Implement x86 SIMD framework
Add NASM support and stub routine for detecting SIMD extensions.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@15 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..85dcd84
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,32 @@
+noinst_LTLIBRARIES = libjpeg.la
+
+HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
+ jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h
+
+libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
+ jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \
+ jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
+ jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
+ jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c \
+ jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \
+ jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c \
+ jsimd.c
+
+if WITH_SIMD
+
+BUILT_SOURCES = simd/jsimdcfg.inc
+
+EXTRA_DIST = nasm_lt.sh
+
+libjpeg_la_SOURCES += simd/jsimd.h simd/jsimdcfg.inc.h \
+ simd/jsimdext.inc simd/jsimdcpu.asm
+
+endif
+
+.asm.lo:
+ $(LIBTOOL) --mode=compile --tag NASM ./nasm_lt.sh $(NASM) $(NAFLAGS) $< -o $@
+
+simd/jsimdcfg.inc: simd/jsimdcfg.inc.h jpeglib.h jconfig.h jmorecfg.h
+ $(CPP) $< | grep ^[\;%] | sed 's%_cpp_protection_%%' > $@
+
diff --git a/README_TigerVNC.txt b/README_TigerVNC.txt
new file mode 100644
index 0000000..c73070a
--- /dev/null
+++ b/README_TigerVNC.txt
@@ -0,0 +1,5 @@
+This directory includes a copy of the Independent JPEG Group's JPEG
+library (see the README file for more information). Not all the files
+from the original distribution have been included into the TigerVNC
+codebase. To obtain the original library, please see the README file,
+section "ARCHIVE LOCATIONS".
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..9150799
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,99 @@
+# AC_PROG_NASM
+# --------------------------
+# Check that NASM exists and determine flags
+AC_DEFUN([AC_PROG_NASM],[
+
+AC_CHECK_PROGS(NASM, [nasm nasmw])
+test -z "$NASM" && AC_MSG_ERROR([no nasm (Netwide Assembler) found])
+
+AC_MSG_CHECKING([for object file format of host system])
+case "$host_os" in
+ cygwin* | mingw* | pw32* | interix*)
+ objfmt='Win32-COFF'
+ ;;
+ msdosdjgpp* | go32*)
+ objfmt='COFF'
+ ;;
+ os2-emx*) # not tested
+ objfmt='MSOMF' # obj
+ ;;
+ linux*coff* | linux*oldld*)
+ objfmt='COFF' # ???
+ ;;
+ linux*aout*)
+ objfmt='a.out'
+ ;;
+ linux*)
+ objfmt='ELF'
+ ;;
+ freebsd* | netbsd* | openbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ objfmt='BSD-a.out'
+ else
+ objfmt='ELF'
+ fi
+ ;;
+ solaris* | sunos* | sysv* | sco*)
+ objfmt='ELF'
+ ;;
+ darwin* | rhapsody* | nextstep* | openstep* | macos*)
+ objfmt='Mach-O'
+ ;;
+ *)
+ objfmt='ELF ?'
+ ;;
+esac
+
+AC_MSG_RESULT([$objfmt])
+if test "$objfmt" = 'ELF ?'; then
+ objfmt='ELF'
+ AC_MSG_WARN([unexpected host system. assumed that the format is $objfmt.])
+fi
+
+AC_MSG_CHECKING([for object file format specifier (NAFLAGS) ])
+case "$objfmt" in
+ MSOMF) NAFLAGS='-fobj -DOBJ32';;
+ Win32-COFF) NAFLAGS='-fwin32 -DWIN32';;
+ COFF) NAFLAGS='-fcoff -DCOFF';;
+ a.out) NAFLAGS='-faout -DAOUT';;
+ BSD-a.out) NAFLAGS='-faoutb -DAOUT';;
+ ELF) NAFLAGS='-felf -DELF';;
+ RDF) NAFLAGS='-frdf -DRDF';;
+ Mach-O) NAFLAGS='-fmacho -DMACHO';;
+esac
+AC_MSG_RESULT([$NAFLAGS])
+AC_SUBST([NAFLAGS])
+
+AC_MSG_CHECKING([whether the assembler ($NASM $NAFLAGS) works])
+cat > conftest.asm <<EOF
+[%line __oline__ "configure"
+ section .text
+ bits 32
+ global _main,main
+_main:
+main: xor eax,eax
+ ret
+]EOF
+try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
+if AC_TRY_EVAL(try_nasm) && test -s conftest.o; then
+ AC_MSG_RESULT(yes)
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.asm >&AC_FD_CC
+ rm -rf conftest*
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([installation or configuration problem: assembler cannot create object files.])
+fi
+
+AC_MSG_CHECKING([whether the linker accepts assembler output])
+try_nasm='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.o $LIBS 1>&AC_FD_CC'
+if AC_TRY_EVAL(try_nasm) && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ AC_MSG_RESULT(yes)
+else
+ rm -rf conftest*
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([configuration problem: maybe object file format mismatch.])
+fi
+
+])
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index 54e986b..0000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,3655 +0,0 @@
-# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-# 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.
-
-# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
-
-# serial 46 AC_PROG_LIBTOOL
-
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-_LT_AC_PROG_ECHO_BACKSLASH
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE(libtool-lock,
- [ --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
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- 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
- 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_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- 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
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
-esac
-
-_LT_AC_LTCONFIG_HACK
-
-])
-
-# AC_LIBTOOL_HEADER_ASSERT
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
-[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
- [lt_cv_func_assert_works],
- [case $host in
- *-*-solaris*)
- if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
- case `$CC --version 2>/dev/null` in
- [[12]].*) lt_cv_func_assert_works=no ;;
- *) lt_cv_func_assert_works=yes ;;
- esac
- fi
- ;;
- esac])
-
-if test "x$lt_cv_func_assert_works" = xyes; then
- AC_CHECK_HEADERS(assert.h)
-fi
-])# AC_LIBTOOL_HEADER_ASSERT
-
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)
-])# _LT_AC_CHECK_DLFCN
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
-
-# 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]]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*) # Its linker distinguishes data from code symbols
- lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris* | sysv5*)
- symcode='[[BDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[[ABCDGISTW]]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Write the raw and C identifiers.
-lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- pipe_works=no
- rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-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 egrep ' nm_test_var$' "$nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
-
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
- sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
- pipe_works=yes
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
- else
- echo "$progname: failed program was:" >&AC_FD_CC
- cat conftest.$ac_ext >&5
- fi
- rm -f 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
-])
-global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- global_symbol_to_cdecl=
- global_symbol_to_c_name_address=
-else
- global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
- global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
-fi
-if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
-then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-# ---------------------------------
-AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[# Find the correct PATH separator. Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) lt_cv_sys_path_separator=';' ;;
- *) lt_cv_sys_path_separator=':' ;;
- esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
-fi
-])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-
-# _LT_AC_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.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-echo=${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 <<EOF
-$*
-EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test -z "$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 &&
- echo_test_string="`eval $cmd`" &&
- (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.
-
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- 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="$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.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-AC_DIVERT_POP
-])# _LT_AC_PROG_ECHO_BACKSLASH
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[if test "$cross_compiling" = yes; then :
- [$4]
-else
- AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#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
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#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); */
- }
-
- exit (status);
-}]
-EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_unknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[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
- ;;
-
- cygwin* | mingw* | pw32*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- *)
- 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="-dld"],
- [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="-dld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- 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"
- AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- 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_AC_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
- LDFLAGS="$LDFLAGS $link_static_flag"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_AC_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
-])# AC_LIBTOOL_DLOPEN_SELF
-
-AC_DEFUN([_LT_AC_LTCONFIG_HACK],
-[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-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'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-need_locks="$enable_libtool_lock"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-if test x"$host" != x"$build"; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case $host_os in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-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
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
- ;;
- *)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="[$]2"
-
-AC_MSG_CHECKING([for objdir])
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-AC_MSG_RESULT($objdir)
-
-
-AC_ARG_WITH(pic,
-[ --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=default
-
-# We assume here that the value for lt_cv_prog_cc_pic will not be cached
-# in isolation, and that seeing it set (from the cache) indicates that
-# the associated values are set (in the cache) correctly too.
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-AC_CACHE_VAL(lt_cv_prog_cc_pic,
-[ lt_cv_prog_cc_pic=
- lt_cv_prog_cc_shlib=
- lt_cv_prog_cc_wl=
- lt_cv_prog_cc_static=
- lt_cv_prog_cc_no_builtin=
- lt_cv_prog_cc_can_build_shared=$can_build_shared
-
- if test "$GCC" = yes; then
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-static'
-
- case $host_os in
- aix*)
- # Below there is a dirty hack to force normal static linking with -ldl
- # The problem is because libdl dynamically linked with both libc and
- # libC (AIX C++ library), which obviously doesn't included in libraries
- # list by gcc. This cause undefined symbols with -static flags.
- # This hack allows C programs to be linked with "-static -ldl", but
- # not sure about C++ programs.
- lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
- ;;
- amigaos*)
- # 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_cv_prog_cc_pic='-fno-common'
- ;;
- cygwin* | mingw* | pw32* | os2*)
- # 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_cv_prog_cc_pic='-DDLL_EXPORT'
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_cv_prog_cc_pic=-Kconform_pic
- fi
- ;;
- *)
- lt_cv_prog_cc_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for PIC flags for the system compiler.
- case $host_os in
- aix3* | aix4* | aix5*)
- lt_cv_prog_cc_wl='-Wl,'
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_cv_prog_cc_static='-Bstatic'
- else
- lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- hpux9* | hpux10* | hpux11*)
- # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
- lt_cv_prog_cc_pic='+Z'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
- # PIC (with -KPIC) is the default.
- ;;
-
- cygwin* | mingw* | pw32* | os2*)
- # 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_cv_prog_cc_pic='-DDLL_EXPORT'
- ;;
-
- newsos6)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- ;;
-
- osf3* | osf4* | osf5*)
- # All OSF/1 code is PIC.
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
- ;;
-
- sco3.2v5*)
- lt_cv_prog_cc_pic='-Kpic'
- lt_cv_prog_cc_static='-dn'
- lt_cv_prog_cc_shlib='-belf'
- ;;
-
- solaris*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
- ;;
-
- sunos4*)
- lt_cv_prog_cc_pic='-PIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Qoption ld '
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
- ;;
-
- uts4*)
- lt_cv_prog_cc_pic='-pic'
- lt_cv_prog_cc_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_cv_prog_cc_pic='-Kconform_pic'
- lt_cv_prog_cc_static='-Bstatic'
- fi
- ;;
-
- *)
- lt_cv_prog_cc_can_build_shared=no
- ;;
- esac
- fi
-])
-if test -z "$lt_cv_prog_cc_pic"; then
- AC_MSG_RESULT([none])
-else
- AC_MSG_RESULT([$lt_cv_prog_cc_pic])
-
- # Check to make sure the pic_flag actually works.
- AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
- AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
- AC_TRY_COMPILE([], [], [dnl
- case $host_os in
- hpux9* | hpux10* | hpux11*)
- # On HP-UX, both CC and GCC only warn that PIC is supported... then
- # they create non-PIC objects. So, if there were any warnings, we
- # assume that PIC is not supported.
- if test -s conftest.err; then
- lt_cv_prog_cc_pic_works=no
- else
- lt_cv_prog_cc_pic_works=yes
- fi
- ;;
- *)
- lt_cv_prog_cc_pic_works=yes
- ;;
- esac
- ], [dnl
- lt_cv_prog_cc_pic_works=no
- ])
- CFLAGS="$save_CFLAGS"
- ])
-
- if test "X$lt_cv_prog_cc_pic_works" = Xno; then
- lt_cv_prog_cc_pic=
- lt_cv_prog_cc_can_build_shared=no
- else
- lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
- fi
-
- AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
-fi
-
-# Check for any special shared library compilation flags.
-if test -n "$lt_cv_prog_cc_shlib"; then
- AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
- if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
- else
- AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
- lt_cv_prog_cc_can_build_shared=no
- fi
-fi
-
-AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
-AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
- lt_cv_prog_cc_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
- AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
- LDFLAGS="$save_LDFLAGS"
-])
-
-# Belt *and* braces to stop my trousers falling down:
-test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
-AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
-
-pic_flag="$lt_cv_prog_cc_pic"
-special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
-wl="$lt_cv_prog_cc_wl"
-link_static_flag="$lt_cv_prog_cc_static"
-no_builtin_flag="$lt_cv_prog_cc_no_builtin"
-can_build_shared="$lt_cv_prog_cc_can_build_shared"
-
-
-# Check to see if options -o and -c are simultaneously supported by compiler
-AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
-AC_CACHE_VAL([lt_cv_compiler_c_o], [
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-echo "int some_variable = 0;" > conftest.$ac_ext
-mkdir out
-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-# that will create temporary files in the current directory regardless of
-# the output directory. Thus, making CWD read-only will cause this test
-# to fail, enabling locking or at least warning the user not to do parallel
-# builds.
-chmod -w .
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
-compiler_c_o=no
-if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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
- if test -s out/conftest.err; then
- lt_cv_compiler_c_o=no
- else
- lt_cv_compiler_c_o=yes
- fi
-else
- # Append any errors to the config.log.
- cat out/conftest.err 1>&AC_FD_CC
- lt_cv_compiler_c_o=no
-fi
-CFLAGS="$save_CFLAGS"
-chmod u+w .
-$rm conftest* out/*
-rmdir out
-cd ..
-rmdir conftest
-$rm -r conftest 2>/dev/null
-])
-compiler_c_o=$lt_cv_compiler_c_o
-AC_MSG_RESULT([$compiler_c_o])
-
-if test x"$compiler_c_o" = x"yes"; then
- # Check to see if we can write to a .lo
- AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
- AC_CACHE_VAL([lt_cv_compiler_o_lo], [
- lt_cv_compiler_o_lo=no
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -c -o conftest.lo"
- save_objext="$ac_objext"
- ac_objext=lo
- AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- lt_cv_compiler_o_lo=no
- else
- lt_cv_compiler_o_lo=yes
- fi
- ])
- ac_objext="$save_objext"
- CFLAGS="$save_CFLAGS"
- ])
- compiler_o_lo=$lt_cv_compiler_o_lo
- AC_MSG_RESULT([$compiler_o_lo])
-else
- compiler_o_lo=no
-fi
-
-# Check to see if we can do hard links to lock some files if needed
-hard_links="nottested"
-if test "$compiler_c_o" = 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
-
-if test "$GCC" = yes; then
- # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
- AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
- echo "int some_variable = 0;" > conftest.$ac_ext
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
- compiler_rtti_exceptions=no
- AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- compiler_rtti_exceptions=no
- else
- compiler_rtti_exceptions=yes
- fi
- ])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$compiler_rtti_exceptions])
-
- if test "$compiler_rtti_exceptions" = "yes"; then
- no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
- else
- no_builtin_flag=' -fno-builtin'
- fi
-fi
-
-# See if the linker supports building shared libraries.
-AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
-
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-old_archive_from_expsyms_cmds=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_into_libs=no
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-link_all_deplibs=unknown
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# 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 egrep regular expression 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_"
-# 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.
-extract_expsyms_cmds=
-
-case $host_os in
-cygwin* | mingw* | pw32*)
- # 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
- ;;
-openbsd*)
- with_gnu_ld=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}'
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX, the GNU linker is very broken
- # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
- ld_shlibs=no
- cat <<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.
-
-EOF
- ;;
-
- amigaos*)
- 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
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can use
- # them.
- ld_shlibs=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> 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*)
- # 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=yes
-
- extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
- sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
- test -f $output_objdir/impgen.exe || (cd $output_objdir && \
- if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
- else $CC -o impgen impgen.c ; fi)~
- $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
- old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
- # cygwin and mingw dlls have different entry points and sets of symbols
- # to exclude.
- # FIXME: what about values for MSVC?
- dll_entry=__cygwin_dll_entry@12
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
- case $host_os in
- mingw*)
- # mingw values
- dll_entry=_DllMainCRTStartup@12
- dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
- ;;
- esac
-
- # mingw and cygwin differ, and it's simplest to just exclude the union
- # of the two symbol sets.
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one (in ltdll.c)
- if test "x$lt_cv_need_dllmain" = "xyes"; then
- ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
- ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
- test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
- else
- ltdll_obj=
- ltdll_cmds=
- fi
-
- # Extract the symbol export list from an `--export-all' def file,
- # then regenerate the def file from the symbol export list, so that
- # the compiled dll only exports the symbol export list.
- # Be careful not to strip the DATA tag left be newer dlltools.
- export_symbols_cmds="$ltdll_cmds"'
- $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
- sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is.
- # If DATA tags from a recent dlltool are present, honour them!
- 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;
- _lt_hint=1;
- cat $export_symbols | while read symbol; do
- set dummy \$symbol;
- case \[$]# in
- 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
- 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
- *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
- esac;
- _lt_hint=`expr 1 + \$_lt_hint`;
- done;
- fi~
- '"$ltdll_cmds"'
- $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
- $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
- ;;
-
- netbsd*)
- 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<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.
-
-EOF
- elif $LD --help 2>&1 | egrep ': 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
- ;;
-
- 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 | egrep ': 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" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- case $host_os in
- cygwin* | mingw* | pw32*)
- # dlltool doesn't understand --whole-archive et. al.
- whole_archive_flag_spec=
- ;;
- *)
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- ;;
- esac
- 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 "$link_static_flag"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- 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]].*|aix5*)
- 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.
-
- hardcode_direct=yes
- archive_cmds=''
- hardcode_libdir_separator=':'
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- hardcode_direct=yes
- 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'
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- shared_flag='${wl}-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall can do strange things, 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'
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
- else
- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='${wl}-berok'
- # This is a bit strange, but is similar to how AIX traditionally builds
- # it's shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- 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
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
-
- cygwin* | mingw* | pw32*)
- # 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
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -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"`'
- ;;
-
- darwin* | rhapsody*)
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- allow_undefined_flag='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
- ;;
- esac
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes. Also zsh mangles
- # `"' quotes if we put them in here... so don't!
- archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
- # We need to add '_' to the symbols in $export_symbols first
- #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- whole_archive_flag_spec='-all_load $convenience'
- ;;
-
- 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*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9* | hpux10* | hpux11*)
- case $host_os in
- hpux9*) 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' ;;
- *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
- esac
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- link_all_deplibs=yes
- ;;
-
- netbsd*)
- 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
- ;;
-
- openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- 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'
- 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
- ;;
-
- 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- 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 ${wl}-set_version ${wl}$verstring` ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
-
- #Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- ;;
-
- sco3.2v5*)
- 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
- export_dynamic_flag_spec='${wl}-Bexport'
- ;;
-
- solaris*)
- # gcc --version < 3.0 without binutils cannot create self contained
- # shared libraries reliably, requiring libgcc.a to resolve some of
- # the object symbols generated in some cases. Libraries that use
- # assert need libgcc.a to resolve __eprintf, for example. Linking
- # a copy of libgcc.a into every shared library to guarantee resolving
- # such symbols causes other problems: According to Tim Van Holder
- # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
- # (to the application) exception stack for one thing.
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- [[12]].*)
- cat <<EOF 1>&2
-
-*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
-*** create self contained shared libraries on Solaris systems, without
-*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
-*** -no-undefined support, which will at least allow you to build shared
-*** libraries. However, you may find that when you link such libraries
-*** into an application without using GCC, you have to manually add
-*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
-*** upgrade to a newer version of GCC. Another option is to rebuild your
-*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
-
-EOF
- no_undefined_flag=
- ;;
- esac
- fi
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- 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'
- ;;
-
- sysv5*)
- no_undefined_flag=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec=
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- 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.2uw2*)
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=no
- hardcode_shlibpath_var=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
-
- sysv5uw7* | unixware7*)
- no_undefined_flag='${wl}-z ${wl}text'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-fi
-AC_MSG_RESULT([$ld_shlibs])
-test "$ld_shlibs" = no && can_build_shared=no
-
-# Check hardcoding attributes.
-AC_MSG_CHECKING([how to hardcode library paths into programs])
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
- test -n "$runpath_var"; then
-
- # We can hardcode non-existant 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 "$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
-AC_MSG_RESULT([$hardcode_action])
-
-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
- AC_MSG_RESULT([no])
-fi
-
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-# PORTME Fill in your ld.so characteristics
-AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-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"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}.so$major'
- ;;
-
-aix4* | aix5*)
- 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}.so$major ${libname}${release}.so$versuffix $libname.so'
- 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<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- 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}.so$major'
- fi
- shlibpath_var=LIBPATH
- fi
- hardcode_into_libs=yes
- ;;
-
-amigaos*)
- 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'
- ;;
-
-beos*)
- library_names_spec='${libname}.so'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi4*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$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"
- export_dynamic_flag_spec=-rdynamic
- # 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*)
- version_type=windows
- need_version=no
- need_lib_prefix=no
- case $GCC,$host_os in
- yes,cygwin*)
- library_names_spec='$libname.dll.a'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
- postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog .libs/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $rm \$dlpath'
- ;;
- yes,mingw*)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
- ;;
- yes,pw32*)
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
- ;;
- *)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $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
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes.
- library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
- soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd*)
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- *)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
- soname_spec='${libname}${release}.so$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.
- dynamic_linker="$host_os dld.sl"
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
- soname_spec='${libname}${release}.sl$major'
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *) version_type=irix ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 ") 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}"
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # 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
-
- # 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'
-
- # Find out which ABI we are using (multilib Linux x86_64 hack).
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*)
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- *)
- ;;
- esac
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
-
-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}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
- soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-openbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- 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
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-os2*)
- libname_spec='$name'
- need_lib_prefix=no
- library_names_spec='$libname.dll $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_version=no
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- 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"
- hardcode_into_libs=yes
- ;;
-
-sco3.2v5*)
- version_type=osf
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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.2uw2* | sysv4.3* | sysv5*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- 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
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
- soname_spec='$libname.so.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-# Report the final consequences.
-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
- ;;
-
-aix4*)
- 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])
-
-if test "$hardcode_action" = relink; 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
-
-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
-
-AC_LIBTOOL_DLOPEN_SELF
-
-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.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
- [$rm conftest*
- echo 'static int dummy;' > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile); then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_cv_prog_cc_wl
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
- then
- lt_cv_archive_cmds_need_lc=no
- else
- lt_cv_archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $rm conftest*])
- AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
- ;;
- esac
-fi
-need_lc=${lt_cv_archive_cmds_need_lc-yes}
-
-# The second clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- :
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- test -f Makefile && make "$ltmain"
-fi
-
-if test -f "$ltmain"; then
- trap "$rm \"${ofile}T\"; exit 1" 1 2 15
- $rm -f "${ofile}T"
-
- echo creating $ofile
-
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS SED \
- AR AR_FLAGS CC LD LN_S NM SHELL \
- reload_flag reload_cmds wl \
- pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
- thread_safe_flag_spec whole_archive_flag_spec libname_spec \
- library_names_spec soname_spec \
- RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
- old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
- postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
- old_striplib striplib file_magic_cmd export_symbols_cmds \
- deplibs_check_method allow_undefined_flag no_undefined_flag \
- finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
- global_symbol_to_c_name_address \
- hardcode_libdir_flag_spec hardcode_libdir_separator \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
-
- case $var in
- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
- extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- cat <<__EOF__ > "${ofile}T"
-#! $SHELL
-
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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.
-
-# A sed that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="${SED} -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$need_lc
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# The default C compiler.
-CC=$lt_CC
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_wl
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_pic_flag
-pic_mode=$pic_mode
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_compiler_c_o
-
-# Can we write directly to a .lo ?
-compiler_o_lo=$lt_compiler_o_lo
-
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
-
-# 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
-
-# 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
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_link_static_flag
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_no_builtin_flag
-
-# 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
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
-
-# Library versioning type.
-version_type=$version_type
-
-# 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
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# 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 and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# 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
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# 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
-
-# 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.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# 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
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# 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
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$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
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_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
-
-# ### END LIBTOOL CONFIG
-
-__EOF__
-
- case $host_os in
- aix3*)
- cat <<\EOF >> "${ofile}T"
-
-# 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
-EOF
- ;;
- esac
-
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- cat <<'EOF' >> "${ofile}T"
- # This is a source program that is used to create dlls on Windows
- # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
- # This is a source program that is used to create import libraries
- # on Windows for dlls which lack them. Don't remove nor modify the
- # starting and closing comments
-# /* impgen.c starts here */
-# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
-#
-# This file is part of GNU libtool.
-#
-# 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.
-# */
-#
-# #include <stdio.h> /* for printf() */
-# #include <unistd.h> /* for open(), lseek(), read() */
-# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
-# #include <string.h> /* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[2];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 2);
-# return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[4];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 4);
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-# void *ptr;
-# {
-# unsigned char *b = ptr;
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-# int argc;
-# char *argv[];
-# {
-# int dll;
-# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-# unsigned long export_rva, export_size, nsections, secptr, expptr;
-# unsigned long name_rvas, nexp;
-# unsigned char *expdata, *erva;
-# char *filename, *dll_name;
-#
-# filename = argv[1];
-#
-# dll = open(filename, O_RDONLY|O_BINARY);
-# if (dll < 1)
-# return 1;
-#
-# dll_name = filename;
-#
-# for (i=0; filename[i]; i++)
-# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
-# dll_name = filename + i +1;
-#
-# pe_header_offset = pe_get32 (dll, 0x3c);
-# opthdr_ofs = pe_header_offset + 4 + 20;
-# num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-# if (num_entries < 1) /* no exports */
-# return 1;
-#
-# export_rva = pe_get32 (dll, opthdr_ofs + 96);
-# export_size = pe_get32 (dll, opthdr_ofs + 100);
-# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-# secptr = (pe_header_offset + 4 + 20 +
-# pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-# expptr = 0;
-# for (i = 0; i < nsections; i++)
-# {
-# char sname[8];
-# unsigned long secptr1 = secptr + 40 * i;
-# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# lseek(dll, secptr1, SEEK_SET);
-# read(dll, sname, 8);
-# if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# {
-# expptr = fptr + (export_rva - vaddr);
-# if (export_rva + export_size > vaddr + vsize)
-# export_size = vsize - (export_rva - vaddr);
-# break;
-# }
-# }
-#
-# expdata = (unsigned char*)malloc(export_size);
-# lseek (dll, expptr, SEEK_SET);
-# read (dll, expdata, export_size);
-# erva = expdata - export_rva;
-#
-# nexp = pe_as32 (expdata+24);
-# name_rvas = pe_as32 (expdata+32);
-#
-# printf ("EXPORTS\n");
-# for (i = 0; i<nexp; i++)
-# {
-# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-# }
-#
-# return 0;
-# }
-# /* impgen.c ends here */
-
-EOF
- ;;
- esac
-
- # 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 '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
-
- mv -f "${ofile}T" "$ofile" || \
- (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
- chmod +x "$ofile"
-fi
-
-])# _LT_AC_LTCONFIG_HACK
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[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_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-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="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- 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 <<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
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_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
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])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 GCC])
- 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.
- [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the path 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
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- 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 GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-# AC_PROG_LD_GNU -
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
-lt_cv_deplibs_check_method,
-[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 egrep 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
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- 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* | mingw* | pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd*)
- 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)/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_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- irix5* | nonstopux*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
- 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
- ;;
-
-openbsd*)
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
- else
- lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[[78]]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- 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
- ;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
-AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}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
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - 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 LIBLTDL and LTDLINCL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# 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_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- 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='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - 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 LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed 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_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- LTDLINCL=
- fi
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])
-
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-
-# 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. #
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-AC_DEFUN([LT_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_executable_p="test -f"
-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
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-
- # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=$TMPDIR/sed$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- { (exit 1); exit 1; }
-}
- _max=0
- _count=0
- # Add /usr/xpg4/bin/sed as it is typically found on Solaris
- # along with /bin/sed that truncates output.
- for _sed in $_sed_list /usr/xpg4/bin/sed; do
- test ! -f ${_sed} && break
- cat /dev/null > "$tmp/sed.in"
- _count=0
- echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
- # Check for GNU sed and select it if it is found.
- if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
- lt_cv_path_SED=${_sed}
- break
- fi
- while true; do
- cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
- mv "$tmp/sed.tmp" "$tmp/sed.in"
- cp "$tmp/sed.in" "$tmp/sed.nl"
- echo >>"$tmp/sed.nl"
- ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
- cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
- # 40000 chars as input seems more than enough
- test $_count -gt 10 && break
- _count=`expr $_count + 1`
- if test $_count -gt $_max; then
- _max=$_count
- lt_cv_path_SED=$_sed
- fi
- done
- done
- rm -rf "$tmp"
-])
-if test "X$SED" != "X"; then
- lt_cv_path_SED=$SED
-else
- SED=$lt_cv_path_SED
-fi
-AC_MSG_RESULT([$SED])
-])
-
diff --git a/altui/README.alt b/altui/README.alt
deleted file mode 100644
index e0f31db..0000000
--- a/altui/README.alt
+++ /dev/null
@@ -1,71 +0,0 @@
-Here is an alternate command-line user interface for the IJG JPEG software.
-It is designed for use under MS-DOS, and may also be useful on other non-Unix
-operating systems. (For that matter, this code works fine on Unix, but the
-standard command-line syntax is better on Unix because it is pipe-friendly.)
-
-With this user interface, cjpeg and djpeg accept multiple input file names
-on the command line; output file names are generated by substituting
-appropriate extensions. The user is prompted before any already-existing
-file will be overwritten. See usage.alt for details.
-
-Expansion of wild-card file specifications is useful but is not directly
-provided by this code. Most DOS C compilers have the ability to do wild-card
-expansion "behind the scenes", and we rely on that feature. On other systems,
-the shell may do it for you, as is done on Unix.
-
-Also, a DOS-specific routine is provided to determine available memory;
-this makes the -maxmemory switch unnecessary except in unusual cases.
-If you know how to determine available memory on a different system,
-you can easily add the necessary code. (And please send it along to
-jpeg-info@uunet.uu.net so we can include it in future releases!)
-
-
-INSTALLATION
-============
-
-You need to have the main IJG JPEG distribution, release 6 or later.
-Replace the standard cjpeg.c and djpeg.c files with the ones provided here.
-Then build the software as described in the main distribution's install.doc
-file, with these exceptions:
-
-* Define PROGRESS_REPORT in jconfig.h if you want the percent-done display.
-* Define NO_OVERWRITE_CHECK if you *don't* want overwrite confirmation.
-* You may ignore the USE_SETMODE and TWO_FILE_COMMANDLINE symbols discussed
- in install.doc; these files do not use them.
-* As given, djpeg.c defaults to GIF output (not PPM output as in the standard
- djpeg.c). If you want something different, modify DEFAULT_FMT.
-
-You may also need to do something special to enable filename wild-card
-expansion, assuming your compiler has that capability at all.
-
-Modify the standard usage.doc file as described in usage.alt. (If you want
-to use the Unix-style manual pages cjpeg.1 and djpeg.1, better fix them too.)
-
-
-Here are some specific notes for popular MS-DOS compilers:
-
-Borland C:
- Add "-DMSDOS" to CFLAGS to enable use of the DOS memory determination code.
- Link with the standard library file WILDARGS.OBJ to get wild-card expansion.
-
-Microsoft C:
- Add "-DMSDOS" to CFLAGS to enable use of the DOS memory determination code.
- Link with the standard library file SETARGV.OBJ to get wild-card expansion.
- In the versions I've used, you must also add /NOE to the linker switches to
- avoid a duplicate-symbol error from including SETARGV.
-
-DJGPP (we recommend version 2.0 or later):
- Add "-DFREE_MEM_ESTIMATE=0" to CFLAGS. Wild-card expansion is automatic.
-
-
-LEGAL ISSUES
-============
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-Terms of distribution and use are the same as for the free IJG JPEG software;
-see its README file for details.
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose. This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
diff --git a/altui/cjpeg.c b/altui/cjpeg.c
deleted file mode 100644
index df1a4f8..0000000
--- a/altui/cjpeg.c
+++ /dev/null
@@ -1,813 +0,0 @@
-/*
- * alternate cjpeg.c
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 6, 2006
- * ---------------------------------------------------------------------
- *
- * This file contains an alternate user interface for the JPEG compressor.
- * One or more input files are named on the command line, and output file
- * names are created by substituting ".jpg" for the input file's extension.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-#include "jversion.h" /* for version message */
-
-#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h> /* Metrowerks needs this */
-#include <console.h> /* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h> /* Think declares it here */
-#endif
-#endif
-
-#ifndef PATH_MAX /* ANSI maximum-pathname-length constant */
-#define PATH_MAX 256
-#endif
-
-
-/* Create the add-on message string table. */
-
-#define JMESSAGE(code,string) string ,
-
-static const char * const cdjpeg_message_table[] = {
-#include "cderror.h"
- NULL
-};
-
-
-/*
- * SIMD Ext: compiler-specific hacks to enable filename wild-card expansion
- */
-
-#ifdef _MSC_VER /* Microsoft Visual C++ */
-/* from setargv.c (setargv.obj) */
-/* Tested under Visual C++ V6.0, Toolkit 2003, and 2005 Express Edition */
-int __cdecl _setargv(void) { int __cdecl __setargv(void); return __setargv(); }
-#endif
-#ifdef __BORLANDC__ /* Borland C++ */
-/* from wildargs.c (wildargs.obj) */
-/* Tested under Borland C++ Compiler 5.5 (win32) */
-#include <wildargs.h>
-typedef void _RTLENTRY (* _RTLENTRY _argv_expand_fnc)(char *, _PFN_ADDARG);
-_argv_expand_fnc _argv_expand_ptr = _expand_wild;
-#endif
-
-
-/*
- * Automatic determination of available memory.
- */
-
-static long default_maxmem; /* saves value determined at startup, or 0 */
-
-#ifndef FREE_MEM_ESTIMATE /* may be defined from command line */
-
-#ifdef MSDOS /* For MS-DOS (unless flat-memory model) */
-
-#include <dos.h> /* for access to intdos() call */
-
-LOCAL(long)
-unused_dos_memory (void)
-/* Obtain total amount of unallocated DOS memory */
-{
- union REGS regs;
- long nparas;
-
- regs.h.ah = 0x48; /* DOS function Allocate Memory Block */
- regs.x.bx = 0xFFFF; /* Ask for more memory than DOS can have */
- (void) intdos(®s, ®s);
- /* DOS will fail and return # of paragraphs actually available in BX. */
- nparas = (unsigned int) regs.x.bx;
- /* Times 16 to convert to bytes. */
- return nparas << 4;
-}
-
-/* The default memory setting is 95% of the available space. */
-#define FREE_MEM_ESTIMATE ((unused_dos_memory() * 95L) / 100L)
-
-#endif /* MSDOS */
-
-#ifdef ATARI /* For Atari ST/STE/TT, Pure C or Turbo C */
-
-#include <ext.h>
-
-/* The default memory setting is 90% of the available space. */
-#define FREE_MEM_ESTIMATE (((long) coreleft() * 90L) / 100L)
-
-#endif /* ATARI */
-
-/* Add memory-estimation procedures for other operating systems here,
- * with appropriate #ifdef's around them.
- */
-
-#endif /* !FREE_MEM_ESTIMATE */
-
-
-/*
- * This routine determines what format the input file is,
- * and selects the appropriate input-reading module.
- *
- * To determine which family of input formats the file belongs to,
- * we may look only at the first byte of the file, since C does not
- * guarantee that more than one character can be pushed back with ungetc.
- * Looking at additional bytes would require one of these approaches:
- * 1) assume we can fseek() the input file (fails for piped input);
- * 2) assume we can push back more than one character (works in
- * some C implementations, but unportable);
- * 3) provide our own buffering (breaks input readers that want to use
- * stdio directly, such as the RLE library);
- * or 4) don't put back the data, and modify the input_init methods to assume
- * they start reading after the start of file (also breaks RLE library).
- * #1 is attractive for MS-DOS but is untenable on Unix.
- *
- * The most portable solution for file types that can't be identified by their
- * first byte is to make the user tell us what they are. This is also the
- * only approach for "raw" file types that contain only arbitrary values.
- * We presently apply this method for Targa files. Most of the time Targa
- * files start with 0x00, so we recognize that case. Potentially, however,
- * a Targa file could start with any byte value (byte 0 is the length of the
- * seldom-used ID field), so we provide a switch to force Targa input mode.
- */
-
-static boolean is_targa; /* records user -targa switch */
-
-
-LOCAL(cjpeg_source_ptr)
-select_file_type (j_compress_ptr cinfo, FILE * infile)
-{
- int c;
-
- if (is_targa) {
-#ifdef TARGA_SUPPORTED
- return jinit_read_targa(cinfo);
-#else
- ERREXIT(cinfo, JERR_TGA_NOTCOMP);
-#endif
- }
-
- if ((c = getc(infile)) == EOF)
- ERREXIT(cinfo, JERR_INPUT_EMPTY);
- if (ungetc(c, infile) == EOF)
- ERREXIT(cinfo, JERR_UNGETC_FAILED);
-
- switch (c) {
-#ifdef BMP_SUPPORTED
- case 'B':
- return jinit_read_bmp(cinfo);
-#endif
-#ifdef GIF_SUPPORTED
- case 'G':
- return jinit_read_gif(cinfo);
-#endif
-#ifdef PPM_SUPPORTED
- case 'P':
- return jinit_read_ppm(cinfo);
-#endif
-#ifdef RLE_SUPPORTED
- case 'R':
- return jinit_read_rle(cinfo);
-#endif
-#ifdef TARGA_SUPPORTED
- case 0x00:
- return jinit_read_targa(cinfo);
-#endif
- default:
- ERREXIT(cinfo, JERR_UNKNOWN_FORMAT);
- break;
- }
-
- return NULL; /* suppress compiler warnings */
-}
-
-
-/*
- * Argument-parsing code.
- * The switch parser is designed to be useful with DOS-style command line
- * syntax, ie, intermixed switches and file names, where only the switches
- * to the left of a given file name affect processing of that file.
- */
-
-
-static const char * progname; /* program name for error messages */
-static char * outfilename; /* for -outfile switch */
-
-
-LOCAL(void)
-usage (void)
-/* complain about bad command line */
-{
- fprintf(stderr, "usage: %s [switches] inputfile(s)\n", progname);
- fprintf(stderr, "List of input files may use wildcards (* and ?)\n");
- fprintf(stderr, "Output filename is same as input filename, but extension .jpg\n");
-
- fprintf(stderr, "Switches (names may be abbreviated):\n");
- fprintf(stderr, " -quality N Compression quality (0..100; 5-95 is useful range)\n");
- fprintf(stderr, " -grayscale Create monochrome JPEG file\n");
-#ifdef ENTROPY_OPT_SUPPORTED
- fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
-#endif
-#ifdef C_PROGRESSIVE_SUPPORTED
- fprintf(stderr, " -progressive Create progressive JPEG file\n");
-#endif
-#ifdef TARGA_SUPPORTED
- fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n");
-#endif
- fprintf(stderr, "Switches for advanced users:\n");
-#ifdef DCT_ISLOW_SUPPORTED
- fprintf(stderr, " -dct int Use integer DCT method%s\n",
- (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
- (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
- (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
-#endif
- fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n");
-#ifdef INPUT_SMOOTHING_SUPPORTED
- fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n");
-#endif
-#ifndef FREE_MEM_ESTIMATE
- fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
-#endif
- fprintf(stderr, " -outfile name Specify name for output file\n");
- fprintf(stderr, " -verbose or -debug Emit debug output\n");
- fprintf(stderr, "Switches for wizards:\n");
-#ifdef C_ARITH_CODING_SUPPORTED
- fprintf(stderr, " -arithmetic Use arithmetic coding\n");
-#endif
- fprintf(stderr, " -baseline Force baseline quantization tables\n");
- fprintf(stderr, " -qtables file Use quantization tables given in file\n");
- fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
- fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n");
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
-#endif
- exit(EXIT_FAILURE);
-}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-LOCAL(void)
-print_simd_info (FILE * file, char * labelstr, unsigned int simd)
-{
- fprintf(file, "%s%s%s%s%s%s\n", labelstr,
- simd & JSIMD_MMX ? " MMX" : "",
- simd & JSIMD_3DNOW ? " 3DNow!" : "",
- simd & JSIMD_SSE ? " SSE" : "",
- simd & JSIMD_SSE2 ? " SSE2" : "",
- simd == JSIMD_NONE ? " NONE" : "");
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
-
-
-LOCAL(int)
-parse_switches (j_compress_ptr cinfo, int argc, char **argv,
- int last_file_arg_seen, boolean for_real)
-/* Parse optional switches.
- * Returns argv[] index of first file-name argument (== argc if none).
- * Any file names with indexes <= last_file_arg_seen are ignored;
- * they have presumably been processed in a previous iteration.
- * (Pass 0 for last_file_arg_seen on the first or only iteration.)
- * for_real is FALSE on the first (dummy) pass; we may skip any expensive
- * processing.
- */
-{
- int argn;
- char * arg;
- int quality; /* -quality parameter */
- int q_scale_factor; /* scaling percentage for -qtables */
- boolean force_baseline;
- boolean simple_progressive;
- char * qtablefile = NULL; /* saves -qtables filename if any */
- char * qslotsarg = NULL; /* saves -qslots parm if any */
- char * samplearg = NULL; /* saves -sample parm if any */
- char * scansarg = NULL; /* saves -scans parm if any */
-
- /* Set up default JPEG parameters. */
- /* Note that default -quality level need not, and does not,
- * match the default scaling for an explicit -qtables argument.
- */
- quality = 75; /* default -quality value */
- q_scale_factor = 100; /* default to no scaling for -qtables */
- force_baseline = FALSE; /* by default, allow 16-bit quantizers */
- simple_progressive = FALSE;
- is_targa = FALSE;
- outfilename = NULL;
- cinfo->err->trace_level = 0;
- if (default_maxmem > 0) /* override library's default value */
- cinfo->mem->max_memory_to_use = default_maxmem;
-
- /* Scan command line options, adjust parameters */
-
- for (argn = 1; argn < argc; argn++) {
- arg = argv[argn];
- if (*arg != '-') {
- /* Not a switch, must be a file name argument */
- if (argn <= last_file_arg_seen) {
- outfilename = NULL; /* -outfile applies to just one input file */
- continue; /* ignore this name if previously processed */
- }
- break; /* else done parsing switches */
- }
- arg++; /* advance past switch marker character */
-
- if (keymatch(arg, "arithmetic", 1)) {
- /* Use arithmetic coding. */
-#ifdef C_ARITH_CODING_SUPPORTED
- cinfo->arith_code = TRUE;
-#else
- fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "baseline", 1)) {
- /* Force baseline-compatible output (8-bit quantizer values). */
- force_baseline = TRUE;
-
-#ifndef JSIMD_MASKFUNC_NOT_SUPPORTED
- } else if (keymatch(arg, "nosimd" , 4)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_ALL);
- } else if (keymatch(arg, "nommx" , 3)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_MMX);
- } else if (keymatch(arg, "no3dnow", 3)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_3DNOW);
- } else if (keymatch(arg, "nosse" , 4)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_SSE);
- } else if (keymatch(arg, "nosse2" , 6)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_SSE2);
-#endif /* !JSIMD_MASKFUNC_NOT_SUPPORTED */
-
- } else if (keymatch(arg, "dct", 2)) {
- /* Select DCT algorithm. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "int", 1)) {
- cinfo->dct_method = JDCT_ISLOW;
- } else if (keymatch(argv[argn], "fast", 2)) {
- cinfo->dct_method = JDCT_IFAST;
- } else if (keymatch(argv[argn], "float", 2)) {
- cinfo->dct_method = JDCT_FLOAT;
- } else
- usage();
-
- } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
- /* Enable debug printouts. */
- /* On first -d, print version identification */
- static boolean printed_version = FALSE;
-
- if (! printed_version) {
- fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n",
- JVERSION, JCOPYRIGHT);
- fprintf(stderr,
- "\nx86 SIMD extension for IJG JPEG library, version %s\n\n",
- JPEG_SIMDEXT_VER_STR);
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
- print_simd_info(stderr, "SIMD instructions supported by the system :",
- jpeg_simd_support(NULL));
-
- fprintf(stderr, "\n === SIMD Operation Modes ===\n");
-#ifdef DCT_ISLOW_SUPPORTED
- print_simd_info(stderr, "Accurate integer DCT (-dct int) :",
- jpeg_simd_forward_dct(cinfo, JDCT_ISLOW));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- print_simd_info(stderr, "Fast integer DCT (-dct fast) :",
- jpeg_simd_forward_dct(cinfo, JDCT_IFAST));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- print_simd_info(stderr, "Floating-point DCT (-dct float) :",
- jpeg_simd_forward_dct(cinfo, JDCT_FLOAT));
-#endif
- print_simd_info(stderr, "Downsampling (-sample 2x2 or 2x1) :",
- jpeg_simd_downsampler(cinfo));
- print_simd_info(stderr, "Colorspace conversion (RGB->YCbCr) :",
- jpeg_simd_color_converter(cinfo));
- fprintf(stderr, "\n");
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
- printed_version = TRUE;
- }
- cinfo->err->trace_level++;
-
- } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
- /* Force a monochrome JPEG file to be generated. */
- jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
-
- } else if (keymatch(arg, "maxmemory", 3)) {
- /* Maximum memory in Kb (or Mb with 'm'). */
- long lval;
- char ch = 'x';
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
- usage();
- if (ch == 'm' || ch == 'M')
- lval *= 1000L;
- cinfo->mem->max_memory_to_use = lval * 1000L;
-
- } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
- /* Enable entropy parm optimization. */
-#ifdef ENTROPY_OPT_SUPPORTED
- cinfo->optimize_coding = TRUE;
-#else
- fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "outfile", 4)) {
- /* Set output file name. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- outfilename = argv[argn]; /* save it away for later use */
-
- } else if (keymatch(arg, "progressive", 1)) {
- /* Select simple progressive mode. */
-#ifdef C_PROGRESSIVE_SUPPORTED
- simple_progressive = TRUE;
- /* We must postpone execution until num_components is known. */
-#else
- fprintf(stderr, "%s: sorry, progressive output was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "quality", 1)) {
- /* Quality factor (quantization table scaling factor). */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%d", &quality) != 1)
- usage();
- /* Change scale factor in case -qtables is present. */
- q_scale_factor = jpeg_quality_scaling(quality);
-
- } else if (keymatch(arg, "qslots", 2)) {
- /* Quantization table slot numbers. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- qslotsarg = argv[argn];
- /* Must delay setting qslots until after we have processed any
- * colorspace-determining switches, since jpeg_set_colorspace sets
- * default quant table numbers.
- */
-
- } else if (keymatch(arg, "qtables", 2)) {
- /* Quantization tables fetched from file. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- qtablefile = argv[argn];
- /* We postpone actually reading the file in case -quality comes later. */
-
- } else if (keymatch(arg, "restart", 1)) {
- /* Restart interval in MCU rows (or in MCUs with 'b'). */
- long lval;
- char ch = 'x';
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
- usage();
- if (lval < 0 || lval > 65535L)
- usage();
- if (ch == 'b' || ch == 'B') {
- cinfo->restart_interval = (unsigned int) lval;
- cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
- } else {
- cinfo->restart_in_rows = (int) lval;
- /* restart_interval will be computed during startup */
- }
-
- } else if (keymatch(arg, "sample", 2)) {
- /* Set sampling factors. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- samplearg = argv[argn];
- /* Must delay setting sample factors until after we have processed any
- * colorspace-determining switches, since jpeg_set_colorspace sets
- * default sampling factors.
- */
-
- } else if (keymatch(arg, "scans", 2)) {
- /* Set scan script. */
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- if (++argn >= argc) /* advance to next argument */
- usage();
- scansarg = argv[argn];
- /* We must postpone reading the file in case -progressive appears. */
-#else
- fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "smooth", 2)) {
- /* Set input smoothing factor. */
- int val;
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%d", &val) != 1)
- usage();
- if (val < 0 || val > 100)
- usage();
- cinfo->smoothing_factor = val;
-
- } else if (keymatch(arg, "targa", 1)) {
- /* Input file is Targa format. */
- is_targa = TRUE;
-
- } else {
- usage(); /* bogus switch */
- }
- }
-
- /* Post-switch-scanning cleanup */
-
- if (for_real) {
-
- /* Set quantization tables for selected quality. */
- /* Some or all may be overridden if -qtables is present. */
- jpeg_set_quality(cinfo, quality, force_baseline);
-
- if (qtablefile != NULL) /* process -qtables if it was present */
- if (! read_quant_tables(cinfo, qtablefile,
- q_scale_factor, force_baseline))
- usage();
-
- if (qslotsarg != NULL) /* process -qslots if it was present */
- if (! set_quant_slots(cinfo, qslotsarg))
- usage();
-
- if (samplearg != NULL) /* process -sample if it was present */
- if (! set_sample_factors(cinfo, samplearg))
- usage();
-
-#ifdef C_PROGRESSIVE_SUPPORTED
- if (simple_progressive) /* process -progressive; -scans can override */
- jpeg_simple_progression(cinfo);
-#endif
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- if (scansarg != NULL) /* process -scans if it was present */
- if (! read_scan_script(cinfo, scansarg))
- usage();
-#endif
- }
-
- return argn; /* return index of next arg (file name) */
-}
-
-
-/*
- * Check for overwrite of an existing file; clear it with user
- */
-
-#ifndef NO_OVERWRITE_CHECK
-
-LOCAL(boolean)
-is_write_ok (char * outfname)
-{
- FILE * ofile;
- int ch;
-
- ofile = fopen(outfname, READ_BINARY);
- if (ofile == NULL)
- return TRUE; /* not present */
- fclose(ofile); /* oops, it is present */
-
- for (;;) {
- fprintf(stderr, "%s already exists, overwrite it? [y/n] ",
- outfname);
- fflush(stderr);
- ch = getc(stdin);
- if (ch != '\n') /* flush rest of line */
- while (getc(stdin) != '\n')
- /* nothing */;
-
- switch (ch) {
- case 'Y':
- case 'y':
- return TRUE;
- case 'N':
- case 'n':
- return FALSE;
- /* otherwise, ask again */
- }
- }
-}
-
-#endif
-
-
-/*
- * Process a single input file name, and return its index in argv[].
- * File names at or to left of old_file_index have been processed already.
- */
-
-LOCAL(int)
-process_one_file (int argc, char **argv, int old_file_index)
-{
- struct jpeg_compress_struct cinfo;
- struct jpeg_error_mgr jerr;
- char *infilename;
- char workfilename[PATH_MAX];
-#ifdef PROGRESS_REPORT
- struct cdjpeg_progress_mgr progress;
-#endif
- int file_index;
- cjpeg_source_ptr src_mgr;
- FILE * input_file = NULL;
- FILE * output_file = NULL;
- JDIMENSION num_scanlines;
-
- /* Initialize the JPEG compression object with default error handling. */
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_compress(&cinfo);
- /* Add some application-specific error messages (from cderror.h) */
- jerr.addon_message_table = cdjpeg_message_table;
- jerr.first_addon_message = JMSG_FIRSTADDONCODE;
- jerr.last_addon_message = JMSG_LASTADDONCODE;
-
- /* Now safe to enable signal catcher. */
-#ifdef NEED_SIGNAL_CATCHER
- enable_signal_catcher((j_common_ptr) &cinfo);
-#endif
-
- /* Initialize JPEG parameters.
- * Much of this may be overridden later.
- * In particular, we don't yet know the input file's color space,
- * but we need to provide some value for jpeg_set_defaults() to work.
- */
-
- cinfo.in_color_space = JCS_RGB; /* arbitrary guess */
- jpeg_set_defaults(&cinfo);
-
- /* Scan command line to find next file name.
- * It is convenient to use just one switch-parsing routine, but the switch
- * values read here are ignored; we will rescan the switches after opening
- * the input file.
- */
-
- file_index = parse_switches(&cinfo, argc, argv, old_file_index, FALSE);
- if (file_index >= argc) {
- fprintf(stderr, "%s: missing input file name\n", progname);
- usage();
- }
-
- /* Open the input file. */
- infilename = argv[file_index];
- if ((input_file = fopen(infilename, READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, infilename);
- goto fail;
- }
-
-#ifdef PROGRESS_REPORT
- start_progress_monitor((j_common_ptr) &cinfo, &progress);
-#endif
-
- /* Figure out the input file format, and set up to read it. */
- src_mgr = select_file_type(&cinfo, input_file);
- src_mgr->input_file = input_file;
-
- /* Read the input file header to obtain file size & colorspace. */
- (*src_mgr->start_input) (&cinfo, src_mgr);
-
- /* Now that we know input colorspace, fix colorspace-dependent defaults */
- jpeg_default_colorspace(&cinfo);
-
- /* Adjust default compression parameters by re-parsing the options */
- file_index = parse_switches(&cinfo, argc, argv, old_file_index, TRUE);
-
- /* If user didn't supply -outfile switch, select output file name. */
- if (outfilename == NULL) {
- int i;
-
- outfilename = workfilename;
- /* Make outfilename be infilename with .jpg substituted for extension */
- strcpy(outfilename, infilename);
- for (i = strlen(outfilename)-1; i >= 0; i--) {
- switch (outfilename[i]) {
- case ':':
- case '/':
- case '\\':
- i = 0; /* stop scanning */
- break;
- case '.':
- outfilename[i] = '\0'; /* lop off existing extension */
- i = 0; /* stop scanning */
- break;
- default:
- break; /* keep scanning */
- }
- }
- strcat(outfilename, ".jpg");
- }
-
- fprintf(stderr, "Compressing %s => %s\n", infilename, outfilename);
-#ifndef NO_OVERWRITE_CHECK
- if (! is_write_ok(outfilename))
- goto fail;
-#endif
-
- /* Open the output file. */
- if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't create %s\n", progname, outfilename);
- goto fail;
- }
-
- /* Specify data destination for compression */
- jpeg_stdio_dest(&cinfo, output_file);
-
- /* Start compressor */
- jpeg_start_compress(&cinfo, TRUE);
-
- /* Process data */
- while (cinfo.next_scanline < cinfo.image_height) {
- num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr);
- (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines);
- }
-
- /* Finish compression and release memory */
- (*src_mgr->finish_input) (&cinfo, src_mgr);
- jpeg_finish_compress(&cinfo);
-
- /* Clean up and exit */
-fail:
- jpeg_destroy_compress(&cinfo);
-
- if (input_file != NULL) fclose(input_file);
- if (output_file != NULL) fclose(output_file);
-
-#ifdef PROGRESS_REPORT
- end_progress_monitor((j_common_ptr) &cinfo);
-#endif
-
- /* Disable signal catcher. */
-#ifdef NEED_SIGNAL_CATCHER
- enable_signal_catcher((j_common_ptr) NULL);
-#endif
-
- return file_index;
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
- int file_index;
-
- /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
- argc = ccommand(&argv);
-#endif
-
-#ifdef MSDOS
- progname = "cjpeg"; /* DOS tends to be too verbose about argv[0] */
-#else
- progname = argv[0];
- if (progname == NULL || progname[0] == 0)
- progname = "cjpeg"; /* in case C library doesn't provide it */
-#endif
-
- /* The default maxmem must be computed only once at program startup,
- * since releasing memory with free() won't give it back to the OS.
- */
-#ifdef FREE_MEM_ESTIMATE
- default_maxmem = FREE_MEM_ESTIMATE;
-#else
- default_maxmem = 0;
-#endif
-
- /* Scan command line, parse switches and locate input file names */
-
- if (argc < 2)
- usage(); /* nothing on the command line?? */
-
- file_index = 0;
-
- while (file_index < argc-1)
- file_index = process_one_file(argc, argv, file_index);
-
- /* All done. */
- exit(EXIT_SUCCESS);
- return 0; /* suppress no-return-value warnings */
-}
diff --git a/altui/djpeg.c b/altui/djpeg.c
deleted file mode 100644
index a000d45..0000000
--- a/altui/djpeg.c
+++ /dev/null
@@ -1,836 +0,0 @@
-/*
- * alternate djpeg.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 6, 2006
- * ---------------------------------------------------------------------
- *
- * This file contains an alternate user interface for the JPEG decompressor.
- * One or more input files are named on the command line, and output file
- * names are created by substituting an appropriate extension.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-#include "jversion.h" /* for version message */
-
-#include <ctype.h> /* to declare isprint() */
-
-#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h> /* Metrowerks needs this */
-#include <console.h> /* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h> /* Think declares it here */
-#endif
-#endif
-
-#ifndef PATH_MAX /* ANSI maximum-pathname-length constant */
-#define PATH_MAX 256
-#endif
-
-
-/* Create the add-on message string table. */
-
-#define JMESSAGE(code,string) string ,
-
-static const char * const cdjpeg_message_table[] = {
-#include "cderror.h"
- NULL
-};
-
-
-/*
- * SIMD Ext: compiler-specific hacks to enable filename wild-card expansion
- */
-
-#ifdef _MSC_VER /* Microsoft Visual C++ */
-/* from setargv.c (setargv.obj) */
-/* Tested under Visual C++ V6.0, Toolkit 2003, and 2005 Express Edition */
-int __cdecl _setargv(void) { int __cdecl __setargv(void); return __setargv(); }
-#endif
-#ifdef __BORLANDC__ /* Borland C++ */
-/* from wildargs.c (wildargs.obj) */
-/* Tested under Borland C++ Compiler 5.5 (win32) */
-#include <wildargs.h>
-typedef void _RTLENTRY (* _RTLENTRY _argv_expand_fnc)(char *, _PFN_ADDARG);
-_argv_expand_fnc _argv_expand_ptr = _expand_wild;
-#endif
-
-
-/*
- * Automatic determination of available memory.
- */
-
-static long default_maxmem; /* saves value determined at startup, or 0 */
-
-#ifndef FREE_MEM_ESTIMATE /* may be defined from command line */
-
-#ifdef MSDOS /* For MS-DOS (unless flat-memory model) */
-
-#include <dos.h> /* for access to intdos() call */
-
-LOCAL(long)
-unused_dos_memory (void)
-/* Obtain total amount of unallocated DOS memory */
-{
- union REGS regs;
- long nparas;
-
- regs.h.ah = 0x48; /* DOS function Allocate Memory Block */
- regs.x.bx = 0xFFFF; /* Ask for more memory than DOS can have */
- (void) intdos(®s, ®s);
- /* DOS will fail and return # of paragraphs actually available in BX. */
- nparas = (unsigned int) regs.x.bx;
- /* Times 16 to convert to bytes. */
- return nparas << 4;
-}
-
-/* The default memory setting is 95% of the available space. */
-#define FREE_MEM_ESTIMATE ((unused_dos_memory() * 95L) / 100L)
-
-#endif /* MSDOS */
-
-#ifdef ATARI /* For Atari ST/STE/TT, Pure C or Turbo C */
-
-#include <ext.h>
-
-/* The default memory setting is 90% of the available space. */
-#define FREE_MEM_ESTIMATE (((long) coreleft() * 90L) / 100L)
-
-#endif /* ATARI */
-
-/* Add memory-estimation procedures for other operating systems here,
- * with appropriate #ifdef's around them.
- */
-
-#endif /* !FREE_MEM_ESTIMATE */
-
-
-/*
- * This list defines the known output image formats
- * (not all of which need be supported by a given version).
- * You can change the default output format by defining DEFAULT_FMT;
- * indeed, you had better do so if you undefine PPM_SUPPORTED.
- */
-
-typedef enum {
- FMT_BMP, /* BMP format (Windows flavor) */
- FMT_GIF, /* GIF format */
- FMT_OS2, /* BMP format (OS/2 flavor) */
- FMT_PPM, /* PPM/PGM (PBMPLUS formats) */
- FMT_RLE, /* RLE format */
- FMT_TARGA, /* Targa format */
- FMT_TIFF /* TIFF format */
-} IMAGE_FORMATS;
-
-#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */
-#define DEFAULT_FMT FMT_GIF
-#endif
-
-static IMAGE_FORMATS requested_fmt;
-
-
-/*
- * Argument-parsing code.
- * The switch parser is designed to be useful with DOS-style command line
- * syntax, ie, intermixed switches and file names, where only the switches
- * to the left of a given file name affect processing of that file.
- */
-
-
-static const char * progname; /* program name for error messages */
-static char * outfilename; /* for -outfile switch */
-
-
-LOCAL(void)
-usage (void)
-/* complain about bad command line */
-{
- fprintf(stderr, "usage: %s [switches] inputfile(s)\n", progname);
- fprintf(stderr, "List of input files may use wildcards (* and ?)\n");
- fprintf(stderr, "Output filename is same as input filename except for extension\n");
-
- fprintf(stderr, "Switches (names may be abbreviated):\n");
- fprintf(stderr, " -colors N Reduce image to no more than N colors\n");
- fprintf(stderr, " -fast Fast, low-quality processing\n");
- fprintf(stderr, " -grayscale Force grayscale output\n");
-#ifdef IDCT_SCALING_SUPPORTED
- fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n");
-#endif
-#ifdef BMP_SUPPORTED
- fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n",
- (DEFAULT_FMT == FMT_BMP ? " (default)" : ""));
-#endif
-#ifdef GIF_SUPPORTED
- fprintf(stderr, " -gif Select GIF output format%s\n",
- (DEFAULT_FMT == FMT_GIF ? " (default)" : ""));
-#endif
-#ifdef BMP_SUPPORTED
- fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n",
- (DEFAULT_FMT == FMT_OS2 ? " (default)" : ""));
-#endif
-#ifdef PPM_SUPPORTED
- fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n",
- (DEFAULT_FMT == FMT_PPM ? " (default)" : ""));
-#endif
-#ifdef RLE_SUPPORTED
- fprintf(stderr, " -rle Select Utah RLE output format%s\n",
- (DEFAULT_FMT == FMT_RLE ? " (default)" : ""));
-#endif
-#ifdef TARGA_SUPPORTED
- fprintf(stderr, " -targa Select Targa output format%s\n",
- (DEFAULT_FMT == FMT_TARGA ? " (default)" : ""));
-#endif
- fprintf(stderr, "Switches for advanced users:\n");
-#ifdef DCT_ISLOW_SUPPORTED
- fprintf(stderr, " -dct int Use integer DCT method%s\n",
- (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
- (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
- (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
-#endif
- fprintf(stderr, " -dither fs Use F-S dithering (default)\n");
- fprintf(stderr, " -dither none Don't use dithering in quantization\n");
- fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n");
-#ifdef QUANT_2PASS_SUPPORTED
- fprintf(stderr, " -map FILE Map to colors used in named image file\n");
-#endif
- fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n");
-#ifdef QUANT_1PASS_SUPPORTED
- fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n");
-#endif
-#ifndef FREE_MEM_ESTIMATE
- fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
-#endif
- fprintf(stderr, " -outfile name Specify name for output file\n");
- fprintf(stderr, " -verbose or -debug Emit debug output\n");
- exit(EXIT_FAILURE);
-}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-LOCAL(void)
-print_simd_info (FILE * file, char * labelstr, unsigned int simd)
-{
- fprintf(file, "%s%s%s%s%s%s\n", labelstr,
- simd & JSIMD_MMX ? " MMX" : "",
- simd & JSIMD_3DNOW ? " 3DNow!" : "",
- simd & JSIMD_SSE ? " SSE" : "",
- simd & JSIMD_SSE2 ? " SSE2" : "",
- simd == JSIMD_NONE ? " NONE" : "");
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
-
-
-LOCAL(int)
-parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
- int last_file_arg_seen, boolean for_real)
-/* Parse optional switches.
- * Returns argv[] index of first file-name argument (== argc if none).
- * Any file names with indexes <= last_file_arg_seen are ignored;
- * they have presumably been processed in a previous iteration.
- * (Pass 0 for last_file_arg_seen on the first or only iteration.)
- * for_real is FALSE on the first (dummy) pass; we may skip any expensive
- * processing.
- */
-{
- int argn;
- char * arg;
-
- /* Set up default JPEG parameters. */
- requested_fmt = DEFAULT_FMT; /* set default output file format */
- outfilename = NULL;
- cinfo->err->trace_level = 0;
- if (default_maxmem > 0) /* override library's default value */
- cinfo->mem->max_memory_to_use = default_maxmem;
-
- /* Scan command line options, adjust parameters */
-
- for (argn = 1; argn < argc; argn++) {
- arg = argv[argn];
- if (*arg != '-') {
- /* Not a switch, must be a file name argument */
- if (argn <= last_file_arg_seen) {
- outfilename = NULL; /* -outfile applies to just one input file */
- continue; /* ignore this name if previously processed */
- }
- break; /* else done parsing switches */
- }
- arg++; /* advance past switch marker character */
-
- if (keymatch(arg, "bmp", 1)) {
- /* BMP output format. */
- requested_fmt = FMT_BMP;
-
- } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) ||
- keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) {
- /* Do color quantization. */
- int val;
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%d", &val) != 1)
- usage();
- cinfo->desired_number_of_colors = val;
- cinfo->quantize_colors = TRUE;
-
-#ifndef JSIMD_MASKFUNC_NOT_SUPPORTED
- } else if (keymatch(arg, "nosimd" , 4)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_ALL);
- } else if (keymatch(arg, "nommx" , 3)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_MMX);
- } else if (keymatch(arg, "no3dnow", 3)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_3DNOW);
- } else if (keymatch(arg, "nosse" , 4)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_SSE);
- } else if (keymatch(arg, "nosse2" , 6)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_SSE2);
-#endif /* !JSIMD_MASKFUNC_NOT_SUPPORTED */
-
- } else if (keymatch(arg, "dct", 2)) {
- /* Select IDCT algorithm. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "int", 1)) {
- cinfo->dct_method = JDCT_ISLOW;
- } else if (keymatch(argv[argn], "fast", 2)) {
- cinfo->dct_method = JDCT_IFAST;
- } else if (keymatch(argv[argn], "float", 2)) {
- cinfo->dct_method = JDCT_FLOAT;
- } else
- usage();
-
- } else if (keymatch(arg, "dither", 2)) {
- /* Select dithering algorithm. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "fs", 2)) {
- cinfo->dither_mode = JDITHER_FS;
- } else if (keymatch(argv[argn], "none", 2)) {
- cinfo->dither_mode = JDITHER_NONE;
- } else if (keymatch(argv[argn], "ordered", 2)) {
- cinfo->dither_mode = JDITHER_ORDERED;
- } else
- usage();
-
- } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
- /* Enable debug printouts. */
- /* On first -d, print version identification */
- static boolean printed_version = FALSE;
-
- if (! printed_version) {
- fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n",
- JVERSION, JCOPYRIGHT);
- fprintf(stderr,
- "\nx86 SIMD extension for IJG JPEG library, version %s\n\n",
- JPEG_SIMDEXT_VER_STR);
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
- print_simd_info(stderr, "SIMD instructions supported by the system :",
- jpeg_simd_support(NULL));
-
- fprintf(stderr, "\n === SIMD Operation Modes ===\n");
-#ifdef DCT_ISLOW_SUPPORTED
- print_simd_info(stderr, "Accurate integer DCT (-dct int) :",
- jpeg_simd_inverse_dct(cinfo, JDCT_ISLOW));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- print_simd_info(stderr, "Fast integer DCT (-dct fast) :",
- jpeg_simd_inverse_dct(cinfo, JDCT_IFAST));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- print_simd_info(stderr, "Floating-point DCT (-dct float) :",
- jpeg_simd_inverse_dct(cinfo, JDCT_FLOAT));
-#endif
-#ifdef IDCT_SCALING_SUPPORTED
- print_simd_info(stderr, "Reduced-size DCT (-scale M/N) :",
- jpeg_simd_inverse_dct(cinfo, JDCT_FLOAT+1));
-#endif
- print_simd_info(stderr, "High-quality upsampling (default) :",
- jpeg_simd_upsampler(cinfo, TRUE));
- print_simd_info(stderr, "Low-quality upsampling (-nosmooth) :",
- jpeg_simd_upsampler(cinfo, FALSE));
- print_simd_info(stderr, "Colorspace conversion (YCbCr->RGB) :",
- jpeg_simd_color_deconverter(cinfo));
- fprintf(stderr, "\n");
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
- printed_version = TRUE;
- }
- cinfo->err->trace_level++;
-
- } else if (keymatch(arg, "fast", 1)) {
- /* Select recommended processing options for quick-and-dirty output. */
- cinfo->two_pass_quantize = FALSE;
- cinfo->dither_mode = JDITHER_ORDERED;
- if (! cinfo->quantize_colors) /* don't override an earlier -colors */
- cinfo->desired_number_of_colors = 216;
- cinfo->dct_method = JDCT_FASTEST;
- cinfo->do_fancy_upsampling = FALSE;
-
- } else if (keymatch(arg, "gif", 1)) {
- /* GIF output format. */
- requested_fmt = FMT_GIF;
-
- } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
- /* Force monochrome output. */
- cinfo->out_color_space = JCS_GRAYSCALE;
-
- } else if (keymatch(arg, "map", 3)) {
- /* Quantize to a color map taken from an input file. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (for_real) { /* too expensive to do twice! */
-#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */
- FILE * mapfile;
-
- if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
- exit(EXIT_FAILURE);
- }
- read_color_map(cinfo, mapfile);
- fclose(mapfile);
- cinfo->quantize_colors = TRUE;
-#else
- ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
- }
-
- } else if (keymatch(arg, "maxmemory", 3)) {
- /* Maximum memory in Kb (or Mb with 'm'). */
- long lval;
- char ch = 'x';
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
- usage();
- if (ch == 'm' || ch == 'M')
- lval *= 1000L;
- cinfo->mem->max_memory_to_use = lval * 1000L;
-
- } else if (keymatch(arg, "nosmooth", 3)) {
- /* Suppress fancy upsampling */
- cinfo->do_fancy_upsampling = FALSE;
-
- } else if (keymatch(arg, "onepass", 3)) {
- /* Use fast one-pass quantization. */
- cinfo->two_pass_quantize = FALSE;
-
- } else if (keymatch(arg, "os2", 3)) {
- /* BMP output format (OS/2 flavor). */
- requested_fmt = FMT_OS2;
-
- } else if (keymatch(arg, "outfile", 4)) {
- /* Set output file name. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- outfilename = argv[argn]; /* save it away for later use */
-
- } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) {
- /* PPM/PGM output format. */
- requested_fmt = FMT_PPM;
-
- } else if (keymatch(arg, "rle", 1)) {
- /* RLE output format. */
- requested_fmt = FMT_RLE;
-
- } else if (keymatch(arg, "scale", 1)) {
- /* Scale the output image by a fraction M/N. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%d/%d",
- &cinfo->scale_num, &cinfo->scale_denom) != 2)
- usage();
-
- } else if (keymatch(arg, "targa", 1)) {
- /* Targa output format. */
- requested_fmt = FMT_TARGA;
-
- } else {
- usage(); /* bogus switch */
- }
- }
-
- return argn; /* return index of next arg (file name) */
-}
-
-
-/*
- * Marker processor for COM and interesting APPn markers.
- * This replaces the library's built-in processor, which just skips the marker.
- * We want to print out the marker as text, to the extent possible.
- * Note this code relies on a non-suspending data source.
- */
-
-LOCAL(unsigned int)
-jpeg_getc (j_decompress_ptr cinfo)
-/* Read next byte */
-{
- struct jpeg_source_mgr * datasrc = cinfo->src;
-
- if (datasrc->bytes_in_buffer == 0) {
- if (! (*datasrc->fill_input_buffer) (cinfo))
- ERREXIT(cinfo, JERR_CANT_SUSPEND);
- }
- datasrc->bytes_in_buffer--;
- return GETJOCTET(*datasrc->next_input_byte++);
-}
-
-
-METHODDEF(boolean)
-print_text_marker (j_decompress_ptr cinfo)
-{
- boolean traceit = (cinfo->err->trace_level >= 1);
- INT32 length;
- unsigned int ch;
- unsigned int lastch = 0;
-
- length = jpeg_getc(cinfo) << 8;
- length += jpeg_getc(cinfo);
- length -= 2; /* discount the length word itself */
-
- if (traceit) {
- if (cinfo->unread_marker == JPEG_COM)
- fprintf(stderr, "Comment, length %ld:\n", (long) length);
- else /* assume it is an APPn otherwise */
- fprintf(stderr, "APP%d, length %ld:\n",
- cinfo->unread_marker - JPEG_APP0, (long) length);
- }
-
- while (--length >= 0) {
- ch = jpeg_getc(cinfo);
- if (traceit) {
- /* Emit the character in a readable form.
- * Nonprintables are converted to \nnn form,
- * while \ is converted to \\.
- * Newlines in CR, CR/LF, or LF form will be printed as one newline.
- */
- if (ch == '\r') {
- fprintf(stderr, "\n");
- } else if (ch == '\n') {
- if (lastch != '\r')
- fprintf(stderr, "\n");
- } else if (ch == '\\') {
- fprintf(stderr, "\\\\");
- } else if (isprint(ch)) {
- putc(ch, stderr);
- } else {
- fprintf(stderr, "\\%03o", ch);
- }
- lastch = ch;
- }
- }
-
- if (traceit)
- fprintf(stderr, "\n");
-
- return TRUE;
-}
-
-
-/*
- * Check for overwrite of an existing file; clear it with user
- */
-
-#ifndef NO_OVERWRITE_CHECK
-
-LOCAL(boolean)
-is_write_ok (char * outfname)
-{
- FILE * ofile;
- int ch;
-
- ofile = fopen(outfname, READ_BINARY);
- if (ofile == NULL)
- return TRUE; /* not present */
- fclose(ofile); /* oops, it is present */
-
- for (;;) {
- fprintf(stderr, "%s already exists, overwrite it? [y/n] ",
- outfname);
- fflush(stderr);
- ch = getc(stdin);
- if (ch != '\n') /* flush rest of line */
- while (getc(stdin) != '\n')
- /* nothing */;
-
- switch (ch) {
- case 'Y':
- case 'y':
- return TRUE;
- case 'N':
- case 'n':
- return FALSE;
- /* otherwise, ask again */
- }
- }
-}
-
-#endif
-
-
-/*
- * Process a single input file name, and return its index in argv[].
- * File names at or to left of old_file_index have been processed already.
- */
-
-LOCAL(int)
-process_one_file (int argc, char **argv, int old_file_index)
-{
- struct jpeg_decompress_struct cinfo;
- struct jpeg_error_mgr jerr;
- char *infilename;
- char workfilename[PATH_MAX];
- const char *default_extension = NULL;
-#ifdef PROGRESS_REPORT
- struct cdjpeg_progress_mgr progress;
-#endif
- int file_index;
- djpeg_dest_ptr dest_mgr = NULL;
- FILE * input_file = NULL;
- FILE * output_file = NULL;
- JDIMENSION num_scanlines;
-
- /* Initialize the JPEG decompression object with default error handling. */
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_decompress(&cinfo);
- /* Add some application-specific error messages (from cderror.h) */
- jerr.addon_message_table = cdjpeg_message_table;
- jerr.first_addon_message = JMSG_FIRSTADDONCODE;
- jerr.last_addon_message = JMSG_LASTADDONCODE;
-
- /* Insert custom marker processor for COM and APP12.
- * APP12 is used by some digital camera makers for textual info,
- * so we provide the ability to display it as text.
- * If you like, additional APPn marker types can be selected for display,
- * but don't try to override APP0 or APP14 this way (see libjpeg.doc).
- */
- jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker);
- jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker);
-
- /* Now safe to enable signal catcher. */
-#ifdef NEED_SIGNAL_CATCHER
- enable_signal_catcher((j_common_ptr) &cinfo);
-#endif
-
- /* Scan command line to find next file name.
- * It is convenient to use just one switch-parsing routine, but the switch
- * values read here are ignored; we will rescan the switches after opening
- * the input file.
- * (Exception: tracing level set here controls verbosity for COM markers
- * found during jpeg_read_header...)
- */
-
- file_index = parse_switches(&cinfo, argc, argv, old_file_index, FALSE);
- if (file_index >= argc) {
- fprintf(stderr, "%s: missing input file name\n", progname);
- usage();
- }
-
- /* Open the input file. */
- infilename = argv[file_index];
- if ((input_file = fopen(infilename, READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, infilename);
- goto fail;
- }
-
-#ifdef PROGRESS_REPORT
- start_progress_monitor((j_common_ptr) &cinfo, &progress);
-#endif
-
- /* Specify data source for decompression */
- jpeg_stdio_src(&cinfo, input_file);
-
- /* Read file header, set default decompression parameters */
- (void) jpeg_read_header(&cinfo, TRUE);
-
- /* Adjust default decompression parameters by re-parsing the options */
- file_index = parse_switches(&cinfo, argc, argv, old_file_index, TRUE);
-
- /* Initialize the output module now to let it override any crucial
- * option settings (for instance, GIF wants to force color quantization).
- */
- switch (requested_fmt) {
-#ifdef BMP_SUPPORTED
- case FMT_BMP:
- dest_mgr = jinit_write_bmp(&cinfo, FALSE);
- default_extension = ".bmp";
- break;
- case FMT_OS2:
- dest_mgr = jinit_write_bmp(&cinfo, TRUE);
- default_extension = ".bmp";
- break;
-#endif
-#ifdef GIF_SUPPORTED
- case FMT_GIF:
- dest_mgr = jinit_write_gif(&cinfo);
- default_extension = ".gif";
- break;
-#endif
-#ifdef PPM_SUPPORTED
- case FMT_PPM:
- dest_mgr = jinit_write_ppm(&cinfo);
- default_extension = ".ppm";
- break;
-#endif
-#ifdef RLE_SUPPORTED
- case FMT_RLE:
- dest_mgr = jinit_write_rle(&cinfo);
- default_extension = ".rle";
- break;
-#endif
-#ifdef TARGA_SUPPORTED
- case FMT_TARGA:
- dest_mgr = jinit_write_targa(&cinfo);
- default_extension = ".tga";
- break;
-#endif
- default:
- ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT);
- break;
- }
-
- /* If user didn't supply -outfile switch, select output file name. */
- if (outfilename == NULL) {
- int i;
-
- outfilename = workfilename;
- /* Make outfilename be infilename with appropriate extension */
- strcpy(outfilename, infilename);
- for (i = strlen(outfilename)-1; i >= 0; i--) {
- switch (outfilename[i]) {
- case ':':
- case '/':
- case '\\':
- i = 0; /* stop scanning */
- break;
- case '.':
- outfilename[i] = '\0'; /* lop off existing extension */
- i = 0; /* stop scanning */
- break;
- default:
- break; /* keep scanning */
- }
- }
- strcat(outfilename, default_extension);
- }
-
- fprintf(stderr, "Decompressing %s => %s\n", infilename, outfilename);
-#ifndef NO_OVERWRITE_CHECK
- if (! is_write_ok(outfilename))
- goto fail;
-#endif
-
- /* Open the output file. */
- if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't create %s\n", progname, outfilename);
- goto fail;
- }
- dest_mgr->output_file = output_file;
-
- /* Start decompressor */
- (void) jpeg_start_decompress(&cinfo);
-
- /* Write output file header */
- (*dest_mgr->start_output) (&cinfo, dest_mgr);
-
- /* Process data */
- while (cinfo.output_scanline < cinfo.output_height) {
- num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
- dest_mgr->buffer_height);
- (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
- }
-
-#ifdef PROGRESS_REPORT
- /* Hack: count final pass as done in case finish_output does an extra pass.
- * The library won't have updated completed_passes.
- */
- progress.pub.completed_passes = progress.pub.total_passes;
-#endif
-
- /* Finish decompression and release memory.
- * I must do it in this order because output module has allocated memory
- * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
- */
- (*dest_mgr->finish_output) (&cinfo, dest_mgr);
- (void) jpeg_finish_decompress(&cinfo);
-
- /* Clean up and exit */
-fail:
- jpeg_destroy_decompress(&cinfo);
-
- if (input_file != NULL) fclose(input_file);
- if (output_file != NULL) fclose(output_file);
-
-#ifdef PROGRESS_REPORT
- end_progress_monitor((j_common_ptr) &cinfo);
-#endif
-
- /* Disable signal catcher. */
-#ifdef NEED_SIGNAL_CATCHER
- enable_signal_catcher((j_common_ptr) NULL);
-#endif
-
- return file_index;
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
- int file_index;
-
- /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
- argc = ccommand(&argv);
-#endif
-
-#ifdef MSDOS
- progname = "djpeg"; /* DOS tends to be too verbose about argv[0] */
-#else
- progname = argv[0];
- if (progname == NULL || progname[0] == 0)
- progname = "djpeg"; /* in case C library doesn't provide it */
-#endif
-
- /* The default maxmem must be computed only once at program startup,
- * since releasing memory with free() won't give it back to the OS.
- */
-#ifdef FREE_MEM_ESTIMATE
- default_maxmem = FREE_MEM_ESTIMATE;
-#else
- default_maxmem = 0;
-#endif
-
- /* Scan command line, parse switches and locate input file names */
-
- if (argc < 2)
- usage(); /* nothing on the command line?? */
-
- file_index = 0;
-
- while (file_index < argc-1)
- file_index = process_one_file(argc, argv, file_index);
-
- /* All done. */
- exit(EXIT_SUCCESS);
- return 0; /* suppress no-return-value warnings */
-}
diff --git a/altui/usage.alt b/altui/usage.alt
deleted file mode 100644
index 277332b..0000000
--- a/altui/usage.alt
+++ /dev/null
@@ -1,62 +0,0 @@
-(Most of the standard usage.doc file also applies to this alternate version,
-but replace its "GENERAL USAGE" section with the text below. Edit the text
-as necessary if you don't support wildcards or overwrite checking. Be sure
-to fix the djpeg switch descriptions if you are not defaulting to PPM output.
-Also, if you've provided an accurate memory-estimation procedure, you can
-probably eliminate the HINTS related to the -maxmemory switch.)
-
-
-GENERAL USAGE
-
-We provide two programs, cjpeg to compress an image file into JPEG format,
-and djpeg to decompress a JPEG file back into a conventional image format.
-
-The basic command line is:
- cjpeg [switches] list of image files
-or
- djpeg [switches] list of jpeg files
-
-Each file named is compressed or decompressed. The input file(s) are not
-modified; the output data is written to files which have the same names
-except for extension. cjpeg always uses ".jpg" for the output file name's
-extension; djpeg uses one of ".bmp", ".gif", ".ppm", ".rle", or ".tga",
-depending on what output format is selected by the switches.
-
-For example, to convert xxx.bmp to xxx.jpg and yyy.ppm to yyy.jpg, say:
- cjpeg xxx.bmp yyy.ppm
-
-On most systems you can use standard wildcards to specify the list of input
-files; for example, on DOS "djpeg *.jpg" decompresses all the JPEG files in
-the current directory.
-
-If an intended output file already exists, you'll be asked whether or not to
-overwrite it. If you say no, the program skips that input file and goes on
-to the next one.
-
-You can intermix switches and file names; for example
- djpeg -gif file1.jpg -targa file2.jpg
-decompresses file1.jpg into GIF format (file1.gif) and file2.jpg into Targa
-format (file2.tga). Only switches to the left of a given file name affect
-processing of that file; when there are conflicting switches, the rightmost
-one takes precedence.
-
-You can override the program's choice of output file name by using the
--outfile switch, as in
- cjpeg -outfile output.jpg input.ppm
--outfile only affects the first input file name to its right.
-
-The currently supported image file formats are: PPM (PBMPLUS color format),
-PGM (PBMPLUS gray-scale format), BMP, GIF, Targa, and RLE (Utah Raster
-Toolkit format). (RLE is supported only if the URT library is available,
-which it isn't on most non-Unix systems.) cjpeg recognizes the input image
-format automatically, with the exception of some Targa-format files. You
-have to tell djpeg which format to generate.
-
-JPEG files are in the defacto standard JFIF file format. There are other,
-less widely used JPEG-based file formats, but we don't support them.
-
-All switch names may be abbreviated; for example, -grayscale may be written
--gray or -gr. Most of the "basic" switches can be abbreviated to as little as
-one letter. Upper and lower case are equivalent (-BMP is the same as -bmp).
-British spellings are also accepted (e.g., -greyscale), though for brevity
-these are not mentioned below.
diff --git a/ansi2knr.1 b/ansi2knr.1
deleted file mode 100644
index f9ee5a6..0000000
--- a/ansi2knr.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH ANSI2KNR 1 "19 Jan 1996"
-.SH NAME
-ansi2knr \- convert ANSI C to Kernighan & Ritchie C
-.SH SYNOPSIS
-.I ansi2knr
-[--varargs] input_file [output_file]
-.SH DESCRIPTION
-If no output_file is supplied, output goes to stdout.
-.br
-There are no error messages.
-.sp
-.I ansi2knr
-recognizes function definitions by seeing a non-keyword identifier at the left
-margin, followed by a left parenthesis, with a right parenthesis as the last
-character on the line, and with a left brace as the first token on the
-following line (ignoring possible intervening comments). It will recognize a
-multi-line header provided that no intervening line ends with a left or right
-brace or a semicolon. These algorithms ignore whitespace and comments, except
-that the function name must be the first thing on the line.
-.sp
-The following constructs will confuse it:
-.br
- - Any other construct that starts at the left margin and follows the
-above syntax (such as a macro or function call).
-.br
- - Some macros that tinker with the syntax of the function header.
-.sp
-The --varargs switch is obsolete, and is recognized only for
-backwards compatibility. The present version of
-.I ansi2knr
-will always attempt to convert a ... argument to va_alist and va_dcl.
-.SH AUTHOR
-L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
-continues to maintain the current version; most of the code in the current
-version is his work. ansi2knr also includes contributions by Francois
-Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
diff --git a/ansi2knr.c b/ansi2knr.c
deleted file mode 100644
index 4e05fc2..0000000
--- a/ansi2knr.c
+++ /dev/null
@@ -1,693 +0,0 @@
-/* ansi2knr.c */
-/* Convert ANSI C function definitions to K&R ("traditional C") syntax */
-
-/*
-ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY. No author or distributor accepts responsibility to anyone for the
-consequences of using it or for whether it serves any particular purpose or
-works at all, unless he says so in writing. Refer to the GNU General Public
-License (the "GPL") for full details.
-
-Everyone is granted permission to copy, modify and redistribute ansi2knr,
-but only under the conditions described in the GPL. A copy of this license
-is supposed to have been given to you along with ansi2knr so you can know
-your rights and responsibilities. It should be in a file named COPYLEFT.
-[In the IJG distribution, the GPL appears below, not in a separate file.]
-Among other things, the copyright notice and this notice must be preserved
-on all copies.
-
-We explicitly state here what we believe is already implied by the GPL: if
-the ansi2knr program is distributed as a separate set of sources and a
-separate executable file which are aggregated on a storage medium together
-with another program, this in itself does not bring the other program under
-the GPL, nor does the mere fact that such a program or the procedures for
-constructing it invoke the ansi2knr executable bring any other part of the
-program under the GPL.
-*/
-
-/*
----------- Here is the GNU GPL file COPYLEFT, referred to above ----------
------ These terms do NOT apply to the JPEG software itself; see README ------
-
- GHOSTSCRIPT GENERAL PUBLIC LICENSE
- (Clarified 11 Feb 1988)
-
- Copyright (C) 1988 Richard M. Stallman
- Everyone is permitted to copy and distribute verbatim copies of this
- license, but changing it is not allowed. You can also use this wording
- to make the terms for other programs.
-
- The license agreements of most software companies keep you at the
-mercy of those companies. By contrast, our general public license is
-intended to give everyone the right to share Ghostscript. To make sure
-that you get the rights we want you to have, we need to make
-restrictions that forbid anyone to deny you these rights or to ask you
-to surrender the rights. Hence this license agreement.
-
- Specifically, we want to make sure that you have the right to give
-away copies of Ghostscript, that you receive source code or else can get
-it if you want it, that you can change Ghostscript or use pieces of it
-in new free programs, and that you know you can do these things.
-
- To make sure that everyone has such rights, we have to forbid you to
-deprive anyone else of these rights. For example, if you distribute
-copies of Ghostscript, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must tell them their rights.
-
- Also, for our own protection, we must make certain that everyone finds
-out that there is no warranty for Ghostscript. If Ghostscript is
-modified by someone else and passed on, we want its recipients to know
-that what they have is not what we distributed, so that any problems
-introduced by others will not reflect on our reputation.
-
- Therefore we (Richard M. Stallman and the Free Software Foundation,
-Inc.) make the following terms which say what you must do to be allowed
-to distribute or change Ghostscript.
-
-
- COPYING POLICIES
-
- 1. You may copy and distribute verbatim copies of Ghostscript source
-code as you receive it, in any medium, provided that you conspicuously
-and appropriately publish on each copy a valid copyright and license
-notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved.
-Distributed by Free Software Foundation, Inc." (or with whatever year is
-appropriate); keep intact the notices on all files that refer to this
-License Agreement and to the absence of any warranty; and give any other
-recipients of the Ghostscript program a copy of this License Agreement
-along with the program. You may charge a distribution fee for the
-physical act of transferring a copy.
-
- 2. You may modify your copy or copies of Ghostscript or any portion of
-it, and copy and distribute such modifications under the terms of
-Paragraph 1 above, provided that you also do the following:
-
- a) cause the modified files to carry prominent notices stating
- that you changed the files and the date of any change; and
-
- b) cause the whole of any work that you distribute or publish,
- that in whole or in part contains or is a derivative of Ghostscript
- or any part thereof, to be licensed at no charge to all third
- parties on terms identical to those contained in this License
- Agreement (except that you may choose to grant more extensive
- warranty protection to some or all third parties, at your option).
-
- c) You may charge a distribution fee for the physical act of
- transferring a copy, and you may at your option offer warranty
- protection in exchange for a fee.
-
-Mere aggregation of another unrelated program with this program (or its
-derivative) on a volume of a storage or distribution medium does not bring
-the other program under the scope of these terms.
-
- 3. You may copy and distribute Ghostscript (or a portion or derivative
-of it, under Paragraph 2) in object code or executable form under the
-terms of Paragraphs 1 and 2 above provided that you also do one of the
-following:
-
- a) accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of
- Paragraphs 1 and 2 above; or,
-
- b) accompany it with a written offer, valid for at least three
- years, to give any third party free (except for a nominal
- shipping charge) a complete machine-readable copy of the
- corresponding source code, to be distributed under the terms of
- Paragraphs 1 and 2 above; or,
-
- c) accompany it with the information you received as to where the
- corresponding source code may be obtained. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form alone.)
-
-For an executable file, complete source code means all the source code for
-all modules it contains; but, as a special exception, it need not include
-source code for modules which are standard libraries that accompany the
-operating system on which the executable file runs.
-
- 4. You may not copy, sublicense, distribute or transfer Ghostscript
-except as expressly provided under this License Agreement. Any attempt
-otherwise to copy, sublicense, distribute or transfer Ghostscript is
-void and your rights to use the program under this License agreement
-shall be automatically terminated. However, parties who have received
-computer software programs from you with this License Agreement will not
-have their licenses terminated so long as such parties remain in full
-compliance.
-
- 5. If you wish to incorporate parts of Ghostscript into other free
-programs whose distribution conditions are different, write to the Free
-Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not
-yet worked out a simple rule that can be stated here, but we will often
-permit this. We will be guided by the two goals of preserving the free
-status of all derivatives of our free software and of promoting the
-sharing and reuse of software.
-
-Your comments and suggestions about our licensing policies and our
-software are welcome! Please contact the Free Software Foundation,
-Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296.
-
- NO WARRANTY
-
- BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
-NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
-WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD
-M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES
-PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
-EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH
-YOU. SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
-STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN
-ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE
-GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
-ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
-(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
-INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU
-HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM
-BY ANY OTHER PARTY.
-
--------------------- End of file COPYLEFT ------------------------------
-*/
-
-/*
- * Usage:
- ansi2knr input_file [output_file]
- * If no output_file is supplied, output goes to stdout.
- * There are no error messages.
- *
- * ansi2knr recognizes function definitions by seeing a non-keyword
- * identifier at the left margin, followed by a left parenthesis,
- * with a right parenthesis as the last character on the line,
- * and with a left brace as the first token on the following line
- * (ignoring possible intervening comments).
- * It will recognize a multi-line header provided that no intervening
- * line ends with a left or right brace or a semicolon.
- * These algorithms ignore whitespace and comments, except that
- * the function name must be the first thing on the line.
- * The following constructs will confuse it:
- * - Any other construct that starts at the left margin and
- * follows the above syntax (such as a macro or function call).
- * - Some macros that tinker with the syntax of the function header.
- */
-
-/*
- * The original and principal author of ansi2knr is L. Peter Deutsch
- * <ghost@aladdin.com>. Other authors are noted in the change history
- * that follows (in reverse chronological order):
- lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with
- compilers that don't understand void, as suggested by
- Tom Lane
- lpd 96-01-15 changed to require that the first non-comment token
- on the line following a function header be a left brace,
- to reduce sensitivity to macros, as suggested by Tom Lane
- <tgl@sss.pgh.pa.us>
- lpd 95-06-22 removed #ifndefs whose sole purpose was to define
- undefined preprocessor symbols as 0; changed all #ifdefs
- for configuration symbols to #ifs
- lpd 95-04-05 changed copyright notice to make it clear that
- including ansi2knr in a program does not bring the entire
- program under the GPL
- lpd 94-12-18 added conditionals for systems where ctype macros
- don't handle 8-bit characters properly, suggested by
- Francois Pinard <pinard@iro.umontreal.ca>;
- removed --varargs switch (this is now the default)
- lpd 94-10-10 removed CONFIG_BROKETS conditional
- lpd 94-07-16 added some conditionals to help GNU `configure',
- suggested by Francois Pinard <pinard@iro.umontreal.ca>;
- properly erase prototype args in function parameters,
- contributed by Jim Avera <jima@netcom.com>;
- correct error in writeblanks (it shouldn't erase EOLs)
- lpd 89-xx-xx original version
- */
-
-/* Most of the conditionals here are to make ansi2knr work with */
-/* or without the GNU configure machinery. */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-
-#if HAVE_CONFIG_H
-
-/*
- For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h).
- This will define HAVE_CONFIG_H and so, activate the following lines.
- */
-
-# if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-# else
-# include <strings.h>
-# endif
-
-#else /* not HAVE_CONFIG_H */
-
-/* Otherwise do it the hard way */
-
-# ifdef BSD
-# include <strings.h>
-# else
-# ifdef VMS
- extern int strlen(), strncmp();
-# else
-# include <string.h>
-# endif
-# endif
-
-#endif /* not HAVE_CONFIG_H */
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#else
-/*
- malloc and free should be declared in stdlib.h,
- but if you've got a K&R compiler, they probably aren't.
- */
-# ifdef MSDOS
-# include <malloc.h>
-# else
-# ifdef VMS
- extern char *malloc();
- extern void free();
-# else
- extern char *malloc();
- extern int free();
-# endif
-# endif
-
-#endif
-
-/*
- * The ctype macros don't always handle 8-bit characters correctly.
- * Compensate for this here.
- */
-#ifdef isascii
-# undef HAVE_ISASCII /* just in case */
-# define HAVE_ISASCII 1
-#else
-#endif
-#if STDC_HEADERS || !HAVE_ISASCII
-# define is_ascii(c) 1
-#else
-# define is_ascii(c) isascii(c)
-#endif
-
-#define is_space(c) (is_ascii(c) && isspace(c))
-#define is_alpha(c) (is_ascii(c) && isalpha(c))
-#define is_alnum(c) (is_ascii(c) && isalnum(c))
-
-/* Scanning macros */
-#define isidchar(ch) (is_alnum(ch) || (ch) == '_')
-#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_')
-
-/* Forward references */
-char *skipspace();
-int writeblanks();
-int test1();
-int convert1();
-
-/* The main program */
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{ FILE *in, *out;
-#define bufsize 5000 /* arbitrary size */
- char *buf;
- char *line;
- char *more;
- /*
- * In previous versions, ansi2knr recognized a --varargs switch.
- * If this switch was supplied, ansi2knr would attempt to convert
- * a ... argument to va_alist and va_dcl; if this switch was not
- * supplied, ansi2knr would simply drop any such arguments.
- * Now, ansi2knr always does this conversion, and we only
- * check for this switch for backward compatibility.
- */
- int convert_varargs = 1;
-
- if ( argc > 1 && argv[1][0] == '-' )
- { if ( !strcmp(argv[1], "--varargs") )
- { convert_varargs = 1;
- argc--;
- argv++;
- }
- else
- { fprintf(stderr, "Unrecognized switch: %s\n", argv[1]);
- exit(1);
- }
- }
- switch ( argc )
- {
- default:
- printf("Usage: ansi2knr input_file [output_file]\n");
- exit(0);
- case 2:
- out = stdout;
- break;
- case 3:
- out = fopen(argv[2], "w");
- if ( out == NULL )
- { fprintf(stderr, "Cannot open output file %s\n", argv[2]);
- exit(1);
- }
- }
- in = fopen(argv[1], "r");
- if ( in == NULL )
- { fprintf(stderr, "Cannot open input file %s\n", argv[1]);
- exit(1);
- }
- fprintf(out, "#line 1 \"%s\"\n", argv[1]);
- buf = malloc(bufsize);
- line = buf;
- while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
- {
-test: line += strlen(line);
- switch ( test1(buf) )
- {
- case 2: /* a function header */
- convert1(buf, out, 1, convert_varargs);
- break;
- case 1: /* a function */
- /* Check for a { at the start of the next line. */
- more = ++line;
-f: if ( line >= buf + (bufsize - 1) ) /* overflow check */
- goto wl;
- if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL )
- goto wl;
- switch ( *skipspace(more, 1) )
- {
- case '{':
- /* Definitely a function header. */
- convert1(buf, out, 0, convert_varargs);
- fputs(more, out);
- break;
- case 0:
- /* The next line was blank or a comment: */
- /* keep scanning for a non-comment. */
- line += strlen(line);
- goto f;
- default:
- /* buf isn't a function header, but */
- /* more might be. */
- fputs(buf, out);
- strcpy(buf, more);
- line = buf;
- goto test;
- }
- break;
- case -1: /* maybe the start of a function */
- if ( line != buf + (bufsize - 1) ) /* overflow check */
- continue;
- /* falls through */
- default: /* not a function */
-wl: fputs(buf, out);
- break;
- }
- line = buf;
- }
- if ( line != buf )
- fputs(buf, out);
- free(buf);
- fclose(out);
- fclose(in);
- return 0;
-}
-
-/* Skip over space and comments, in either direction. */
-char *
-skipspace(p, dir)
- register char *p;
- register int dir; /* 1 for forward, -1 for backward */
-{ for ( ; ; )
- { while ( is_space(*p) )
- p += dir;
- if ( !(*p == '/' && p[dir] == '*') )
- break;
- p += dir; p += dir;
- while ( !(*p == '*' && p[dir] == '/') )
- { if ( *p == 0 )
- return p; /* multi-line comment?? */
- p += dir;
- }
- p += dir; p += dir;
- }
- return p;
-}
-
-/*
- * Write blanks over part of a string.
- * Don't overwrite end-of-line characters.
- */
-int
-writeblanks(start, end)
- char *start;
- char *end;
-{ char *p;
- for ( p = start; p < end; p++ )
- if ( *p != '\r' && *p != '\n' )
- *p = ' ';
- return 0;
-}
-
-/*
- * Test whether the string in buf is a function definition.
- * The string may contain and/or end with a newline.
- * Return as follows:
- * 0 - definitely not a function definition;
- * 1 - definitely a function definition;
- * 2 - definitely a function prototype (NOT USED);
- * -1 - may be the beginning of a function definition,
- * append another line and look again.
- * The reason we don't attempt to convert function prototypes is that
- * Ghostscript's declaration-generating macros look too much like
- * prototypes, and confuse the algorithms.
- */
-int
-test1(buf)
- char *buf;
-{ register char *p = buf;
- char *bend;
- char *endfn;
- int contin;
-
- if ( !isidfirstchar(*p) )
- return 0; /* no name at left margin */
- bend = skipspace(buf + strlen(buf) - 1, -1);
- switch ( *bend )
- {
- case ';': contin = 0 /*2*/; break;
- case ')': contin = 1; break;
- case '{': return 0; /* not a function */
- case '}': return 0; /* not a function */
- default: contin = -1;
- }
- while ( isidchar(*p) )
- p++;
- endfn = p;
- p = skipspace(p, 1);
- if ( *p++ != '(' )
- return 0; /* not a function */
- p = skipspace(p, 1);
- if ( *p == ')' )
- return 0; /* no parameters */
- /* Check that the apparent function name isn't a keyword. */
- /* We only need to check for keywords that could be followed */
- /* by a left parenthesis (which, unfortunately, is most of them). */
- { static char *words[] =
- { "asm", "auto", "case", "char", "const", "double",
- "extern", "float", "for", "if", "int", "long",
- "register", "return", "short", "signed", "sizeof",
- "static", "switch", "typedef", "unsigned",
- "void", "volatile", "while", 0
- };
- char **key = words;
- char *kp;
- int len = endfn - buf;
-
- while ( (kp = *key) != 0 )
- { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
- return 0; /* name is a keyword */
- key++;
- }
- }
- return contin;
-}
-
-/* Convert a recognized function definition or header to K&R syntax. */
-int
-convert1(buf, out, header, convert_varargs)
- char *buf;
- FILE *out;
- int header; /* Boolean */
- int convert_varargs; /* Boolean */
-{ char *endfn;
- register char *p;
- char **breaks;
- unsigned num_breaks = 2; /* for testing */
- char **btop;
- char **bp;
- char **ap;
- char *vararg = 0;
-
- /* Pre-ANSI implementations don't agree on whether strchr */
- /* is called strchr or index, so we open-code it here. */
- for ( endfn = buf; *(endfn++) != '('; )
- ;
-top: p = endfn;
- breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
- if ( breaks == 0 )
- { /* Couldn't allocate break table, give up */
- fprintf(stderr, "Unable to allocate break table!\n");
- fputs(buf, out);
- return -1;
- }
- btop = breaks + num_breaks * 2 - 2;
- bp = breaks;
- /* Parse the argument list */
- do
- { int level = 0;
- char *lp = NULL;
- char *rp;
- char *end = NULL;
-
- if ( bp >= btop )
- { /* Filled up break table. */
- /* Allocate a bigger one and start over. */
- free((char *)breaks);
- num_breaks <<= 1;
- goto top;
- }
- *bp++ = p;
- /* Find the end of the argument */
- for ( ; end == NULL; p++ )
- { switch(*p)
- {
- case ',':
- if ( !level ) end = p;
- break;
- case '(':
- if ( !level ) lp = p;
- level++;
- break;
- case ')':
- if ( --level < 0 ) end = p;
- else rp = p;
- break;
- case '/':
- p = skipspace(p, 1) - 1;
- break;
- default:
- ;
- }
- }
- /* Erase any embedded prototype parameters. */
- if ( lp )
- writeblanks(lp + 1, rp);
- p--; /* back up over terminator */
- /* Find the name being declared. */
- /* This is complicated because of procedure and */
- /* array modifiers. */
- for ( ; ; )
- { p = skipspace(p - 1, -1);
- switch ( *p )
- {
- case ']': /* skip array dimension(s) */
- case ')': /* skip procedure args OR name */
- { int level = 1;
- while ( level )
- switch ( *--p )
- {
- case ']': case ')': level++; break;
- case '[': case '(': level--; break;
- case '/': p = skipspace(p, -1) + 1; break;
- default: ;
- }
- }
- if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
- { /* We found the name being declared */
- while ( !isidfirstchar(*p) )
- p = skipspace(p, 1) + 1;
- goto found;
- }
- break;
- default:
- goto found;
- }
- }
-found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
- { if ( convert_varargs )
- { *bp++ = "va_alist";
- vararg = p-2;
- }
- else
- { p++;
- if ( bp == breaks + 1 ) /* sole argument */
- writeblanks(breaks[0], p);
- else
- writeblanks(bp[-1] - 1, p);
- bp--;
- }
- }
- else
- { while ( isidchar(*p) ) p--;
- *bp++ = p+1;
- }
- p = end;
- }
- while ( *p++ == ',' );
- *bp = p;
- /* Make a special check for 'void' arglist */
- if ( bp == breaks+2 )
- { p = skipspace(breaks[0], 1);
- if ( !strncmp(p, "void", 4) )
- { p = skipspace(p+4, 1);
- if ( p == breaks[2] - 1 )
- { bp = breaks; /* yup, pretend arglist is empty */
- writeblanks(breaks[0], p + 1);
- }
- }
- }
- /* Put out the function name and left parenthesis. */
- p = buf;
- while ( p != endfn ) putc(*p, out), p++;
- /* Put out the declaration. */
- if ( header )
- { fputs(");", out);
- for ( p = breaks[0]; *p; p++ )
- if ( *p == '\r' || *p == '\n' )
- putc(*p, out);
- }
- else
- { for ( ap = breaks+1; ap < bp; ap += 2 )
- { p = *ap;
- while ( isidchar(*p) )
- putc(*p, out), p++;
- if ( ap < bp - 1 )
- fputs(", ", out);
- }
- fputs(") ", out);
- /* Put out the argument declarations */
- for ( ap = breaks+2; ap <= bp; ap += 2 )
- (*ap)[-1] = ';';
- if ( vararg != 0 )
- { *vararg = 0;
- fputs(breaks[0], out); /* any prior args */
- fputs("va_dcl", out); /* the final arg */
- fputs(bp[0], out);
- }
- else
- fputs(breaks[0], out);
- }
- free((char *)breaks);
- return 0;
-}
diff --git a/cderror.h b/cderror.h
deleted file mode 100644
index 70435e1..0000000
--- a/cderror.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * cderror.h
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file defines the error and message codes for the cjpeg/djpeg
- * applications. These strings are not needed as part of the JPEG library
- * proper.
- * Edit this file to add new codes, or to translate the message strings to
- * some other language.
- */
-
-/*
- * To define the enum list of message codes, include this file without
- * defining macro JMESSAGE. To create a message string table, include it
- * again with a suitable JMESSAGE definition (see jerror.c for an example).
- */
-#ifndef JMESSAGE
-#ifndef CDERROR_H
-#define CDERROR_H
-/* First time through, define the enum list */
-#define JMAKE_ENUM_LIST
-#else
-/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
-#define JMESSAGE(code,string)
-#endif /* CDERROR_H */
-#endif /* JMESSAGE */
-
-#ifdef JMAKE_ENUM_LIST
-
-typedef enum {
-
-#define JMESSAGE(code,string) code ,
-
-#endif /* JMAKE_ENUM_LIST */
-
-JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
-
-#ifdef BMP_SUPPORTED
-JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
-JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported")
-JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
-JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
-JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
-JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
-JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
-JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
-JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
-JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
-JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
-#endif /* BMP_SUPPORTED */
-
-#ifdef GIF_SUPPORTED
-JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
-JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
-JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
-JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
-JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
-JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
-JMESSAGE(JTRC_GIF_BADVERSION,
- "Warning: unexpected GIF version number '%c%c%c'")
-JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
-JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
-JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
-JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
-JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
-JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
-#endif /* GIF_SUPPORTED */
-
-#ifdef PPM_SUPPORTED
-JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
-JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
-JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
-JMESSAGE(JTRC_PGM, "%ux%u PGM image")
-JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
-JMESSAGE(JTRC_PPM, "%ux%u PPM image")
-JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image")
-#endif /* PPM_SUPPORTED */
-
-#ifdef RLE_SUPPORTED
-JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library")
-JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB")
-JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE")
-JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file")
-JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header")
-JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header")
-JMESSAGE(JERR_RLE_NOT, "Not an RLE file")
-JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE")
-JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup")
-JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file")
-JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d")
-JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file")
-JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d")
-JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d")
-#endif /* RLE_SUPPORTED */
-
-#ifdef TARGA_SUPPORTED
-JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
-JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
-JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
-JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
-JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
-JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
-#else
-JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
-#endif /* TARGA_SUPPORTED */
-
-JMESSAGE(JERR_BAD_CMAP_FILE,
- "Color map file is invalid or of unsupported format")
-JMESSAGE(JERR_TOO_MANY_COLORS,
- "Output file format cannot handle %d colormap entries")
-JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
-#ifdef TARGA_SUPPORTED
-JMESSAGE(JERR_UNKNOWN_FORMAT,
- "Unrecognized input file format --- perhaps you need -targa")
-#else
-JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
-#endif
-JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
-
-#ifdef JMAKE_ENUM_LIST
-
- JMSG_LASTADDONCODE
-} ADDON_MESSAGE_CODE;
-
-#undef JMAKE_ENUM_LIST
-#endif /* JMAKE_ENUM_LIST */
-
-/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
-#undef JMESSAGE
diff --git a/cdjpeg.c b/cdjpeg.c
deleted file mode 100644
index b6250ff..0000000
--- a/cdjpeg.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * cdjpeg.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains common support routines used by the IJG application
- * programs (cjpeg, djpeg, jpegtran).
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-#include <ctype.h> /* to declare isupper(), tolower() */
-#ifdef NEED_SIGNAL_CATCHER
-#include <signal.h> /* to declare signal() */
-#endif
-#ifdef USE_SETMODE
-#include <fcntl.h> /* to declare setmode()'s parameter macros */
-/* If you have setmode() but not <io.h>, just delete this line: */
-#include <io.h> /* to declare setmode() */
-#endif
-
-
-/*
- * Signal catcher to ensure that temporary files are removed before aborting.
- * NB: for Amiga Manx C this is actually a global routine named _abort();
- * we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus...
- */
-
-#ifdef NEED_SIGNAL_CATCHER
-
-static j_common_ptr sig_cinfo;
-
-void /* must be global for Manx C */
-signal_catcher (int signum)
-{
- if (sig_cinfo != NULL) {
- if (sig_cinfo->err != NULL) /* turn off trace output */
- sig_cinfo->err->trace_level = 0;
- jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */
- }
- exit(EXIT_FAILURE);
-}
-
-
-GLOBAL(void)
-enable_signal_catcher (j_common_ptr cinfo)
-{
- sig_cinfo = cinfo;
-#ifdef SIGINT /* not all systems have SIGINT */
- signal(SIGINT, signal_catcher);
-#endif
-#ifdef SIGTERM /* not all systems have SIGTERM */
- signal(SIGTERM, signal_catcher);
-#endif
-}
-
-#endif
-
-
-/*
- * Optional progress monitor: display a percent-done figure on stderr.
- */
-
-#ifdef PROGRESS_REPORT
-
-METHODDEF(void)
-progress_monitor (j_common_ptr cinfo)
-{
- cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
- int total_passes = prog->pub.total_passes + prog->total_extra_passes;
- int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit);
-
- if (percent_done != prog->percent_done) {
- prog->percent_done = percent_done;
- if (total_passes > 1) {
- fprintf(stderr, "\rPass %d/%d: %3d%% ",
- prog->pub.completed_passes + prog->completed_extra_passes + 1,
- total_passes, percent_done);
- } else {
- fprintf(stderr, "\r %3d%% ", percent_done);
- }
- fflush(stderr);
- }
-}
-
-
-GLOBAL(void)
-start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
-{
- /* Enable progress display, unless trace output is on */
- if (cinfo->err->trace_level == 0) {
- progress->pub.progress_monitor = progress_monitor;
- progress->completed_extra_passes = 0;
- progress->total_extra_passes = 0;
- progress->percent_done = -1;
- cinfo->progress = &progress->pub;
- }
-}
-
-
-GLOBAL(void)
-end_progress_monitor (j_common_ptr cinfo)
-{
- /* Clear away progress display */
- if (cinfo->err->trace_level == 0) {
- fprintf(stderr, "\r \r");
- fflush(stderr);
- }
-}
-
-#endif
-
-
-/*
- * Case-insensitive matching of possibly-abbreviated keyword switches.
- * keyword is the constant keyword (must be lower case already),
- * minchars is length of minimum legal abbreviation.
- */
-
-GLOBAL(boolean)
-keymatch (char * arg, const char * keyword, int minchars)
-{
- register int ca, ck;
- register int nmatched = 0;
-
- while ((ca = *arg++) != '\0') {
- if ((ck = *keyword++) == '\0')
- return FALSE; /* arg longer than keyword, no good */
- if (isupper(ca)) /* force arg to lcase (assume ck is already) */
- ca = tolower(ca);
- if (ca != ck)
- return FALSE; /* no good */
- nmatched++; /* count matched characters */
- }
- /* reached end of argument; fail if it's too short for unique abbrev */
- if (nmatched < minchars)
- return FALSE;
- return TRUE; /* A-OK */
-}
-
-
-/*
- * Routines to establish binary I/O mode for stdin and stdout.
- * Non-Unix systems often require some hacking to get out of text mode.
- */
-
-GLOBAL(FILE *)
-read_stdin (void)
-{
- FILE * input_file = stdin;
-
-#ifdef USE_SETMODE /* need to hack file mode? */
- setmode(fileno(stdin), O_BINARY);
-#endif
-#ifdef USE_FDOPEN /* need to re-open in binary mode? */
- if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
- fprintf(stderr, "Cannot reopen stdin\n");
- exit(EXIT_FAILURE);
- }
-#endif
- return input_file;
-}
-
-
-GLOBAL(FILE *)
-write_stdout (void)
-{
- FILE * output_file = stdout;
-
-#ifdef USE_SETMODE /* need to hack file mode? */
- setmode(fileno(stdout), O_BINARY);
-#endif
-#ifdef USE_FDOPEN /* need to re-open in binary mode? */
- if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
- fprintf(stderr, "Cannot reopen stdout\n");
- exit(EXIT_FAILURE);
- }
-#endif
- return output_file;
-}
diff --git a/cdjpeg.h b/cdjpeg.h
deleted file mode 100644
index 2b387b6..0000000
--- a/cdjpeg.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * cdjpeg.h
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains common declarations for the sample applications
- * cjpeg and djpeg. It is NOT used by the core JPEG library.
- */
-
-#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
-#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jerror.h" /* get library error codes too */
-#include "cderror.h" /* get application-specific error codes */
-
-
-/*
- * Object interface for cjpeg's source file decoding modules
- */
-
-typedef struct cjpeg_source_struct * cjpeg_source_ptr;
-
-struct cjpeg_source_struct {
- JMETHOD(void, start_input, (j_compress_ptr cinfo,
- cjpeg_source_ptr sinfo));
- JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
- cjpeg_source_ptr sinfo));
- JMETHOD(void, finish_input, (j_compress_ptr cinfo,
- cjpeg_source_ptr sinfo));
-
- FILE *input_file;
-
- JSAMPARRAY buffer;
- JDIMENSION buffer_height;
-};
-
-
-/*
- * Object interface for djpeg's output file encoding modules
- */
-
-typedef struct djpeg_dest_struct * djpeg_dest_ptr;
-
-struct djpeg_dest_struct {
- /* start_output is called after jpeg_start_decompress finishes.
- * The color map will be ready at this time, if one is needed.
- */
- JMETHOD(void, start_output, (j_decompress_ptr cinfo,
- djpeg_dest_ptr dinfo));
- /* Emit the specified number of pixel rows from the buffer. */
- JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
- djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied));
- /* Finish up at the end of the image. */
- JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
- djpeg_dest_ptr dinfo));
-
- /* Target file spec; filled in by djpeg.c after object is created. */
- FILE * output_file;
-
- /* Output pixel-row buffer. Created by module init or start_output.
- * Width is cinfo->output_width * cinfo->output_components;
- * height is buffer_height.
- */
- JSAMPARRAY buffer;
- JDIMENSION buffer_height;
-};
-
-
-/*
- * cjpeg/djpeg may need to perform extra passes to convert to or from
- * the source/destination file format. The JPEG library does not know
- * about these passes, but we'd like them to be counted by the progress
- * monitor. We use an expanded progress monitor object to hold the
- * additional pass count.
- */
-
-struct cdjpeg_progress_mgr {
- struct jpeg_progress_mgr pub; /* fields known to JPEG library */
- int completed_extra_passes; /* extra passes completed */
- int total_extra_passes; /* total extra */
- /* last printed percentage stored here to avoid multiple printouts */
- int percent_done;
-};
-
-typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
-
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jinit_read_bmp jIRdBMP
-#define jinit_write_bmp jIWrBMP
-#define jinit_read_gif jIRdGIF
-#define jinit_write_gif jIWrGIF
-#define jinit_read_ppm jIRdPPM
-#define jinit_write_ppm jIWrPPM
-#define jinit_read_rle jIRdRLE
-#define jinit_write_rle jIWrRLE
-#define jinit_read_targa jIRdTarga
-#define jinit_write_targa jIWrTarga
-#define read_quant_tables RdQTables
-#define read_scan_script RdScnScript
-#define set_quant_slots SetQSlots
-#define set_sample_factors SetSFacts
-#define read_color_map RdCMap
-#define enable_signal_catcher EnSigCatcher
-#define start_progress_monitor StProgMon
-#define end_progress_monitor EnProgMon
-#define read_stdin RdStdin
-#define write_stdout WrStdout
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-/* Module selection routines for I/O modules. */
-
-EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
- boolean is_os2));
-EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
-
-/* cjpeg support routines (in rdswitch.c) */
-
-EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
- int scale_factor, boolean force_baseline));
-EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
-EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
-EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
-
-/* djpeg support routines (in rdcolmap.c) */
-
-EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
-
-/* common support routines (in cdjpeg.c) */
-
-EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
-EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
- cd_progress_ptr progress));
-EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
-EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
-EXTERN(FILE *) read_stdin JPP((void));
-EXTERN(FILE *) write_stdout JPP((void));
-
-/* miscellaneous useful macros */
-
-#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
-#define READ_BINARY "r"
-#define WRITE_BINARY "w"
-#else
-#ifdef VMS /* VMS is very nonstandard */
-#define READ_BINARY "rb", "ctx=stm"
-#define WRITE_BINARY "wb", "ctx=stm"
-#else /* standard ANSI-compliant case */
-#define READ_BINARY "rb"
-#define WRITE_BINARY "wb"
-#endif
-#endif
-
-#ifndef EXIT_FAILURE /* define exit() codes if not provided */
-#define EXIT_FAILURE 1
-#endif
-#ifndef EXIT_SUCCESS
-#ifdef VMS
-#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
-#else
-#define EXIT_SUCCESS 0
-#endif
-#endif
-#ifndef EXIT_WARNING
-#ifdef VMS
-#define EXIT_WARNING 1 /* VMS is very nonstandard */
-#else
-#define EXIT_WARNING 2
-#endif
-#endif
diff --git a/change.log b/change.log
deleted file mode 100644
index 74102c0..0000000
--- a/change.log
+++ /dev/null
@@ -1,217 +0,0 @@
-CHANGE LOG for Independent JPEG Group's JPEG software
-
-
-Version 6b 27-Mar-1998
------------------------
-
-jpegtran has new features for lossless image transformations (rotation
-and flipping) as well as "lossless" reduction to grayscale.
-
-jpegtran now copies comments by default; it has a -copy switch to enable
-copying all APPn blocks as well, or to suppress comments. (Formerly it
-always suppressed comments and APPn blocks.) jpegtran now also preserves
-JFIF version and resolution information.
-
-New decompressor library feature: COM and APPn markers found in the input
-file can be saved in memory for later use by the application. (Before,
-you had to code this up yourself with a custom marker processor.)
-
-There is an unused field "void * client_data" now in compress and decompress
-parameter structs; this may be useful in some applications.
-
-JFIF version number information is now saved by the decoder and accepted by
-the encoder. jpegtran uses this to copy the source file's version number,
-to ensure "jpegtran -copy all" won't create bogus files that contain JFXX
-extensions but claim to be version 1.01. Applications that generate their
-own JFXX extension markers also (finally) have a supported way to cause the
-encoder to emit JFIF version number 1.02.
-
-djpeg's trace mode reports JFIF 1.02 thumbnail images as such, rather
-than as unknown APP0 markers.
-
-In -verbose mode, djpeg and rdjpgcom will try to print the contents of
-APP12 markers as text. Some digital cameras store useful text information
-in APP12 markers.
-
-Handling of truncated data streams is more robust: blocks beyond the one in
-which the error occurs will be output as uniform gray, or left unchanged
-if decoding a progressive JPEG. The appearance no longer depends on the
-Huffman tables being used.
-
-Huffman tables are checked for validity much more carefully than before.
-
-To avoid the Unisys LZW patent, djpeg's GIF output capability has been
-changed to produce "uncompressed GIFs", and cjpeg's GIF input capability
-has been removed altogether. We're not happy about it either, but there
-seems to be no good alternative.
-
-The configure script now supports building libjpeg as a shared library
-on many flavors of Unix (all the ones that GNU libtool knows how to
-build shared libraries for). Use "./configure --enable-shared" to
-try this out.
-
-New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio.
-Also, a jconfig file and a build script for Metrowerks CodeWarrior
-on Apple Macintosh. makefile.dj has been updated for DJGPP v2, and there
-are miscellaneous other minor improvements in the makefiles.
-
-jmemmac.c now knows how to create temporary files following Mac System 7
-conventions.
-
-djpeg's -map switch is now able to read raw-format PPM files reliably.
-
-cjpeg -progressive -restart no longer generates any unnecessary DRI markers.
-
-Multiple calls to jpeg_simple_progression for a single JPEG object
-no longer leak memory.
-
-
-Version 6a 7-Feb-96
---------------------
-
-Library initialization sequence modified to detect version mismatches
-and struct field packing mismatches between library and calling application.
-This change requires applications to be recompiled, but does not require
-any application source code change.
-
-All routine declarations changed to the style "GLOBAL(type) name ...",
-that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the
-routine's return type as an argument. This makes it possible to add
-Microsoft-style linkage keywords to all the routines by changing just
-these macros. Note that any application code that was using these macros
-will have to be changed.
-
-DCT coefficient quantization tables are now stored in normal array order
-rather than zigzag order. Application code that calls jpeg_add_quant_table,
-or otherwise manipulates quantization tables directly, will need to be
-changed. If you need to make such code work with either older or newer
-versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is
-recommended.
-
-djpeg's trace capability now dumps DQT tables in natural order, not zigzag
-order. This allows the trace output to be made into a "-qtables" file
-more easily.
-
-New system-dependent memory manager module for use on Apple Macintosh.
-
-Fix bug in cjpeg's -smooth option: last one or two scanlines would be
-duplicates of the prior line unless the image height mod 16 was 1 or 2.
-
-Repair minor problems in VMS, BCC, MC6 makefiles.
-
-New configure script based on latest GNU Autoconf.
-
-Correct the list of include files needed by MetroWerks C for ccommand().
-
-Numerous small documentation updates.
-
-
-Version 6 2-Aug-95
--------------------
-
-Progressive JPEG support: library can read and write full progressive JPEG
-files. A "buffered image" mode supports incremental decoding for on-the-fly
-display of progressive images. Simply recompiling an existing IJG-v5-based
-decoder with v6 should allow it to read progressive files, though of course
-without any special progressive display.
-
-New "jpegtran" application performs lossless transcoding between different
-JPEG formats; primarily, it can be used to convert baseline to progressive
-JPEG and vice versa. In support of jpegtran, the library now allows lossless
-reading and writing of JPEG files as DCT coefficient arrays. This ability
-may be of use in other applications.
-
-Notes for programmers:
-* We changed jpeg_start_decompress() to be able to suspend; this makes all
-decoding modes available to suspending-input applications. However,
-existing applications that use suspending input will need to be changed
-to check the return value from jpeg_start_decompress(). You don't need to
-do anything if you don't use a suspending data source.
-* We changed the interface to the virtual array routines: access_virt_array
-routines now take a count of the number of rows to access this time. The
-last parameter to request_virt_array routines is now interpreted as the
-maximum number of rows that may be accessed at once, but not necessarily
-the height of every access.
-
-
-Version 5b 15-Mar-95
----------------------
-
-Correct bugs with grayscale images having v_samp_factor > 1.
-
-jpeg_write_raw_data() now supports output suspension.
-
-Correct bugs in "configure" script for case of compiling in
-a directory other than the one containing the source files.
-
-Repair bug in jquant1.c: sometimes didn't use as many colors as it could.
-
-Borland C makefile and jconfig file work under either MS-DOS or OS/2.
-
-Miscellaneous improvements to documentation.
-
-
-Version 5a 7-Dec-94
---------------------
-
-Changed color conversion roundoff behavior so that grayscale values are
-represented exactly. (This causes test image files to change.)
-
-Make ordered dither use 16x16 instead of 4x4 pattern for a small quality
-improvement.
-
-New configure script based on latest GNU Autoconf.
-Fix configure script to handle CFLAGS correctly.
-Rename *.auto files to *.cfg, so that configure script still works if
-file names have been truncated for DOS.
-
-Fix bug in rdbmp.c: didn't allow for extra data between header and image.
-
-Modify rdppm.c/wrppm.c to handle 2-byte raw PPM/PGM formats for 12-bit data.
-
-Fix several bugs in rdrle.c.
-
-NEED_SHORT_EXTERNAL_NAMES option was broken.
-
-Revise jerror.h/jerror.c for more flexibility in message table.
-
-Repair oversight in jmemname.c NO_MKTEMP case: file could be there
-but unreadable.
-
-
-Version 5 24-Sep-94
---------------------
-
-Version 5 represents a nearly complete redesign and rewrite of the IJG
-software. Major user-visible changes include:
- * Automatic configuration simplifies installation for most Unix systems.
- * A range of speed vs. image quality tradeoffs are supported.
- This includes resizing of an image during decompression: scaling down
- by a factor of 1/2, 1/4, or 1/8 is handled very efficiently.
- * New programs rdjpgcom and wrjpgcom allow insertion and extraction
- of text comments in a JPEG file.
-
-The application programmer's interface to the library has changed completely.
-Notable improvements include:
- * We have eliminated the use of callback routines for handling the
- uncompressed image data. The application now sees the library as a
- set of routines that it calls to read or write image data on a
- scanline-by-scanline basis.
- * The application image data is represented in a conventional interleaved-
- pixel format, rather than as a separate array for each color channel.
- This can save a copying step in many programs.
- * The handling of compressed data has been cleaned up: the application can
- supply routines to source or sink the compressed data. It is possible to
- suspend processing on source/sink buffer overrun, although this is not
- supported in all operating modes.
- * All static state has been eliminated from the library, so that multiple
- instances of compression or decompression can be active concurrently.
- * JPEG abbreviated datastream formats are supported, ie, quantization and
- Huffman tables can be stored separately from the image data.
- * And not only that, but the documentation of the library has improved
- considerably!
-
-
-The last widely used release before the version 5 rewrite was version 4A of
-18-Feb-93. Change logs before that point have been discarded, since they
-are not of much interest after the rewrite.
diff --git a/cjpeg.1 b/cjpeg.1
deleted file mode 100644
index d175a96..0000000
--- a/cjpeg.1
+++ /dev/null
@@ -1,292 +0,0 @@
-.TH CJPEG 1 "20 March 1998"
-.SH NAME
-cjpeg \- compress an image file to a JPEG file
-.SH SYNOPSIS
-.B cjpeg
-[
-.I options
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B cjpeg
-compresses the named image file, or the standard input if no file is
-named, and produces a JPEG/JFIF file on the standard output.
-The currently supported input file formats are: PPM (PBMPLUS color
-format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
-Toolkit format). (RLE is supported only if the URT library is available.)
-.SH OPTIONS
-All switch names may be abbreviated; for example,
-.B \-grayscale
-may be written
-.B \-gray
-or
-.BR \-gr .
-Most of the "basic" switches can be abbreviated to as little as one letter.
-Upper and lower case are equivalent (thus
-.B \-BMP
-is the same as
-.BR \-bmp ).
-British spellings are also accepted (e.g.,
-.BR \-greyscale ),
-though for brevity these are not mentioned below.
-.PP
-The basic switches are:
-.TP
-.BI \-quality " N"
-Scale quantization tables to adjust image quality. Quality is 0 (worst) to
-100 (best); default is 75. (See below for more info.)
-.TP
-.B \-grayscale
-Create monochrome JPEG file from color input. Be sure to use this switch when
-compressing a grayscale BMP file, because
-.B cjpeg
-isn't bright enough to notice whether a BMP file uses only shades of gray.
-By saying
-.BR \-grayscale ,
-you'll get a smaller JPEG file that takes less time to process.
-.TP
-.B \-optimize
-Perform optimization of entropy encoding parameters. Without this, default
-encoding parameters are used.
-.B \-optimize
-usually makes the JPEG file a little smaller, but
-.B cjpeg
-runs somewhat slower and needs much more memory. Image quality and speed of
-decompression are unaffected by
-.BR \-optimize .
-.TP
-.B \-progressive
-Create progressive JPEG file (see below).
-.TP
-.B \-targa
-Input file is Targa format. Targa files that contain an "identification"
-field will not be automatically recognized by
-.BR cjpeg ;
-for such files you must specify
-.B \-targa
-to make
-.B cjpeg
-treat the input as Targa format.
-For most Targa files, you won't need this switch.
-.PP
-The
-.B \-quality
-switch lets you trade off compressed file size against quality of the
-reconstructed image: the higher the quality setting, the larger the JPEG file,
-and the closer the output image will be to the original input. Normally you
-want to use the lowest quality setting (smallest file) that decompresses into
-something visually indistinguishable from the original image. For this
-purpose the quality setting should be between 50 and 95; the default of 75 is
-often about right. If you see defects at
-.B \-quality
-75, then go up 5 or 10 counts at a time until you are happy with the output
-image. (The optimal setting will vary from one image to another.)
-.PP
-.B \-quality
-100 will generate a quantization table of all 1's, minimizing loss in the
-quantization step (but there is still information loss in subsampling, as well
-as roundoff error). This setting is mainly of interest for experimental
-purposes. Quality values above about 95 are
-.B not
-recommended for normal use; the compressed file size goes up dramatically for
-hardly any gain in output image quality.
-.PP
-In the other direction, quality values below 50 will produce very small files
-of low image quality. Settings around 5 to 10 might be useful in preparing an
-index of a large image library, for example. Try
-.B \-quality
-2 (or so) for some amusing Cubist effects. (Note: quality
-values below about 25 generate 2-byte quantization tables, which are
-considered optional in the JPEG standard.
-.B cjpeg
-emits a warning message when you give such a quality value, because some
-other JPEG programs may be unable to decode the resulting file. Use
-.B \-baseline
-if you need to ensure compatibility at low quality values.)
-.PP
-The
-.B \-progressive
-switch creates a "progressive JPEG" file. In this type of JPEG file, the data
-is stored in multiple scans of increasing quality. If the file is being
-transmitted over a slow communications link, the decoder can use the first
-scan to display a low-quality image very quickly, and can then improve the
-display with each subsequent scan. The final image is exactly equivalent to a
-standard JPEG file of the same quality setting, and the total file size is
-about the same --- often a little smaller.
-.B Caution:
-progressive JPEG is not yet widely implemented, so many decoders will be
-unable to view a progressive JPEG file at all.
-.PP
-Switches for advanced users:
-.TP
-.B \-dct int
-Use integer DCT method (default).
-.TP
-.B \-dct fast
-Use fast integer DCT (less accurate).
-.TP
-.B \-dct float
-Use floating-point DCT method.
-The float method is very slightly more accurate than the int method, but is
-much slower unless your machine has very fast floating-point hardware. Also
-note that results of the floating-point method may vary slightly across
-machines, while the integer methods should give the same results everywhere.
-The fast integer method is much less accurate than the other two.
-.TP
-.BI \-restart " N"
-Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
-attached to the number.
-.B \-restart 0
-(the default) means no restart markers.
-.TP
-.BI \-smooth " N"
-Smooth the input image to eliminate dithering noise. N, ranging from 1 to
-100, indicates the strength of smoothing. 0 (the default) means no smoothing.
-.TP
-.BI \-maxmemory " N"
-Set limit for amount of memory to use in processing large images. Value is
-in thousands of bytes, or millions of bytes if "M" is attached to the
-number. For example,
-.B \-max 4m
-selects 4000000 bytes. If more space is needed, temporary files will be used.
-.TP
-.BI \-outfile " name"
-Send output image to the named file, not to standard output.
-.TP
-.B \-verbose
-Enable debug printout. More
-.BR \-v 's
-give more output. Also, version information is printed at startup.
-.TP
-.B \-debug
-Same as
-.BR \-verbose .
-.PP
-The
-.B \-restart
-option inserts extra markers that allow a JPEG decoder to resynchronize after
-a transmission error. Without restart markers, any damage to a compressed
-file will usually ruin the image from the point of the error to the end of the
-image; with restart markers, the damage is usually confined to the portion of
-the image up to the next restart marker. Of course, the restart markers
-occupy extra space. We recommend
-.B \-restart 1
-for images that will be transmitted across unreliable networks such as Usenet.
-.PP
-The
-.B \-smooth
-option filters the input to eliminate fine-scale noise. This is often useful
-when converting dithered images to JPEG: a moderate smoothing factor of 10 to
-50 gets rid of dithering patterns in the input file, resulting in a smaller
-JPEG file and a better-looking image. Too large a smoothing factor will
-visibly blur the image, however.
-.PP
-Switches for wizards:
-.TP
-.B \-baseline
-Force baseline-compatible quantization tables to be generated. This clamps
-quantization values to 8 bits even at low quality settings. (This switch is
-poorly named, since it does not ensure that the output is actually baseline
-JPEG. For example, you can use
-.B \-baseline
-and
-.B \-progressive
-together.)
-.TP
-.BI \-qtables " file"
-Use the quantization tables given in the specified text file.
-.TP
-.BI \-qslots " N[,...]"
-Select which quantization table to use for each color component.
-.TP
-.BI \-sample " HxV[,...]"
-Set JPEG sampling factors for each color component.
-.TP
-.BI \-scans " file"
-Use the scan script given in the specified text file.
-.PP
-The "wizard" switches are intended for experimentation with JPEG. If you
-don't know what you are doing, \fBdon't use them\fR. These switches are
-documented further in the file wizard.doc.
-.SH EXAMPLES
-.LP
-This example compresses the PPM file foo.ppm with a quality factor of
-60 and saves the output as foo.jpg:
-.IP
-.B cjpeg \-quality
-.I 60 foo.ppm
-.B >
-.I foo.jpg
-.SH HINTS
-Color GIF files are not the ideal input for JPEG; JPEG is really intended for
-compressing full-color (24-bit) images. In particular, don't try to convert
-cartoons, line drawings, and other images that have only a few distinct
-colors. GIF works great on these, JPEG does not. If you want to convert a
-GIF to JPEG, you should experiment with
-.BR cjpeg 's
-.B \-quality
-and
-.B \-smooth
-options to get a satisfactory conversion.
-.B \-smooth 10
-or so is often helpful.
-.PP
-Avoid running an image through a series of JPEG compression/decompression
-cycles. Image quality loss will accumulate; after ten or so cycles the image
-may be noticeably worse than it was after one cycle. It's best to use a
-lossless format while manipulating an image, then convert to JPEG format when
-you are ready to file the image away.
-.PP
-The
-.B \-optimize
-option to
-.B cjpeg
-is worth using when you are making a "final" version for posting or archiving.
-It's also a win when you are using low quality settings to make very small
-JPEG files; the percentage improvement is often a lot more than it is on
-larger files. (At present,
-.B \-optimize
-mode is always selected when generating progressive JPEG files.)
-.SH ENVIRONMENT
-.TP
-.B JPEGMEM
-If this environment variable is set, its value is the default memory limit.
-The value is specified as described for the
-.B \-maxmemory
-switch.
-.B JPEGMEM
-overrides the default value specified when the program was compiled, and
-itself is overridden by an explicit
-.BR \-maxmemory .
-.SH SEE ALSO
-.BR djpeg (1),
-.BR jpegtran (1),
-.BR rdjpgcom (1),
-.BR wrjpgcom (1)
-.br
-.BR ppm (5),
-.BR pgm (5)
-.br
-Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
-Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
-.SH AUTHOR
-Independent JPEG Group
-.SH BUGS
-Arithmetic coding is not supported for legal reasons.
-.PP
-GIF input files are no longer supported, to avoid the Unisys LZW patent.
-Use a Unisys-licensed program if you need to read a GIF file. (Conversion
-of GIF files to JPEG is usually a bad idea anyway.)
-.PP
-Not all variants of BMP and Targa file formats are supported.
-.PP
-The
-.B \-targa
-switch is not a bug, it's a feature. (It would be a bug if the Targa format
-designers had not been clueless.)
-.PP
-Still not as fast as we'd like.
diff --git a/cjpeg.c b/cjpeg.c
deleted file mode 100644
index 10f5f5b..0000000
--- a/cjpeg.c
+++ /dev/null
@@ -1,668 +0,0 @@
-/*
- * cjpeg.c
- *
- * Copyright (C) 1991-1998, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : August 23, 2005
- * ---------------------------------------------------------------------
- *
- * This file contains a command-line user interface for the JPEG compressor.
- * It should work on any system with Unix- or MS-DOS-style command lines.
- *
- * Two different command line styles are permitted, depending on the
- * compile-time switch TWO_FILE_COMMANDLINE:
- * cjpeg [options] inputfile outputfile
- * cjpeg [options] [inputfile]
- * In the second style, output is always to standard output, which you'd
- * normally redirect to a file or pipe to some other program. Input is
- * either from a named file or from standard input (typically redirected).
- * The second style is convenient on Unix but is unhelpful on systems that
- * don't support pipes. Also, you MUST use the first style if your system
- * doesn't do binary I/O to stdin/stdout.
- * To simplify script writing, the "-outfile" switch is provided. The syntax
- * cjpeg [options] -outfile outputfile inputfile
- * works regardless of which command line style is used.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-#include "jversion.h" /* for version message */
-
-#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h> /* Metrowerks needs this */
-#include <console.h> /* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h> /* Think declares it here */
-#endif
-#endif
-
-
-/* Create the add-on message string table. */
-
-#define JMESSAGE(code,string) string ,
-
-static const char * const cdjpeg_message_table[] = {
-#include "cderror.h"
- NULL
-};
-
-
-/*
- * This routine determines what format the input file is,
- * and selects the appropriate input-reading module.
- *
- * To determine which family of input formats the file belongs to,
- * we may look only at the first byte of the file, since C does not
- * guarantee that more than one character can be pushed back with ungetc.
- * Looking at additional bytes would require one of these approaches:
- * 1) assume we can fseek() the input file (fails for piped input);
- * 2) assume we can push back more than one character (works in
- * some C implementations, but unportable);
- * 3) provide our own buffering (breaks input readers that want to use
- * stdio directly, such as the RLE library);
- * or 4) don't put back the data, and modify the input_init methods to assume
- * they start reading after the start of file (also breaks RLE library).
- * #1 is attractive for MS-DOS but is untenable on Unix.
- *
- * The most portable solution for file types that can't be identified by their
- * first byte is to make the user tell us what they are. This is also the
- * only approach for "raw" file types that contain only arbitrary values.
- * We presently apply this method for Targa files. Most of the time Targa
- * files start with 0x00, so we recognize that case. Potentially, however,
- * a Targa file could start with any byte value (byte 0 is the length of the
- * seldom-used ID field), so we provide a switch to force Targa input mode.
- */
-
-static boolean is_targa; /* records user -targa switch */
-
-
-LOCAL(cjpeg_source_ptr)
-select_file_type (j_compress_ptr cinfo, FILE * infile)
-{
- int c;
-
- if (is_targa) {
-#ifdef TARGA_SUPPORTED
- return jinit_read_targa(cinfo);
-#else
- ERREXIT(cinfo, JERR_TGA_NOTCOMP);
-#endif
- }
-
- if ((c = getc(infile)) == EOF)
- ERREXIT(cinfo, JERR_INPUT_EMPTY);
- if (ungetc(c, infile) == EOF)
- ERREXIT(cinfo, JERR_UNGETC_FAILED);
-
- switch (c) {
-#ifdef BMP_SUPPORTED
- case 'B':
- return jinit_read_bmp(cinfo);
-#endif
-#ifdef GIF_SUPPORTED
- case 'G':
- return jinit_read_gif(cinfo);
-#endif
-#ifdef PPM_SUPPORTED
- case 'P':
- return jinit_read_ppm(cinfo);
-#endif
-#ifdef RLE_SUPPORTED
- case 'R':
- return jinit_read_rle(cinfo);
-#endif
-#ifdef TARGA_SUPPORTED
- case 0x00:
- return jinit_read_targa(cinfo);
-#endif
- default:
- ERREXIT(cinfo, JERR_UNKNOWN_FORMAT);
- break;
- }
-
- return NULL; /* suppress compiler warnings */
-}
-
-
-/*
- * Argument-parsing code.
- * The switch parser is designed to be useful with DOS-style command line
- * syntax, ie, intermixed switches and file names, where only the switches
- * to the left of a given file name affect processing of that file.
- * The main program in this file doesn't actually use this capability...
- */
-
-
-static const char * progname; /* program name for error messages */
-static char * outfilename; /* for -outfile switch */
-
-
-LOCAL(void)
-usage (void)
-/* complain about bad command line */
-{
- fprintf(stderr, "usage: %s [switches] ", progname);
-#ifdef TWO_FILE_COMMANDLINE
- fprintf(stderr, "inputfile outputfile\n");
-#else
- fprintf(stderr, "[inputfile]\n");
-#endif
-
- fprintf(stderr, "Switches (names may be abbreviated):\n");
- fprintf(stderr, " -quality N Compression quality (0..100; 5-95 is useful range)\n");
- fprintf(stderr, " -grayscale Create monochrome JPEG file\n");
-#ifdef ENTROPY_OPT_SUPPORTED
- fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
-#endif
-#ifdef C_PROGRESSIVE_SUPPORTED
- fprintf(stderr, " -progressive Create progressive JPEG file\n");
-#endif
-#ifdef TARGA_SUPPORTED
- fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n");
-#endif
- fprintf(stderr, "Switches for advanced users:\n");
-#ifdef DCT_ISLOW_SUPPORTED
- fprintf(stderr, " -dct int Use integer DCT method%s\n",
- (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
- (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
- (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
-#endif
- fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n");
-#ifdef INPUT_SMOOTHING_SUPPORTED
- fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n");
-#endif
- fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
- fprintf(stderr, " -outfile name Specify name for output file\n");
- fprintf(stderr, " -verbose or -debug Emit debug output\n");
- fprintf(stderr, "Switches for wizards:\n");
-#ifdef C_ARITH_CODING_SUPPORTED
- fprintf(stderr, " -arithmetic Use arithmetic coding\n");
-#endif
- fprintf(stderr, " -baseline Force baseline quantization tables\n");
- fprintf(stderr, " -qtables file Use quantization tables given in file\n");
- fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
- fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n");
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
-#endif
- exit(EXIT_FAILURE);
-}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-LOCAL(void)
-print_simd_info (FILE * file, char * labelstr, unsigned int simd)
-{
- fprintf(file, "%s%s%s%s%s%s\n", labelstr,
- simd & JSIMD_MMX ? " MMX" : "",
- simd & JSIMD_3DNOW ? " 3DNow!" : "",
- simd & JSIMD_SSE ? " SSE" : "",
- simd & JSIMD_SSE2 ? " SSE2" : "",
- simd == JSIMD_NONE ? " NONE" : "");
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
-
-
-LOCAL(int)
-parse_switches (j_compress_ptr cinfo, int argc, char **argv,
- int last_file_arg_seen, boolean for_real)
-/* Parse optional switches.
- * Returns argv[] index of first file-name argument (== argc if none).
- * Any file names with indexes <= last_file_arg_seen are ignored;
- * they have presumably been processed in a previous iteration.
- * (Pass 0 for last_file_arg_seen on the first or only iteration.)
- * for_real is FALSE on the first (dummy) pass; we may skip any expensive
- * processing.
- */
-{
- int argn;
- char * arg;
- int quality; /* -quality parameter */
- int q_scale_factor; /* scaling percentage for -qtables */
- boolean force_baseline;
- boolean simple_progressive;
- char * qtablefile = NULL; /* saves -qtables filename if any */
- char * qslotsarg = NULL; /* saves -qslots parm if any */
- char * samplearg = NULL; /* saves -sample parm if any */
- char * scansarg = NULL; /* saves -scans parm if any */
-
- /* Set up default JPEG parameters. */
- /* Note that default -quality level need not, and does not,
- * match the default scaling for an explicit -qtables argument.
- */
- quality = 75; /* default -quality value */
- q_scale_factor = 100; /* default to no scaling for -qtables */
- force_baseline = FALSE; /* by default, allow 16-bit quantizers */
- simple_progressive = FALSE;
- is_targa = FALSE;
- outfilename = NULL;
- cinfo->err->trace_level = 0;
-
- /* Scan command line options, adjust parameters */
-
- for (argn = 1; argn < argc; argn++) {
- arg = argv[argn];
- if (*arg != '-') {
- /* Not a switch, must be a file name argument */
- if (argn <= last_file_arg_seen) {
- outfilename = NULL; /* -outfile applies to just one input file */
- continue; /* ignore this name if previously processed */
- }
- break; /* else done parsing switches */
- }
- arg++; /* advance past switch marker character */
-
- if (keymatch(arg, "arithmetic", 1)) {
- /* Use arithmetic coding. */
-#ifdef C_ARITH_CODING_SUPPORTED
- cinfo->arith_code = TRUE;
-#else
- fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "baseline", 1)) {
- /* Force baseline-compatible output (8-bit quantizer values). */
- force_baseline = TRUE;
-
-#ifndef JSIMD_MASKFUNC_NOT_SUPPORTED
- } else if (keymatch(arg, "nosimd" , 4)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_ALL);
- } else if (keymatch(arg, "nommx" , 3)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_MMX);
- } else if (keymatch(arg, "no3dnow", 3)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_3DNOW);
- } else if (keymatch(arg, "nosse" , 4)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_SSE);
- } else if (keymatch(arg, "nosse2" , 6)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_SSE2);
-#endif /* !JSIMD_MASKFUNC_NOT_SUPPORTED */
-
- } else if (keymatch(arg, "dct", 2)) {
- /* Select DCT algorithm. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "int", 1)) {
- cinfo->dct_method = JDCT_ISLOW;
- } else if (keymatch(argv[argn], "fast", 2)) {
- cinfo->dct_method = JDCT_IFAST;
- } else if (keymatch(argv[argn], "float", 2)) {
- cinfo->dct_method = JDCT_FLOAT;
- } else
- usage();
-
- } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
- /* Enable debug printouts. */
- /* On first -d, print version identification */
- static boolean printed_version = FALSE;
-
- if (! printed_version) {
- fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n",
- JVERSION, JCOPYRIGHT);
- fprintf(stderr,
- "\nx86 SIMD extension for IJG JPEG library, version %s\n\n",
- JPEG_SIMDEXT_VER_STR);
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
- print_simd_info(stderr, "SIMD instructions supported by the system :",
- jpeg_simd_support(NULL));
-
- fprintf(stderr, "\n === SIMD Operation Modes ===\n");
-#ifdef DCT_ISLOW_SUPPORTED
- print_simd_info(stderr, "Accurate integer DCT (-dct int) :",
- jpeg_simd_forward_dct(cinfo, JDCT_ISLOW));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- print_simd_info(stderr, "Fast integer DCT (-dct fast) :",
- jpeg_simd_forward_dct(cinfo, JDCT_IFAST));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- print_simd_info(stderr, "Floating-point DCT (-dct float) :",
- jpeg_simd_forward_dct(cinfo, JDCT_FLOAT));
-#endif
- print_simd_info(stderr, "Downsampling (-sample 2x2 or 2x1) :",
- jpeg_simd_downsampler(cinfo));
- print_simd_info(stderr, "Colorspace conversion (RGB->YCbCr) :",
- jpeg_simd_color_converter(cinfo));
- fprintf(stderr, "\n");
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
- printed_version = TRUE;
- }
- cinfo->err->trace_level++;
-
- } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
- /* Force a monochrome JPEG file to be generated. */
- jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
-
- } else if (keymatch(arg, "maxmemory", 3)) {
- /* Maximum memory in Kb (or Mb with 'm'). */
- long lval;
- char ch = 'x';
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
- usage();
- if (ch == 'm' || ch == 'M')
- lval *= 1000L;
- cinfo->mem->max_memory_to_use = lval * 1000L;
-
- } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
- /* Enable entropy parm optimization. */
-#ifdef ENTROPY_OPT_SUPPORTED
- cinfo->optimize_coding = TRUE;
-#else
- fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "outfile", 4)) {
- /* Set output file name. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- outfilename = argv[argn]; /* save it away for later use */
-
- } else if (keymatch(arg, "progressive", 1)) {
- /* Select simple progressive mode. */
-#ifdef C_PROGRESSIVE_SUPPORTED
- simple_progressive = TRUE;
- /* We must postpone execution until num_components is known. */
-#else
- fprintf(stderr, "%s: sorry, progressive output was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "quality", 1)) {
- /* Quality factor (quantization table scaling factor). */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%d", &quality) != 1)
- usage();
- /* Change scale factor in case -qtables is present. */
- q_scale_factor = jpeg_quality_scaling(quality);
-
- } else if (keymatch(arg, "qslots", 2)) {
- /* Quantization table slot numbers. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- qslotsarg = argv[argn];
- /* Must delay setting qslots until after we have processed any
- * colorspace-determining switches, since jpeg_set_colorspace sets
- * default quant table numbers.
- */
-
- } else if (keymatch(arg, "qtables", 2)) {
- /* Quantization tables fetched from file. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- qtablefile = argv[argn];
- /* We postpone actually reading the file in case -quality comes later. */
-
- } else if (keymatch(arg, "restart", 1)) {
- /* Restart interval in MCU rows (or in MCUs with 'b'). */
- long lval;
- char ch = 'x';
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
- usage();
- if (lval < 0 || lval > 65535L)
- usage();
- if (ch == 'b' || ch == 'B') {
- cinfo->restart_interval = (unsigned int) lval;
- cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
- } else {
- cinfo->restart_in_rows = (int) lval;
- /* restart_interval will be computed during startup */
- }
-
- } else if (keymatch(arg, "sample", 2)) {
- /* Set sampling factors. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- samplearg = argv[argn];
- /* Must delay setting sample factors until after we have processed any
- * colorspace-determining switches, since jpeg_set_colorspace sets
- * default sampling factors.
- */
-
- } else if (keymatch(arg, "scans", 2)) {
- /* Set scan script. */
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- if (++argn >= argc) /* advance to next argument */
- usage();
- scansarg = argv[argn];
- /* We must postpone reading the file in case -progressive appears. */
-#else
- fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "smooth", 2)) {
- /* Set input smoothing factor. */
- int val;
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%d", &val) != 1)
- usage();
- if (val < 0 || val > 100)
- usage();
- cinfo->smoothing_factor = val;
-
- } else if (keymatch(arg, "targa", 1)) {
- /* Input file is Targa format. */
- is_targa = TRUE;
-
- } else {
- usage(); /* bogus switch */
- }
- }
-
- /* Post-switch-scanning cleanup */
-
- if (for_real) {
-
- /* Set quantization tables for selected quality. */
- /* Some or all may be overridden if -qtables is present. */
- jpeg_set_quality(cinfo, quality, force_baseline);
-
- if (qtablefile != NULL) /* process -qtables if it was present */
- if (! read_quant_tables(cinfo, qtablefile,
- q_scale_factor, force_baseline))
- usage();
-
- if (qslotsarg != NULL) /* process -qslots if it was present */
- if (! set_quant_slots(cinfo, qslotsarg))
- usage();
-
- if (samplearg != NULL) /* process -sample if it was present */
- if (! set_sample_factors(cinfo, samplearg))
- usage();
-
-#ifdef C_PROGRESSIVE_SUPPORTED
- if (simple_progressive) /* process -progressive; -scans can override */
- jpeg_simple_progression(cinfo);
-#endif
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- if (scansarg != NULL) /* process -scans if it was present */
- if (! read_scan_script(cinfo, scansarg))
- usage();
-#endif
- }
-
- return argn; /* return index of next arg (file name) */
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
- struct jpeg_compress_struct cinfo;
- struct jpeg_error_mgr jerr;
-#ifdef PROGRESS_REPORT
- struct cdjpeg_progress_mgr progress;
-#endif
- int file_index;
- cjpeg_source_ptr src_mgr;
- FILE * input_file;
- FILE * output_file;
- JDIMENSION num_scanlines;
-
- /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
- argc = ccommand(&argv);
-#endif
-
- progname = argv[0];
- if (progname == NULL || progname[0] == 0)
- progname = "cjpeg"; /* in case C library doesn't provide it */
-
- /* Initialize the JPEG compression object with default error handling. */
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_compress(&cinfo);
- /* Add some application-specific error messages (from cderror.h) */
- jerr.addon_message_table = cdjpeg_message_table;
- jerr.first_addon_message = JMSG_FIRSTADDONCODE;
- jerr.last_addon_message = JMSG_LASTADDONCODE;
-
- /* Now safe to enable signal catcher. */
-#ifdef NEED_SIGNAL_CATCHER
- enable_signal_catcher((j_common_ptr) &cinfo);
-#endif
-
- /* Initialize JPEG parameters.
- * Much of this may be overridden later.
- * In particular, we don't yet know the input file's color space,
- * but we need to provide some value for jpeg_set_defaults() to work.
- */
-
- cinfo.in_color_space = JCS_RGB; /* arbitrary guess */
- jpeg_set_defaults(&cinfo);
-
- /* Scan command line to find file names.
- * It is convenient to use just one switch-parsing routine, but the switch
- * values read here are ignored; we will rescan the switches after opening
- * the input file.
- */
-
- file_index = parse_switches(&cinfo, argc, argv, 0, FALSE);
-
-#ifdef TWO_FILE_COMMANDLINE
- /* Must have either -outfile switch or explicit output file name */
- if (outfilename == NULL) {
- if (file_index != argc-2) {
- fprintf(stderr, "%s: must name one input and one output file\n",
- progname);
- usage();
- }
- outfilename = argv[file_index+1];
- } else {
- if (file_index != argc-1) {
- fprintf(stderr, "%s: must name one input and one output file\n",
- progname);
- usage();
- }
- }
-#else
- /* Unix style: expect zero or one file name */
- if (file_index < argc-1) {
- fprintf(stderr, "%s: only one input file\n", progname);
- usage();
- }
-#endif /* TWO_FILE_COMMANDLINE */
-
- /* Open the input file. */
- if (file_index < argc) {
- if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
- exit(EXIT_FAILURE);
- }
- } else {
- /* default input file is stdin */
- input_file = read_stdin();
- }
-
- /* Open the output file. */
- if (outfilename != NULL) {
- if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
- exit(EXIT_FAILURE);
- }
- } else {
- /* default output file is stdout */
- output_file = write_stdout();
- }
-
-#ifdef PROGRESS_REPORT
- start_progress_monitor((j_common_ptr) &cinfo, &progress);
-#endif
-
- /* Figure out the input file format, and set up to read it. */
- src_mgr = select_file_type(&cinfo, input_file);
- src_mgr->input_file = input_file;
-
- /* Read the input file header to obtain file size & colorspace. */
- (*src_mgr->start_input) (&cinfo, src_mgr);
-
- /* Now that we know input colorspace, fix colorspace-dependent defaults */
- jpeg_default_colorspace(&cinfo);
-
- /* Adjust default compression parameters by re-parsing the options */
- file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
-
- /* Specify data destination for compression */
- jpeg_stdio_dest(&cinfo, output_file);
-
- /* Start compressor */
- jpeg_start_compress(&cinfo, TRUE);
-
- /* Process data */
- while (cinfo.next_scanline < cinfo.image_height) {
- num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr);
- (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines);
- }
-
- /* Finish compression and release memory */
- (*src_mgr->finish_input) (&cinfo, src_mgr);
- jpeg_finish_compress(&cinfo);
- jpeg_destroy_compress(&cinfo);
-
- /* Close files, if we opened them */
- if (input_file != stdin)
- fclose(input_file);
- if (output_file != stdout)
- fclose(output_file);
-
-#ifdef PROGRESS_REPORT
- end_progress_monitor((j_common_ptr) &cinfo);
-#endif
-
- /* All done. */
- exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
- return 0; /* suppress no-return-value warnings */
-}
diff --git a/ckconfig.c b/ckconfig.c
deleted file mode 100644
index ba380dc..0000000
--- a/ckconfig.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * ckconfig.c
- *
- * Copyright (C) 1991-1994, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : March 28, 2005
- * ---------------------------------------------------------------------
- */
-
-/*
- * This program is intended to help you determine how to configure the JPEG
- * software for installation on a particular system. The idea is to try to
- * compile and execute this program. If your compiler fails to compile the
- * program, make changes as indicated in the comments below. Once you can
- * compile the program, run it, and it will produce a "jconfig.h" file for
- * your system.
- *
- * As a general rule, each time you try to compile this program,
- * pay attention only to the *first* error message you get from the compiler.
- * Many C compilers will issue lots of spurious error messages once they
- * have gotten confused. Go to the line indicated in the first error message,
- * and read the comments preceding that line to see what to change.
- *
- * Almost all of the edits you may need to make to this program consist of
- * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL",
- * or vice versa. This is called defining or undefining that symbol.
- */
-
-
-/* First we must see if your system has the include files we need.
- * We start out with the assumption that your system has all the ANSI-standard
- * include files. If you get any error trying to include one of these files,
- * undefine the corresponding HAVE_xxx symbol.
- */
-
-#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */
-#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */
-#include <stddef.h>
-#endif
-
-#define HAVE_STDLIB_H /* same thing for stdlib.h */
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#include <stdio.h> /* If you ain't got this, you ain't got C. */
-
-/* We have to see if your string functions are defined by
- * strings.h (old BSD convention) or string.h (everybody else).
- * We try the non-BSD convention first; define NEED_BSD_STRINGS
- * if the compiler says it can't find string.h.
- */
-
-#undef NEED_BSD_STRINGS
-
-#ifdef NEED_BSD_STRINGS
-#include <strings.h>
-#else
-#include <string.h>
-#endif
-
-/* On some systems (especially older Unix machines), type size_t is
- * defined only in the include file <sys/types.h>. If you get a failure
- * on the size_t test below, try defining NEED_SYS_TYPES_H.
- */
-
-#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */
-#ifdef NEED_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-
-/* Usually type size_t is defined in one of the include files we've included
- * above. If not, you'll get an error on the "typedef size_t my_size_t;" line.
- * In that case, first try defining NEED_SYS_TYPES_H just above.
- * If that doesn't work, you'll have to search through your system library
- * to figure out which include file defines "size_t". Look for a line that
- * says "typedef something-or-other size_t;". Then, change the line below
- * that says "#include <someincludefile.h>" to instead include the file
- * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find
- * type size_t anywhere, try replacing "#include <someincludefile.h>" with
- * "typedef unsigned int size_t;".
- */
-
-#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */
-
-#ifdef NEED_SPECIAL_INCLUDE
-#include <someincludefile.h>
-#endif
-
-typedef size_t my_size_t; /* The payoff: do we have size_t now? */
-
-
-/* The next question is whether your compiler supports ANSI-style function
- * prototypes. You need to know this in order to choose between using
- * makefile.ansi and using makefile.unix.
- * The #define line below is set to assume you have ANSI function prototypes.
- * If you get an error in this group of lines, undefine HAVE_PROTOTYPES.
- */
-
-#define HAVE_PROTOTYPES
-
-#ifdef HAVE_PROTOTYPES
-int testfunction (int arg1, int * arg2); /* check prototypes */
-
-struct methods_struct { /* check method-pointer declarations */
- int (*error_exit) (char *msgtext);
- int (*trace_message) (char *msgtext);
- int (*another_method) (void);
-};
-
-int testfunction (int arg1, int * arg2) /* check definitions */
-{
- return arg2[arg1];
-}
-
-int test2function (void) /* check void arg list */
-{
- return 0;
-}
-#endif
-
-
-/* Now we want to find out if your compiler knows what "unsigned char" means.
- * If you get an error on the "unsigned char un_char;" line,
- * then undefine HAVE_UNSIGNED_CHAR.
- */
-
-#define HAVE_UNSIGNED_CHAR
-
-#ifdef HAVE_UNSIGNED_CHAR
-unsigned char un_char;
-#endif
-
-
-/* Now we want to find out if your compiler knows what "unsigned short" means.
- * If you get an error on the "unsigned short un_short;" line,
- * then undefine HAVE_UNSIGNED_SHORT.
- */
-
-#define HAVE_UNSIGNED_SHORT
-
-#ifdef HAVE_UNSIGNED_SHORT
-unsigned short un_short;
-#endif
-
-
-/* Now we want to find out if your compiler understands type "void".
- * If you get an error anywhere in here, undefine HAVE_VOID.
- */
-
-#define HAVE_VOID
-
-#ifdef HAVE_VOID
-/* Caution: a C++ compiler will insist on complete prototypes */
-typedef void * void_ptr; /* check void * */
-#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
-typedef void (*void_func) (int a, int b);
-#else
-typedef void (*void_func) ();
-#endif
-
-#ifdef HAVE_PROTOTYPES /* check void function result */
-void test3function (void_ptr arg1, void_func arg2)
-#else
-void test3function (arg1, arg2)
- void_ptr arg1;
- void_func arg2;
-#endif
-{
- char * locptr = (char *) arg1; /* check casting to and from void * */
- arg1 = (void *) locptr;
- (*arg2) (1, 2); /* check call of fcn returning void */
-}
-#endif
-
-
-/* Now we want to find out if your compiler knows what "const" means.
- * If you get an error here, undefine HAVE_CONST.
- */
-
-#define HAVE_CONST
-
-#ifdef HAVE_CONST
-static const int carray[3] = {1, 2, 3};
-
-#ifdef HAVE_PROTOTYPES
-int test4function (const int arg1)
-#else
-int test4function (arg1)
- const int arg1;
-#endif
-{
- return carray[arg1];
-}
-#endif
-
-
-/* If you get an error or warning about this structure definition,
- * define INCOMPLETE_TYPES_BROKEN.
- */
-
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifndef INCOMPLETE_TYPES_BROKEN
-typedef struct undefined_structure * undef_struct_ptr;
-#endif
-
-
-/* If you get an error about duplicate names,
- * define NEED_SHORT_EXTERNAL_NAMES.
- */
-
-#undef NEED_SHORT_EXTERNAL_NAMES
-
-#ifndef NEED_SHORT_EXTERNAL_NAMES
-
-int possibly_duplicate_function ()
-{
- return 0;
-}
-
-int possibly_dupli_function ()
-{
- return 1;
-}
-
-#endif
-
-
-
-/************************************************************************
- * OK, that's it. You should not have to change anything beyond this
- * point in order to compile and execute this program. (You might get
- * some warnings, but you can ignore them.)
- * When you run the program, it will make a couple more tests that it
- * can do automatically, and then it will create jconfig.h and print out
- * any additional suggestions it has.
- ************************************************************************
- */
-
-
-#ifdef HAVE_PROTOTYPES
-int is_char_signed (int arg)
-#else
-int is_char_signed (arg)
- int arg;
-#endif
-{
- if (arg == 189) { /* expected result for unsigned char */
- return 0; /* type char is unsigned */
- }
- else if (arg != -67) { /* expected result for signed char */
- printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
- printf("I fear the JPEG software will not work at all.\n\n");
- }
- return 1; /* assume char is signed otherwise */
-}
-
-
-#ifdef HAVE_PROTOTYPES
-int is_shifting_signed (long arg)
-#else
-int is_shifting_signed (arg)
- long arg;
-#endif
-/* See whether right-shift on a long is signed or not. */
-{
- long res = arg >> 4;
-
- if (res == -0x7F7E80CL) { /* expected result for signed shift */
- return 1; /* right shift is signed */
- }
- /* see if unsigned-shift hack will fix it. */
- /* we can't just test exact value since it depends on width of long... */
- res |= (~0L) << (32-4);
- if (res == -0x7F7E80CL) { /* expected result now? */
- return 0; /* right shift is unsigned */
- }
- printf("Right shift isn't acting as I expect it to.\n");
- printf("I fear the JPEG software will not work at all.\n\n");
- return 0; /* try it with unsigned anyway */
-}
-
-
-#ifdef HAVE_PROTOTYPES
-int main (int argc, char ** argv)
-#else
-int main (argc, argv)
- int argc;
- char ** argv;
-#endif
-{
- char signed_char_check = (char) (-67);
- FILE *outfile;
-
- /* Attempt to write jconfig.h */
- if ((outfile = fopen("jconfig.h", "w")) == NULL) {
- printf("Failed to write jconfig.h\n");
- return 1;
- }
-
- /* Write out all the info */
- fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n");
- fprintf(outfile, "/* see jconfig.doc for explanations */\n\n");
-#ifdef HAVE_PROTOTYPES
- fprintf(outfile, "#define HAVE_PROTOTYPES\n");
-#else
- fprintf(outfile, "#undef HAVE_PROTOTYPES\n");
-#endif
-#ifdef HAVE_UNSIGNED_CHAR
- fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n");
-#else
- fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n");
-#endif
-#ifdef HAVE_UNSIGNED_SHORT
- fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n");
-#else
- fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n");
-#endif
-#ifdef HAVE_VOID
- fprintf(outfile, "/* #define void char */\n");
-#else
- fprintf(outfile, "#define void char\n");
-#endif
-#ifdef HAVE_CONST
- fprintf(outfile, "/* #define const */\n");
-#else
- fprintf(outfile, "#define const\n");
-#endif
- if (is_char_signed((int) signed_char_check))
- fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n");
- else
- fprintf(outfile, "#define CHAR_IS_UNSIGNED\n");
-#ifdef HAVE_STDDEF_H
- fprintf(outfile, "#define HAVE_STDDEF_H\n");
-#else
- fprintf(outfile, "#undef HAVE_STDDEF_H\n");
-#endif
-#ifdef HAVE_STDLIB_H
- fprintf(outfile, "#define HAVE_STDLIB_H\n");
-#else
- fprintf(outfile, "#undef HAVE_STDLIB_H\n");
-#endif
-#ifdef NEED_BSD_STRINGS
- fprintf(outfile, "#define NEED_BSD_STRINGS\n");
-#else
- fprintf(outfile, "#undef NEED_BSD_STRINGS\n");
-#endif
-#ifdef NEED_SYS_TYPES_H
- fprintf(outfile, "#define NEED_SYS_TYPES_H\n");
-#else
- fprintf(outfile, "#undef NEED_SYS_TYPES_H\n");
-#endif
- fprintf(outfile, "#undef NEED_FAR_POINTERS\n");
-#ifdef NEED_SHORT_EXTERNAL_NAMES
- fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n");
-#else
- fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n");
-#endif
-#ifdef INCOMPLETE_TYPES_BROKEN
- fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n");
-#else
- fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n");
-#endif
-#ifdef _WIN32
- fprintf(outfile, "\n/* Define "boolean" as unsigned char, not int, per Windows custom */\n");
- fprintf(outfile, "#define TYPEDEF_UCHAR_BOOLEAN\n");
-#endif
- fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n");
- if (is_shifting_signed(-0x7F7E80B1L))
- fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n");
- else
- fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n");
- fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n");
-
- fprintf(outfile, "\n#if defined(JPEG_INTERNALS) || defined(JPEG_INTERNAL_OPTIONS)\n");
- fprintf(outfile, "#undef JSIMD_MMX_NOT_SUPPORTED\n");
- fprintf(outfile, "#undef JSIMD_3DNOW_NOT_SUPPORTED\n");
- fprintf(outfile, "#undef JSIMD_SSE_NOT_SUPPORTED\n");
- fprintf(outfile, "#undef JSIMD_SSE2_NOT_SUPPORTED\n");
- fprintf(outfile, "#endif\n");
-
- fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n");
- fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n");
- fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n");
- fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n");
- fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n");
- fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n");
- fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n");
-#ifdef _WIN32
- fprintf(outfile, "#define USE_SETMODE /* Needed to make one-file style work */\n");
-#endif
- fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n");
- fprintf(outfile, "#undef DONT_USE_B_MODE\n");
- fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n");
- fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n");
-
- /* Close the jconfig.h file */
- fclose(outfile);
-
- /* User report */
- printf("Configuration check for Independent JPEG Group's software done.\n");
- printf("\nI have written the jconfig.h file for you.\n\n");
-#ifdef HAVE_PROTOTYPES
- printf("You should use makefile.ansi as the starting point for your Makefile.\n");
-#else
- printf("You should use makefile.unix as the starting point for your Makefile.\n");
-#endif
-
-#ifdef NEED_SPECIAL_INCLUDE
- printf("\nYou'll need to change jconfig.h to include the system include file\n");
- printf("that you found type size_t in, or add a direct definition of type\n");
- printf("size_t if that's what you used. Just add it to the end.\n");
-#endif
-
- return 0;
-}
diff --git a/coderules.doc b/coderules.doc
deleted file mode 100644
index 0ab5d9b..0000000
--- a/coderules.doc
+++ /dev/null
@@ -1,118 +0,0 @@
-IJG JPEG LIBRARY: CODING RULES
-
-Copyright (C) 1991-1996, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-Since numerous people will be contributing code and bug fixes, it's important
-to establish a common coding style. The goal of using similar coding styles
-is much more important than the details of just what that style is.
-
-In general we follow the recommendations of "Recommended C Style and Coding
-Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and
-Brader). This document is available in the IJG FTP archive (see
-jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl).
-
-Block comments should be laid out thusly:
-
-/*
- * Block comments in this style.
- */
-
-We indent statements in K&R style, e.g.,
- if (test) {
- then-part;
- } else {
- else-part;
- }
-with two spaces per indentation level. (This indentation convention is
-handled automatically by GNU Emacs and many other text editors.)
-
-Multi-word names should be written in lower case with underscores, e.g.,
-multi_word_name (not multiWordName). Preprocessor symbols and enum constants
-are similar but upper case (MULTI_WORD_NAME). Names should be unique within
-the first fifteen characters. (On some older systems, global names must be
-unique within six characters. We accommodate this without cluttering the
-source code by using macros to substitute shorter names.)
-
-We use function prototypes everywhere; we rely on automatic source code
-transformation to feed prototype-less C compilers. Transformation is done
-by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
-ansi2knr is not very bright, so it imposes a format requirement on function
-declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
-should be written in the following style:
-
-LOCAL(int *)
-function_name (int a, char *b)
-{
- code...
-}
-
-Note that each function definition must begin with GLOBAL(type), LOCAL(type),
-or METHODDEF(type). These macros expand to "static type" or just "type" as
-appropriate. They provide a readable indication of the routine's usage and
-can readily be changed for special needs. (For instance, special linkage
-keywords can be inserted for use in Windows DLLs.)
-
-ansi2knr does not transform method declarations (function pointers in
-structs). We handle these with a macro JMETHOD, defined as
- #ifdef HAVE_PROTOTYPES
- #define JMETHOD(type,methodname,arglist) type (*methodname) arglist
- #else
- #define JMETHOD(type,methodname,arglist) type (*methodname) ()
- #endif
-which is used like this:
- struct function_pointers {
- JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
- JMETHOD(void, term_entropy_encoder, (void));
- };
-Note the set of parentheses surrounding the parameter list.
-
-A similar solution is used for forward and external function declarations
-(see the EXTERN and JPP macros).
-
-If the code is to work on non-ANSI compilers, we cannot rely on a prototype
-declaration to coerce actual parameters into the right types. Therefore, use
-explicit casts on actual parameters whenever the actual parameter type is not
-identical to the formal parameter. Beware of implicit conversions to "int".
-
-It seems there are some non-ANSI compilers in which the sizeof() operator
-is defined to return int, yet size_t is defined as long. Needless to say,
-this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(),
-so that the result is guaranteed to be of type size_t.
-
-
-The JPEG library is intended to be used within larger programs. Furthermore,
-we want it to be reentrant so that it can be used by applications that process
-multiple images concurrently. The following rules support these requirements:
-
-1. Avoid direct use of file I/O, "malloc", error report printouts, etc;
-pass these through the common routines provided.
-
-2. Minimize global namespace pollution. Functions should be declared static
-wherever possible. (Note that our method-based calling conventions help this
-a lot: in many modules only the initialization function will ever need to be
-called directly, so only that function need be externally visible.) All
-global function names should begin with "jpeg_", and should have an
-abbreviated name (unique in the first six characters) substituted by macro
-when NEED_SHORT_EXTERNAL_NAMES is set.
-
-3. Don't use global variables; anything that must be used in another module
-should be in the common data structures.
-
-4. Don't use static variables except for read-only constant tables. Variables
-that should be private to a module can be placed into private structures (see
-the system architecture document, structure.doc).
-
-5. Source file names should begin with "j" for files that are part of the
-library proper; source files that are not part of the library, such as cjpeg.c
-and djpeg.c, do not begin with "j". Keep source file names to eight
-characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
-compression and decompression code in separate source files --- some
-applications may want only one half of the library.
-
-Note: these rules (particularly #4) are not followed religiously in the
-modules that are used in cjpeg/djpeg but are not part of the JPEG library
-proper. Those modules are not really intended to be used in other
-applications.
diff --git a/config.guess b/config.guess
deleted file mode 100644
index fb25fa4..0000000
--- a/config.guess
+++ /dev/null
@@ -1,1491 +0,0 @@
-#! /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 Free Software Foundation, Inc.
-
-timestamp='2006-01-30'
-
-# 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 <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. 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 <config-patches@gnu.org>."
-
-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
-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 ;;
- *) 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 powerppc-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 ;;
- 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.*:*)
- echo i386-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 <stdio.h> /* 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 <sys/systemcfg.h>
-
- 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:*:[45])
- 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 <stdlib.h>
- #include <unistd.h>
-
- 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 <unistd.h>
- 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/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- i*: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 ;;
- x86:Interix*:[345]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit ;;
- [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:*:*)
- 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 ;;
- 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 ;;
- 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 ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- 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 <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI)
- 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' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/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 i386.
- echo i386-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; } ;;
- 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 <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # 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 ;;
- 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 ;;
- 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 ;;
-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 <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#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 <sys/param.h>
- 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 <sys/param.h>
-# 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 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> 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:
diff --git a/config.sub b/config.sub
deleted file mode 100644
index a4e8a94..0000000
--- a/config.sub
+++ /dev/null
@@ -1,1606 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2006-01-02'
-
-# 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 <config-patches@gnu.org>. 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 <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-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* | \
- 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 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | mt \
- | msp430 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m32c)
- 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-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | 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-* \
- | 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[23]e-* | sh[34]eb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- m32c-*)
- ;;
- # 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
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- 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
- ;;
- cr16c)
- basic_machine=cr16c-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
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- 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
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- 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
- ;;
- 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
- ;;
- 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[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
- 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* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -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* \
- | -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*)
- # 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
- ;;
- -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
- *-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
- ;;
- 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:
diff --git a/config.ver b/config.ver
deleted file mode 100644
index 5b6b6c8..0000000
--- a/config.ver
+++ /dev/null
@@ -1,44 +0,0 @@
-
-JPEG_VER_MAJOR=62
-JPEG_VER_MINOR=1
-JPEG_REVISION=0
-
-case $host_os in
- cygwin*)
- # The shared library built from this source code is *not* binary
- # compatible with the cygwin's official binary release (cygjpeg-62.dll).
- # This is because the official binary has been built with
- # the lossless jpeg patch which is available as ljpeg-6b.tar.gz .
- # Therefore we decided to give the shared library the version number
- # other than 62.
- #
- JPEG_VER_MAJOR=162
- JPEG_VER_MINOR=0
- ;;
- freebsd*)
- # This follows the official binary release in the ports collection.
- JPEG_VER_MAJOR=9
- ;;
-esac
-
-# convert absolute version numbers to libtool ages
-case $version_type in
- freebsd-aout|freebsd-elf|sunos)
- JPEG_LT_CURRENT=$JPEG_VER_MAJOR
- JPEG_LT_REVISION=$JPEG_VER_MINOR
- JPEG_LT_AGE=0
- ;;
- irix|nonstopux)
- JPEG_LT_CURRENT=`expr $JPEG_VER_MAJOR + $JPEG_VER_MINOR - 1`
- JPEG_LT_AGE=$JPEG_VER_MINOR
- JPEG_LT_REVISION=$JPEG_VER_MINOR
- ;;
- *)
- JPEG_LT_CURRENT=`expr $JPEG_VER_MAJOR + $JPEG_VER_MINOR`
- JPEG_LT_AGE=$JPEG_VER_MINOR
- JPEG_LT_REVISION=$JPEG_REVISION
- ;;
-esac
-
-JPEG_LIB_VERSION=$JPEG_LT_CURRENT:$JPEG_LT_REVISION:$JPEG_LT_AGE
-
diff --git a/configure b/configure
deleted file mode 100755
index 9c368e5..0000000
--- a/configure
+++ /dev/null
@@ -1,7112 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=no]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=no]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-
-# Find the correct PATH separator. Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) lt_cv_sys_path_separator=';' ;;
- *) lt_cv_sys_path_separator=':' ;;
- esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
-fi
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
- ;;
-esac
-
-echo=${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 <<EOF
-
-EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test -z "$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 &&
- echo_test_string="`eval $cmd`" &&
- (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.
-
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- 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="$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.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-ac_help="$ac_help
- --enable-maxmem[=N] enable use of temp files, set max mem usage to N MB"
-ac_help="$ac_help
-"
-ac_help="$ac_help
- --disable-mmx do not use MMX instruction set"
-ac_help="$ac_help
- --disable-3dnow do not use 3DNow! instruction set"
-ac_help="$ac_help
- --disable-sse do not use SSE instruction set"
-ac_help="$ac_help
- --disable-sse2 do not use SSE2 instruction set"
-ac_help="$ac_help
- --enable-uchar-boolean define type \"boolean\" as unsigned char (for Windows)"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -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 ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$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" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$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)
- # 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 << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --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
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$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" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- 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)
- 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" ;;
-
- -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 ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=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" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=jcmaster.c
-
-# 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 its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- 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
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:714: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-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
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:744: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_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 $# -gt 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
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:795: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:827: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 838 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:869: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:874: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:902: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&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
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:934: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 949 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 966 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 983 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
-echo "configure:1014: checking for function prototypes" >&5
-if eval "test \"`echo '$''{'ijg_cv_have_prototypes'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1019 "configure"
-#include "confdefs.h"
-
-int testfunction (int arg1, int * arg2); /* check prototypes */
-struct methods_struct { /* check method-pointer declarations */
- int (*error_exit) (char *msgtext);
- int (*trace_message) (char *msgtext);
- int (*another_method) (void);
-};
-int testfunction (int arg1, int * arg2) /* check definitions */
-{ return arg2[arg1]; }
-int test2function (void) /* check void arg list */
-{ return 0; }
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ijg_cv_have_prototypes=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ijg_cv_have_prototypes=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ijg_cv_have_prototypes" 1>&6
-if test $ijg_cv_have_prototypes = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_PROTOTYPES
-EOF
-
-else
- echo Your compiler does not seem to know about function prototypes.
- echo Perhaps it needs a special switch to enable ANSI C mode.
- echo If so, we recommend running configure like this:
- echo " ./configure CC='cc -switch'"
- echo where -switch is the proper switch.
-fi
-ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stddef.h""... $ac_c" 1>&6
-echo "configure:1064: checking for stddef.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1069 "configure"
-#include "confdefs.h"
-#include <stddef.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_STDDEF_H
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
-echo "configure:1100: checking for stdlib.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1105 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_STDLIB_H
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-
-ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for string.h""... $ac_c" 1>&6
-echo "configure:1136: checking for string.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1141 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NEED_BSD_STRINGS
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1172: checking for size_t" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1174 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#include <stdio.h>
-#ifdef NEED_BSD_STRINGS
-#include <strings.h>
-#else
-#include <string.h>
-#endif
-typedef size_t my_size_t;
-
-int main() {
- my_size_t foovar;
-; return 0; }
-EOF
-if { (eval echo configure:1195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ijg_size_t_ok=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"
-fi
-rm -f conftest*
-echo "$ac_t""$ijg_size_t_ok" 1>&6
-if test "$ijg_size_t_ok" != yes; then
-ac_safe=`echo "sys/types.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for sys/types.h""... $ac_c" 1>&6
-echo "configure:1209: checking for sys/types.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1214 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define NEED_SYS_TYPES_H
-EOF
-
-cat > conftest.$ac_ext <<EOF
-#line 1240 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "size_t" >/dev/null 2>&1; then
- rm -rf conftest*
- ijg_size_t_ok="size_t is in sys/types.h"
-else
- rm -rf conftest*
- ijg_size_t_ok=no
-fi
-rm -f conftest*
-
-else
- echo "$ac_t""no" 1>&6
-ijg_size_t_ok=no
-fi
-
-echo "$ac_t""$ijg_size_t_ok" 1>&6
-if test "$ijg_size_t_ok" = no; then
- echo Type size_t is not defined in any of the usual places.
- echo Try putting '"typedef unsigned int size_t;"' in jconfig.h.
-fi
-fi
-echo $ac_n "checking for type unsigned char""... $ac_c" 1>&6
-echo "configure:1266: checking for type unsigned char" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1268 "configure"
-#include "confdefs.h"
-
-int main() {
- unsigned char un_char;
-; return 0; }
-EOF
-if { (eval echo configure:1275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-cat >> confdefs.h <<\EOF
-#define HAVE_UNSIGNED_CHAR
-EOF
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-echo $ac_n "checking for type unsigned short""... $ac_c" 1>&6
-echo "configure:1290: checking for type unsigned short" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1292 "configure"
-#include "confdefs.h"
-
-int main() {
- unsigned short un_short;
-; return 0; }
-EOF
-if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-cat >> confdefs.h <<\EOF
-#define HAVE_UNSIGNED_SHORT
-EOF
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-echo $ac_n "checking for type void""... $ac_c" 1>&6
-echo "configure:1314: checking for type void" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1316 "configure"
-#include "confdefs.h"
-
-/* Caution: a C++ compiler will insist on valid prototypes */
-typedef void * void_ptr; /* check void * */
-#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
-typedef void (*void_func) (int a, int b);
-#else
-typedef void (*void_func) ();
-#endif
-
-#ifdef HAVE_PROTOTYPES /* check void function result */
-void test3function (void_ptr arg1, void_func arg2)
-#else
-void test3function (arg1, arg2)
- void_ptr arg1;
- void_func arg2;
-#endif
-{
- char * locptr = (char *) arg1; /* check casting to and from void * */
- arg1 = (void *) locptr;
- (*arg2) (1, 2); /* check call of fcn returning void */
-}
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define void char
-EOF
-
-fi
-rm -f conftest*
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1360: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1365 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:1414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_const=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1435: checking for inline" >&5
-ijg_cv_inline=""
-cat > conftest.$ac_ext <<EOF
-#line 1438 "configure"
-#include "confdefs.h"
-
-int main() {
-} __inline__ int foo() { return 0; }
-int bar() { return foo();
-; return 0; }
-EOF
-if { (eval echo configure:1446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ijg_cv_inline="__inline__"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
-#line 1454 "configure"
-#include "confdefs.h"
-
-int main() {
-} __inline int foo() { return 0; }
-int bar() { return foo();
-; return 0; }
-EOF
-if { (eval echo configure:1462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ijg_cv_inline="__inline"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
-#line 1470 "configure"
-#include "confdefs.h"
-
-int main() {
-} inline int foo() { return 0; }
-int bar() { return foo();
-; return 0; }
-EOF
-if { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ijg_cv_inline="inline"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-echo "$ac_t""$ijg_cv_inline" 1>&6
-cat >> confdefs.h <<EOF
-#define INLINE $ijg_cv_inline
-EOF
-
-echo $ac_n "checking for broken incomplete types""... $ac_c" 1>&6
-echo "configure:1496: checking for broken incomplete types" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1498 "configure"
-#include "confdefs.h"
- typedef struct undefined_structure * undef_struct_ptr;
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""ok" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""broken" 1>&6
-cat >> confdefs.h <<\EOF
-#define INCOMPLETE_TYPES_BROKEN
-EOF
-
-fi
-rm -f conftest*
-echo $ac_n "checking for short external names""... $ac_c" 1>&6
-echo "configure:1520: checking for short external names" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1522 "configure"
-#include "confdefs.h"
-
-int possibly_duplicate_function () { return 0; }
-int possibly_dupli_function () { return 1; }
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""ok" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""short" 1>&6
-cat >> confdefs.h <<\EOF
-#define NEED_SHORT_EXTERNAL_NAMES
-EOF
-
-fi
-rm -f conftest*
-echo $ac_n "checking to see if char is signed""... $ac_c" 1>&6
-echo "configure:1547: checking to see if char is signed" >&5
-if test "$cross_compiling" = yes; then
- echo Assuming that char is signed on target machine.
-echo If it is unsigned, this will be a little bit inefficient.
-
-else
- cat > conftest.$ac_ext <<EOF
-#line 1554 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_PROTOTYPES
-int is_char_signed (int arg)
-#else
-int is_char_signed (arg)
- int arg;
-#endif
-{
- if (arg == 189) { /* expected result for unsigned char */
- return 0; /* type char is unsigned */
- }
- else if (arg != -67) { /* expected result for signed char */
- printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
- printf("I fear the JPEG software will not work at all.\n\n");
- }
- return 1; /* assume char is signed otherwise */
-}
-char signed_char_check = (char) (-67);
-main() {
- exit(is_char_signed((int) signed_char_check));
-}
-EOF
-if { (eval echo configure:1578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define CHAR_IS_UNSIGNED
-EOF
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "$ac_t""yes" 1>&6
-fi
-rm -fr conftest*
-fi
-
-echo $ac_n "checking to see if right shift is signed""... $ac_c" 1>&6
-echo "configure:1595: checking to see if right shift is signed" >&5
-if test "$cross_compiling" = yes; then
- echo "$ac_t""Assuming that right shift is signed on target machine." 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1600 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_PROTOTYPES
-int is_shifting_signed (long arg)
-#else
-int is_shifting_signed (arg)
- long arg;
-#endif
-/* See whether right-shift on a long is signed or not. */
-{
- long res = arg >> 4;
-
- if (res == -0x7F7E80CL) { /* expected result for signed shift */
- return 1; /* right shift is signed */
- }
- /* see if unsigned-shift hack will fix it. */
- /* we can't just test exact value since it depends on width of long... */
- res |= (~0L) << (32-4);
- if (res == -0x7F7E80CL) { /* expected result now? */
- return 0; /* right shift is unsigned */
- }
- printf("Right shift isn't acting as I expect it to.\n");
- printf("I fear the JPEG software will not work at all.\n\n");
- return 0; /* try it with unsigned anyway */
-}
-main() {
- exit(is_shifting_signed(-0x7F7E80B1L));
-}
-EOF
-if { (eval echo configure:1630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define RIGHT_SHIFT_IS_UNSIGNED
-EOF
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "$ac_t""yes" 1>&6
-fi
-rm -fr conftest*
-fi
-
-echo $ac_n "checking to see if fopen accepts b spec""... $ac_c" 1>&6
-echo "configure:1647: checking to see if fopen accepts b spec" >&5
-if test "$cross_compiling" = yes; then
- echo "$ac_t""Assuming that it does." 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1652 "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-main() {
- if (fopen("conftestdata", "wb") != NULL)
- exit(0);
- exit(1);
-}
-EOF
-if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define DONT_USE_B_MODE
-EOF
-
-fi
-rm -fr conftest*
-fi
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-# 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
-# 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"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1709: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/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
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-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. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&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_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1764: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1799: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1820: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1825 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1853: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1858 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1884: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-# Decide whether to use libtool,
-# and if so whether to build shared, static, or both flavors of library.
-# Check whether --enable-shared or --disable-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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=no
-fi
-
-# Check whether --enable-static or --disable-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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=no
-fi
-
-if test "x$enable_shared" != xno -o "x$enable_static" != xno; then
- USELIBTOOL="yes"
-# LIBTOOL="./libtool"
- O="lo"
- A="la"
- LN='$(LIBTOOL) --mode=link $(CC)'
- INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
- INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM"
- UNINSTALL='$(LIBTOOL) --mode=uninstall $(RM)'
-else
- USELIBTOOL="no"
- LIBTOOL=""
- O="o"
- A="a"
- LN='$(CC)'
- INSTALL_LIB="$INSTALL_DATA"
- UNINSTALL='$(RM)'
-fi
-
-
-
-
-
-
-
-# Configure libtool if needed.
-if test $USELIBTOOL = yes; then
-
-
- # Find the correct PATH separator. Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) lt_cv_sys_path_separator=';' ;;
- *) lt_cv_sys_path_separator=':' ;;
- esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
-fi
-
-# Check whether --enable-fast-install or --disable-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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:2027: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-# Check whether --with-gnu-ld or --without-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.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:2056: checking for ld used by GCC" >&5
- 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.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path 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
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:2086: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:2089: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- 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 GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:2124: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:2141: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:2153: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}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
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
-echo "configure:2191: checking for a sed that does not truncate output" >&5
-if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # 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_executable_p="test -f"
-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
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-
- # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=$TMPDIR/sed$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- { (exit 1); exit 1; }
-}
- _max=0
- _count=0
- # Add /usr/xpg4/bin/sed as it is typically found on Solaris
- # along with /bin/sed that truncates output.
- for _sed in $_sed_list /usr/xpg4/bin/sed; do
- test ! -f ${_sed} && break
- cat /dev/null > "$tmp/sed.in"
- _count=0
- echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
- # Check for GNU sed and select it if it is found.
- if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
- lt_cv_path_SED=${_sed}
- break
- fi
- while true; do
- cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
- mv "$tmp/sed.tmp" "$tmp/sed.in"
- cp "$tmp/sed.in" "$tmp/sed.nl"
- echo >>"$tmp/sed.nl"
- ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
- cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
- # 40000 chars as input seems more than enough
- test $_count -gt 10 && break
- _count=`expr $_count + 1`
- if test $_count -gt $_max; then
- _max=$_count
- lt_cv_path_SED=$_sed
- fi
- done
- done
- rm -rf "$tmp"
-
-fi
-
-if test "X$SED" != "X"; then
- lt_cv_path_SED=$SED
-else
- SED=$lt_cv_path_SED
-fi
-echo "$ac_t""$SED" 1>&6
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2275: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
-echo "configure:2296: checking how to recognise dependent libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&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 egrep 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
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- 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* | mingw* | pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd*)
- 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)/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_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- irix5* | nonstopux*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- 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
- ;;
-
-openbsd*)
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
- else
- lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- 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
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2482: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
-echo "configure:2516: checking command to parse $NM output" >&5
-if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&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]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[ABCDGISTW]'
- ;;
-hpux*) # Its linker distinguishes data from code symbols
- lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- ;;
-irix* | nonstopux*)
- symcode='[BCDEGRST]'
- ;;
-osf*)
- symcode='[BCDEGQRST]'
- ;;
-solaris* | sysv5*)
- symcode='[BDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[ABCDGISTW]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Write the raw and C identifiers.
-lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- pipe_works=no
- rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
- if { (eval echo configure:2599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { (eval echo configure:2602: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && 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 egrep ' nm_test_var$' "$nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
-
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{
-EOF
- sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
- pipe_works=yes
- fi
- LIBS="$save_LIBS"
- CFLAGS="$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 -f 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
-
-global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- global_symbol_to_cdecl=
- global_symbol_to_c_name_address=
-else
- global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
- global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
-fi
-if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
-then
- echo "$ac_t""failed" 1>&6
-else
- echo "$ac_t""ok" 1>&6
-fi
-
-for ac_hdr in dlfcn.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2702: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2707 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-
-
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2748: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- 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 <<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
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2810: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- 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 <<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
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# 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
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2881: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2913: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# 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
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2948: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2980: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- STRIP=":"
-fi
-fi
-
-
-enable_dlopen=yes
-enable_win32_dll=yes
-
-# Check whether --enable-libtool-lock or --disable-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
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 3029 "configure"' > conftest.$ac_ext
- if { (eval echo configure:3030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- 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
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:3051: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 3064 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&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
- ;;
-
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- # 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
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3101: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3133: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="false"
-fi
-fi
-
- # 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
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3168: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3200: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="false"
-fi
-fi
-
- # 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
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3235: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_OBJDUMP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3267: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- OBJDUMP="false"
-fi
-fi
-
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:3303: checking if libtool should supply DllMain function" >&5
-if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3308 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_need_dllmain=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_need_dllmain=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_need_dllmain" 1>&6
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:3337: checking how to link DLLs" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 3342 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:3349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_dll_switch=-mdll
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_dll_switch=-dll
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
-
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-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'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-need_locks="$enable_libtool_lock"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-if test x"$host" != x"$build"; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case $host_os in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-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
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
- ;;
- *)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
-
-echo $ac_n "checking for objdir""... $ac_c" 1>&6
-echo "configure:3463: checking for objdir" >&5
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-echo "$ac_t""$objdir" 1>&6
-
-
-# Check whether --with-pic or --without-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
-
-# We assume here that the value for lt_cv_prog_cc_pic will not be cached
-# in isolation, and that seeing it set (from the cache) indicates that
-# the associated values are set (in the cache) correctly too.
-echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
-echo "configure:3490: checking for $compiler option to produce PIC" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_prog_cc_pic=
- lt_cv_prog_cc_shlib=
- lt_cv_prog_cc_wl=
- lt_cv_prog_cc_static=
- lt_cv_prog_cc_no_builtin=
- lt_cv_prog_cc_can_build_shared=$can_build_shared
-
- if test "$GCC" = yes; then
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-static'
-
- case $host_os in
- aix*)
- # Below there is a dirty hack to force normal static linking with -ldl
- # The problem is because libdl dynamically linked with both libc and
- # libC (AIX C++ library), which obviously doesn't included in libraries
- # list by gcc. This cause undefined symbols with -static flags.
- # This hack allows C programs to be linked with "-static -ldl", but
- # not sure about C++ programs.
- lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
- ;;
- amigaos*)
- # 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_cv_prog_cc_pic='-fno-common'
- ;;
- cygwin* | mingw* | pw32* | os2*)
- # 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_cv_prog_cc_pic='-DDLL_EXPORT'
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_cv_prog_cc_pic=-Kconform_pic
- fi
- ;;
- *)
- lt_cv_prog_cc_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for PIC flags for the system compiler.
- case $host_os in
- aix3* | aix4* | aix5*)
- lt_cv_prog_cc_wl='-Wl,'
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_cv_prog_cc_static='-Bstatic'
- else
- lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- hpux9* | hpux10* | hpux11*)
- # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
- lt_cv_prog_cc_pic='+Z'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
- # PIC (with -KPIC) is the default.
- ;;
-
- cygwin* | mingw* | pw32* | os2*)
- # 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_cv_prog_cc_pic='-DDLL_EXPORT'
- ;;
-
- newsos6)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- ;;
-
- osf3* | osf4* | osf5*)
- # All OSF/1 code is PIC.
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
- ;;
-
- sco3.2v5*)
- lt_cv_prog_cc_pic='-Kpic'
- lt_cv_prog_cc_static='-dn'
- lt_cv_prog_cc_shlib='-belf'
- ;;
-
- solaris*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
- ;;
-
- sunos4*)
- lt_cv_prog_cc_pic='-PIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Qoption ld '
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
- ;;
-
- uts4*)
- lt_cv_prog_cc_pic='-pic'
- lt_cv_prog_cc_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_cv_prog_cc_pic='-Kconform_pic'
- lt_cv_prog_cc_static='-Bstatic'
- fi
- ;;
-
- *)
- lt_cv_prog_cc_can_build_shared=no
- ;;
- esac
- fi
-
-fi
-
-if test -z "$lt_cv_prog_cc_pic"; then
- echo "$ac_t""none" 1>&6
-else
- echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
-
- # Check to make sure the pic_flag actually works.
- echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
-echo "configure:3638: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
- if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
- cat > conftest.$ac_ext <<EOF
-#line 3645 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- case $host_os in
- hpux9* | hpux10* | hpux11*)
- # On HP-UX, both CC and GCC only warn that PIC is supported... then
- # they create non-PIC objects. So, if there were any warnings, we
- # assume that PIC is not supported.
- if test -s conftest.err; then
- lt_cv_prog_cc_pic_works=no
- else
- lt_cv_prog_cc_pic_works=yes
- fi
- ;;
- *)
- lt_cv_prog_cc_pic_works=yes
- ;;
- esac
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_prog_cc_pic_works=no
-
-fi
-rm -f conftest*
- CFLAGS="$save_CFLAGS"
-
-fi
-
-
- if test "X$lt_cv_prog_cc_pic_works" = Xno; then
- lt_cv_prog_cc_pic=
- lt_cv_prog_cc_can_build_shared=no
- else
- lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
- fi
-
- echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
-fi
-
-# Check for any special shared library compilation flags.
-if test -n "$lt_cv_prog_cc_shlib"; then
- echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
- if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then :
- else
- echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
- lt_cv_prog_cc_can_build_shared=no
- fi
-fi
-
-echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
-echo "configure:3704: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_prog_cc_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
- cat > conftest.$ac_ext <<EOF
-#line 3712 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_prog_cc_static_works=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-
-
-# Belt *and* braces to stop my trousers falling down:
-test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
-echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
-
-pic_flag="$lt_cv_prog_cc_pic"
-special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
-wl="$lt_cv_prog_cc_wl"
-link_static_flag="$lt_cv_prog_cc_static"
-no_builtin_flag="$lt_cv_prog_cc_no_builtin"
-can_build_shared="$lt_cv_prog_cc_can_build_shared"
-
-
-# Check to see if options -o and -c are simultaneously supported by compiler
-echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
-echo "configure:3746: checking if $compiler supports -c -o file.$ac_objext" >&5
-if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-echo "int some_variable = 0;" > conftest.$ac_ext
-mkdir out
-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-# that will create temporary files in the current directory regardless of
-# the output directory. Thus, making CWD read-only will cause this test
-# to fail, enabling locking or at least warning the user not to do parallel
-# builds.
-chmod -w .
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
-compiler_c_o=no
-if { (eval echo configure:3765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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
- if test -s out/conftest.err; then
- lt_cv_compiler_c_o=no
- else
- lt_cv_compiler_c_o=yes
- fi
-else
- # Append any errors to the config.log.
- cat out/conftest.err 1>&5
- lt_cv_compiler_c_o=no
-fi
-CFLAGS="$save_CFLAGS"
-chmod u+w .
-$rm conftest* out/*
-rmdir out
-cd ..
-rmdir conftest
-$rm -r conftest 2>/dev/null
-
-fi
-
-compiler_c_o=$lt_cv_compiler_c_o
-echo "$ac_t""$compiler_c_o" 1>&6
-
-if test x"$compiler_c_o" = x"yes"; then
- # Check to see if we can write to a .lo
- echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
-echo "configure:3794: checking if $compiler supports -c -o file.lo" >&5
- if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- lt_cv_compiler_o_lo=no
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -c -o conftest.lo"
- save_objext="$ac_objext"
- ac_objext=lo
- cat > conftest.$ac_ext <<EOF
-#line 3805 "configure"
-#include "confdefs.h"
-
-int main() {
-int some_variable = 0;
-; return 0; }
-EOF
-if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- lt_cv_compiler_o_lo=no
- else
- lt_cv_compiler_o_lo=yes
- fi
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
- ac_objext="$save_objext"
- CFLAGS="$save_CFLAGS"
-
-fi
-
- compiler_o_lo=$lt_cv_compiler_o_lo
- echo "$ac_t""$compiler_o_lo" 1>&6
-else
- compiler_o_lo=no
-fi
-
-# Check to see if we can do hard links to lock some files if needed
-hard_links="nottested"
-if test "$compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
-echo "configure:3843: checking if we can lock with hard links" >&5
- 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
- echo "$ac_t""$hard_links" 1>&6
- if test "$hard_links" = no; then
- echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-if test "$GCC" = yes; then
- # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
- echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
-echo "configure:3862: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
- echo "int some_variable = 0;" > conftest.$ac_ext
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
- compiler_rtti_exceptions=no
- cat > conftest.$ac_ext <<EOF
-#line 3868 "configure"
-#include "confdefs.h"
-
-int main() {
-int some_variable = 0;
-; return 0; }
-EOF
-if { (eval echo configure:3875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- compiler_rtti_exceptions=no
- else
- compiler_rtti_exceptions=yes
- fi
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
- CFLAGS="$save_CFLAGS"
- echo "$ac_t""$compiler_rtti_exceptions" 1>&6
-
- if test "$compiler_rtti_exceptions" = "yes"; then
- no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
- else
- no_builtin_flag=' -fno-builtin'
- fi
-fi
-
-# See if the linker supports building shared libraries.
-echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:3902: checking whether the linker ($LD) supports shared libraries" >&5
-
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-old_archive_from_expsyms_cmds=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_into_libs=no
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-link_all_deplibs=unknown
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# 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 egrep regular expression 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_"
-# 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.
-extract_expsyms_cmds=
-
-case $host_os in
-cygwin* | mingw* | pw32*)
- # 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
- ;;
-openbsd*)
- with_gnu_ld=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}'
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX, the GNU linker is very broken
- # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
- ld_shlibs=no
- cat <<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.
-
-EOF
- ;;
-
- amigaos*)
- 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
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can use
- # them.
- ld_shlibs=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> 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*)
- # 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=yes
-
- extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
- sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
- test -f $output_objdir/impgen.exe || (cd $output_objdir && \
- if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
- else $CC -o impgen impgen.c ; fi)~
- $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
- old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
- # cygwin and mingw dlls have different entry points and sets of symbols
- # to exclude.
- # FIXME: what about values for MSVC?
- dll_entry=__cygwin_dll_entry@12
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
- case $host_os in
- mingw*)
- # mingw values
- dll_entry=_DllMainCRTStartup@12
- dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
- ;;
- esac
-
- # mingw and cygwin differ, and it's simplest to just exclude the union
- # of the two symbol sets.
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one (in ltdll.c)
- if test "x$lt_cv_need_dllmain" = "xyes"; then
- ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
- ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
- test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
- else
- ltdll_obj=
- ltdll_cmds=
- fi
-
- # Extract the symbol export list from an `--export-all' def file,
- # then regenerate the def file from the symbol export list, so that
- # the compiled dll only exports the symbol export list.
- # Be careful not to strip the DATA tag left be newer dlltools.
- export_symbols_cmds="$ltdll_cmds"'
- $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
- sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is.
- # If DATA tags from a recent dlltool are present, honour them!
- 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;
- _lt_hint=1;
- cat $export_symbols | while read symbol; do
- set dummy \$symbol;
- case \$# in
- 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
- 4) echo " \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
- *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
- esac;
- _lt_hint=`expr 1 + \$_lt_hint`;
- done;
- fi~
- '"$ltdll_cmds"'
- $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
- $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
- ;;
-
- netbsd*)
- 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<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.
-
-EOF
- elif $LD --help 2>&1 | egrep ': 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
- ;;
-
- 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 | egrep ': 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" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- case $host_os in
- cygwin* | mingw* | pw32*)
- # dlltool doesn't understand --whole-archive et. al.
- whole_archive_flag_spec=
- ;;
- *)
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- ;;
- esac
- 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 "$link_static_flag"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- 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].*|aix5*)
- 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.
-
- hardcode_direct=yes
- archive_cmds=''
- hardcode_libdir_separator=':'
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- hardcode_direct=yes
- 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'
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- shared_flag='${wl}-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall can do strange things, 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'
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
- else
- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='${wl}-berok'
- # This is a bit strange, but is similar to how AIX traditionally builds
- # it's shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- 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
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
-
- cygwin* | mingw* | pw32*)
- # 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
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -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"`'
- ;;
-
- darwin* | rhapsody*)
- case "$host_os" in
- rhapsody* | darwin1.[012])
- allow_undefined_flag='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
- ;;
- esac
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes. Also zsh mangles
- # `"' quotes if we put them in here... so don't!
- archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
- # We need to add '_' to the symbols in $export_symbols first
- #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- whole_archive_flag_spec='-all_load $convenience'
- ;;
-
- 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*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9* | hpux10* | hpux11*)
- case $host_os in
- hpux9*) 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' ;;
- *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
- esac
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- link_all_deplibs=yes
- ;;
-
- netbsd*)
- 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
- ;;
-
- openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- 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'
- 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
- ;;
-
- 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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- 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 ${wl}-set_version ${wl}$verstring` ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
-
- #Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- ;;
-
- sco3.2v5*)
- 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
- export_dynamic_flag_spec='${wl}-Bexport'
- ;;
-
- solaris*)
- # gcc --version < 3.0 without binutils cannot create self contained
- # shared libraries reliably, requiring libgcc.a to resolve some of
- # the object symbols generated in some cases. Libraries that use
- # assert need libgcc.a to resolve __eprintf, for example. Linking
- # a copy of libgcc.a into every shared library to guarantee resolving
- # such symbols causes other problems: According to Tim Van Holder
- # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
- # (to the application) exception stack for one thing.
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- [12].*)
- cat <<EOF 1>&2
-
-*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
-*** create self contained shared libraries on Solaris systems, without
-*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
-*** -no-undefined support, which will at least allow you to build shared
-*** libraries. However, you may find that when you link such libraries
-*** into an application without using GCC, you have to manually add
-*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
-*** upgrade to a newer version of GCC. Another option is to rebuild your
-*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
-
-EOF
- no_undefined_flag=
- ;;
- esac
- fi
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- 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'
- ;;
-
- sysv5*)
- no_undefined_flag=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec=
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- 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.2uw2*)
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=no
- hardcode_shlibpath_var=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
-
- sysv5uw7* | unixware7*)
- no_undefined_flag='${wl}-z ${wl}text'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-fi
-echo "$ac_t""$ld_shlibs" 1>&6
-test "$ld_shlibs" = no && can_build_shared=no
-
-# Check hardcoding attributes.
-echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
-echo "configure:4601: checking how to hardcode library paths into programs" >&5
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
- test -n "$runpath_var"; then
-
- # We can hardcode non-existant 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 "$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
-echo "$ac_t""$hardcode_action" 1>&6
-
-striplib=
-old_striplib=
-echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
-echo "configure:4629: checking whether stripping libraries is possible" >&5
-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"
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-# PORTME Fill in your ld.so characteristics
-echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
-echo "configure:4643: checking dynamic linker characteristics" >&5
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-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"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}.so$major'
- ;;
-
-aix4* | aix5*)
- 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}.so$major ${libname}${release}.so$versuffix $libname.so'
- 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<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- 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}.so$major'
- fi
- shlibpath_var=LIBPATH
- fi
- hardcode_into_libs=yes
- ;;
-
-amigaos*)
- 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'
- ;;
-
-beos*)
- library_names_spec='${libname}.so'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi4*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$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"
- export_dynamic_flag_spec=-rdynamic
- # 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*)
- version_type=windows
- need_version=no
- need_lib_prefix=no
- case $GCC,$host_os in
- yes,cygwin*)
- library_names_spec='$libname.dll.a'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
- postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog .libs/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $rm \$dlpath'
- ;;
- yes,mingw*)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
- ;;
- yes,pw32*)
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
- ;;
- *)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $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
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes.
- library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
- soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd*)
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- *)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
- soname_spec='${libname}${release}.so$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.
- dynamic_linker="$host_os dld.sl"
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
- soname_spec='${libname}${release}.sl$major'
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *) version_type=irix ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 ") 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}"
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # 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
-
- # 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'
-
- # Find out which ABI we are using (multilib Linux x86_64 hack).
- libsuff=
- case "$host_cpu" in
- x86_64*|s390x*)
- echo '#line 4902 "configure"' > conftest.$ac_ext
- if { (eval echo configure:4903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *64-bit*)
- libsuff=64
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
- *)
- ;;
- esac
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
- ;;
-
-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}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
- soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-openbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- 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
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-os2*)
- libname_spec='$name'
- need_lib_prefix=no
- library_names_spec='$libname.dll $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_version=no
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- 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"
- hardcode_into_libs=yes
- ;;
-
-sco3.2v5*)
- version_type=osf
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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.2uw2* | sysv4.3* | sysv5*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- 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
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
- soname_spec='$libname.so.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-echo "$ac_t""$dynamic_linker" 1>&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-# Report the final consequences.
-echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
-echo "configure:5074: checking if libtool supports shared libraries" >&5
-echo "$ac_t""$can_build_shared" 1>&6
-
-echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
-echo "configure:5078: checking whether to build shared libraries" >&5
-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
- ;;
-
-aix4*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
-esac
-echo "$ac_t""$enable_shared" 1>&6
-
-echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
-echo "configure:5101: checking whether to build static libraries" >&5
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-echo "$ac_t""$enable_static" 1>&6
-
-if test "$hardcode_action" = relink; 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
-
-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 "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
- ;;
-
- cygwin* | mingw* | pw32*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- *)
- echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "configure:5142: checking for shl_load" >&5
-if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5147 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load();
-
-int main() {
-
-/* 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_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-shl_load();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:5170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_shl_load=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_shl_load=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="shl_load"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:5188: checking for shl_load in -ldld" >&5
-ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldld $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5196 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:5226: checking for dlopen" >&5
-if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 5231 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen();
-
-int main() {
-
-/* 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_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-dlopen();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_dlopen=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_dlopen=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="dlopen"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5272: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5280 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "configure:5310: checking for dlopen in -lsvld" >&5
-ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lsvld $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5318 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:5329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:5348: checking for dld_link in -ldld" >&5
-ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldld $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 5356 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dld_link();
-
-int main() {
-dld_link()
-; return 0; }
-EOF
-if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-else
- echo "$ac_t""no" 1>&6
-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"
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "configure:5423: checking whether a program can dlopen itself" >&5
-if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&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 <<EOF
-#line 5433 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#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
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#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); */
- }
-
- exit (status);
-}
-EOF
- if { (eval echo configure:5494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-
-echo "$ac_t""$lt_cv_dlopen_self" 1>&6
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
- echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "configure:5517: checking whether a statically linked program can dlopen itself" >&5
-if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&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 <<EOF
-#line 5527 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#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
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#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); */
- }
-
- exit (status);
-}
-EOF
- if { (eval echo configure:5588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-
-echo "$ac_t""$lt_cv_dlopen_self_static" 1>&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
-
-
-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.
- echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
-echo "configure:5637: checking whether -lc should be explicitly linked in" >&5
- if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- $rm conftest*
- echo 'static int dummy;' > conftest.$ac_ext
-
- if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_cv_prog_cc_wl
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { (eval echo configure:5657: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
- then
- lt_cv_archive_cmds_need_lc=no
- else
- lt_cv_archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $rm conftest*
-fi
-
- echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
- ;;
- esac
-fi
-need_lc=${lt_cv_archive_cmds_need_lc-yes}
-
-# The second clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- :
-else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- test -f Makefile && make "$ltmain"
-fi
-
-if test -f "$ltmain"; then
- trap "$rm \"${ofile}T\"; exit 1" 1 2 15
- $rm -f "${ofile}T"
-
- echo creating $ofile
-
- # Now quote all the things that may contain metacharacters while being
- # careful not to overquote the AC_SUBSTed values. We take copies of the
- # variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS SED \
- AR AR_FLAGS CC LD LN_S NM SHELL \
- reload_flag reload_cmds wl \
- pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
- thread_safe_flag_spec whole_archive_flag_spec libname_spec \
- library_names_spec soname_spec \
- RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
- old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
- postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
- old_striplib striplib file_magic_cmd export_symbols_cmds \
- deplibs_check_method allow_undefined_flag no_undefined_flag \
- finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
- global_symbol_to_c_name_address \
- hardcode_libdir_flag_spec hardcode_libdir_separator \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
-
- case $var in
- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
- extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
- ;;
- *)
- eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
- ;;
- esac
- done
-
- cat <<__EOF__ > "${ofile}T"
-#! $SHELL
-
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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.
-
-# A sed that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="${SED} -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$need_lc
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# The default C compiler.
-CC=$lt_CC
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_wl
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_pic_flag
-pic_mode=$pic_mode
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_compiler_c_o
-
-# Can we write directly to a .lo ?
-compiler_o_lo=$lt_compiler_o_lo
-
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
-
-# 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
-
-# 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
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_link_static_flag
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_no_builtin_flag
-
-# 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
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
-
-# Library versioning type.
-version_type=$version_type
-
-# 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
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# 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 and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# 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
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# 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
-
-# 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.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# 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
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# 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
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$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
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_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
-
-# ### END LIBTOOL CONFIG
-
-__EOF__
-
- case $host_os in
- aix3*)
- cat <<\EOF >> "${ofile}T"
-
-# 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
-EOF
- ;;
- esac
-
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- cat <<'EOF' >> "${ofile}T"
- # This is a source program that is used to create dlls on Windows
- # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
- # This is a source program that is used to create import libraries
- # on Windows for dlls which lack them. Don't remove nor modify the
- # starting and closing comments
-# /* impgen.c starts here */
-# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
-#
-# This file is part of GNU libtool.
-#
-# 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.
-# */
-#
-# #include <stdio.h> /* for printf() */
-# #include <unistd.h> /* for open(), lseek(), read() */
-# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
-# #include <string.h> /* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[2];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 2);
-# return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[4];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 4);
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-# void *ptr;
-# {
-# unsigned char *b = ptr;
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-# int argc;
-# char *argv[];
-# {
-# int dll;
-# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-# unsigned long export_rva, export_size, nsections, secptr, expptr;
-# unsigned long name_rvas, nexp;
-# unsigned char *expdata, *erva;
-# char *filename, *dll_name;
-#
-# filename = argv[1];
-#
-# dll = open(filename, O_RDONLY|O_BINARY);
-# if (dll < 1)
-# return 1;
-#
-# dll_name = filename;
-#
-# for (i=0; filename[i]; i++)
-# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
-# dll_name = filename + i +1;
-#
-# pe_header_offset = pe_get32 (dll, 0x3c);
-# opthdr_ofs = pe_header_offset + 4 + 20;
-# num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-# if (num_entries < 1) /* no exports */
-# return 1;
-#
-# export_rva = pe_get32 (dll, opthdr_ofs + 96);
-# export_size = pe_get32 (dll, opthdr_ofs + 100);
-# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-# secptr = (pe_header_offset + 4 + 20 +
-# pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-# expptr = 0;
-# for (i = 0; i < nsections; i++)
-# {
-# char sname[8];
-# unsigned long secptr1 = secptr + 40 * i;
-# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# lseek(dll, secptr1, SEEK_SET);
-# read(dll, sname, 8);
-# if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# {
-# expptr = fptr + (export_rva - vaddr);
-# if (export_rva + export_size > vaddr + vsize)
-# export_size = vsize - (export_rva - vaddr);
-# break;
-# }
-# }
-#
-# expdata = (unsigned char*)malloc(export_size);
-# lseek (dll, expptr, SEEK_SET);
-# read (dll, expdata, export_size);
-# erva = expdata - export_rva;
-#
-# nexp = pe_as32 (expdata+24);
-# name_rvas = pe_as32 (expdata+32);
-#
-# printf ("EXPORTS\n");
-# for (i = 0; i<nexp; i++)
-# {
-# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-# }
-#
-# return 0;
-# }
-# /* impgen.c ends here */
-
-EOF
- ;;
- esac
-
- # 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 '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
-
- mv -f "${ofile}T" "$ofile" || \
- (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
- chmod +x "$ofile"
-fi
-
-
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Prevent multiple expansion
-
-
-fi
-# if libtool >= 1.5
-TAGCC=
-
-
-# Select memory manager depending on user input.
-# If no "-enable-maxmem", use jmemnobs
-MEMORYMGR='jmemnobs.$(O)'
-MAXMEM="no"
-# Check whether --enable-maxmem or --disable-maxmem was given.
-if test "${enable_maxmem+set}" = set; then
- enableval="$enable_maxmem"
- MAXMEM="$enableval"
-fi
-
-# support --with-maxmem for backwards compatibility with IJG V5.
-# Check whether --with-maxmem or --without-maxmem was given.
-if test "${with_maxmem+set}" = set; then
- withval="$with_maxmem"
- MAXMEM="$withval"
-fi
-
-if test "x$MAXMEM" = xyes; then
- MAXMEM=1
-fi
-if test "x$MAXMEM" != xno; then
- if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then
- { echo "configure: error: non-numeric argument to --enable-maxmem" 1>&2; exit 1; }
- fi
- DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
-cat >> confdefs.h <<EOF
-#define DEFAULT_MAX_MEM ${DEFAULTMAXMEM}
-EOF
-
-echo $ac_n "checking for 'tmpfile()'""... $ac_c" 1>&6
-echo "configure:6277: checking for 'tmpfile()'" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6279 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-int main() {
- FILE * tfile = tmpfile();
-; return 0; }
-EOF
-if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-MEMORYMGR='jmemansi.$(O)'
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-MEMORYMGR='jmemname.$(O)'
-cat >> confdefs.h <<\EOF
-#define NEED_SIGNAL_CATCHER
-EOF
-
-echo $ac_n "checking for 'mktemp()'""... $ac_c" 1>&6
-echo "configure:6301: checking for 'mktemp()'" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6303 "configure"
-#include "confdefs.h"
-
-int main() {
- char fname[80]; mktemp(fname);
-; return 0; }
-EOF
-if { (eval echo configure:6310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-cat >> confdefs.h <<\EOF
-#define NO_MKTEMP
-EOF
-
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-
-
-
-echo $ac_n "checking to see if the host cpu type is i386 or compatible""... $ac_c" 1>&6
-echo "configure:6331: checking to see if the host cpu type is i386 or compatible" >&5
-case "$host_cpu" in
- i*86 | x86 | ia32)
- echo "$ac_t""yes" 1>&6
- ;;
- x86_64 | amd64 | aa64)
- echo "$ac_t""no (x86_64)" 1>&6
- { echo "configure: error: Currently, this version of JPEG library cannot be compiled as 64-bit code. sorry." 1>&2; exit 1; }
- ;;
- *)
- echo "$ac_t""no ("$host_cpu")" 1>&6
- { echo "configure: error: This version of JPEG library is for i386 or compatible processors only." 1>&2; exit 1; }
- ;;
-esac
-
-if test -z "$NAFLAGS" ; then
- echo $ac_n "checking for object file format of host system""... $ac_c" 1>&6
-echo "configure:6348: checking for object file format of host system" >&5
- case "$host_os" in
- cygwin* | mingw* | pw32* | interix*)
- objfmt='Win32-COFF'
- ;;
- msdosdjgpp* | go32*)
- objfmt='COFF'
- ;;
- os2-emx*) # not tested
- objfmt='MSOMF' # obj
- ;;
- linux*coff* | linux*oldld*)
- objfmt='COFF' # ???
- ;;
- linux*aout*)
- objfmt='a.out'
- ;;
- linux*)
- objfmt='ELF'
- ;;
- freebsd* | netbsd* | openbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- objfmt='BSD-a.out'
- else
- objfmt='ELF'
- fi
- ;;
- solaris* | sunos* | sysv* | sco*)
- objfmt='ELF'
- ;;
- darwin* | rhapsody* | nextstep* | openstep* | macos*)
- objfmt='Mach-O'
- ;;
- *)
- objfmt='ELF ?'
- ;;
- esac
- echo "$ac_t""$objfmt" 1>&6
- if test "$objfmt" = 'ELF ?'; then
- objfmt='ELF'
- echo "configure: warning: unexpected host system. assumed that the format is $objfmt." 1>&2
- fi
-else
- objfmt=''
-fi
-echo $ac_n "checking for object file format specifier (NAFLAGS) ""... $ac_c" 1>&6
-echo "configure:6394: checking for object file format specifier (NAFLAGS) " >&5
-case "$objfmt" in
- MSOMF) NAFLAGS='-fobj -DOBJ32';;
- Win32-COFF) NAFLAGS='-fwin32 -DWIN32';;
- COFF) NAFLAGS='-fcoff -DCOFF';;
- a.out) NAFLAGS='-faout -DAOUT';;
- BSD-a.out) NAFLAGS='-faoutb -DAOUT';;
- ELF) NAFLAGS='-felf -DELF';;
- RDF) NAFLAGS='-frdf -DRDF';;
- Mach-O) NAFLAGS='-fmacho -DMACHO';;
-esac
-echo "$ac_t""$NAFLAGS" 1>&6
-
-
-
-for ac_prog in nasm nasmw
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6414: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NASM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NASM"; then
- ac_cv_prog_NASM="$NASM" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_NASM="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-NASM="$ac_cv_prog_NASM"
-if test -n "$NASM"; then
- echo "$ac_t""$NASM" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$NASM" && break
-done
-
-test -z "$NASM" && { echo "configure: error: no nasm (Netwide Assembler) found in \$PATH" 1>&2; exit 1; }
-if echo "$NASM" | grep yasm > /dev/null; then
- echo "configure: warning: DON'T USE YASM! CURRENT VERSION (R0.4.0) IS BUGGY!" 1>&2
-fi
-
-echo $ac_n "checking whether the assembler ($NASM $NAFLAGS) works""... $ac_c" 1>&6
-echo "configure:6449: checking whether the assembler ($NASM $NAFLAGS) works" >&5
-cat > conftest.asm <<EOF
-%line 6451 "configure"
- section .text
- bits 32
- global _main,main
-_main:
-main: xor eax,eax
- ret
-EOF
-try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
-if { (eval echo configure:6460: \"$try_nasm\") 1>&5; (eval $try_nasm) 2>&5; } && test -s conftest.o; then
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.asm >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- { echo "configure: error: installation or configuration problem: assembler cannot create object files." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the linker accepts assembler output""... $ac_c" 1>&6
-echo "configure:6470: checking whether the linker accepts assembler output" >&5
-try_nasm='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.o $LIBS 1>&5'
-if { (eval echo configure:6472: \"$try_nasm\") 1>&5; (eval $try_nasm) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- { echo "configure: error: configuration problem: maybe object file format mismatch." 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the assembler supports line continuation character""... $ac_c" 1>&6
-echo "configure:6482: checking whether the assembler supports line continuation character" >&5
-cat > conftest.asm <<\EOF
-%line 6484 "configure"
-; The line continuation character '\'
-; was introduced in nasm 0.98.25.
- section .text
- bits 32
- global _zero
-_zero: xor \
- eax,eax
- ret
-EOF
-try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
-if { (eval echo configure:6495: \"$try_nasm\") 1>&5; (eval $try_nasm) 2>&5; } && test -s conftest.o; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.asm >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- { echo "configure: error: you have to use a more recent version of the assembler." 1>&2; exit 1; }
-fi
-
-
-echo $ac_n "checking SIMD instruction sets requested to use""... $ac_c" 1>&6
-echo "configure:6508: checking SIMD instruction sets requested to use" >&5
-simd_to_use=""
-
-# Check whether --enable-mmx or --disable-mmx was given.
-if test "${enable_mmx+set}" = set; then
- enableval="$enable_mmx"
- if test "x$enableval" = xno; then
- cat >> confdefs.h <<\EOF
-#define JSIMD_MMX_NOT_SUPPORTED
-EOF
-
-else
- simd_to_use="$simd_to_use MMX"
-fi
-else
- simd_to_use="$simd_to_use MMX"
-fi
-
-
-# Check whether --enable-3dnow or --disable-3dnow was given.
-if test "${enable_3dnow+set}" = set; then
- enableval="$enable_3dnow"
- if test "x$enableval" = xno; then
- cat >> confdefs.h <<\EOF
-#define JSIMD_3DNOW_NOT_SUPPORTED
-EOF
-
-else
- simd_to_use="$simd_to_use 3DNow!"
-fi
-else
- simd_to_use="$simd_to_use 3DNow!"
-fi
-
-
-# Check whether --enable-sse or --disable-sse was given.
-if test "${enable_sse+set}" = set; then
- enableval="$enable_sse"
- if test "x$enableval" = xno; then
- cat >> confdefs.h <<\EOF
-#define JSIMD_SSE_NOT_SUPPORTED
-EOF
-
-else
- simd_to_use="$simd_to_use SSE"
-fi
-else
- simd_to_use="$simd_to_use SSE"
-fi
-
-
-# Check whether --enable-sse2 or --disable-sse2 was given.
-if test "${enable_sse2+set}" = set; then
- enableval="$enable_sse2"
- if test "x$enableval" = xno; then
- cat >> confdefs.h <<\EOF
-#define JSIMD_SSE2_NOT_SUPPORTED
-EOF
-
-else
- simd_to_use="$simd_to_use SSE2"
-fi
-else
- simd_to_use="$simd_to_use SSE2"
-fi
-
-
-test -z "$simd_to_use" && simd_to_use="NONE"
-echo "$ac_t""$simd_to_use" 1>&6
-
-for simd_name in $simd_to_use; do
-case "$simd_name" in
- MMX) simd_instruction='psubw mm0,mm0';;
- 3DNow!) simd_instruction='pfsub mm0,mm0';;
- SSE) simd_instruction='subps xmm0,xmm0';;
- SSE2) simd_instruction='subpd xmm0,xmm0';;
- *) continue;;
-esac
-echo $ac_n "checking whether the assembler supports $simd_name instructions""... $ac_c" 1>&6
-echo "configure:6587: checking whether the assembler supports $simd_name instructions" >&5
-cat > conftest.asm <<EOF
-%line 6589 "configure"
- section .text
- bits 32
- global _simd
-_simd: $simd_instruction
- ret
-EOF
-try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
-if { (eval echo configure:6597: \"$try_nasm\") 1>&5; (eval $try_nasm) 2>&5; } && test -s conftest.o; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.asm >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- { echo "configure: error: you have to use a more recent version of the assembler." 1>&2; exit 1; }
-fi
-done
-
-# Select OS-dependent SIMD instruction support checker.
-# jsimdw32.$(O) (Win32) / jsimddjg.$(O) (DJGPP V.2) / jsimdgcc.$(O) (Unix/gcc)
-if test "x$SIMDCHECKER" = x ; then
- case "$host_os" in
- cygwin* | mingw* | pw32* | interix*)
- SIMDCHECKER='jsimdw32.$(O)'
- ;;
- msdosdjgpp* | go32*)
- SIMDCHECKER='jsimddjg.$(O)'
- ;;
- os2-emx*) # not tested
- SIMDCHECKER='jsimdgcc.$(O)'
- ;;
- *)
- SIMDCHECKER='jsimdgcc.$(O)'
- ;;
- esac
-fi
-
-
-case "$host_os" in
- cygwin* | mingw* | pw32* | os2-emx* | msdosdjgpp* | go32*)
- cat >> confdefs.h <<\EOF
-#define USE_SETMODE
-EOF
-
- ;;
-# _host_name_*)
-# AC_DEFINE([USE_FDOPEN],)
-# ;;
-esac
-
-# This is for UNIX-like environments on Windows platform.
-# Check whether --enable-uchar-boolean or --disable-uchar-boolean was given.
-if test "${enable_uchar_boolean+set}" = set; then
- enableval="$enable_uchar_boolean"
- if test "x$enableval" != xno; then
- cat >> confdefs.h <<\EOF
-#define TYPEDEF_UCHAR_BOOLEAN
-EOF
-
-fi
-fi
-
-
-
-JPEG_LIB_VERSION="63:0:1"
-confv_dirs="$srcdir $srcdir/.. $srcdir/../.."
-config_ver=
-for ac_dir in $confv_dirs; do
- if test -r $ac_dir/config.ver; then
- config_ver=$ac_dir/config.ver
- break
- fi
-done
-if test -z "$config_ver"; then
- echo "configure: warning: cannot find config.ver in $confv_dirs" 1>&2
- echo "configure: warning: default version number $JPEG_LIB_VERSION is used" 1>&2
- echo $ac_n "checking libjpeg version number for libtool""... $ac_c" 1>&6
-echo "configure:6668: checking libjpeg version number for libtool" >&5
- echo "$ac_t""$JPEG_LIB_VERSION" 1>&6
-else
- echo $ac_n "checking libjpeg version number for libtool""... $ac_c" 1>&6
-echo "configure:6672: checking libjpeg version number for libtool" >&5
- . $config_ver
- echo "$ac_t""$JPEG_LIB_VERSION" 1>&6
- echo "configure: if you want to change the version number, modify $config_ver" 1>&2
-fi
-
-
-# Prepare to massage makefile.cfg correctly.
-if test $ijg_cv_have_prototypes = yes; then
- A2K_DEPS=""
- COM_A2K="# "
-else
- A2K_DEPS="ansi2knr"
- COM_A2K=""
-fi
-
-
-# ansi2knr needs -DBSD if string.h is missing
-if test $ac_cv_header_string_h = no; then
- ANSI2KNRFLAGS="-DBSD"
-else
- ANSI2KNRFLAGS=""
-fi
-
-# Substitutions to enable or disable libtool-related stuff
-if test $USELIBTOOL = yes -a $ijg_cv_have_prototypes = yes; then
- COM_LT=""
-else
- COM_LT="# "
-fi
-
-if test "x$enable_shared" != xno; then
- FORCE_INSTALL_LIB="install-lib"
- UNINSTALL_LIB="uninstall-lib"
-else
- FORCE_INSTALL_LIB=""
- UNINSTALL_LIB=""
-fi
-
-
-# Set up -I directives
-if test "x$srcdir" = x.; then
- INCLUDEFLAGS='-I$(srcdir)'
-else
- INCLUDEFLAGS='-I. -I$(srcdir)'
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# 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. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# 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.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile:makefile.cfg jconfig.h:jconfig.cfg" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@RANLIB@%$RANLIB%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@EXEEXT@%$EXEEXT%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@O@%$O%g
-s%@A@%$A%g
-s%@LN@%$LN%g
-s%@INSTALL_LIB@%$INSTALL_LIB%g
-s%@UNINSTALL@%$UNINSTALL%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@LN_S@%$LN_S%g
-s%@OBJEXT@%$OBJEXT%g
-s%@ECHO@%$ECHO%g
-s%@STRIP@%$STRIP%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@AS@%$AS%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@TAGCC@%$TAGCC%g
-s%@MEMORYMGR@%$MEMORYMGR%g
-s%@NAFLAGS@%$NAFLAGS%g
-s%@NASM@%$NASM%g
-s%@SIMDCHECKER@%$SIMDCHECKER%g
-s%@JPEG_LIB_VERSION@%$JPEG_LIB_VERSION%g
-s%@A2K_DEPS@%$A2K_DEPS%g
-s%@COM_A2K@%$COM_A2K%g
-s%@ANSI2KNRFLAGS@%$ANSI2KNRFLAGS%g
-s%@COM_LT@%$COM_LT%g
-s%@FORCE_INSTALL_LIB@%$FORCE_INSTALL_LIB%g
-s%@UNINSTALL_LIB@%$UNINSTALL_LIB%g
-s%@INCLUDEFLAGS@%$INCLUDEFLAGS%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile:makefile.cfg"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="jconfig.h:jconfig.cfg"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #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.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..683ca7e
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,111 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.61])
+AC_INIT([libjpeg], [6.b])
+
+AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
+
+# Always build with prototypes
+AC_DEFINE([HAVE_PROTOTYPES], 1, [Define if your compiler supports prototypes])
+# Don't use undefined types
+AC_DEFINE([INCOMPLETE_TYPES_BROKEN], 1, [Define if you want use complete types])
+
+# Checks for programs.
+AC_PROG_CPP
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+AC_PROG_LN_S
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+AC_CHECK_HEADER([sys/types.h], AC_DEFINE([NEED_SYS_TYPES_H], 1, [Define if you have sys/types.h]))
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_CHAR_UNSIGNED
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_CHECK_TYPES([unsigned char, unsigned short])
+
+AC_MSG_CHECKING([if right shift is signed])
+AC_TRY_RUN(
+ [#include <stdio.h>
+ int is_shifting_signed (long arg) {
+ long res = arg >> 4;
+
+ if (res == -0x7F7E80CL)
+ return 1; /* right shift is signed */
+
+ /* see if unsigned-shift hack will fix it. */
+ /* we can't just test exact value since it depends on width of long... */
+ res |= (~0L) << (32-4);
+ if (res == -0x7F7E80CL)
+ return 0; /* right shift is unsigned */
+
+ printf("Right shift isn't acting as I expect it to.\n");
+ printf("I fear the JPEG software will not work at all.\n\n");
+ return 0; /* try it with unsigned anyway */
+ }
+ int main (void) {
+ exit(is_shifting_signed(-0x7F7E80B1L));
+ }],
+ [AC_MSG_RESULT(no)
+ AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED], 1, [Define if shift is unsigned])],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(Assuming that right shift is signed on target machine.)])
+
+# test whether global names are unique to at least 15 chars
+AC_MSG_CHECKING([for short external names])
+AC_TRY_LINK(
+ [int possibly_duplicate_function () { return 0; }
+ int possibly_dupli_function () { return 1; }], [ ],
+ [AC_MSG_RESULT(ok)],
+ [AC_MSG_RESULT(short)
+ AC_DEFINE([NEED_SHORT_EXTERNAL_NAMES], 1, [Define if you need short function names])])
+
+# Checks for library functions.
+AC_CHECK_FUNCS([memset memcpy], [],
+ [AC_DEFINE([NEED_BSD_STRINGS], 1,
+ [Define if you have BSD-like bzero and bcopy])])
+
+# Set flags to indicate platform
+case "$host_os" in
+ cygwin* | mingw* | pw32* | interix*)
+ is_win32=1
+ ;;
+esac
+AM_CONDITIONAL([IS_WIN32], [test "x$is_win32" = "x1"])
+
+# SIMD is optional
+AC_ARG_WITH([simd],
+ AC_HELP_STRING([--without-simd],[Omit accelerated SIMD routines.]))
+if test "x${with_simd}" != "xno"; then
+ # Check if we're on a supported CPU
+ AC_MSG_CHECKING([if host cpu type is i386 or compatible])
+ case "$host_cpu" in
+ i*86 | x86 | ia32)
+ AC_MSG_RESULT(yes)
+ AC_PROG_NASM
+ AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
+ ;;
+ *)
+ AC_MSG_RESULT([no ("$host_cpu")])
+ with_simd=no
+ ;;
+ esac
+fi
+AM_CONDITIONAL([WITH_SIMD], [test "x$with_simd" != "xno"])
+
+# jconfig.h is the file we use, but we have another before that to
+# fool autoheader. the reason is that we include this header in our
+# API headers, which can screw things up for users of the lib.
+# jconfig.h is a minimal version that allows this package to be built
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([jconfig.h])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 06171f0..0000000
--- a/configure.in
+++ /dev/null
@@ -1,634 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT([jcmaster.c])
-AC_CONFIG_HEADER([jconfig.h:jconfig.cfg])
-dnl --------------------------------------------------------------------
-AC_PROG_CC
-AC_PROG_CPP
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for function prototypes])
-AC_CACHE_VAL([ijg_cv_have_prototypes],[AC_TRY_COMPILE([
-int testfunction (int arg1, int * arg2); /* check prototypes */
-struct methods_struct { /* check method-pointer declarations */
- int (*error_exit) (char *msgtext);
- int (*trace_message) (char *msgtext);
- int (*another_method) (void);
-};
-int testfunction (int arg1, int * arg2) /* check definitions */
-{ return arg2[arg1]; }
-int test2function (void) /* check void arg list */
-{ return 0; }
-],[ ],[ijg_cv_have_prototypes=yes],[ijg_cv_have_prototypes=no])])
-AC_MSG_RESULT([$ijg_cv_have_prototypes])
-if test $ijg_cv_have_prototypes = yes; then
- AC_DEFINE([HAVE_PROTOTYPES],)
-else
- echo [Your compiler does not seem to know about function prototypes.]
- echo [Perhaps it needs a special switch to enable ANSI C mode.]
- echo [If so, we recommend running configure like this:]
- echo [" ./configure CC='cc -switch'"]
- echo [where -switch is the proper switch.]
-fi
-dnl --------------------------------------------------------------------
-AC_CHECK_HEADER([stddef.h],[AC_DEFINE([HAVE_STDDEF_H],)])
-AC_CHECK_HEADER([stdlib.h],[AC_DEFINE([HAVE_STDLIB_H],)])
-AC_CHECK_HEADER([string.h],[:],[AC_DEFINE([NEED_BSD_STRINGS],)])
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for size_t])
-AC_TRY_COMPILE([
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#include <stdio.h>
-#ifdef NEED_BSD_STRINGS
-#include <strings.h>
-#else
-#include <string.h>
-#endif
-typedef size_t my_size_t;
-],[ my_size_t foovar; ],
-[ijg_size_t_ok=yes],
-[ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"])
-AC_MSG_RESULT([$ijg_size_t_ok])
-if test "$ijg_size_t_ok" != yes; then
-AC_CHECK_HEADER([sys/types.h],[AC_DEFINE([NEED_SYS_TYPES_H],)
-AC_EGREP_HEADER([size_t],[sys/types.h],
-[ijg_size_t_ok="size_t is in sys/types.h"],[ijg_size_t_ok=no])],
-[ijg_size_t_ok=no])
-AC_MSG_RESULT([$ijg_size_t_ok])
-if test "$ijg_size_t_ok" = no; then
- echo [Type size_t is not defined in any of the usual places.]
- echo [Try putting '"typedef unsigned int size_t;"' in jconfig.h.]
-fi
-fi
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for type unsigned char])
-AC_TRY_COMPILE(,[ unsigned char un_char; ],[AC_MSG_RESULT(yes)
-AC_DEFINE([HAVE_UNSIGNED_CHAR],)],[AC_MSG_RESULT(no)])
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for type unsigned short])
-AC_TRY_COMPILE(,[ unsigned short un_short; ],[AC_MSG_RESULT(yes)
-AC_DEFINE([HAVE_UNSIGNED_SHORT],)],[AC_MSG_RESULT(no)])
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for type void])
-AC_TRY_COMPILE([
-/* Caution: a C++ compiler will insist on valid prototypes */
-typedef void * void_ptr; /* check void * */
-#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
-typedef void (*void_func) (int a, int b);
-#else
-typedef void (*void_func) ();
-#endif
-
-#ifdef HAVE_PROTOTYPES /* check void function result */
-void test3function (void_ptr arg1, void_func arg2)
-#else
-void test3function (arg1, arg2)
- void_ptr arg1;
- void_func arg2;
-#endif
-{
- char * locptr = (char *) arg1; /* check casting to and from void * */
- arg1 = (void *) locptr;
- (*arg2) (1, 2); /* check call of fcn returning void */
-}
-],[ ],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
-AC_DEFINE([void],[char])])
-
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for working const])
-AC_CACHE_VAL([ac_cv_c_const],[AC_TRY_COMPILE(,[
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-],[ac_cv_c_const=yes],[ac_cv_c_const=no])])
-AC_MSG_RESULT([$ac_cv_c_const])
-if test $ac_cv_c_const = no; then
- AC_DEFINE([const],)
-fi
-
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for inline])
-ijg_cv_inline=""
-AC_TRY_COMPILE(,[} __inline__ int foo() { return 0; }
-int bar() { return foo();],[ijg_cv_inline="__inline__"],
-[AC_TRY_COMPILE(,[} __inline int foo() { return 0; }
-int bar() { return foo();],[ijg_cv_inline="__inline"],
-[AC_TRY_COMPILE(,[} inline int foo() { return 0; }
-int bar() { return foo();],[ijg_cv_inline="inline"],)])])
-AC_MSG_RESULT([$ijg_cv_inline])
-AC_DEFINE_UNQUOTED([INLINE],[$ijg_cv_inline])
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for broken incomplete types])
-AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ],
-,[AC_MSG_RESULT(ok)],[AC_MSG_RESULT(broken)
-AC_DEFINE([INCOMPLETE_TYPES_BROKEN],)])
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([for short external names])
-AC_TRY_LINK([
-int possibly_duplicate_function () { return 0; }
-int possibly_dupli_function () { return 1; }
-],[ ],[AC_MSG_RESULT(ok)],[AC_MSG_RESULT(short)
-AC_DEFINE([NEED_SHORT_EXTERNAL_NAMES],)])
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([to see if char is signed])
-AC_TRY_RUN([
-#ifdef HAVE_PROTOTYPES
-int is_char_signed (int arg)
-#else
-int is_char_signed (arg)
- int arg;
-#endif
-{
- if (arg == 189) { /* expected result for unsigned char */
- return 0; /* type char is unsigned */
- }
- else if (arg != -67) { /* expected result for signed char */
- printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
- printf("I fear the JPEG software will not work at all.\n\n");
- }
- return 1; /* assume char is signed otherwise */
-}
-char signed_char_check = (char) (-67);
-main() {
- exit(is_char_signed((int) signed_char_check));
-}],[AC_MSG_RESULT(no)
-AC_DEFINE([CHAR_IS_UNSIGNED],)],[AC_MSG_RESULT(yes)],
-[echo Assuming that char is signed on target machine.
-echo If it is unsigned, this will be a little bit inefficient.
-])
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([to see if right shift is signed])
-AC_TRY_RUN([
-#ifdef HAVE_PROTOTYPES
-int is_shifting_signed (long arg)
-#else
-int is_shifting_signed (arg)
- long arg;
-#endif
-/* See whether right-shift on a long is signed or not. */
-{
- long res = arg >> 4;
-
- if (res == -0x7F7E80CL) { /* expected result for signed shift */
- return 1; /* right shift is signed */
- }
- /* see if unsigned-shift hack will fix it. */
- /* we can't just test exact value since it depends on width of long... */
- res |= (~0L) << (32-4);
- if (res == -0x7F7E80CL) { /* expected result now? */
- return 0; /* right shift is unsigned */
- }
- printf("Right shift isn't acting as I expect it to.\n");
- printf("I fear the JPEG software will not work at all.\n\n");
- return 0; /* try it with unsigned anyway */
-}
-main() {
- exit(is_shifting_signed(-0x7F7E80B1L));
-}],[AC_MSG_RESULT(no)
-AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED],)],[AC_MSG_RESULT(yes)],
-[AC_MSG_RESULT([Assuming that right shift is signed on target machine.])])
-dnl --------------------------------------------------------------------
-AC_MSG_CHECKING([to see if fopen accepts b spec])
-AC_TRY_RUN([
-#include <stdio.h>
-main() {
- if (fopen("conftestdata", "wb") != NULL)
- exit(0);
- exit(1);
-}],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
-AC_DEFINE([DONT_USE_B_MODE],)],[AC_MSG_RESULT([Assuming that it does.])])
-dnl --------------------------------------------------------------------
-AC_PROG_INSTALL
-AC_PROG_RANLIB
-dnl --------------------------------------------------------------------
-
-AC_CANONICAL_HOST
-AC_EXEEXT
-
-# Decide whether to use libtool,
-# and if so whether to build shared, static, or both flavors of library.
-AC_DISABLE_SHARED
-AC_DISABLE_STATIC
-if test "x$enable_shared" != xno -o "x$enable_static" != xno; then
- USELIBTOOL="yes"
-# LIBTOOL="./libtool"
- O="lo"
- A="la"
- LN='$(LIBTOOL) --mode=link $(CC)'
- INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
- INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM"
- UNINSTALL='$(LIBTOOL) --mode=uninstall $(RM)'
-else
- USELIBTOOL="no"
- LIBTOOL=""
- O="o"
- A="a"
- LN='$(CC)'
- INSTALL_LIB="$INSTALL_DATA"
- UNINSTALL='$(RM)'
-fi
-AC_SUBST([LIBTOOL])
-AC_SUBST([O])
-AC_SUBST([A])
-AC_SUBST([LN])
-AC_SUBST([INSTALL_LIB])
-AC_SUBST([UNINSTALL])
-
-# Configure libtool if needed.
-if test $USELIBTOOL = yes; then
- AC_LIBTOOL_DLOPEN
- AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
-fi
-# if libtool >= 1.5
-TAGCC=ifdef([AC_LIBTOOL_GCJ],[--tag=CC])
-AC_SUBST([TAGCC])
-
-dnl --------------------------------------------------------------------
-# Select memory manager depending on user input.
-# If no "-enable-maxmem", use jmemnobs
-MEMORYMGR='jmemnobs.$(O)'
-MAXMEM="no"
-AC_ARG_ENABLE([maxmem],
-[ --enable-maxmem[=N] enable use of temp files, set max mem usage to N MB],
-[MAXMEM="$enableval"])
-# support --with-maxmem for backwards compatibility with IJG V5.
-AC_ARG_WITH([maxmem],,[MAXMEM="$withval"])
-if test "x$MAXMEM" = xyes; then
- MAXMEM=1
-fi
-if test "x$MAXMEM" != xno; then
- if test -n "`echo $MAXMEM | sed 's/[[0-9]]//g'`"; then
- AC_MSG_ERROR([non-numeric argument to --enable-maxmem])
- fi
- DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
-AC_DEFINE_UNQUOTED([DEFAULT_MAX_MEM],[${DEFAULTMAXMEM}])
-AC_MSG_CHECKING([for 'tmpfile()'])
-AC_TRY_LINK([#include <stdio.h>],[ FILE * tfile = tmpfile(); ],
-[AC_MSG_RESULT(yes)
-MEMORYMGR='jmemansi.$(O)'],
-[AC_MSG_RESULT(no)
-MEMORYMGR='jmemname.$(O)'
-AC_DEFINE([NEED_SIGNAL_CATCHER],)
-AC_MSG_CHECKING([for 'mktemp()'])
-AC_TRY_LINK(,[ char fname[80]; mktemp(fname); ],
-[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
-AC_DEFINE([NO_MKTEMP],)])])
-fi
-AC_SUBST([MEMORYMGR])
-
-dnl ====================================================================
-
-AC_MSG_CHECKING([to see if the host cpu type is i386 or compatible])
-case "$host_cpu" in
- i*86 | x86 | ia32)
- AC_MSG_RESULT(yes)
- ;;
- x86_64 | amd64 | aa64)
- AC_MSG_RESULT([no (x86_64)])
- AC_MSG_ERROR([Currently, this version of JPEG library cannot be compiled as 64-bit code. sorry.])
- ;;
- *)
- AC_MSG_RESULT([no ("$host_cpu")])
- AC_MSG_ERROR([This version of JPEG library is for i386 or compatible processors only.])
- ;;
-esac
-
-if test -z "$NAFLAGS" ; then
- AC_MSG_CHECKING([for object file format of host system])
- case "$host_os" in
- cygwin* | mingw* | pw32* | interix*)
- objfmt='Win32-COFF'
- ;;
- msdosdjgpp* | go32*)
- objfmt='COFF'
- ;;
- os2-emx*) # not tested
- objfmt='MSOMF' # obj
- ;;
- linux*coff* | linux*oldld*)
- objfmt='COFF' # ???
- ;;
- linux*aout*)
- objfmt='a.out'
- ;;
- linux*)
- objfmt='ELF'
- ;;
- freebsd* | netbsd* | openbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- objfmt='BSD-a.out'
- else
- objfmt='ELF'
- fi
- ;;
- solaris* | sunos* | sysv* | sco*)
- objfmt='ELF'
- ;;
- darwin* | rhapsody* | nextstep* | openstep* | macos*)
- objfmt='Mach-O'
- ;;
- *)
- objfmt='ELF ?'
- ;;
- esac
- AC_MSG_RESULT([$objfmt])
- if test "$objfmt" = 'ELF ?'; then
- objfmt='ELF'
- AC_MSG_WARN([unexpected host system. assumed that the format is $objfmt.])
- fi
-else
- objfmt=''
-fi
-AC_MSG_CHECKING([for object file format specifier (NAFLAGS) ])
-case "$objfmt" in
- MSOMF) NAFLAGS='-fobj -DOBJ32';;
- Win32-COFF) NAFLAGS='-fwin32 -DWIN32';;
- COFF) NAFLAGS='-fcoff -DCOFF';;
- a.out) NAFLAGS='-faout -DAOUT';;
- BSD-a.out) NAFLAGS='-faoutb -DAOUT';;
- ELF) NAFLAGS='-felf -DELF';;
- RDF) NAFLAGS='-frdf -DRDF';;
- Mach-O) NAFLAGS='-fmacho -DMACHO';;
-esac
-AC_MSG_RESULT([$NAFLAGS])
-AC_SUBST([NAFLAGS])
-
-dnl --------------------------------------------------------------------
-
-AC_CHECK_PROGS(NASM, [nasm nasmw])
-test -z "$NASM" && AC_MSG_ERROR([no nasm (Netwide Assembler) found in \$PATH])
-if echo "$NASM" | grep yasm > /dev/null; then
- AC_MSG_WARN([DON'T USE YASM! CURRENT VERSION (R0.4.0) IS BUGGY!])
-fi
-
-AC_MSG_CHECKING([whether the assembler ($NASM $NAFLAGS) works])
-cat > conftest.asm <<EOF
-[%line __oline__ "configure"
- section .text
- bits 32
- global _main,main
-_main:
-main: xor eax,eax
- ret
-]EOF
-try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
-if AC_TRY_EVAL(try_nasm) && test -s conftest.o; then
- AC_MSG_RESULT(yes)
-else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.asm >&AC_FD_CC
- rm -rf conftest*
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([installation or configuration problem: assembler cannot create object files.])
-fi
-AC_MSG_CHECKING([whether the linker accepts assembler output])
-try_nasm='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.o $LIBS 1>&AC_FD_CC'
-if AC_TRY_EVAL(try_nasm) && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- AC_MSG_RESULT(yes)
-else
- rm -rf conftest*
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([configuration problem: maybe object file format mismatch.])
-fi
-
-AC_MSG_CHECKING([whether the assembler supports line continuation character])
-cat > conftest.asm <<\EOF
-[%line __oline__ "configure"
-; The line continuation character '\'
-; was introduced in nasm 0.98.25.
- section .text
- bits 32
- global _zero
-_zero: xor \
- eax,eax
- ret
-]EOF
-try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
-if AC_TRY_EVAL(try_nasm) && test -s conftest.o; then
- rm -rf conftest*
- AC_MSG_RESULT(yes)
-else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.asm >&AC_FD_CC
- rm -rf conftest*
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([you have to use a more recent version of the assembler.])
-fi
-
-dnl --------------------------------------------------------------------
-
-AC_MSG_CHECKING([SIMD instruction sets requested to use])
-simd_to_use=""
-
-AC_ARG_ENABLE(mmx,
-[ --disable-mmx do not use MMX instruction set],
-[if test "x$enableval" = xno; then
- AC_DEFINE([JSIMD_MMX_NOT_SUPPORTED],)
-else
- simd_to_use="$simd_to_use MMX"
-fi], [simd_to_use="$simd_to_use MMX"])
-
-AC_ARG_ENABLE(3dnow,
-[ --disable-3dnow do not use 3DNow! instruction set],
-[if test "x$enableval" = xno; then
- AC_DEFINE([JSIMD_3DNOW_NOT_SUPPORTED],)
-else
- simd_to_use="$simd_to_use 3DNow!"
-fi], [simd_to_use="$simd_to_use 3DNow!"])
-
-AC_ARG_ENABLE(sse,
-[ --disable-sse do not use SSE instruction set],
-[if test "x$enableval" = xno; then
- AC_DEFINE([JSIMD_SSE_NOT_SUPPORTED],)
-else
- simd_to_use="$simd_to_use SSE"
-fi], [simd_to_use="$simd_to_use SSE"])
-
-AC_ARG_ENABLE(sse2,
-[ --disable-sse2 do not use SSE2 instruction set],
-[if test "x$enableval" = xno; then
- AC_DEFINE([JSIMD_SSE2_NOT_SUPPORTED],)
-else
- simd_to_use="$simd_to_use SSE2"
-fi], [simd_to_use="$simd_to_use SSE2"])
-
-test -z "$simd_to_use" && simd_to_use="NONE"
-AC_MSG_RESULT([$simd_to_use])
-
-for simd_name in $simd_to_use; do
-case "$simd_name" in
- MMX) simd_instruction='psubw mm0,mm0';;
- 3DNow!) simd_instruction='pfsub mm0,mm0';;
- SSE) simd_instruction='subps xmm0,xmm0';;
- SSE2) simd_instruction='subpd xmm0,xmm0';;
- *) continue;;
-esac
-AC_MSG_CHECKING([whether the assembler supports $simd_name instructions])
-cat > conftest.asm <<EOF
-[%line __oline__ "configure"
- section .text
- bits 32
- global _simd
-_simd: $simd_instruction
- ret
-]EOF
-try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
-if AC_TRY_EVAL(try_nasm) && test -s conftest.o; then
- rm -rf conftest*
- AC_MSG_RESULT(yes)
-else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.asm >&AC_FD_CC
- rm -rf conftest*
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([you have to use a more recent version of the assembler.])
-fi
-done
-
-dnl --------------------------------------------------------------------
-# Select OS-dependent SIMD instruction support checker.
-# jsimdw32.$(O) (Win32) / jsimddjg.$(O) (DJGPP V.2) / jsimdgcc.$(O) (Unix/gcc)
-if test "x$SIMDCHECKER" = x ; then
- case "$host_os" in
- cygwin* | mingw* | pw32* | interix*)
- SIMDCHECKER='jsimdw32.$(O)'
- ;;
- msdosdjgpp* | go32*)
- SIMDCHECKER='jsimddjg.$(O)'
- ;;
- os2-emx*) # not tested
- SIMDCHECKER='jsimdgcc.$(O)'
- ;;
- *)
- SIMDCHECKER='jsimdgcc.$(O)'
- ;;
- esac
-fi
-AC_SUBST([SIMDCHECKER])
-
-case "$host_os" in
- cygwin* | mingw* | pw32* | os2-emx* | msdosdjgpp* | go32*)
- AC_DEFINE([USE_SETMODE],)
- ;;
-# _host_name_*)
-# AC_DEFINE([USE_FDOPEN],)
-# ;;
-esac
-
-# This is for UNIX-like environments on Windows platform.
-AC_ARG_ENABLE(uchar-boolean,
-[ --enable-uchar-boolean define type \"boolean\" as unsigned char (for Windows)],
-[if test "x$enableval" != xno; then
- AC_DEFINE([TYPEDEF_UCHAR_BOOLEAN],)
-fi])
-
-dnl --------------------------------------------------------------------
-
-JPEG_LIB_VERSION="63:0:1"
-confv_dirs="$srcdir $srcdir/.. $srcdir/../.."
-config_ver=
-for ac_dir in $confv_dirs; do
- if test -r $ac_dir/config.ver; then
- config_ver=$ac_dir/config.ver
- break
- fi
-done
-if test -z "$config_ver"; then
- AC_MSG_WARN([cannot find config.ver in $confv_dirs])
- AC_MSG_WARN([default version number $JPEG_LIB_VERSION is used])
- AC_MSG_CHECKING([libjpeg version number for libtool])
- AC_MSG_RESULT([$JPEG_LIB_VERSION])
-else
- AC_MSG_CHECKING([libjpeg version number for libtool])
- . $config_ver
- AC_MSG_RESULT([$JPEG_LIB_VERSION])
- echo "configure: if you want to change the version number, modify $config_ver" 1>&2
-fi
-AC_SUBST([JPEG_LIB_VERSION])
-
-dnl --------------------------------------------------------------------
-# Prepare to massage makefile.cfg correctly.
-if test $ijg_cv_have_prototypes = yes; then
- A2K_DEPS=""
- COM_A2K="# "
-else
- A2K_DEPS="ansi2knr"
- COM_A2K=""
-fi
-AC_SUBST([A2K_DEPS])
-AC_SUBST([COM_A2K])
-# ansi2knr needs -DBSD if string.h is missing
-if test $ac_cv_header_string_h = no; then
- ANSI2KNRFLAGS="-DBSD"
-else
- ANSI2KNRFLAGS=""
-fi
-AC_SUBST([ANSI2KNRFLAGS])
-# Substitutions to enable or disable libtool-related stuff
-if test $USELIBTOOL = yes -a $ijg_cv_have_prototypes = yes; then
- COM_LT=""
-else
- COM_LT="# "
-fi
-AC_SUBST([COM_LT])
-if test "x$enable_shared" != xno; then
- FORCE_INSTALL_LIB="install-lib"
- UNINSTALL_LIB="uninstall-lib"
-else
- FORCE_INSTALL_LIB=""
- UNINSTALL_LIB=""
-fi
-AC_SUBST([FORCE_INSTALL_LIB])
-AC_SUBST([UNINSTALL_LIB])
-# Set up -I directives
-if test "x$srcdir" = x.; then
- INCLUDEFLAGS='-I$(srcdir)'
-else
- INCLUDEFLAGS='-I. -I$(srcdir)'
-fi
-AC_SUBST([INCLUDEFLAGS])
-dnl --------------------------------------------------------------------
-AC_OUTPUT([Makefile:makefile.cfg])
diff --git a/djpeg.1 b/djpeg.1
deleted file mode 100644
index 11beb6a..0000000
--- a/djpeg.1
+++ /dev/null
@@ -1,253 +0,0 @@
-.TH DJPEG 1 "22 August 1997"
-.SH NAME
-djpeg \- decompress a JPEG file to an image file
-.SH SYNOPSIS
-.B djpeg
-[
-.I options
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B djpeg
-decompresses the named JPEG file, or the standard input if no file is named,
-and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP,
-GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected.
-(RLE is supported only if the URT library is available.)
-.SH OPTIONS
-All switch names may be abbreviated; for example,
-.B \-grayscale
-may be written
-.B \-gray
-or
-.BR \-gr .
-Most of the "basic" switches can be abbreviated to as little as one letter.
-Upper and lower case are equivalent (thus
-.B \-BMP
-is the same as
-.BR \-bmp ).
-British spellings are also accepted (e.g.,
-.BR \-greyscale ),
-though for brevity these are not mentioned below.
-.PP
-The basic switches are:
-.TP
-.BI \-colors " N"
-Reduce image to at most N colors. This reduces the number of colors used in
-the output image, so that it can be displayed on a colormapped display or
-stored in a colormapped file format. For example, if you have an 8-bit
-display, you'd need to reduce to 256 or fewer colors.
-.TP
-.BI \-quantize " N"
-Same as
-.BR \-colors .
-.B \-colors
-is the recommended name,
-.B \-quantize
-is provided only for backwards compatibility.
-.TP
-.B \-fast
-Select recommended processing options for fast, low quality output. (The
-default options are chosen for highest quality output.) Currently, this is
-equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
-.TP
-.B \-grayscale
-Force gray-scale output even if JPEG file is color. Useful for viewing on
-monochrome displays; also,
-.B djpeg
-runs noticeably faster in this mode.
-.TP
-.BI \-scale " M/N"
-Scale the output image by a factor M/N. Currently the scale factor must be
-1/1, 1/2, 1/4, or 1/8. Scaling is handy if the image is larger than your
-screen; also,
-.B djpeg
-runs much faster when scaling down the output.
-.TP
-.B \-bmp
-Select BMP output format (Windows flavor). 8-bit colormapped format is
-emitted if
-.B \-colors
-or
-.B \-grayscale
-is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
-format is emitted.
-.TP
-.B \-gif
-Select GIF output format. Since GIF does not support more than 256 colors,
-.B \-colors 256
-is assumed (unless you specify a smaller number of colors).
-.TP
-.B \-os2
-Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is
-emitted if
-.B \-colors
-or
-.B \-grayscale
-is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
-format is emitted.
-.TP
-.B \-pnm
-Select PBMPLUS (PPM/PGM) output format (this is the default format).
-PGM is emitted if the JPEG file is gray-scale or if
-.B \-grayscale
-is specified; otherwise PPM is emitted.
-.TP
-.B \-rle
-Select RLE output format. (Requires URT library.)
-.TP
-.B \-targa
-Select Targa output format. Gray-scale format is emitted if the JPEG file is
-gray-scale or if
-.B \-grayscale
-is specified; otherwise, colormapped format is emitted if
-.B \-colors
-is specified; otherwise, 24-bit full-color format is emitted.
-.PP
-Switches for advanced users:
-.TP
-.B \-dct int
-Use integer DCT method (default).
-.TP
-.B \-dct fast
-Use fast integer DCT (less accurate).
-.TP
-.B \-dct float
-Use floating-point DCT method.
-The float method is very slightly more accurate than the int method, but is
-much slower unless your machine has very fast floating-point hardware. Also
-note that results of the floating-point method may vary slightly across
-machines, while the integer methods should give the same results everywhere.
-The fast integer method is much less accurate than the other two.
-.TP
-.B \-dither fs
-Use Floyd-Steinberg dithering in color quantization.
-.TP
-.B \-dither ordered
-Use ordered dithering in color quantization.
-.TP
-.B \-dither none
-Do not use dithering in color quantization.
-By default, Floyd-Steinberg dithering is applied when quantizing colors; this
-is slow but usually produces the best results. Ordered dither is a compromise
-between speed and quality; no dithering is fast but usually looks awful. Note
-that these switches have no effect unless color quantization is being done.
-Ordered dither is only available in
-.B \-onepass
-mode.
-.TP
-.BI \-map " file"
-Quantize to the colors used in the specified image file. This is useful for
-producing multiple files with identical color maps, or for forcing a
-predefined set of colors to be used. The
-.I file
-must be a GIF or PPM file. This option overrides
-.B \-colors
-and
-.BR \-onepass .
-.TP
-.B \-nosmooth
-Use a faster, lower-quality upsampling routine.
-.TP
-.B \-onepass
-Use one-pass instead of two-pass color quantization. The one-pass method is
-faster and needs less memory, but it produces a lower-quality image.
-.B \-onepass
-is ignored unless you also say
-.B \-colors
-.IR N .
-Also, the one-pass method is always used for gray-scale output (the two-pass
-method is no improvement then).
-.TP
-.BI \-maxmemory " N"
-Set limit for amount of memory to use in processing large images. Value is
-in thousands of bytes, or millions of bytes if "M" is attached to the
-number. For example,
-.B \-max 4m
-selects 4000000 bytes. If more space is needed, temporary files will be used.
-.TP
-.BI \-outfile " name"
-Send output image to the named file, not to standard output.
-.TP
-.B \-verbose
-Enable debug printout. More
-.BR \-v 's
-give more output. Also, version information is printed at startup.
-.TP
-.B \-debug
-Same as
-.BR \-verbose .
-.SH EXAMPLES
-.LP
-This example decompresses the JPEG file foo.jpg, quantizes it to
-256 colors, and saves the output in 8-bit BMP format in foo.bmp:
-.IP
-.B djpeg \-colors 256 \-bmp
-.I foo.jpg
-.B >
-.I foo.bmp
-.SH HINTS
-To get a quick preview of an image, use the
-.B \-grayscale
-and/or
-.B \-scale
-switches.
-.B \-grayscale \-scale 1/8
-is the fastest case.
-.PP
-Several options are available that trade off image quality to gain speed.
-.B \-fast
-turns on the recommended settings.
-.PP
-.B \-dct fast
-and/or
-.B \-nosmooth
-gain speed at a small sacrifice in quality.
-When producing a color-quantized image,
-.B \-onepass \-dither ordered
-is fast but much lower quality than the default behavior.
-.B \-dither none
-may give acceptable results in two-pass mode, but is seldom tolerable in
-one-pass mode.
-.PP
-If you are fortunate enough to have very fast floating point hardware,
-\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most
-machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is
-not worth using, because its theoretical accuracy advantage is too small to be
-significant in practice.
-.SH ENVIRONMENT
-.TP
-.B JPEGMEM
-If this environment variable is set, its value is the default memory limit.
-The value is specified as described for the
-.B \-maxmemory
-switch.
-.B JPEGMEM
-overrides the default value specified when the program was compiled, and
-itself is overridden by an explicit
-.BR \-maxmemory .
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR jpegtran (1),
-.BR rdjpgcom (1),
-.BR wrjpgcom (1)
-.br
-.BR ppm (5),
-.BR pgm (5)
-.br
-Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
-Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
-.SH AUTHOR
-Independent JPEG Group
-.SH BUGS
-Arithmetic coding is not supported for legal reasons.
-.PP
-To avoid the Unisys LZW patent,
-.B djpeg
-produces uncompressed GIF files. These are larger than they should be, but
-are readable by standard GIF decoders.
-.PP
-Still not as fast as we'd like.
diff --git a/djpeg.c b/djpeg.c
deleted file mode 100644
index a1ec059..0000000
--- a/djpeg.c
+++ /dev/null
@@ -1,684 +0,0 @@
-/*
- * djpeg.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : August 23, 2005
- * ---------------------------------------------------------------------
- *
- * This file contains a command-line user interface for the JPEG decompressor.
- * It should work on any system with Unix- or MS-DOS-style command lines.
- *
- * Two different command line styles are permitted, depending on the
- * compile-time switch TWO_FILE_COMMANDLINE:
- * djpeg [options] inputfile outputfile
- * djpeg [options] [inputfile]
- * In the second style, output is always to standard output, which you'd
- * normally redirect to a file or pipe to some other program. Input is
- * either from a named file or from standard input (typically redirected).
- * The second style is convenient on Unix but is unhelpful on systems that
- * don't support pipes. Also, you MUST use the first style if your system
- * doesn't do binary I/O to stdin/stdout.
- * To simplify script writing, the "-outfile" switch is provided. The syntax
- * djpeg [options] -outfile outputfile inputfile
- * works regardless of which command line style is used.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-#include "jversion.h" /* for version message */
-
-#include <ctype.h> /* to declare isprint() */
-
-#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h> /* Metrowerks needs this */
-#include <console.h> /* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h> /* Think declares it here */
-#endif
-#endif
-
-
-/* Create the add-on message string table. */
-
-#define JMESSAGE(code,string) string ,
-
-static const char * const cdjpeg_message_table[] = {
-#include "cderror.h"
- NULL
-};
-
-
-/*
- * This list defines the known output image formats
- * (not all of which need be supported by a given version).
- * You can change the default output format by defining DEFAULT_FMT;
- * indeed, you had better do so if you undefine PPM_SUPPORTED.
- */
-
-typedef enum {
- FMT_BMP, /* BMP format (Windows flavor) */
- FMT_GIF, /* GIF format */
- FMT_OS2, /* BMP format (OS/2 flavor) */
- FMT_PPM, /* PPM/PGM (PBMPLUS formats) */
- FMT_RLE, /* RLE format */
- FMT_TARGA, /* Targa format */
- FMT_TIFF /* TIFF format */
-} IMAGE_FORMATS;
-
-#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */
-#define DEFAULT_FMT FMT_PPM
-#endif
-
-static IMAGE_FORMATS requested_fmt;
-
-
-/*
- * Argument-parsing code.
- * The switch parser is designed to be useful with DOS-style command line
- * syntax, ie, intermixed switches and file names, where only the switches
- * to the left of a given file name affect processing of that file.
- * The main program in this file doesn't actually use this capability...
- */
-
-
-static const char * progname; /* program name for error messages */
-static char * outfilename; /* for -outfile switch */
-
-
-LOCAL(void)
-usage (void)
-/* complain about bad command line */
-{
- fprintf(stderr, "usage: %s [switches] ", progname);
-#ifdef TWO_FILE_COMMANDLINE
- fprintf(stderr, "inputfile outputfile\n");
-#else
- fprintf(stderr, "[inputfile]\n");
-#endif
-
- fprintf(stderr, "Switches (names may be abbreviated):\n");
- fprintf(stderr, " -colors N Reduce image to no more than N colors\n");
- fprintf(stderr, " -fast Fast, low-quality processing\n");
- fprintf(stderr, " -grayscale Force grayscale output\n");
-#ifdef IDCT_SCALING_SUPPORTED
- fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n");
-#endif
-#ifdef BMP_SUPPORTED
- fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n",
- (DEFAULT_FMT == FMT_BMP ? " (default)" : ""));
-#endif
-#ifdef GIF_SUPPORTED
- fprintf(stderr, " -gif Select GIF output format%s\n",
- (DEFAULT_FMT == FMT_GIF ? " (default)" : ""));
-#endif
-#ifdef BMP_SUPPORTED
- fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n",
- (DEFAULT_FMT == FMT_OS2 ? " (default)" : ""));
-#endif
-#ifdef PPM_SUPPORTED
- fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n",
- (DEFAULT_FMT == FMT_PPM ? " (default)" : ""));
-#endif
-#ifdef RLE_SUPPORTED
- fprintf(stderr, " -rle Select Utah RLE output format%s\n",
- (DEFAULT_FMT == FMT_RLE ? " (default)" : ""));
-#endif
-#ifdef TARGA_SUPPORTED
- fprintf(stderr, " -targa Select Targa output format%s\n",
- (DEFAULT_FMT == FMT_TARGA ? " (default)" : ""));
-#endif
- fprintf(stderr, "Switches for advanced users:\n");
-#ifdef DCT_ISLOW_SUPPORTED
- fprintf(stderr, " -dct int Use integer DCT method%s\n",
- (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n",
- (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : ""));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
- (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
-#endif
- fprintf(stderr, " -dither fs Use F-S dithering (default)\n");
- fprintf(stderr, " -dither none Don't use dithering in quantization\n");
- fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n");
-#ifdef QUANT_2PASS_SUPPORTED
- fprintf(stderr, " -map FILE Map to colors used in named image file\n");
-#endif
- fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n");
-#ifdef QUANT_1PASS_SUPPORTED
- fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n");
-#endif
- fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
- fprintf(stderr, " -outfile name Specify name for output file\n");
- fprintf(stderr, " -verbose or -debug Emit debug output\n");
- exit(EXIT_FAILURE);
-}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-LOCAL(void)
-print_simd_info (FILE * file, char * labelstr, unsigned int simd)
-{
- fprintf(file, "%s%s%s%s%s%s\n", labelstr,
- simd & JSIMD_MMX ? " MMX" : "",
- simd & JSIMD_3DNOW ? " 3DNow!" : "",
- simd & JSIMD_SSE ? " SSE" : "",
- simd & JSIMD_SSE2 ? " SSE2" : "",
- simd == JSIMD_NONE ? " NONE" : "");
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
-
-
-LOCAL(int)
-parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
- int last_file_arg_seen, boolean for_real)
-/* Parse optional switches.
- * Returns argv[] index of first file-name argument (== argc if none).
- * Any file names with indexes <= last_file_arg_seen are ignored;
- * they have presumably been processed in a previous iteration.
- * (Pass 0 for last_file_arg_seen on the first or only iteration.)
- * for_real is FALSE on the first (dummy) pass; we may skip any expensive
- * processing.
- */
-{
- int argn;
- char * arg;
-
- /* Set up default JPEG parameters. */
- requested_fmt = DEFAULT_FMT; /* set default output file format */
- outfilename = NULL;
- cinfo->err->trace_level = 0;
-
- /* Scan command line options, adjust parameters */
-
- for (argn = 1; argn < argc; argn++) {
- arg = argv[argn];
- if (*arg != '-') {
- /* Not a switch, must be a file name argument */
- if (argn <= last_file_arg_seen) {
- outfilename = NULL; /* -outfile applies to just one input file */
- continue; /* ignore this name if previously processed */
- }
- break; /* else done parsing switches */
- }
- arg++; /* advance past switch marker character */
-
- if (keymatch(arg, "bmp", 1)) {
- /* BMP output format. */
- requested_fmt = FMT_BMP;
-
- } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) ||
- keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) {
- /* Do color quantization. */
- int val;
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%d", &val) != 1)
- usage();
- cinfo->desired_number_of_colors = val;
- cinfo->quantize_colors = TRUE;
-
-#ifndef JSIMD_MASKFUNC_NOT_SUPPORTED
- } else if (keymatch(arg, "nosimd" , 4)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_ALL);
- } else if (keymatch(arg, "nommx" , 3)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_MMX);
- } else if (keymatch(arg, "no3dnow", 3)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_3DNOW);
- } else if (keymatch(arg, "nosse" , 4)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_SSE);
- } else if (keymatch(arg, "nosse2" , 6)) {
- jpeg_simd_mask((j_common_ptr) cinfo, JSIMD_NONE, JSIMD_SSE2);
-#endif /* !JSIMD_MASKFUNC_NOT_SUPPORTED */
-
- } else if (keymatch(arg, "dct", 2)) {
- /* Select IDCT algorithm. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "int", 1)) {
- cinfo->dct_method = JDCT_ISLOW;
- } else if (keymatch(argv[argn], "fast", 2)) {
- cinfo->dct_method = JDCT_IFAST;
- } else if (keymatch(argv[argn], "float", 2)) {
- cinfo->dct_method = JDCT_FLOAT;
- } else
- usage();
-
- } else if (keymatch(arg, "dither", 2)) {
- /* Select dithering algorithm. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "fs", 2)) {
- cinfo->dither_mode = JDITHER_FS;
- } else if (keymatch(argv[argn], "none", 2)) {
- cinfo->dither_mode = JDITHER_NONE;
- } else if (keymatch(argv[argn], "ordered", 2)) {
- cinfo->dither_mode = JDITHER_ORDERED;
- } else
- usage();
-
- } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
- /* Enable debug printouts. */
- /* On first -d, print version identification */
- static boolean printed_version = FALSE;
-
- if (! printed_version) {
- fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n",
- JVERSION, JCOPYRIGHT);
- fprintf(stderr,
- "\nx86 SIMD extension for IJG JPEG library, version %s\n\n",
- JPEG_SIMDEXT_VER_STR);
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
- print_simd_info(stderr, "SIMD instructions supported by the system :",
- jpeg_simd_support(NULL));
-
- fprintf(stderr, "\n === SIMD Operation Modes ===\n");
-#ifdef DCT_ISLOW_SUPPORTED
- print_simd_info(stderr, "Accurate integer DCT (-dct int) :",
- jpeg_simd_inverse_dct(cinfo, JDCT_ISLOW));
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- print_simd_info(stderr, "Fast integer DCT (-dct fast) :",
- jpeg_simd_inverse_dct(cinfo, JDCT_IFAST));
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- print_simd_info(stderr, "Floating-point DCT (-dct float) :",
- jpeg_simd_inverse_dct(cinfo, JDCT_FLOAT));
-#endif
-#ifdef IDCT_SCALING_SUPPORTED
- print_simd_info(stderr, "Reduced-size DCT (-scale M/N) :",
- jpeg_simd_inverse_dct(cinfo, JDCT_FLOAT+1));
-#endif
- print_simd_info(stderr, "High-quality upsampling (default) :",
- jpeg_simd_upsampler(cinfo, TRUE));
- print_simd_info(stderr, "Low-quality upsampling (-nosmooth) :",
- jpeg_simd_upsampler(cinfo, FALSE));
- print_simd_info(stderr, "Colorspace conversion (YCbCr->RGB) :",
- jpeg_simd_color_deconverter(cinfo));
- fprintf(stderr, "\n");
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
- printed_version = TRUE;
- }
- cinfo->err->trace_level++;
-
- } else if (keymatch(arg, "fast", 1)) {
- /* Select recommended processing options for quick-and-dirty output. */
- cinfo->two_pass_quantize = FALSE;
- cinfo->dither_mode = JDITHER_ORDERED;
- if (! cinfo->quantize_colors) /* don't override an earlier -colors */
- cinfo->desired_number_of_colors = 216;
- cinfo->dct_method = JDCT_FASTEST;
- cinfo->do_fancy_upsampling = FALSE;
-
- } else if (keymatch(arg, "gif", 1)) {
- /* GIF output format. */
- requested_fmt = FMT_GIF;
-
- } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
- /* Force monochrome output. */
- cinfo->out_color_space = JCS_GRAYSCALE;
-
- } else if (keymatch(arg, "map", 3)) {
- /* Quantize to a color map taken from an input file. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (for_real) { /* too expensive to do twice! */
-#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */
- FILE * mapfile;
-
- if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
- exit(EXIT_FAILURE);
- }
- read_color_map(cinfo, mapfile);
- fclose(mapfile);
- cinfo->quantize_colors = TRUE;
-#else
- ERREXIT(cinfo, JERR_NOT_COMPILED);
-#endif
- }
-
- } else if (keymatch(arg, "maxmemory", 3)) {
- /* Maximum memory in Kb (or Mb with 'm'). */
- long lval;
- char ch = 'x';
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
- usage();
- if (ch == 'm' || ch == 'M')
- lval *= 1000L;
- cinfo->mem->max_memory_to_use = lval * 1000L;
-
- } else if (keymatch(arg, "nosmooth", 3)) {
- /* Suppress fancy upsampling */
- cinfo->do_fancy_upsampling = FALSE;
-
- } else if (keymatch(arg, "onepass", 3)) {
- /* Use fast one-pass quantization. */
- cinfo->two_pass_quantize = FALSE;
-
- } else if (keymatch(arg, "os2", 3)) {
- /* BMP output format (OS/2 flavor). */
- requested_fmt = FMT_OS2;
-
- } else if (keymatch(arg, "outfile", 4)) {
- /* Set output file name. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- outfilename = argv[argn]; /* save it away for later use */
-
- } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) {
- /* PPM/PGM output format. */
- requested_fmt = FMT_PPM;
-
- } else if (keymatch(arg, "rle", 1)) {
- /* RLE output format. */
- requested_fmt = FMT_RLE;
-
- } else if (keymatch(arg, "scale", 1)) {
- /* Scale the output image by a fraction M/N. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%d/%d",
- &cinfo->scale_num, &cinfo->scale_denom) != 2)
- usage();
-
- } else if (keymatch(arg, "targa", 1)) {
- /* Targa output format. */
- requested_fmt = FMT_TARGA;
-
- } else {
- usage(); /* bogus switch */
- }
- }
-
- return argn; /* return index of next arg (file name) */
-}
-
-
-/*
- * Marker processor for COM and interesting APPn markers.
- * This replaces the library's built-in processor, which just skips the marker.
- * We want to print out the marker as text, to the extent possible.
- * Note this code relies on a non-suspending data source.
- */
-
-LOCAL(unsigned int)
-jpeg_getc (j_decompress_ptr cinfo)
-/* Read next byte */
-{
- struct jpeg_source_mgr * datasrc = cinfo->src;
-
- if (datasrc->bytes_in_buffer == 0) {
- if (! (*datasrc->fill_input_buffer) (cinfo))
- ERREXIT(cinfo, JERR_CANT_SUSPEND);
- }
- datasrc->bytes_in_buffer--;
- return GETJOCTET(*datasrc->next_input_byte++);
-}
-
-
-METHODDEF(boolean)
-print_text_marker (j_decompress_ptr cinfo)
-{
- boolean traceit = (cinfo->err->trace_level >= 1);
- INT32 length;
- unsigned int ch;
- unsigned int lastch = 0;
-
- length = jpeg_getc(cinfo) << 8;
- length += jpeg_getc(cinfo);
- length -= 2; /* discount the length word itself */
-
- if (traceit) {
- if (cinfo->unread_marker == JPEG_COM)
- fprintf(stderr, "Comment, length %ld:\n", (long) length);
- else /* assume it is an APPn otherwise */
- fprintf(stderr, "APP%d, length %ld:\n",
- cinfo->unread_marker - JPEG_APP0, (long) length);
- }
-
- while (--length >= 0) {
- ch = jpeg_getc(cinfo);
- if (traceit) {
- /* Emit the character in a readable form.
- * Nonprintables are converted to \nnn form,
- * while \ is converted to \\.
- * Newlines in CR, CR/LF, or LF form will be printed as one newline.
- */
- if (ch == '\r') {
- fprintf(stderr, "\n");
- } else if (ch == '\n') {
- if (lastch != '\r')
- fprintf(stderr, "\n");
- } else if (ch == '\\') {
- fprintf(stderr, "\\\\");
- } else if (isprint(ch)) {
- putc(ch, stderr);
- } else {
- fprintf(stderr, "\\%03o", ch);
- }
- lastch = ch;
- }
- }
-
- if (traceit)
- fprintf(stderr, "\n");
-
- return TRUE;
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
- struct jpeg_decompress_struct cinfo;
- struct jpeg_error_mgr jerr;
-#ifdef PROGRESS_REPORT
- struct cdjpeg_progress_mgr progress;
-#endif
- int file_index;
- djpeg_dest_ptr dest_mgr = NULL;
- FILE * input_file;
- FILE * output_file;
- JDIMENSION num_scanlines;
-
- /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
- argc = ccommand(&argv);
-#endif
-
- progname = argv[0];
- if (progname == NULL || progname[0] == 0)
- progname = "djpeg"; /* in case C library doesn't provide it */
-
- /* Initialize the JPEG decompression object with default error handling. */
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_decompress(&cinfo);
- /* Add some application-specific error messages (from cderror.h) */
- jerr.addon_message_table = cdjpeg_message_table;
- jerr.first_addon_message = JMSG_FIRSTADDONCODE;
- jerr.last_addon_message = JMSG_LASTADDONCODE;
-
- /* Insert custom marker processor for COM and APP12.
- * APP12 is used by some digital camera makers for textual info,
- * so we provide the ability to display it as text.
- * If you like, additional APPn marker types can be selected for display,
- * but don't try to override APP0 or APP14 this way (see libjpeg.doc).
- */
- jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker);
- jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker);
-
- /* Now safe to enable signal catcher. */
-#ifdef NEED_SIGNAL_CATCHER
- enable_signal_catcher((j_common_ptr) &cinfo);
-#endif
-
- /* Scan command line to find file names. */
- /* It is convenient to use just one switch-parsing routine, but the switch
- * values read here are ignored; we will rescan the switches after opening
- * the input file.
- * (Exception: tracing level set here controls verbosity for COM markers
- * found during jpeg_read_header...)
- */
-
- file_index = parse_switches(&cinfo, argc, argv, 0, FALSE);
-
-#ifdef TWO_FILE_COMMANDLINE
- /* Must have either -outfile switch or explicit output file name */
- if (outfilename == NULL) {
- if (file_index != argc-2) {
- fprintf(stderr, "%s: must name one input and one output file\n",
- progname);
- usage();
- }
- outfilename = argv[file_index+1];
- } else {
- if (file_index != argc-1) {
- fprintf(stderr, "%s: must name one input and one output file\n",
- progname);
- usage();
- }
- }
-#else
- /* Unix style: expect zero or one file name */
- if (file_index < argc-1) {
- fprintf(stderr, "%s: only one input file\n", progname);
- usage();
- }
-#endif /* TWO_FILE_COMMANDLINE */
-
- /* Open the input file. */
- if (file_index < argc) {
- if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
- exit(EXIT_FAILURE);
- }
- } else {
- /* default input file is stdin */
- input_file = read_stdin();
- }
-
- /* Open the output file. */
- if (outfilename != NULL) {
- if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
- exit(EXIT_FAILURE);
- }
- } else {
- /* default output file is stdout */
- output_file = write_stdout();
- }
-
-#ifdef PROGRESS_REPORT
- start_progress_monitor((j_common_ptr) &cinfo, &progress);
-#endif
-
- /* Specify data source for decompression */
- jpeg_stdio_src(&cinfo, input_file);
-
- /* Read file header, set default decompression parameters */
- (void) jpeg_read_header(&cinfo, TRUE);
-
- /* Adjust default decompression parameters by re-parsing the options */
- file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
-
- /* Initialize the output module now to let it override any crucial
- * option settings (for instance, GIF wants to force color quantization).
- */
- switch (requested_fmt) {
-#ifdef BMP_SUPPORTED
- case FMT_BMP:
- dest_mgr = jinit_write_bmp(&cinfo, FALSE);
- break;
- case FMT_OS2:
- dest_mgr = jinit_write_bmp(&cinfo, TRUE);
- break;
-#endif
-#ifdef GIF_SUPPORTED
- case FMT_GIF:
- dest_mgr = jinit_write_gif(&cinfo);
- break;
-#endif
-#ifdef PPM_SUPPORTED
- case FMT_PPM:
- dest_mgr = jinit_write_ppm(&cinfo);
- break;
-#endif
-#ifdef RLE_SUPPORTED
- case FMT_RLE:
- dest_mgr = jinit_write_rle(&cinfo);
- break;
-#endif
-#ifdef TARGA_SUPPORTED
- case FMT_TARGA:
- dest_mgr = jinit_write_targa(&cinfo);
- break;
-#endif
- default:
- ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT);
- break;
- }
- dest_mgr->output_file = output_file;
-
- /* Start decompressor */
- (void) jpeg_start_decompress(&cinfo);
-
- /* Write output file header */
- (*dest_mgr->start_output) (&cinfo, dest_mgr);
-
- /* Process data */
- while (cinfo.output_scanline < cinfo.output_height) {
- num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
- dest_mgr->buffer_height);
- (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
- }
-
-#ifdef PROGRESS_REPORT
- /* Hack: count final pass as done in case finish_output does an extra pass.
- * The library won't have updated completed_passes.
- */
- progress.pub.completed_passes = progress.pub.total_passes;
-#endif
-
- /* Finish decompression and release memory.
- * I must do it in this order because output module has allocated memory
- * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
- */
- (*dest_mgr->finish_output) (&cinfo, dest_mgr);
- (void) jpeg_finish_decompress(&cinfo);
- jpeg_destroy_decompress(&cinfo);
-
- /* Close files, if we opened them */
- if (input_file != stdin)
- fclose(input_file);
- if (output_file != stdout)
- fclose(output_file);
-
-#ifdef PROGRESS_REPORT
- end_progress_monitor((j_common_ptr) &cinfo);
-#endif
-
- /* All done. */
- exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
- return 0; /* suppress no-return-value warnings */
-}
diff --git a/example.c b/example.c
deleted file mode 100644
index 7fc354f..0000000
--- a/example.c
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * example.c
- *
- * This file illustrates how to use the IJG code as a subroutine library
- * to read or write JPEG image files. You should look at this code in
- * conjunction with the documentation file libjpeg.doc.
- *
- * This code will not do anything useful as-is, but it may be helpful as a
- * skeleton for constructing routines that call the JPEG library.
- *
- * We present these routines in the same coding style used in the JPEG code
- * (ANSI function definitions, etc); but you are of course free to code your
- * routines in a different style if you prefer.
- */
-
-#include <stdio.h>
-
-/*
- * Include file for users of JPEG library.
- * You will need to have included system headers that define at least
- * the typedefs FILE and size_t before you can include jpeglib.h.
- * (stdio.h is sufficient on ANSI-conforming systems.)
- * You may also wish to include "jerror.h".
- */
-
-#include "jpeglib.h"
-
-/*
- * <setjmp.h> is used for the optional error recovery mechanism shown in
- * the second part of the example.
- */
-
-#include <setjmp.h>
-
-
-
-/******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/
-
-/* This half of the example shows how to feed data into the JPEG compressor.
- * We present a minimal version that does not worry about refinements such
- * as error recovery (the JPEG code will just exit() if it gets an error).
- */
-
-
-/*
- * IMAGE DATA FORMATS:
- *
- * The standard input image format is a rectangular array of pixels, with
- * each pixel having the same number of "component" values (color channels).
- * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars).
- * If you are working with color data, then the color values for each pixel
- * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit
- * RGB color.
- *
- * For this example, we'll assume that this data structure matches the way
- * our application has stored the image in memory, so we can just pass a
- * pointer to our image buffer. In particular, let's say that the image is
- * RGB color and is described by:
- */
-
-extern JSAMPLE * image_buffer; /* Points to large array of R,G,B-order data */
-extern int image_height; /* Number of rows in image */
-extern int image_width; /* Number of columns in image */
-
-
-/*
- * Sample routine for JPEG compression. We assume that the target file name
- * and a compression quality factor are passed in.
- */
-
-GLOBAL(void)
-write_JPEG_file (char * filename, int quality)
-{
- /* This struct contains the JPEG compression parameters and pointers to
- * working space (which is allocated as needed by the JPEG library).
- * It is possible to have several such structures, representing multiple
- * compression/decompression processes, in existence at once. We refer
- * to any one struct (and its associated working data) as a "JPEG object".
- */
- struct jpeg_compress_struct cinfo;
- /* This struct represents a JPEG error handler. It is declared separately
- * because applications often want to supply a specialized error handler
- * (see the second half of this file for an example). But here we just
- * take the easy way out and use the standard error handler, which will
- * print a message on stderr and call exit() if compression fails.
- * Note that this struct must live as long as the main JPEG parameter
- * struct, to avoid dangling-pointer problems.
- */
- struct jpeg_error_mgr jerr;
- /* More stuff */
- FILE * outfile; /* target file */
- JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */
- int row_stride; /* physical row width in image buffer */
-
- /* Step 1: allocate and initialize JPEG compression object */
-
- /* We have to set up the error handler first, in case the initialization
- * step fails. (Unlikely, but it could happen if you are out of memory.)
- * This routine fills in the contents of struct jerr, and returns jerr's
- * address which we place into the link field in cinfo.
- */
- cinfo.err = jpeg_std_error(&jerr);
- /* Now we can initialize the JPEG compression object. */
- jpeg_create_compress(&cinfo);
-
- /* Step 2: specify data destination (eg, a file) */
- /* Note: steps 2 and 3 can be done in either order. */
-
- /* Here we use the library-supplied code to send compressed data to a
- * stdio stream. You can also write your own code to do something else.
- * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
- * requires it in order to write binary files.
- */
- if ((outfile = fopen(filename, "wb")) == NULL) {
- fprintf(stderr, "can't open %s\n", filename);
- exit(1);
- }
- jpeg_stdio_dest(&cinfo, outfile);
-
- /* Step 3: set parameters for compression */
-
- /* First we supply a description of the input image.
- * Four fields of the cinfo struct must be filled in:
- */
- cinfo.image_width = image_width; /* image width and height, in pixels */
- cinfo.image_height = image_height;
- cinfo.input_components = 3; /* # of color components per pixel */
- cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
- /* Now use the library's routine to set default compression parameters.
- * (You must set at least cinfo.in_color_space before calling this,
- * since the defaults depend on the source color space.)
- */
- jpeg_set_defaults(&cinfo);
- /* Now you can set any non-default parameters you wish to.
- * Here we just illustrate the use of quality (quantization table) scaling:
- */
- jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
-
- /* Step 4: Start compressor */
-
- /* TRUE ensures that we will write a complete interchange-JPEG file.
- * Pass TRUE unless you are very sure of what you're doing.
- */
- jpeg_start_compress(&cinfo, TRUE);
-
- /* Step 5: while (scan lines remain to be written) */
- /* jpeg_write_scanlines(...); */
-
- /* Here we use the library's state variable cinfo.next_scanline as the
- * loop counter, so that we don't have to keep track ourselves.
- * To keep things simple, we pass one scanline per call; you can pass
- * more if you wish, though.
- */
- row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */
-
- while (cinfo.next_scanline < cinfo.image_height) {
- /* jpeg_write_scanlines expects an array of pointers to scanlines.
- * Here the array is only one element long, but you could pass
- * more than one scanline at a time if that's more convenient.
- */
- row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
- (void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
- }
-
- /* Step 6: Finish compression */
-
- jpeg_finish_compress(&cinfo);
- /* After finish_compress, we can close the output file. */
- fclose(outfile);
-
- /* Step 7: release JPEG compression object */
-
- /* This is an important step since it will release a good deal of memory. */
- jpeg_destroy_compress(&cinfo);
-
- /* And we're done! */
-}
-
-
-/*
- * SOME FINE POINTS:
- *
- * In the above loop, we ignored the return value of jpeg_write_scanlines,
- * which is the number of scanlines actually written. We could get away
- * with this because we were only relying on the value of cinfo.next_scanline,
- * which will be incremented correctly. If you maintain additional loop
- * variables then you should be careful to increment them properly.
- * Actually, for output to a stdio stream you needn't worry, because
- * then jpeg_write_scanlines will write all the lines passed (or else exit
- * with a fatal error). Partial writes can only occur if you use a data
- * destination module that can demand suspension of the compressor.
- * (If you don't know what that's for, you don't need it.)
- *
- * If the compressor requires full-image buffers (for entropy-coding
- * optimization or a multi-scan JPEG file), it will create temporary
- * files for anything that doesn't fit within the maximum-memory setting.
- * (Note that temp files are NOT needed if you use the default parameters.)
- * On some systems you may need to set up a signal handler to ensure that
- * temporary files are deleted if the program is interrupted. See libjpeg.doc.
- *
- * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG
- * files to be compatible with everyone else's. If you cannot readily read
- * your data in that order, you'll need an intermediate array to hold the
- * image. See rdtarga.c or rdbmp.c for examples of handling bottom-to-top
- * source data using the JPEG code's internal virtual-array mechanisms.
- */
-
-
-
-/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/
-
-/* This half of the example shows how to read data from the JPEG decompressor.
- * It's a bit more refined than the above, in that we show:
- * (a) how to modify the JPEG library's standard error-reporting behavior;
- * (b) how to allocate workspace using the library's memory manager.
- *
- * Just to make this example a little different from the first one, we'll
- * assume that we do not intend to put the whole image into an in-memory
- * buffer, but to send it line-by-line someplace else. We need a one-
- * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG
- * memory manager allocate it for us. This approach is actually quite useful
- * because we don't need to remember to deallocate the buffer separately: it
- * will go away automatically when the JPEG object is cleaned up.
- */
-
-
-/*
- * ERROR HANDLING:
- *
- * The JPEG library's standard error handler (jerror.c) is divided into
- * several "methods" which you can override individually. This lets you
- * adjust the behavior without duplicating a lot of code, which you might
- * have to update with each future release.
- *
- * Our example here shows how to override the "error_exit" method so that
- * control is returned to the library's caller when a fatal error occurs,
- * rather than calling exit() as the standard error_exit method does.
- *
- * We use C's setjmp/longjmp facility to return control. This means that the
- * routine which calls the JPEG library must first execute a setjmp() call to
- * establish the return point. We want the replacement error_exit to do a
- * longjmp(). But we need to make the setjmp buffer accessible to the
- * error_exit routine. To do this, we make a private extension of the
- * standard JPEG error handler object. (If we were using C++, we'd say we
- * were making a subclass of the regular error handler.)
- *
- * Here's the extended error handler struct:
- */
-
-struct my_error_mgr {
- struct jpeg_error_mgr pub; /* "public" fields */
-
- jmp_buf setjmp_buffer; /* for return to caller */
-};
-
-typedef struct my_error_mgr * my_error_ptr;
-
-/*
- * Here's the routine that will replace the standard error_exit method:
- */
-
-METHODDEF(void)
-my_error_exit (j_common_ptr cinfo)
-{
- /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
- my_error_ptr myerr = (my_error_ptr) cinfo->err;
-
- /* Always display the message. */
- /* We could postpone this until after returning, if we chose. */
- (*cinfo->err->output_message) (cinfo);
-
- /* Return control to the setjmp point */
- longjmp(myerr->setjmp_buffer, 1);
-}
-
-
-/*
- * Sample routine for JPEG decompression. We assume that the source file name
- * is passed in. We want to return 1 on success, 0 on error.
- */
-
-
-GLOBAL(int)
-read_JPEG_file (char * filename)
-{
- /* This struct contains the JPEG decompression parameters and pointers to
- * working space (which is allocated as needed by the JPEG library).
- */
- struct jpeg_decompress_struct cinfo;
- /* We use our private extension JPEG error handler.
- * Note that this struct must live as long as the main JPEG parameter
- * struct, to avoid dangling-pointer problems.
- */
- struct my_error_mgr jerr;
- /* More stuff */
- FILE * infile; /* source file */
- JSAMPARRAY buffer; /* Output row buffer */
- int row_stride; /* physical row width in output buffer */
-
- /* In this example we want to open the input file before doing anything else,
- * so that the setjmp() error recovery below can assume the file is open.
- * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
- * requires it in order to read binary files.
- */
-
- if ((infile = fopen(filename, "rb")) == NULL) {
- fprintf(stderr, "can't open %s\n", filename);
- return 0;
- }
-
- /* Step 1: allocate and initialize JPEG decompression object */
-
- /* We set up the normal JPEG error routines, then override error_exit. */
- cinfo.err = jpeg_std_error(&jerr.pub);
- jerr.pub.error_exit = my_error_exit;
- /* Establish the setjmp return context for my_error_exit to use. */
- if (setjmp(jerr.setjmp_buffer)) {
- /* If we get here, the JPEG code has signaled an error.
- * We need to clean up the JPEG object, close the input file, and return.
- */
- jpeg_destroy_decompress(&cinfo);
- fclose(infile);
- return 0;
- }
- /* Now we can initialize the JPEG decompression object. */
- jpeg_create_decompress(&cinfo);
-
- /* Step 2: specify data source (eg, a file) */
-
- jpeg_stdio_src(&cinfo, infile);
-
- /* Step 3: read file parameters with jpeg_read_header() */
-
- (void) jpeg_read_header(&cinfo, TRUE);
- /* We can ignore the return value from jpeg_read_header since
- * (a) suspension is not possible with the stdio data source, and
- * (b) we passed TRUE to reject a tables-only JPEG file as an error.
- * See libjpeg.doc for more info.
- */
-
- /* Step 4: set parameters for decompression */
-
- /* In this example, we don't need to change any of the defaults set by
- * jpeg_read_header(), so we do nothing here.
- */
-
- /* Step 5: Start decompressor */
-
- (void) jpeg_start_decompress(&cinfo);
- /* We can ignore the return value since suspension is not possible
- * with the stdio data source.
- */
-
- /* We may need to do some setup of our own at this point before reading
- * the data. After jpeg_start_decompress() we have the correct scaled
- * output image dimensions available, as well as the output colormap
- * if we asked for color quantization.
- * In this example, we need to make an output work buffer of the right size.
- */
- /* JSAMPLEs per row in output buffer */
- row_stride = cinfo.output_width * cinfo.output_components;
- /* Make a one-row-high sample array that will go away when done with image */
- buffer = (*cinfo.mem->alloc_sarray)
- ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
-
- /* Step 6: while (scan lines remain to be read) */
- /* jpeg_read_scanlines(...); */
-
- /* Here we use the library's state variable cinfo.output_scanline as the
- * loop counter, so that we don't have to keep track ourselves.
- */
- while (cinfo.output_scanline < cinfo.output_height) {
- /* jpeg_read_scanlines expects an array of pointers to scanlines.
- * Here the array is only one element long, but you could ask for
- * more than one scanline at a time if that's more convenient.
- */
- (void) jpeg_read_scanlines(&cinfo, buffer, 1);
- /* Assume put_scanline_someplace wants a pointer and sample count. */
- put_scanline_someplace(buffer[0], row_stride);
- }
-
- /* Step 7: Finish decompression */
-
- (void) jpeg_finish_decompress(&cinfo);
- /* We can ignore the return value since suspension is not possible
- * with the stdio data source.
- */
-
- /* Step 8: Release JPEG decompression object */
-
- /* This is an important step since it will release a good deal of memory. */
- jpeg_destroy_decompress(&cinfo);
-
- /* After finish_decompress, we can close the input file.
- * Here we postpone it until after no more JPEG errors are possible,
- * so as to simplify the setjmp error logic above. (Actually, I don't
- * think that jpeg_destroy can do an error exit, but why assume anything...)
- */
- fclose(infile);
-
- /* At this point you may want to check to see whether any corrupt-data
- * warnings occurred (test whether jerr.pub.num_warnings is nonzero).
- */
-
- /* And we're done! */
- return 1;
-}
-
-
-/*
- * SOME FINE POINTS:
- *
- * In the above code, we ignored the return value of jpeg_read_scanlines,
- * which is the number of scanlines actually read. We could get away with
- * this because we asked for only one line at a time and we weren't using
- * a suspending data source. See libjpeg.doc for more info.
- *
- * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress();
- * we should have done it beforehand to ensure that the space would be
- * counted against the JPEG max_memory setting. In some systems the above
- * code would risk an out-of-memory error. However, in general we don't
- * know the output image dimensions before jpeg_start_decompress(), unless we
- * call jpeg_calc_output_dimensions(). See libjpeg.doc for more about this.
- *
- * Scanlines are returned in the same order as they appear in the JPEG file,
- * which is standardly top-to-bottom. If you must emit data bottom-to-top,
- * you can use one of the virtual arrays provided by the JPEG memory manager
- * to invert the data. See wrbmp.c for an example.
- *
- * As with compression, some operating modes may require temporary files.
- * On some systems you may need to set up a signal handler to ensure that
- * temporary files are deleted if the program is interrupted. See libjpeg.doc.
- */
diff --git a/filelist.doc b/filelist.doc
deleted file mode 100644
index e14982c..0000000
--- a/filelist.doc
+++ /dev/null
@@ -1,210 +0,0 @@
-IJG JPEG LIBRARY: FILE LIST
-
-Copyright (C) 1994-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-Here is a road map to the files in the IJG JPEG distribution. The
-distribution includes the JPEG library proper, plus two application
-programs ("cjpeg" and "djpeg") which use the library to convert JPEG
-files to and from some other popular image formats. A third application
-"jpegtran" uses the library to do lossless conversion between different
-variants of JPEG. There are also two stand-alone applications,
-"rdjpgcom" and "wrjpgcom".
-
-
-THE JPEG LIBRARY
-================
-
-Include files:
-
-jpeglib.h JPEG library's exported data and function declarations.
-jconfig.h Configuration declarations. Note: this file is not present
- in the distribution; it is generated during installation.
-jmorecfg.h Additional configuration declarations; need not be changed
- for a standard installation.
-jerror.h Declares JPEG library's error and trace message codes.
-jinclude.h Central include file used by all IJG .c files to reference
- system include files.
-jpegint.h JPEG library's internal data structures.
-jchuff.h Private declarations for Huffman encoder modules.
-jdhuff.h Private declarations for Huffman decoder modules.
-jdct.h Private declarations for forward & reverse DCT subsystems.
-jmemsys.h Private declarations for memory management subsystem.
-jversion.h Version information.
-
-Applications using the library should include jpeglib.h (which in turn
-includes jconfig.h and jmorecfg.h). Optionally, jerror.h may be included
-if the application needs to reference individual JPEG error codes. The
-other include files are intended for internal use and would not normally
-be included by an application program. (cjpeg/djpeg/etc do use jinclude.h,
-since its function is to improve portability of the whole IJG distribution.
-Most other applications will directly include the system include files they
-want, and hence won't need jinclude.h.)
-
-
-C source code files:
-
-These files contain most of the functions intended to be called directly by
-an application program:
-
-jcapimin.c Application program interface: core routines for compression.
-jcapistd.c Application program interface: standard compression.
-jdapimin.c Application program interface: core routines for decompression.
-jdapistd.c Application program interface: standard decompression.
-jcomapi.c Application program interface routines common to compression
- and decompression.
-jcparam.c Compression parameter setting helper routines.
-jctrans.c API and library routines for transcoding compression.
-jdtrans.c API and library routines for transcoding decompression.
-
-Compression side of the library:
-
-jcinit.c Initialization: determines which other modules to use.
-jcmaster.c Master control: setup and inter-pass sequencing logic.
-jcmainct.c Main buffer controller (preprocessor => JPEG compressor).
-jcprepct.c Preprocessor buffer controller.
-jccoefct.c Buffer controller for DCT coefficient buffer.
-jccolor.c Color space conversion.
-jcsample.c Downsampling.
-jcdctmgr.c DCT manager (DCT implementation selection & control).
-jfdctint.c Forward DCT using slow-but-accurate integer method.
-jfdctfst.c Forward DCT using faster, less accurate integer method.
-jfdctflt.c Forward DCT using floating-point arithmetic.
-jchuff.c Huffman entropy coding for sequential JPEG.
-jcphuff.c Huffman entropy coding for progressive JPEG.
-jcmarker.c JPEG marker writing.
-jdatadst.c Data destination manager for stdio output.
-
-Decompression side of the library:
-
-jdmaster.c Master control: determines which other modules to use.
-jdinput.c Input controller: controls input processing modules.
-jdmainct.c Main buffer controller (JPEG decompressor => postprocessor).
-jdcoefct.c Buffer controller for DCT coefficient buffer.
-jdpostct.c Postprocessor buffer controller.
-jdmarker.c JPEG marker reading.
-jdhuff.c Huffman entropy decoding for sequential JPEG.
-jdphuff.c Huffman entropy decoding for progressive JPEG.
-jddctmgr.c IDCT manager (IDCT implementation selection & control).
-jidctint.c Inverse DCT using slow-but-accurate integer method.
-jidctfst.c Inverse DCT using faster, less accurate integer method.
-jidctflt.c Inverse DCT using floating-point arithmetic.
-jidctred.c Inverse DCTs with reduced-size outputs.
-jdsample.c Upsampling.
-jdcolor.c Color space conversion.
-jdmerge.c Merged upsampling/color conversion (faster, lower quality).
-jquant1.c One-pass color quantization using a fixed-spacing colormap.
-jquant2.c Two-pass color quantization using a custom-generated colormap.
- Also handles one-pass quantization to an externally given map.
-jdatasrc.c Data source manager for stdio input.
-
-Support files for both compression and decompression:
-
-jerror.c Standard error handling routines (application replaceable).
-jmemmgr.c System-independent (more or less) memory management code.
-jutils.c Miscellaneous utility routines.
-
-jmemmgr.c relies on a system-dependent memory management module. The IJG
-distribution includes the following implementations of the system-dependent
-module:
-
-jmemnobs.c "No backing store": assumes adequate virtual memory exists.
-jmemansi.c Makes temporary files with ANSI-standard routine tmpfile().
-jmemname.c Makes temporary files with program-generated file names.
-jmemdos.c Custom implementation for MS-DOS (16-bit environment only):
- can use extended and expanded memory as well as temp files.
-jmemmac.c Custom implementation for Apple Macintosh.
-
-Exactly one of the system-dependent modules should be configured into an
-installed JPEG library (see install.doc for hints about which one to use).
-On unusual systems you may find it worthwhile to make a special
-system-dependent memory manager.
-
-
-Non-C source code files:
-
-jmemdosa.asm 80x86 assembly code support for jmemdos.c; used only in
- MS-DOS-specific configurations of the JPEG library.
-
-
-CJPEG/DJPEG/JPEGTRAN
-====================
-
-Include files:
-
-cdjpeg.h Declarations shared by cjpeg/djpeg/jpegtran modules.
-cderror.h Additional error and trace message codes for cjpeg et al.
-transupp.h Declarations for jpegtran support routines in transupp.c.
-
-C source code files:
-
-cjpeg.c Main program for cjpeg.
-djpeg.c Main program for djpeg.
-jpegtran.c Main program for jpegtran.
-cdjpeg.c Utility routines used by all three programs.
-rdcolmap.c Code to read a colormap file for djpeg's "-map" switch.
-rdswitch.c Code to process some of cjpeg's more complex switches.
- Also used by jpegtran.
-transupp.c Support code for jpegtran: lossless image manipulations.
-
-Image file reader modules for cjpeg:
-
-rdbmp.c BMP file input.
-rdgif.c GIF file input (now just a stub).
-rdppm.c PPM/PGM file input.
-rdrle.c Utah RLE file input.
-rdtarga.c Targa file input.
-
-Image file writer modules for djpeg:
-
-wrbmp.c BMP file output.
-wrgif.c GIF file output (a mere shadow of its former self).
-wrppm.c PPM/PGM file output.
-wrrle.c Utah RLE file output.
-wrtarga.c Targa file output.
-
-
-RDJPGCOM/WRJPGCOM
-=================
-
-C source code files:
-
-rdjpgcom.c Stand-alone rdjpgcom application.
-wrjpgcom.c Stand-alone wrjpgcom application.
-
-These programs do not depend on the IJG library. They do use
-jconfig.h and jinclude.h, only to improve portability.
-
-
-ADDITIONAL FILES
-================
-
-Documentation (see README for a guide to the documentation files):
-
-README Master documentation file.
-*.doc Other documentation files.
-*.1 Documentation in Unix man page format.
-change.log Version-to-version change highlights.
-example.c Sample code for calling JPEG library.
-
-Configuration/installation files and programs (see install.doc for more info):
-
-configure Unix shell script to perform automatic configuration.
-ltconfig Support scripts for configure (from GNU libtool).
-ltmain.sh
-config.guess
-config.sub
-install-sh Install shell script for those Unix systems lacking one.
-ckconfig.c Program to generate jconfig.h on non-Unix systems.
-jconfig.doc Template for making jconfig.h by hand.
-makefile.* Sample makefiles for particular systems.
-jconfig.* Sample jconfig.h for particular systems.
-ansi2knr.c De-ANSIfier for pre-ANSI C compilers (courtesy of
- L. Peter Deutsch and Aladdin Enterprises).
-
-Test files (see install.doc for test procedure):
-
-test*.* Source and comparison files for confidence test.
- These are binary image files, NOT text files.
diff --git a/install-sh b/install-sh
deleted file mode 100755
index 4d4a951..0000000
--- a/install-sh
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
-# 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. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-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:
--c (ignored)
--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.
---help display this help and exit.
---version display version info and exit.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
- case $1 in
- -c) shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd=$stripprog
- shift
- continue;;
-
- -t) dstarg=$2
- shift
- shift
- continue;;
-
- -T) no_target_directory=true
- shift
- continue;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
- break;;
- esac
-done
-
-if test -z "$1"; 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
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src ;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- src=
-
- if test -d "$dst"; then
- mkdircmd=:
- chmodcmd=
- else
- mkdircmd=$mkdirprog
- fi
- 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 "$dstarg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dstarg
- # 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: $dstarg: Is a directory" >&2
- exit 1
- fi
- dst=$dst/`basename "$src"`
- fi
- fi
-
- # This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
- # Make sure that the destination directory exists.
-
- # Skip lots of stat calls in the usual case.
- if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
-
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- shift
- IFS=$oIFS
-
- pathcomp=
-
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
- shift
- if test ! -d "$pathcomp"; then
- $mkdirprog "$pathcomp"
- # mkdir can fail with a `File exist' error in case several
- # install-sh are creating the directory concurrently. This
- # is OK.
- test -d "$pathcomp" || exit
- fi
- pathcomp=$pathcomp/
- done
- fi
-
- if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
- else
- dstfile=`basename "$dst"`
-
- # 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
- trap '(exit $?); exit' 1 2 13 15
-
- # Copy the file name to the temp name.
- $doit $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 "$dsttmp"; } &&
-
- # Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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.
- {
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
- || {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit 1
- }
- else
- :
- fi
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
- }
- }
- fi || { (exit 1); exit 1; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
- (exit 0); 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-end: "$"
-# End:
diff --git a/install.doc b/install.doc
deleted file mode 100644
index 3702b98..0000000
--- a/install.doc
+++ /dev/null
@@ -1,1063 +0,0 @@
-INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software
-
-Copyright (C) 1991-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file explains how to configure and install the IJG software. We have
-tried to make this software extremely portable and flexible, so that it can be
-adapted to almost any environment. The downside of this decision is that the
-installation process is complicated. We have provided shortcuts to simplify
-the task on common systems. But in any case, you will need at least a little
-familiarity with C programming and program build procedures for your system.
-
-If you are only using this software as part of a larger program, the larger
-program's installation procedure may take care of configuring the IJG code.
-For example, Ghostscript's installation script will configure the IJG code.
-You don't need to read this file if you just want to compile Ghostscript.
-
-If you are on a Unix machine, you may not need to read this file at all.
-Try doing
- ./configure
- make
- make test
-If that doesn't complain, do
- make install
-(better do "make -n install" first to see if the makefile will put the files
-where you want them). Read further if you run into snags or want to customize
-the code for your system.
-
-
-TABLE OF CONTENTS
------------------
-
-Before you start
-Configuring the software:
- using the automatic "configure" script
- using one of the supplied jconfig and makefile files
- by hand
-Building the software
-Testing the software
-Installing the software
-Optional stuff
-Optimization
-Hints for specific systems
-
-
-BEFORE YOU START
-================
-
-Before installing the software you must unpack the distributed source code.
-Since you are reading this file, you have probably already succeeded in this
-task. However, there is a potential for error if you needed to convert the
-files to the local standard text file format (for example, if you are on
-MS-DOS you may have converted LF end-of-line to CR/LF). You must apply
-such conversion to all the files EXCEPT those whose names begin with "test".
-The test files contain binary data; if you change them in any way then the
-self-test will give bad results.
-
-Please check the last section of this file to see if there are hints for the
-specific machine or compiler you are using.
-
-
-CONFIGURING THE SOFTWARE
-========================
-
-To configure the IJG code for your system, you need to create two files:
- * jconfig.h: contains values for system-dependent #define symbols.
- * Makefile: controls the compilation process.
-(On a non-Unix machine, you may create "project files" or some other
-substitute for a Makefile. jconfig.h is needed in any environment.)
-
-We provide three different ways to generate these files:
- * On a Unix system, you can just run the "configure" script.
- * We provide sample jconfig files and makefiles for popular machines;
- if your machine matches one of the samples, just copy the right sample
- files to jconfig.h and Makefile.
- * If all else fails, read the instructions below and make your own files.
-
-
-Configuring the software using the automatic "configure" script
----------------------------------------------------------------
-
-If you are on a Unix machine, you can just type
- ./configure
-and let the configure script construct appropriate configuration files.
-If you're using "csh" on an old version of System V, you might need to type
- sh configure
-instead to prevent csh from trying to execute configure itself.
-Expect configure to run for a few minutes, particularly on slower machines;
-it works by compiling a series of test programs.
-
-Configure was created with GNU Autoconf and it follows the usual conventions
-for GNU configure scripts. It makes a few assumptions that you may want to
-override. You can do this by providing optional switches to configure:
-
-* If you want to build libjpeg as a shared library, say
- ./configure --enable-shared
-To get both shared and static libraries, say
- ./configure --enable-shared --enable-static
-Note that these switches invoke GNU libtool to take care of system-dependent
-shared library building methods. If things don't work this way, please try
-running configure without either switch; that should build a static library
-without using libtool. If that works, your problem is probably with libtool
-not with the IJG code. libtool is fairly new and doesn't support all flavors
-of Unix yet. (You might be able to find a newer version of libtool than the
-one included with libjpeg; see ftp.gnu.org. Report libtool problems to
-bug-libtool@gnu.org.)
-
-* Configure will use gcc (GNU C compiler) if it's available, otherwise cc.
-To force a particular compiler to be selected, use the CC option, for example
- ./configure CC='cc'
-The same method can be used to include any unusual compiler switches.
-For example, on HP-UX you probably want to say
- ./configure CC='cc -Aa'
-to get HP's compiler to run in ANSI mode.
-
-* The default CFLAGS setting is "-O" for non-gcc compilers, "-O2" for gcc.
-You can override this by saying, for example,
- ./configure CFLAGS='-g'
-if you want to compile with debugging support.
-
-* Configure will set up the makefile so that "make install" will install files
-into /usr/local/bin, /usr/local/man, etc. You can specify an installation
-prefix other than "/usr/local" by giving configure the option "--prefix=PATH".
-
-* If you don't have a lot of swap space, you may need to enable the IJG
-software's internal virtual memory mechanism. To do this, give the option
-"--enable-maxmem=N" where N is the default maxmemory limit in megabytes.
-This is discussed in more detail under "Selecting a memory manager", below.
-You probably don't need to worry about this on reasonably-sized Unix machines,
-unless you plan to process very large images.
-
-Configure has some other features that are useful if you are cross-compiling
-or working in a network of multiple machine types; but if you need those
-features, you probably already know how to use them.
-
-
-Configuring the software using one of the supplied jconfig and makefile files
------------------------------------------------------------------------------
-
-If you have one of these systems, you can just use the provided configuration
-files:
-
-Makefile jconfig file System and/or compiler
-
-makefile.manx jconfig.manx Amiga, Manx Aztec C
-makefile.sas jconfig.sas Amiga, SAS C
-makeproj.mac jconfig.mac Apple Macintosh, Metrowerks CodeWarrior
-mak*jpeg.st jconfig.st Atari ST/STE/TT, Pure C or Turbo C
-makefile.bcc jconfig.bcc MS-DOS or OS/2, Borland C
-makefile.dj jconfig.dj MS-DOS, DJGPP (Delorie's port of GNU C)
-makefile.mc6 jconfig.mc6 MS-DOS, Microsoft C (16-bit only)
-makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C
-makefile.vc jconfig.vc Windows NT/95, MS Visual C++
-make*.ds jconfig.vc Windows NT/95, MS Developer Studio
-makefile.mms jconfig.vms Digital VMS, with MMS software
-makefile.vms jconfig.vms Digital VMS, without MMS software
-
-Copy the proper jconfig file to jconfig.h and the makefile to Makefile (or
-whatever your system uses as the standard makefile name). For more info see
-the appropriate system-specific hints section near the end of this file.
-
-
-Configuring the software by hand
---------------------------------
-
-First, generate a jconfig.h file. If you are moderately familiar with C,
-the comments in jconfig.doc should be enough information to do this; just
-copy jconfig.doc to jconfig.h and edit it appropriately. Otherwise, you may
-prefer to use the ckconfig.c program. You will need to compile and execute
-ckconfig.c by hand --- we hope you know at least enough to do that.
-ckconfig.c may not compile the first try (in fact, the whole idea is for it
-to fail if anything is going to). If you get compile errors, fix them by
-editing ckconfig.c according to the directions given in ckconfig.c. Once
-you get it to run, it will write a suitable jconfig.h file, and will also
-print out some advice about which makefile to use.
-
-You may also want to look at the canned jconfig files, if there is one for a
-system similar to yours.
-
-Second, select a makefile and copy it to Makefile (or whatever your system
-uses as the standard makefile name). The most generic makefiles we provide
-are
- makefile.ansi: if your C compiler supports function prototypes
- makefile.unix: if not.
-(You have function prototypes if ckconfig.c put "#define HAVE_PROTOTYPES"
-in jconfig.h.) You may want to start from one of the other makefiles if
-there is one for a system similar to yours.
-
-Look over the selected Makefile and adjust options as needed. In particular
-you may want to change the CC and CFLAGS definitions. For instance, if you
-are using GCC, set CC=gcc. If you had to use any compiler switches to get
-ckconfig.c to work, make sure the same switches are in CFLAGS.
-
-If you are on a system that doesn't use makefiles, you'll need to set up
-project files (or whatever you do use) to compile all the source files and
-link them into executable files cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom.
-See the file lists in any of the makefiles to find out which files go into
-each program. Note that the provided makefiles all make a "library" file
-libjpeg first, but you don't have to do that if you don't want to; the file
-lists identify which source files are actually needed for compression,
-decompression, or both. As a last resort, you can make a batch script that
-just compiles everything and links it all together; makefile.vms is an example
-of this (it's for VMS systems that have no make-like utility).
-
-Here are comments about some specific configuration decisions you'll
-need to make:
-
-Command line style
-------------------
-
-These programs can use a Unix-like command line style which supports
-redirection and piping, like this:
- cjpeg inputfile >outputfile
- cjpeg <inputfile >outputfile
- source program | cjpeg >outputfile
-The simpler "two file" command line style is just
- cjpeg inputfile outputfile
-You may prefer the two-file style, particularly if you don't have pipes.
-
-You MUST use two-file style on any system that doesn't cope well with binary
-data fed through stdin/stdout; this is true for some MS-DOS compilers, for
-example. If you're not on a Unix system, it's safest to assume you need
-two-file style. (But if your compiler provides either the Posix-standard
-fdopen() library routine or a Microsoft-compatible setmode() routine, you
-can safely use the Unix command line style, by defining USE_FDOPEN or
-USE_SETMODE respectively.)
-
-To use the two-file style, make jconfig.h say "#define TWO_FILE_COMMANDLINE".
-
-Selecting a memory manager
---------------------------
-
-The IJG code is capable of working on images that are too big to fit in main
-memory; data is swapped out to temporary files as necessary. However, the
-code to do this is rather system-dependent. We provide five different
-memory managers:
-
-* jmemansi.c This version uses the ANSI-standard library routine tmpfile(),
- which not all non-ANSI systems have. On some systems
- tmpfile() may put the temporary file in a non-optimal
- location; if you don't like what it does, use jmemname.c.
-
-* jmemname.c This version creates named temporary files. For anything
- except a Unix machine, you'll need to configure the
- select_file_name() routine appropriately; see the comments
- near the head of jmemname.c. If you use this version, define
- NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files
- are removed if the program is aborted.
-
-* jmemnobs.c (That stands for No Backing Store :-).) This will compile on
- almost any system, but it assumes you have enough main memory
- or virtual memory to hold the biggest images you work with.
-
-* jmemdos.c This should be used with most 16-bit MS-DOS compilers.
- See the system-specific notes about MS-DOS for more info.
- IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in
- jconfig.h, and include the assembly file jmemdosa.asm in the
- programs. The supplied makefiles and jconfig files for
- 16-bit MS-DOS compilers already do both.
-
-* jmemmac.c Custom version for Apple Macintosh; see the system-specific
- notes for Macintosh for more info.
-
-To use a particular memory manager, change the SYSDEPMEM variable in your
-makefile to equal the corresponding object file name (for example, jmemansi.o
-or jmemansi.obj for jmemansi.c).
-
-If you have plenty of (real or virtual) main memory, just use jmemnobs.c.
-"Plenty" means about ten bytes for every pixel in the largest images
-you plan to process, so a lot of systems don't meet this criterion.
-If yours doesn't, try jmemansi.c first. If that doesn't compile, you'll have
-to use jmemname.c; be sure to adjust select_file_name() for local conditions.
-You may also need to change unlink() to remove() in close_backing_store().
-
-Except with jmemnobs.c or jmemmac.c, you need to adjust the DEFAULT_MAX_MEM
-setting to a reasonable value for your system (either by adding a #define for
-DEFAULT_MAX_MEM to jconfig.h, or by adding a -D switch to the Makefile).
-This value limits the amount of data space the program will attempt to
-allocate. Code and static data space isn't counted, so the actual memory
-needs for cjpeg or djpeg are typically 100 to 150Kb more than the max-memory
-setting. Larger max-memory settings reduce the amount of I/O needed to
-process a large image, but too large a value can result in "insufficient
-memory" failures. On most Unix machines (and other systems with virtual
-memory), just set DEFAULT_MAX_MEM to several million and forget it. At the
-other end of the spectrum, for MS-DOS machines you probably can't go much
-above 300K to 400K. (On MS-DOS the value refers to conventional memory only.
-Extended/expanded memory is handled separately by jmemdos.c.)
-
-
-BUILDING THE SOFTWARE
-=====================
-
-Now you should be able to compile the software. Just say "make" (or
-whatever's necessary to start the compilation). Have a cup of coffee.
-
-Here are some things that could go wrong:
-
-If your compiler complains about undefined structures, you should be able to
-shut it up by putting "#define INCOMPLETE_TYPES_BROKEN" in jconfig.h.
-
-If you have trouble with missing system include files or inclusion of the
-wrong ones, read jinclude.h. This shouldn't happen if you used configure
-or ckconfig.c to set up jconfig.h.
-
-There are a fair number of routines that do not use all of their parameters;
-some compilers will issue warnings about this, which you can ignore. There
-are also a few configuration checks that may give "unreachable code" warnings.
-Any other warning deserves investigation.
-
-If you don't have a getenv() library routine, define NO_GETENV.
-
-Also see the system-specific hints, below.
-
-
-TESTING THE SOFTWARE
-====================
-
-As a quick test of functionality we've included a small sample image in
-several forms:
- testorig.jpg Starting point for the djpeg tests.
- testimg.ppm The output of djpeg testorig.jpg
- testimg.bmp The output of djpeg -bmp -colors 256 testorig.jpg
- testimg.jpg The output of cjpeg testimg.ppm
- testprog.jpg Progressive-mode equivalent of testorig.jpg.
- testimgp.jpg The output of cjpeg -progressive -optimize testimg.ppm
-(The first- and second-generation .jpg files aren't identical since JPEG is
-lossy.) If you can generate duplicates of the testimg* files then you
-probably have working programs.
-
-With most of the makefiles, "make test" will perform the necessary
-comparisons.
-
-If you're using a makefile that doesn't provide the test option, run djpeg
-and cjpeg by hand and compare the output files to testimg* with whatever
-binary file comparison tool you have. The files should be bit-for-bit
-identical.
-
-If the programs complain "MAX_ALLOC_CHUNK is wrong, please fix", then you
-need to reduce MAX_ALLOC_CHUNK to a value that fits in type size_t.
-Try adding "#define MAX_ALLOC_CHUNK 65520L" to jconfig.h. A less likely
-configuration error is "ALIGN_TYPE is wrong, please fix": defining ALIGN_TYPE
-as long should take care of that one.
-
-If the cjpeg test run fails with "Missing Huffman code table entry", it's a
-good bet that you needed to define RIGHT_SHIFT_IS_UNSIGNED. Go back to the
-configuration step and run ckconfig.c. (This is a good plan for any other
-test failure, too.)
-
-If you are using Unix (one-file) command line style on a non-Unix system,
-it's a good idea to check that binary I/O through stdin/stdout actually
-works. You should get the same results from "djpeg <testorig.jpg >out.ppm"
-as from "djpeg -outfile out.ppm testorig.jpg". Note that the makefiles all
-use the latter style and therefore do not exercise stdin/stdout! If this
-check fails, try recompiling with USE_SETMODE or USE_FDOPEN defined.
-If it still doesn't work, better use two-file style.
-
-If you chose a memory manager other than jmemnobs.c, you should test that
-temporary-file usage works. Try "djpeg -bmp -colors 256 -max 0 testorig.jpg"
-and make sure its output matches testimg.bmp. If you have any really large
-images handy, try compressing them with -optimize and/or decompressing with
--colors 256 to make sure your DEFAULT_MAX_MEM setting is not too large.
-
-NOTE: this is far from an exhaustive test of the JPEG software; some modules,
-such as 1-pass color quantization, are not exercised at all. It's just a
-quick test to give you some confidence that you haven't missed something
-major.
-
-
-INSTALLING THE SOFTWARE
-=======================
-
-Once you're done with the above steps, you can install the software by
-copying the executable files (cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom)
-to wherever you normally install programs. On Unix systems, you'll also want
-to put the man pages (cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1)
-in the man-page directory. The pre-fab makefiles don't support this step
-since there's such a wide variety of installation procedures on different
-systems.
-
-If you generated a Makefile with the "configure" script, you can just say
- make install
-to install the programs and their man pages into the standard places.
-(You'll probably need to be root to do this.) We recommend first saying
- make -n install
-to see where configure thought the files should go. You may need to edit
-the Makefile, particularly if your system's conventions for man page
-filenames don't match what configure expects.
-
-If you want to install the IJG library itself, for use in compiling other
-programs besides ours, then you need to put the four include files
- jpeglib.h jerror.h jconfig.h jmorecfg.h
-into your include-file directory, and put the library file libjpeg.a
-(extension may vary depending on system) wherever library files go.
-If you generated a Makefile with "configure", it will do what it thinks
-is the right thing if you say
- make install-lib
-
-
-OPTIONAL STUFF
-==============
-
-Progress monitor:
-
-If you like, you can #define PROGRESS_REPORT (in jconfig.h) to enable display
-of percent-done progress reports. The routine provided in cdjpeg.c merely
-prints percentages to stderr, but you can customize it to do something
-fancier.
-
-Utah RLE file format support:
-
-We distribute the software with support for RLE image files (Utah Raster
-Toolkit format) disabled, because the RLE support won't compile without the
-Utah library. If you have URT version 3.1 or later, you can enable RLE
-support as follows:
- 1. #define RLE_SUPPORTED in jconfig.h.
- 2. Add a -I option to CFLAGS in the Makefile for the directory
- containing the URT .h files (typically the "include"
- subdirectory of the URT distribution).
- 3. Add -L... -lrle to LDLIBS in the Makefile, where ... specifies
- the directory containing the URT "librle.a" file (typically the
- "lib" subdirectory of the URT distribution).
-
-Support for 12-bit-deep pixel data:
-
-The JPEG standard allows either 8-bit or 12-bit data precision. (For color,
-this means 8 or 12 bits per channel, of course.) If you need to work with
-deeper than 8-bit data, you can compile the IJG code for 12-bit operation.
-To do so:
- 1. In jmorecfg.h, define BITS_IN_JSAMPLE as 12 rather than 8.
- 2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED,
- because the code for those formats doesn't handle 12-bit data and won't
- even compile. (The PPM code does work, as explained below. The GIF
- code works too; it scales 8-bit GIF data to and from 12-bit depth
- automatically.)
- 3. Compile. Don't expect "make test" to pass, since the supplied test
- files are for 8-bit data.
-
-Currently, 12-bit support does not work on 16-bit-int machines.
-
-Note that a 12-bit version will not read 8-bit JPEG files, nor vice versa;
-so you'll want to keep around a regular 8-bit compilation as well.
-(Run-time selection of data depth, to allow a single copy that does both,
-is possible but would probably slow things down considerably; it's very low
-on our to-do list.)
-
-The PPM reader (rdppm.c) can read 12-bit data from either text-format or
-binary-format PPM and PGM files. Binary-format PPM/PGM files which have a
-maxval greater than 255 are assumed to use 2 bytes per sample, LSB first
-(little-endian order). As of early 1995, 2-byte binary format is not
-officially supported by the PBMPLUS library, but it is expected that a
-future release of PBMPLUS will support it. Note that the PPM reader will
-read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming
-data is automatically rescaled to either maxval=255 or maxval=4095 as
-appropriate for the cjpeg bit depth.
-
-The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM
-format, maxval 4095, when compiled with BITS_IN_JSAMPLE=12. Since this
-format is not yet widely supported, you can disable it by compiling wrppm.c
-with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a
-standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy
-of djpeg to keep around. But hopefully you won't need it for very long.
-Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.)
-
-Of course, if you are working with 12-bit data, you probably have it stored
-in some other, nonstandard format. In that case you'll probably want to
-write your own I/O modules to read and write your format.
-
-Note that a 12-bit version of cjpeg always runs in "-optimize" mode, in
-order to generate valid Huffman tables. This is necessary because our
-default Huffman tables only cover 8-bit data.
-
-Removing code:
-
-If you need to make a smaller version of the JPEG software, some optional
-functions can be removed at compile time. See the xxx_SUPPORTED #defines in
-jconfig.h and jmorecfg.h. If at all possible, we recommend that you leave in
-decoder support for all valid JPEG files, to ensure that you can read anyone's
-output. Taking out support for image file formats that you don't use is the
-most painless way to make the programs smaller. Another possibility is to
-remove some of the DCT methods: in particular, the "IFAST" method may not be
-enough faster than the others to be worth keeping on your machine. (If you
-do remove ISLOW or IFAST, be sure to redefine JDCT_DEFAULT or JDCT_FASTEST
-to a supported method, by adding a #define in jconfig.h.)
-
-
-OPTIMIZATION
-============
-
-Unless you own a Cray, you'll probably be interested in making the JPEG
-software go as fast as possible. This section covers some machine-dependent
-optimizations you may want to try. We suggest that before trying any of
-this, you first get the basic installation to pass the self-test step.
-Repeat the self-test after any optimization to make sure that you haven't
-broken anything.
-
-The integer DCT routines perform a lot of multiplications. These
-multiplications must yield 32-bit results, but none of their input values
-are more than 16 bits wide. On many machines, notably the 680x0 and 80x86
-CPUs, a 16x16=>32 bit multiply instruction is faster than a full 32x32=>32
-bit multiply. Unfortunately there is no portable way to specify such a
-multiplication in C, but some compilers can generate one when you use the
-right combination of casts. See the MULTIPLYxxx macro definitions in
-jdct.h. If your compiler makes "int" be 32 bits and "short" be 16 bits,
-defining SHORTxSHORT_32 is fairly likely to work. When experimenting with
-alternate definitions, be sure to test not only whether the code still works
-(use the self-test), but also whether it is actually faster --- on some
-compilers, alternate definitions may compute the right answer, yet be slower
-than the default. Timing cjpeg on a large PGM (grayscale) input file is the
-best way to check this, as the DCT will be the largest fraction of the runtime
-in that mode. (Note: some of the distributed compiler-specific jconfig files
-already contain #define switches to select appropriate MULTIPLYxxx
-definitions.)
-
-If your machine has sufficiently fast floating point hardware, you may find
-that the float DCT method is faster than the integer DCT methods, even
-after tweaking the integer multiply macros. In that case you may want to
-make the float DCT be the default method. (The only objection to this is
-that float DCT results may vary slightly across machines.) To do that, add
-"#define JDCT_DEFAULT JDCT_FLOAT" to jconfig.h. Even if you don't change
-the default, you should redefine JDCT_FASTEST, which is the method selected
-by djpeg's -fast switch. Don't forget to update the documentation files
-(usage.doc and/or cjpeg.1, djpeg.1) to agree with what you've done.
-
-If access to "short" arrays is slow on your machine, it may be a win to
-define type JCOEF as int rather than short. This will cost a good deal of
-memory though, particularly in some multi-pass modes, so don't do it unless
-you have memory to burn and short is REALLY slow.
-
-If your compiler can compile function calls in-line, make sure the INLINE
-macro in jmorecfg.h is defined as the keyword that marks a function
-inline-able. Some compilers have a switch that tells the compiler to inline
-any function it thinks is profitable (e.g., -finline-functions for gcc).
-Enabling such a switch is likely to make the compiled code bigger but faster.
-
-In general, it's worth trying the maximum optimization level of your compiler,
-and experimenting with any optional optimizations such as loop unrolling.
-(Unfortunately, far too many compilers have optimizer bugs ... be prepared to
-back off if the code fails self-test.) If you do any experimentation along
-these lines, please report the optimal settings to jpeg-info@uunet.uu.net so
-we can mention them in future releases. Be sure to specify your machine and
-compiler version.
-
-
-HINTS FOR SPECIFIC SYSTEMS
-==========================
-
-We welcome reports on changes needed for systems not mentioned here. Submit
-'em to jpeg-info@uunet.uu.net. Also, if configure or ckconfig.c is wrong
-about how to configure the JPEG software for your system, please let us know.
-
-
-Acorn RISC OS:
-
-(Thanks to Simon Middleton for these hints on compiling with Desktop C.)
-After renaming the files according to Acorn conventions, take a copy of
-makefile.ansi, change all occurrences of 'libjpeg.a' to 'libjpeg.o' and
-change these definitions as indicated:
-
-CFLAGS= -throwback -IC: -Wn
-LDLIBS=C:o.Stubs
-SYSDEPMEM=jmemansi.o
-LN=Link
-AR=LibFile -c -o
-
-Also add a new line '.c.o:; $(cc) $< $(cflags) -c -o $@'. Remove the
-lines '$(RM) libjpeg.o' and '$(AR2) libjpeg.o' and the 'jconfig.h'
-dependency section.
-
-Copy jconfig.doc to jconfig.h. Edit jconfig.h to define TWO_FILE_COMMANDLINE
-and CHAR_IS_UNSIGNED.
-
-Run the makefile using !AMU not !Make. If you want to use the 'clean' and
-'test' makefile entries then you will have to fiddle with the syntax a bit
-and rename the test files.
-
-
-Amiga:
-
-SAS C 6.50 reportedly is too buggy to compile the IJG code properly.
-A patch to update to 6.51 is available from SAS or AmiNet FTP sites.
-
-The supplied config files are set up to use jmemname.c as the memory
-manager, with temporary files being created on the device named by
-"JPEGTMP:".
-
-
-Atari ST/STE/TT:
-
-Copy the project files makcjpeg.st, makdjpeg.st, maktjpeg.st, and makljpeg.st
-to cjpeg.prj, djpeg.prj, jpegtran.prj, and libjpeg.prj respectively. The
-project files should work as-is with Pure C. For Turbo C, change library
-filenames "pc..." to "tc..." in each project file. Note that libjpeg.prj
-selects jmemansi.c as the recommended memory manager. You'll probably want to
-adjust the DEFAULT_MAX_MEM setting --- you want it to be a couple hundred K
-less than your normal free memory. Put "#define DEFAULT_MAX_MEM nnnn" into
-jconfig.h to do this.
-
-To use the 68881/68882 coprocessor for the floating point DCT, add the
-compiler option "-8" to the project files and replace pcfltlib.lib with
-pc881lib.lib in cjpeg.prj and djpeg.prj. Or if you don't have a
-coprocessor, you may prefer to remove the float DCT code by undefining
-DCT_FLOAT_SUPPORTED in jmorecfg.h (since without a coprocessor, the float
-code will be too slow to be useful). In that case, you can delete
-pcfltlib.lib from the project files.
-
-Note that you must make libjpeg.lib before making cjpeg.ttp, djpeg.ttp,
-or jpegtran.ttp. You'll have to perform the self-test by hand.
-
-We haven't bothered to include project files for rdjpgcom and wrjpgcom.
-Those source files should just be compiled by themselves; they don't
-depend on the JPEG library.
-
-There is a bug in some older versions of the Turbo C library which causes the
-space used by temporary files created with "tmpfile()" not to be freed after
-an abnormal program exit. If you check your disk afterwards, you will find
-cluster chains that are allocated but not used by a file. This should not
-happen in cjpeg/djpeg/jpegtran, since we enable a signal catcher to explicitly
-close temp files before exiting. But if you use the JPEG library with your
-own code, be sure to supply a signal catcher, or else use a different
-system-dependent memory manager.
-
-
-Cray:
-
-Should you be so fortunate as to be running JPEG on a Cray YMP, there is a
-compiler bug in old versions of Cray's Standard C (prior to 3.1). If you
-still have an old compiler, you'll need to insert a line reading
-"#pragma novector" just before the loop
- for (i = 1; i <= (int) htbl->bits[l]; i++)
- huffsize[p++] = (char) l;
-in fix_huff_tbl (in V5beta1, line 204 of jchuff.c and line 176 of jdhuff.c).
-[This bug may or may not still occur with the current IJG code, but it's
-probably a dead issue anyway...]
-
-
-HP-UX:
-
-If you have HP-UX 7.05 or later with the "software development" C compiler,
-you should run the compiler in ANSI mode. If using the configure script,
-say
- ./configure CC='cc -Aa'
-(or -Ae if you prefer). If configuring by hand, use makefile.ansi and add
-"-Aa" to the CFLAGS line in the makefile.
-
-If you have a pre-7.05 system, or if you are using the non-ANSI C compiler
-delivered with a minimum HP-UX system, then you must use makefile.unix
-(and do NOT add -Aa); or just run configure without the CC option.
-
-On HP 9000 series 800 machines, the HP C compiler is buggy in revisions prior
-to A.08.07. If you get complaints about "not a typedef name", you'll have to
-use makefile.unix, or run configure without the CC option.
-
-
-Macintosh, generic comments:
-
-The supplied user-interface files (cjpeg.c, djpeg.c, etc) are set up to
-provide a Unix-style command line interface. You can use this interface on
-the Mac by means of the ccommand() library routine provided by Metrowerks
-CodeWarrior or Think C. This is only appropriate for testing the library,
-however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want
-to develop a Mac-style user interface. There isn't a complete example
-available at the moment, but there are some helpful starting points:
-1. Sam Bushell's free "To JPEG" applet provides drag-and-drop conversion to
-JPEG under System 7 and later. This only illustrates how to use the
-compression half of the library, but it does a very nice job of that part.
-The CodeWarrior source code is available from http://www.pobox.com/~jsam.
-2. Jim Brunner prepared a Mac-style user interface for both compression and
-decompression. Unfortunately, it hasn't been updated since IJG v4, and
-the library's API has changed considerably since then. Still it may be of
-some help, particularly as a guide to compiling the IJG code under Think C.
-Jim's code is available from the Info-Mac archives, at sumex-aim.stanford.edu
-or mirrors thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx.
-
-jmemmac.c is the recommended memory manager back end for Macintosh. It uses
-NewPtr/DisposePtr instead of malloc/free, and has a Mac-specific
-implementation of jpeg_mem_available(). It also creates temporary files that
-follow Mac conventions. (That part of the code relies on System-7-or-later OS
-functions. See the comments in jmemmac.c if you need to run it on System 6.)
-NOTE that USE_MAC_MEMMGR must be defined in jconfig.h to use jmemmac.c.
-
-You can also use jmemnobs.c, if you don't care about handling images larger
-than available memory. If you use any memory manager back end other than
-jmemmac.c, we recommend replacing "malloc" and "free" by "NewPtr" and
-"DisposePtr", because Mac C libraries often have peculiar implementations of
-malloc/free. (For instance, free() may not return the freed space to the
-Mac Memory Manager. This is undesirable for the IJG code because jmemmgr.c
-already clumps space requests.)
-
-
-Macintosh, Metrowerks CodeWarrior:
-
-The Unix-command-line-style interface can be used by defining USE_CCOMMAND.
-You'll also need to define TWO_FILE_COMMANDLINE to avoid stdin/stdout.
-This means that when using the cjpeg/djpeg programs, you'll have to type the
-input and output file names in the "Arguments" text-edit box, rather than
-using the file radio buttons. (Perhaps USE_FDOPEN or USE_SETMODE would
-eliminate the problem, but I haven't heard from anyone who's tried it.)
-
-On 680x0 Macs, Metrowerks defines type "double" as a 10-byte IEEE extended
-float. jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power
-of 2. Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint.
-
-The supplied configuration file jconfig.mac can be used for your jconfig.h;
-it includes all the recommended symbol definitions. If you have AppleScript
-installed, you can run the supplied script makeproj.mac to create CodeWarrior
-project files for the library and the testbed applications, then build the
-library and applications. (Thanks to Dan Sears and Don Agro for this nifty
-hack, which saves us from trying to maintain CodeWarrior project files as part
-of the IJG distribution...)
-
-
-Macintosh, Think C:
-
-The documentation in Jim Brunner's "JPEG Convert" source code (see above)
-includes detailed build instructions for Think C; it's probably somewhat
-out of date for the current release, but may be helpful.
-
-If you want to build the minimal command line version, proceed as follows.
-You'll have to prepare project files for the programs; we don't include any
-in the distribution since they are not text files. Use the file lists in
-any of the supplied makefiles as a guide. Also add the ANSI and Unix C
-libraries in a separate segment. You may need to divide the JPEG files into
-more than one segment; we recommend dividing compression and decompression
-modules. Define USE_CCOMMAND in jconfig.h so that the ccommand() routine is
-called. You must also define TWO_FILE_COMMANDLINE because stdin/stdout
-don't handle binary data correctly.
-
-On 680x0 Macs, Think C defines type "double" as a 12-byte IEEE extended float.
-jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power of 2.
-Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint.
-
-jconfig.mac should work as a jconfig.h configuration file for Think C,
-but the makeproj.mac AppleScript script is specific to CodeWarrior. Sorry.
-
-
-MIPS R3000:
-
-MIPS's cc version 1.31 has a rather nasty optimization bug. Don't use -O
-if you have that compiler version. (Use "cc -V" to check the version.)
-Note that the R3000 chip is found in workstations from DEC and others.
-
-
-MS-DOS, generic comments for 16-bit compilers:
-
-The IJG code is designed to work well in 80x86 "small" or "medium" memory
-models (i.e., data pointers are 16 bits unless explicitly declared "far";
-code pointers can be either size). You may be able to use small model to
-compile cjpeg or djpeg by itself, but you will probably have to use medium
-model for any larger application. This won't make much difference in
-performance. You *will* take a noticeable performance hit if you use a
-large-data memory model, and you should avoid "huge" model if at all
-possible. Be sure that NEED_FAR_POINTERS is defined in jconfig.h if you use
-a small-data memory model; be sure it is NOT defined if you use a large-data
-model. (The supplied makefiles and jconfig files for Borland and Microsoft C
-compile in medium model and define NEED_FAR_POINTERS.)
-
-The DOS-specific memory manager, jmemdos.c, should be used if possible.
-It needs some assembly-code routines which are in jmemdosa.asm; make sure
-your makefile assembles that file and includes it in the library. If you
-don't have a suitable assembler, you can get pre-assembled object files for
-jmemdosa by FTP from ftp.uu.net:/graphics/jpeg/jdosaobj.zip. (DOS-oriented
-distributions of the IJG source code often include these object files.)
-
-When using jmemdos.c, jconfig.h must define USE_MSDOS_MEMMGR and must set
-MAX_ALLOC_CHUNK to less than 64K (65520L is a typical value). If your
-C library's far-heap malloc() can't allocate blocks that large, reduce
-MAX_ALLOC_CHUNK to whatever it can handle.
-
-If you can't use jmemdos.c for some reason --- for example, because you
-don't have an assembler to assemble jmemdosa.asm --- you'll have to fall
-back to jmemansi.c or jmemname.c. You'll probably still need to set
-MAX_ALLOC_CHUNK in jconfig.h, because most DOS C libraries won't malloc()
-more than 64K at a time. IMPORTANT: if you use jmemansi.c or jmemname.c,
-you will have to compile in a large-data memory model in order to get the
-right stdio library. Too bad.
-
-wrjpgcom needs to be compiled in large model, because it malloc()s a 64KB
-work area to hold the comment text. If your C library's malloc can't
-handle that, reduce MAX_COM_LENGTH as necessary in wrjpgcom.c.
-
-Most MS-DOS compilers treat stdin/stdout as text files, so you must use
-two-file command line style. But if your compiler has either fdopen() or
-setmode(), you can use one-file style if you like. To do this, define
-USE_SETMODE or USE_FDOPEN so that stdin/stdout will be set to binary mode.
-(USE_SETMODE seems to work with more DOS compilers than USE_FDOPEN.) You
-should test that I/O through stdin/stdout produces the same results as I/O
-to explicitly named files... the "make test" procedures in the supplied
-makefiles do NOT use stdin/stdout.
-
-
-MS-DOS, generic comments for 32-bit compilers:
-
-None of the above comments about memory models apply if you are using a
-32-bit flat-memory-space environment, such as DJGPP or Watcom C. (And you
-should use one if you have it, as performance will be much better than
-8086-compatible code!) For flat-memory-space compilers, do NOT define
-NEED_FAR_POINTERS, and do NOT use jmemdos.c. Use jmemnobs.c if the
-environment supplies adequate virtual memory, otherwise use jmemansi.c or
-jmemname.c.
-
-You'll still need to be careful about binary I/O through stdin/stdout.
-See the last paragraph of the previous section.
-
-
-MS-DOS, Borland C:
-
-Be sure to convert all the source files to DOS text format (CR/LF newlines).
-Although Borland C will often work OK with unmodified Unix (LF newlines)
-source files, sometimes it will give bogus compile errors.
-"Illegal character '#'" is the most common such error. (This is true with
-Borland C 3.1, but perhaps is fixed in newer releases.)
-
-If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE.
-jconfig.bcc already includes #define USE_SETMODE to make this work.
-(fdopen does not work correctly.)
-
-
-MS-DOS, Microsoft C:
-
-makefile.mc6 works with Microsoft C, DOS Visual C++, etc. It should only
-be used if you want to build a 16-bit (small or medium memory model) program.
-
-If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE.
-jconfig.mc6 already includes #define USE_SETMODE to make this work.
-(fdopen does not work correctly.)
-
-Note that this makefile assumes that the working copy of itself is called
-"makefile". If you want to call it something else, say "makefile.mak",
-be sure to adjust the dependency line that reads "$(RFILE) : makefile".
-Otherwise the make will fail because it doesn't know how to create "makefile".
-Worse, some releases of Microsoft's make utilities give an incorrect error
-message in this situation.
-
-Old versions of MS C fail with an "out of macro expansion space" error
-because they can't cope with the macro TRACEMS8 (defined in jerror.h).
-If this happens to you, the easiest solution is to change TRACEMS8 to
-expand to nothing. You'll lose the ability to dump out JPEG coefficient
-tables with djpeg -debug -debug, but at least you can compile.
-
-Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn
-off optimization entirely (remove -O from CFLAGS). 6.00A is better, but it
-still generates bad code if you enable loop optimizations (-Ol or -Ox).
-
-MS C 8.0 crashes when compiling jquant1.c with optimization switch /Oo ...
-which is on by default. To work around this bug, compile that one file
-with /Oo-.
-
-
-Microsoft Windows (all versions), generic comments:
-
-Some Windows system include files define typedef boolean as "unsigned char".
-The IJG code also defines typedef boolean, but we make it "int" by default.
-This doesn't affect the IJG programs because we don't import those Windows
-include files. But if you use the JPEG library in your own program, and some
-of your program's files import one definition of boolean while some import the
-other, you can get all sorts of mysterious problems. A good preventive step
-is to make the IJG library use "unsigned char" for boolean. To do that,
-add something like this to your jconfig.h file:
- /* Define "boolean" as unsigned char, not int, per Windows custom */
- #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
- typedef unsigned char boolean;
- #endif
- #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
-(This is already in jconfig.vc, by the way.)
-
-windef.h contains the declarations
- #define far
- #define FAR far
-Since jmorecfg.h tries to define FAR as empty, you may get a compiler
-warning if you include both jpeglib.h and windef.h (which windows.h
-includes). To suppress the warning, you can put "#ifndef FAR"/"#endif"
-around the line "#define FAR" in jmorecfg.h.
-
-When using the library in a Windows application, you will almost certainly
-want to modify or replace the error handler module jerror.c, since our
-default error handler does a couple of inappropriate things:
- 1. it tries to write error and warning messages on stderr;
- 2. in event of a fatal error, it exits by calling exit().
-
-A simple stopgap solution for problem 1 is to replace the line
- fprintf(stderr, "%s\n", buffer);
-(in output_message in jerror.c) with
- MessageBox(GetActiveWindow(),buffer,"JPEG Error",MB_OK|MB_ICONERROR);
-It's highly recommended that you at least do that much, since otherwise
-error messages will disappear into nowhere. (Beginning with IJG v6b, this
-code is already present in jerror.c; just define USE_WINDOWS_MESSAGEBOX in
-jconfig.h to enable it.)
-
-The proper solution for problem 2 is to return control to your calling
-application after a library error. This can be done with the setjmp/longjmp
-technique discussed in libjpeg.doc and illustrated in example.c. (NOTE:
-some older Windows C compilers provide versions of setjmp/longjmp that
-don't actually work under Windows. You may need to use the Windows system
-functions Catch and Throw instead.)
-
-The recommended memory manager under Windows is jmemnobs.c; in other words,
-let Windows do any virtual memory management needed. You should NOT use
-jmemdos.c nor jmemdosa.asm under Windows.
-
-For Windows 3.1, we recommend compiling in medium or large memory model;
-for newer Windows versions, use a 32-bit flat memory model. (See the MS-DOS
-sections above for more info about memory models.) In the 16-bit memory
-models only, you'll need to put
- #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */
-into jconfig.h to limit allocation chunks to 64Kb. (Without that, you'd
-have to use huge memory model, which slows things down unnecessarily.)
-jmemnobs.c works without modification in large or flat memory models, but to
-use medium model, you need to modify its jpeg_get_large and jpeg_free_large
-routines to allocate far memory. In any case, you might like to replace
-its calls to malloc and free with direct calls on Windows memory allocation
-functions.
-
-You may also want to modify jdatasrc.c and jdatadst.c to use Windows file
-operations rather than fread/fwrite. This is only necessary if your C
-compiler doesn't provide a competent implementation of C stdio functions.
-
-You might want to tweak the RGB_xxx macros in jmorecfg.h so that the library
-will accept or deliver color pixels in BGR sample order, not RGB; BGR order
-is usually more convenient under Windows. Note that this change will break
-the sample applications cjpeg/djpeg, but the library itself works fine.
-
-
-Many people want to convert the IJG library into a DLL. This is reasonably
-straightforward, but watch out for the following:
-
- 1. Don't try to compile as a DLL in small or medium memory model; use
-large model, or even better, 32-bit flat model. Many places in the IJG code
-assume the address of a local variable is an ordinary (not FAR) pointer;
-that isn't true in a medium-model DLL.
-
- 2. Microsoft C cannot pass file pointers between applications and DLLs.
-(See Microsoft Knowledge Base, PSS ID Number Q50336.) So jdatasrc.c and
-jdatadst.c don't work if you open a file in your application and then pass
-the pointer to the DLL. One workaround is to make jdatasrc.c/jdatadst.c
-part of your main application rather than part of the DLL.
-
- 3. You'll probably need to modify the macros GLOBAL() and EXTERN() to
-attach suitable linkage keywords to the exported routine names. Similarly,
-you'll want to modify METHODDEF() and JMETHOD() to ensure function pointers
-are declared in a way that lets application routines be called back through
-the function pointers. These macros are in jmorecfg.h. Typical definitions
-for a 16-bit DLL are:
- #define GLOBAL(type) type _far _pascal _loadds _export
- #define EXTERN(type) extern type _far _pascal _loadds
- #define METHODDEF(type) static type _far _pascal
- #define JMETHOD(type,methodname,arglist) \
- type (_far _pascal *methodname) arglist
-For a 32-bit DLL you may want something like
- #define GLOBAL(type) __declspec(dllexport) type
- #define EXTERN(type) extern __declspec(dllexport) type
-Although not all the GLOBAL routines are actually intended to be called by
-the application, the performance cost of making them all DLL entry points is
-negligible.
-
-The unmodified IJG library presents a very C-specific application interface,
-so the resulting DLL is only usable from C or C++ applications. There has
-been some talk of writing wrapper code that would present a simpler interface
-usable from other languages, such as Visual Basic. This is on our to-do list
-but hasn't been very high priority --- any volunteers out there?
-
-
-Microsoft Windows, Borland C:
-
-The provided jconfig.bcc should work OK in a 32-bit Windows environment,
-but you'll need to tweak it in a 16-bit environment (you'd need to define
-NEED_FAR_POINTERS and MAX_ALLOC_CHUNK). Beware that makefile.bcc will need
-alteration if you want to use it for Windows --- in particular, you should
-use jmemnobs.c not jmemdos.c under Windows.
-
-Borland C++ 4.5 fails with an internal compiler error when trying to compile
-jdmerge.c in 32-bit mode. If enough people complain, perhaps Borland will fix
-it. In the meantime, the simplest known workaround is to add a redundant
-definition of the variable range_limit in h2v1_merged_upsample(), at the head
-of the block that handles odd image width (about line 268 in v6 jdmerge.c):
- /* If image width is odd, do the last output column separately */
- if (cinfo->output_width & 1) {
- register JSAMPLE * range_limit = cinfo->sample_range_limit; /* ADD THIS */
- cb = GETJSAMPLE(*inptr1);
-Pretty bizarre, especially since the very similar routine h2v2_merged_upsample
-doesn't trigger the bug.
-Recent reports suggest that this bug does not occur with "bcc32a" (the
-Pentium-optimized version of the compiler).
-
-Another report from a user of Borland C 4.5 was that incorrect code (leading
-to a color shift in processed images) was produced if any of the following
-optimization switch combinations were used:
- -Ot -Og
- -Ot -Op
- -Ot -Om
-So try backing off on optimization if you see such a problem. (Are there
-several different releases all numbered "4.5"??)
-
-
-Microsoft Windows, Microsoft Visual C++:
-
-jconfig.vc should work OK with any Microsoft compiler for a 32-bit memory
-model. makefile.vc is intended for command-line use. (If you are using
-the Developer Studio environment, you may prefer the DevStudio project
-files; see below.)
-
-Some users feel that it's easier to call the library from C++ code if you
-force VC++ to treat the library as C++ code, which you can do by renaming
-all the *.c files to *.cpp (and adjusting the makefile to match). This
-avoids the need to put extern "C" { ... } around #include "jpeglib.h" in
-your C++ application.
-
-
-Microsoft Windows, Microsoft Developer Studio:
-
-We include makefiles that should work as project files in DevStudio 4.2 or
-later. There is a library makefile that builds the IJG library as a static
-Win32 library, and an application makefile that builds the sample applications
-as Win32 console applications. (Even if you only want the library, we
-recommend building the applications so that you can run the self-test.)
-
-To use:
-1. Copy jconfig.vc to jconfig.h, makelib.ds to jpeg.mak, and
- makeapps.ds to apps.mak. (Note that the renaming is critical!)
-2. Click on the .mak files to construct project workspaces.
- (If you are using DevStudio more recent than 4.2, you'll probably
- get a message saying that the makefiles are being updated.)
-3. Build the library project, then the applications project.
-4. Move the application .exe files from `app`\Release to an
- appropriate location on your path.
-5. To perform the self-test, execute the command line
- NMAKE /f makefile.vc test
-
-
-OS/2, Borland C++:
-
-Watch out for optimization bugs in older Borland compilers; you may need
-to back off the optimization switch settings. See the comments in
-makefile.bcc.
-
-
-SGI:
-
-On some SGI systems, you may need to set "AR2= ar -ts" in the Makefile.
-If you are using configure, you can do this by saying
- ./configure RANLIB='ar -ts'
-This change is not needed on all SGIs. Use it only if the make fails at the
-stage of linking the completed programs.
-
-On the MIPS R4000 architecture (Indy, etc.), the compiler option "-mips2"
-reportedly speeds up the float DCT method substantially, enough to make it
-faster than the default int method (but still slower than the fast int
-method). If you use -mips2, you may want to alter the default DCT method to
-be float. To do this, put "#define JDCT_DEFAULT JDCT_FLOAT" in jconfig.h.
-
-
-VMS:
-
-On an Alpha/VMS system with MMS, be sure to use the "/Marco=Alpha=1"
-qualifier with MMS when building the JPEG package.
-
-VAX/VMS v5.5-1 may have problems with the test step of the build procedure
-reporting differences when it compares the original and test images. If the
-error points to the last block of the files, it is most likely bogus and may
-be safely ignored. It seems to be because the files are Stream_LF and
-Backup/Compare has difficulty with the (presumably) null padded files.
-This problem was not observed on VAX/VMS v6.1 or AXP/VMS v6.1.
diff --git a/jccolmmx.asm b/jccolmmx.asm
deleted file mode 100644
index 2e2fca6..0000000
--- a/jccolmmx.asm
+++ /dev/null
@@ -1,513 +0,0 @@
-;
-; jccolmmx.asm - colorspace conversion (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-%ifdef JCCOLOR_RGBYCC_MMX_SUPPORTED
-
-; --------------------------------------------------------------------------
-
-%define SCALEBITS 16
-
-F_0_081 equ 5329 ; FIX(0.08131)
-F_0_114 equ 7471 ; FIX(0.11400)
-F_0_168 equ 11059 ; FIX(0.16874)
-F_0_250 equ 16384 ; FIX(0.25000)
-F_0_299 equ 19595 ; FIX(0.29900)
-F_0_331 equ 21709 ; FIX(0.33126)
-F_0_418 equ 27439 ; FIX(0.41869)
-F_0_587 equ 38470 ; FIX(0.58700)
-F_0_337 equ (F_0_587 - F_0_250) ; FIX(0.58700) - FIX(0.25000)
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_rgb_ycc_convert_mmx)
-
-EXTN(jconst_rgb_ycc_convert_mmx):
-
-PW_F0299_F0337 times 2 dw F_0_299, F_0_337
-PW_F0114_F0250 times 2 dw F_0_114, F_0_250
-PW_MF016_MF033 times 2 dw -F_0_168,-F_0_331
-PW_MF008_MF041 times 2 dw -F_0_081,-F_0_418
-PD_ONEHALFM1_CJ times 2 dd (1 << (SCALEBITS-1)) - 1 + (CENTERJSAMPLE << SCALEBITS)
-PD_ONEHALF times 2 dd (1 << (SCALEBITS-1))
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Convert some rows of samples to the output colorspace.
-;
-; GLOBAL(void)
-; jpeg_rgb_ycc_convert_mmx (j_compress_ptr cinfo,
-; JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
-; JDIMENSION output_row, int num_rows);
-;
-
-%define cinfo(b) (b)+8 ; j_compress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPARRAY input_buf
-%define output_buf(b) (b)+16 ; JSAMPIMAGE output_buf
-%define output_row(b) (b)+20 ; JDIMENSION output_row
-%define num_rows(b) (b)+24 ; int num_rows
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 8
-%define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_rgb_ycc_convert_mmx)
-
-EXTN(jpeg_rgb_ycc_convert_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov ecx, POINTER [cinfo(eax)]
- mov ecx, JDIMENSION [jcstruct_image_width(ecx)] ; num_cols
- test ecx,ecx
- jz near .return
-
- push ecx
-
- mov esi, JSAMPIMAGE [output_buf(eax)]
- mov ecx, JDIMENSION [output_row(eax)]
- mov edi, JSAMPARRAY [esi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [esi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [esi+2*SIZEOF_JSAMPARRAY]
- lea edi, [edi+ecx*SIZEOF_JSAMPROW]
- lea ebx, [ebx+ecx*SIZEOF_JSAMPROW]
- lea edx, [edx+ecx*SIZEOF_JSAMPROW]
-
- pop ecx
-
- mov esi, JSAMPARRAY [input_buf(eax)]
- mov eax, INT [num_rows(eax)]
- test eax,eax
- jle near .return
- alignx 16,7
-.rowloop:
- pushpic eax
- push edx
- push ebx
- push edi
- push esi
- push ecx ; col
-
- mov esi, JSAMPROW [esi] ; inptr
- mov edi, JSAMPROW [edi] ; outptr0
- mov ebx, JSAMPROW [ebx] ; outptr1
- mov edx, JSAMPROW [edx] ; outptr2
- movpic eax, POINTER [gotptr] ; load GOT address (eax)
-
- cmp ecx, byte SIZEOF_MMWORD
- jae short .columnloop
- alignx 16,7
-
-%if RGB_PIXELSIZE == 3 ; ---------------
-
-.column_ld1:
- push eax
- push edx
- lea ecx,[ecx+ecx*2] ; imul ecx,RGB_PIXELSIZE
- test cl, SIZEOF_BYTE
- jz short .column_ld2
- sub ecx, byte SIZEOF_BYTE
- xor eax,eax
- mov al, BYTE [esi+ecx]
-.column_ld2:
- test cl, SIZEOF_WORD
- jz short .column_ld4
- sub ecx, byte SIZEOF_WORD
- xor edx,edx
- mov dx, WORD [esi+ecx]
- shl eax, WORD_BIT
- or eax,edx
-.column_ld4:
- movd mmA,eax
- pop edx
- pop eax
- test cl, SIZEOF_DWORD
- jz short .column_ld8
- sub ecx, byte SIZEOF_DWORD
- movd mmG, DWORD [esi+ecx]
- psllq mmA, DWORD_BIT
- por mmA,mmG
-.column_ld8:
- test cl, SIZEOF_MMWORD
- jz short .column_ld16
- movq mmG,mmA
- movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
- mov ecx, SIZEOF_MMWORD
- jmp short .rgb_ycc_cnv
-.column_ld16:
- test cl, 2*SIZEOF_MMWORD
- mov ecx, SIZEOF_MMWORD
- jz short .rgb_ycc_cnv
- movq mmF,mmA
- movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
- movq mmG, MMWORD [esi+1*SIZEOF_MMWORD]
- jmp short .rgb_ycc_cnv
- alignx 16,7
-
-.columnloop:
- movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
- movq mmG, MMWORD [esi+1*SIZEOF_MMWORD]
- movq mmF, MMWORD [esi+2*SIZEOF_MMWORD]
-
-.rgb_ycc_cnv:
- ; mmA=(00 10 20 01 11 21 02 12)
- ; mmG=(22 03 13 23 04 14 24 05)
- ; mmF=(15 25 06 16 26 07 17 27)
-
- movq mmD,mmA
- psllq mmA,4*BYTE_BIT ; mmA=(-- -- -- -- 00 10 20 01)
- psrlq mmD,4*BYTE_BIT ; mmD=(11 21 02 12 -- -- -- --)
-
- punpckhbw mmA,mmG ; mmA=(00 04 10 14 20 24 01 05)
- psllq mmG,4*BYTE_BIT ; mmG=(-- -- -- -- 22 03 13 23)
-
- punpcklbw mmD,mmF ; mmD=(11 15 21 25 02 06 12 16)
- punpckhbw mmG,mmF ; mmG=(22 26 03 07 13 17 23 27)
-
- movq mmE,mmA
- psllq mmA,4*BYTE_BIT ; mmA=(-- -- -- -- 00 04 10 14)
- psrlq mmE,4*BYTE_BIT ; mmE=(20 24 01 05 -- -- -- --)
-
- punpckhbw mmA,mmD ; mmA=(00 02 04 06 10 12 14 16)
- psllq mmD,4*BYTE_BIT ; mmD=(-- -- -- -- 11 15 21 25)
-
- punpcklbw mmE,mmG ; mmE=(20 22 24 26 01 03 05 07)
- punpckhbw mmD,mmG ; mmD=(11 13 15 17 21 23 25 27)
-
- pxor mmH,mmH
-
- movq mmC,mmA
- punpcklbw mmA,mmH ; mmA=(00 02 04 06)
- punpckhbw mmC,mmH ; mmC=(10 12 14 16)
-
- movq mmB,mmE
- punpcklbw mmE,mmH ; mmE=(20 22 24 26)
- punpckhbw mmB,mmH ; mmB=(01 03 05 07)
-
- movq mmF,mmD
- punpcklbw mmD,mmH ; mmD=(11 13 15 17)
- punpckhbw mmF,mmH ; mmF=(21 23 25 27)
-
-%else ; RGB_PIXELSIZE == 4 ; -----------
-
-.column_ld1:
- test cl, SIZEOF_MMWORD/8
- jz short .column_ld2
- sub ecx, byte SIZEOF_MMWORD/8
- movd mmA, DWORD [esi+ecx*RGB_PIXELSIZE]
-.column_ld2:
- test cl, SIZEOF_MMWORD/4
- jz short .column_ld4
- sub ecx, byte SIZEOF_MMWORD/4
- movq mmF,mmA
- movq mmA, MMWORD [esi+ecx*RGB_PIXELSIZE]
-.column_ld4:
- test cl, SIZEOF_MMWORD/2
- mov ecx, SIZEOF_MMWORD
- jz short .rgb_ycc_cnv
- movq mmD,mmA
- movq mmC,mmF
- movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
- movq mmF, MMWORD [esi+1*SIZEOF_MMWORD]
- jmp short .rgb_ycc_cnv
- alignx 16,7
-
-.columnloop:
- movq mmA, MMWORD [esi+0*SIZEOF_MMWORD]
- movq mmF, MMWORD [esi+1*SIZEOF_MMWORD]
- movq mmD, MMWORD [esi+2*SIZEOF_MMWORD]
- movq mmC, MMWORD [esi+3*SIZEOF_MMWORD]
-
-.rgb_ycc_cnv:
- ; mmA=(00 10 20 30 01 11 21 31)
- ; mmF=(02 12 22 32 03 13 23 33)
- ; mmD=(04 14 24 34 05 15 25 35)
- ; mmC=(06 16 26 36 07 17 27 37)
-
- movq mmB,mmA
- punpcklbw mmA,mmF ; mmA=(00 02 10 12 20 22 30 32)
- punpckhbw mmB,mmF ; mmB=(01 03 11 13 21 23 31 33)
-
- movq mmG,mmD
- punpcklbw mmD,mmC ; mmD=(04 06 14 16 24 26 34 36)
- punpckhbw mmG,mmC ; mmG=(05 07 15 17 25 27 35 37)
-
- movq mmE,mmA
- punpcklwd mmA,mmD ; mmA=(00 02 04 06 10 12 14 16)
- punpckhwd mmE,mmD ; mmE=(20 22 24 26 30 32 34 36)
-
- movq mmH,mmB
- punpcklwd mmB,mmG ; mmB=(01 03 05 07 11 13 15 17)
- punpckhwd mmH,mmG ; mmH=(21 23 25 27 31 33 35 37)
-
- pxor mmF,mmF
-
- movq mmC,mmA
- punpcklbw mmA,mmF ; mmA=(00 02 04 06)
- punpckhbw mmC,mmF ; mmC=(10 12 14 16)
-
- movq mmD,mmB
- punpcklbw mmB,mmF ; mmB=(01 03 05 07)
- punpckhbw mmD,mmF ; mmD=(11 13 15 17)
-
- movq mmG,mmE
- punpcklbw mmE,mmF ; mmE=(20 22 24 26)
- punpckhbw mmG,mmF ; mmG=(30 32 34 36)
-
- punpcklbw mmF,mmH
- punpckhbw mmH,mmH
- psrlw mmF,BYTE_BIT ; mmF=(21 23 25 27)
- psrlw mmH,BYTE_BIT ; mmH=(31 33 35 37)
-
-%endif ; RGB_PIXELSIZE ; ---------------
-
- ; mm0=(R0 R2 R4 R6)=RE, mm2=(G0 G2 G4 G6)=GE, mm4=(B0 B2 B4 B6)=BE
- ; mm1=(R1 R3 R5 R7)=RO, mm3=(G1 G3 G5 G7)=GO, mm5=(B1 B3 B5 B7)=BO
-
- ; (Original)
- ; Y = 0.29900 * R + 0.58700 * G + 0.11400 * B
- ; Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE
- ; Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE
- ;
- ; (This implementation)
- ; Y = 0.29900 * R + 0.33700 * G + 0.11400 * B + 0.25000 * G
- ; Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE
- ; Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE
-
- movq MMWORD [wk(0)], mm0 ; wk(0)=RE
- movq MMWORD [wk(1)], mm1 ; wk(1)=RO
- movq MMWORD [wk(2)], mm4 ; wk(2)=BE
- movq MMWORD [wk(3)], mm5 ; wk(3)=BO
-
- movq mm6,mm1
- punpcklwd mm1,mm3
- punpckhwd mm6,mm3
- movq mm7,mm1
- movq mm4,mm6
- pmaddwd mm1,[GOTOFF(eax,PW_F0299_F0337)] ; mm1=ROL*FIX(0.299)+GOL*FIX(0.337)
- pmaddwd mm6,[GOTOFF(eax,PW_F0299_F0337)] ; mm6=ROH*FIX(0.299)+GOH*FIX(0.337)
- pmaddwd mm7,[GOTOFF(eax,PW_MF016_MF033)] ; mm7=ROL*-FIX(0.168)+GOL*-FIX(0.331)
- pmaddwd mm4,[GOTOFF(eax,PW_MF016_MF033)] ; mm4=ROH*-FIX(0.168)+GOH*-FIX(0.331)
-
- movq MMWORD [wk(4)], mm1 ; wk(4)=ROL*FIX(0.299)+GOL*FIX(0.337)
- movq MMWORD [wk(5)], mm6 ; wk(5)=ROH*FIX(0.299)+GOH*FIX(0.337)
-
- pxor mm1,mm1
- pxor mm6,mm6
- punpcklwd mm1,mm5 ; mm1=BOL
- punpckhwd mm6,mm5 ; mm6=BOH
- psrld mm1,1 ; mm1=BOL*FIX(0.500)
- psrld mm6,1 ; mm6=BOH*FIX(0.500)
-
- movq mm5,[GOTOFF(eax,PD_ONEHALFM1_CJ)] ; mm5=[PD_ONEHALFM1_CJ]
-
- paddd mm7,mm1
- paddd mm4,mm6
- paddd mm7,mm5
- paddd mm4,mm5
- psrld mm7,SCALEBITS ; mm7=CbOL
- psrld mm4,SCALEBITS ; mm4=CbOH
- packssdw mm7,mm4 ; mm7=CbO
-
- movq mm1, MMWORD [wk(2)] ; mm1=BE
-
- movq mm6,mm0
- punpcklwd mm0,mm2
- punpckhwd mm6,mm2
- movq mm5,mm0
- movq mm4,mm6
- pmaddwd mm0,[GOTOFF(eax,PW_F0299_F0337)] ; mm0=REL*FIX(0.299)+GEL*FIX(0.337)
- pmaddwd mm6,[GOTOFF(eax,PW_F0299_F0337)] ; mm6=REH*FIX(0.299)+GEH*FIX(0.337)
- pmaddwd mm5,[GOTOFF(eax,PW_MF016_MF033)] ; mm5=REL*-FIX(0.168)+GEL*-FIX(0.331)
- pmaddwd mm4,[GOTOFF(eax,PW_MF016_MF033)] ; mm4=REH*-FIX(0.168)+GEH*-FIX(0.331)
-
- movq MMWORD [wk(6)], mm0 ; wk(6)=REL*FIX(0.299)+GEL*FIX(0.337)
- movq MMWORD [wk(7)], mm6 ; wk(7)=REH*FIX(0.299)+GEH*FIX(0.337)
-
- pxor mm0,mm0
- pxor mm6,mm6
- punpcklwd mm0,mm1 ; mm0=BEL
- punpckhwd mm6,mm1 ; mm6=BEH
- psrld mm0,1 ; mm0=BEL*FIX(0.500)
- psrld mm6,1 ; mm6=BEH*FIX(0.500)
-
- movq mm1,[GOTOFF(eax,PD_ONEHALFM1_CJ)] ; mm1=[PD_ONEHALFM1_CJ]
-
- paddd mm5,mm0
- paddd mm4,mm6
- paddd mm5,mm1
- paddd mm4,mm1
- psrld mm5,SCALEBITS ; mm5=CbEL
- psrld mm4,SCALEBITS ; mm4=CbEH
- packssdw mm5,mm4 ; mm5=CbE
-
- psllw mm7,BYTE_BIT
- por mm5,mm7 ; mm5=Cb
- movq MMWORD [ebx], mm5 ; Save Cb
-
- movq mm0, MMWORD [wk(3)] ; mm0=BO
- movq mm6, MMWORD [wk(2)] ; mm6=BE
- movq mm1, MMWORD [wk(1)] ; mm1=RO
-
- movq mm4,mm0
- punpcklwd mm0,mm3
- punpckhwd mm4,mm3
- movq mm7,mm0
- movq mm5,mm4
- pmaddwd mm0,[GOTOFF(eax,PW_F0114_F0250)] ; mm0=BOL*FIX(0.114)+GOL*FIX(0.250)
- pmaddwd mm4,[GOTOFF(eax,PW_F0114_F0250)] ; mm4=BOH*FIX(0.114)+GOH*FIX(0.250)
- pmaddwd mm7,[GOTOFF(eax,PW_MF008_MF041)] ; mm7=BOL*-FIX(0.081)+GOL*-FIX(0.418)
- pmaddwd mm5,[GOTOFF(eax,PW_MF008_MF041)] ; mm5=BOH*-FIX(0.081)+GOH*-FIX(0.418)
-
- movq mm3,[GOTOFF(eax,PD_ONEHALF)] ; mm3=[PD_ONEHALF]
-
- paddd mm0, MMWORD [wk(4)]
- paddd mm4, MMWORD [wk(5)]
- paddd mm0,mm3
- paddd mm4,mm3
- psrld mm0,SCALEBITS ; mm0=YOL
- psrld mm4,SCALEBITS ; mm4=YOH
- packssdw mm0,mm4 ; mm0=YO
-
- pxor mm3,mm3
- pxor mm4,mm4
- punpcklwd mm3,mm1 ; mm3=ROL
- punpckhwd mm4,mm1 ; mm4=ROH
- psrld mm3,1 ; mm3=ROL*FIX(0.500)
- psrld mm4,1 ; mm4=ROH*FIX(0.500)
-
- movq mm1,[GOTOFF(eax,PD_ONEHALFM1_CJ)] ; mm1=[PD_ONEHALFM1_CJ]
-
- paddd mm7,mm3
- paddd mm5,mm4
- paddd mm7,mm1
- paddd mm5,mm1
- psrld mm7,SCALEBITS ; mm7=CrOL
- psrld mm5,SCALEBITS ; mm5=CrOH
- packssdw mm7,mm5 ; mm7=CrO
-
- movq mm3, MMWORD [wk(0)] ; mm3=RE
-
- movq mm4,mm6
- punpcklwd mm6,mm2
- punpckhwd mm4,mm2
- movq mm1,mm6
- movq mm5,mm4
- pmaddwd mm6,[GOTOFF(eax,PW_F0114_F0250)] ; mm6=BEL*FIX(0.114)+GEL*FIX(0.250)
- pmaddwd mm4,[GOTOFF(eax,PW_F0114_F0250)] ; mm4=BEH*FIX(0.114)+GEH*FIX(0.250)
- pmaddwd mm1,[GOTOFF(eax,PW_MF008_MF041)] ; mm1=BEL*-FIX(0.081)+GEL*-FIX(0.418)
- pmaddwd mm5,[GOTOFF(eax,PW_MF008_MF041)] ; mm5=BEH*-FIX(0.081)+GEH*-FIX(0.418)
-
- movq mm2,[GOTOFF(eax,PD_ONEHALF)] ; mm2=[PD_ONEHALF]
-
- paddd mm6, MMWORD [wk(6)]
- paddd mm4, MMWORD [wk(7)]
- paddd mm6,mm2
- paddd mm4,mm2
- psrld mm6,SCALEBITS ; mm6=YEL
- psrld mm4,SCALEBITS ; mm4=YEH
- packssdw mm6,mm4 ; mm6=YE
-
- psllw mm0,BYTE_BIT
- por mm6,mm0 ; mm6=Y
- movq MMWORD [edi], mm6 ; Save Y
-
- pxor mm2,mm2
- pxor mm4,mm4
- punpcklwd mm2,mm3 ; mm2=REL
- punpckhwd mm4,mm3 ; mm4=REH
- psrld mm2,1 ; mm2=REL*FIX(0.500)
- psrld mm4,1 ; mm4=REH*FIX(0.500)
-
- movq mm0,[GOTOFF(eax,PD_ONEHALFM1_CJ)] ; mm0=[PD_ONEHALFM1_CJ]
-
- paddd mm1,mm2
- paddd mm5,mm4
- paddd mm1,mm0
- paddd mm5,mm0
- psrld mm1,SCALEBITS ; mm1=CrEL
- psrld mm5,SCALEBITS ; mm5=CrEH
- packssdw mm1,mm5 ; mm1=CrE
-
- psllw mm7,BYTE_BIT
- por mm1,mm7 ; mm1=Cr
- movq MMWORD [edx], mm1 ; Save Cr
-
- sub ecx, byte SIZEOF_MMWORD
- add esi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; inptr
- add edi, byte SIZEOF_MMWORD ; outptr0
- add ebx, byte SIZEOF_MMWORD ; outptr1
- add edx, byte SIZEOF_MMWORD ; outptr2
- cmp ecx, byte SIZEOF_MMWORD
- jae near .columnloop
- test ecx,ecx
- jnz near .column_ld1
-
- pop ecx ; col
- pop esi
- pop edi
- pop ebx
- pop edx
- poppic eax
-
- add esi, byte SIZEOF_JSAMPROW ; input_buf
- add edi, byte SIZEOF_JSAMPROW
- add ebx, byte SIZEOF_JSAMPROW
- add edx, byte SIZEOF_JSAMPROW
- dec eax ; num_rows
- jg near .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JCCOLOR_RGBYCC_MMX_SUPPORTED
-%endif ; RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
diff --git a/jccolor.c b/jccolor.c
index 85f3083..2407456 100644
--- a/jccolor.c
+++ b/jccolor.c
@@ -2,23 +2,17 @@
* jccolor.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 5, 2006
- * ---------------------------------------------------------------------
- *
* This file contains input colorspace conversion routines.
*/
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "jcolsamp.h" /* Private declarations */
+#include "jsimd.h"
/* Private subobject */
@@ -360,7 +354,6 @@
jinit_color_converter (j_compress_ptr cinfo)
{
my_cconvert_ptr cconvert;
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
cconvert = (my_cconvert_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -429,20 +422,9 @@
if (cinfo->num_components != 3)
ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
if (cinfo->in_color_space == JCS_RGB) {
-#if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-#ifdef JCCOLOR_RGBYCC_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_rgb_ycc_convert_sse2)) {
- cconvert->pub.color_convert = jpeg_rgb_ycc_convert_sse2;
- } else
-#endif
-#ifdef JCCOLOR_RGBYCC_MMX_SUPPORTED
- if (simd & JSIMD_MMX) {
- cconvert->pub.color_convert = jpeg_rgb_ycc_convert_mmx;
- } else
-#endif
-#endif /* RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4 */
- {
+ if (jsimd_can_rgb_ycc())
+ cconvert->pub.color_convert = jsimd_rgb_ycc_convert;
+ else {
cconvert->pub.start_pass = rgb_ycc_start;
cconvert->pub.color_convert = rgb_ycc_convert;
}
@@ -481,28 +463,3 @@
break;
}
}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-GLOBAL(unsigned int)
-jpeg_simd_color_converter (j_compress_ptr cinfo)
-{
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
-
-#if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-#ifdef JCCOLOR_RGBYCC_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_rgb_ycc_convert_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JCCOLOR_RGBYCC_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
-#endif /* RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4 */
-
- return JSIMD_NONE;
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
diff --git a/jccolss2.asm b/jccolss2.asm
deleted file mode 100644
index 1aabd89..0000000
--- a/jccolss2.asm
+++ /dev/null
@@ -1,541 +0,0 @@
-;
-; jccolss2.asm - colorspace conversion (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-%ifdef JCCOLOR_RGBYCC_SSE2_SUPPORTED
-
-; --------------------------------------------------------------------------
-
-%define SCALEBITS 16
-
-F_0_081 equ 5329 ; FIX(0.08131)
-F_0_114 equ 7471 ; FIX(0.11400)
-F_0_168 equ 11059 ; FIX(0.16874)
-F_0_250 equ 16384 ; FIX(0.25000)
-F_0_299 equ 19595 ; FIX(0.29900)
-F_0_331 equ 21709 ; FIX(0.33126)
-F_0_418 equ 27439 ; FIX(0.41869)
-F_0_587 equ 38470 ; FIX(0.58700)
-F_0_337 equ (F_0_587 - F_0_250) ; FIX(0.58700) - FIX(0.25000)
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_rgb_ycc_convert_sse2)
-
-EXTN(jconst_rgb_ycc_convert_sse2):
-
-PW_F0299_F0337 times 4 dw F_0_299, F_0_337
-PW_F0114_F0250 times 4 dw F_0_114, F_0_250
-PW_MF016_MF033 times 4 dw -F_0_168,-F_0_331
-PW_MF008_MF041 times 4 dw -F_0_081,-F_0_418
-PD_ONEHALFM1_CJ times 4 dd (1 << (SCALEBITS-1)) - 1 + (CENTERJSAMPLE << SCALEBITS)
-PD_ONEHALF times 4 dd (1 << (SCALEBITS-1))
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Convert some rows of samples to the output colorspace.
-;
-; GLOBAL(void)
-; jpeg_rgb_ycc_convert_sse2 (j_compress_ptr cinfo,
-; JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
-; JDIMENSION output_row, int num_rows);
-;
-
-%define cinfo(b) (b)+8 ; j_compress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPARRAY input_buf
-%define output_buf(b) (b)+16 ; JSAMPIMAGE output_buf
-%define output_row(b) (b)+20 ; JDIMENSION output_row
-%define num_rows(b) (b)+24 ; int num_rows
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 8
-%define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_rgb_ycc_convert_sse2)
-
-EXTN(jpeg_rgb_ycc_convert_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov ecx, POINTER [cinfo(eax)]
- mov ecx, JDIMENSION [jcstruct_image_width(ecx)] ; num_cols
- test ecx,ecx
- jz near .return
-
- push ecx
-
- mov esi, JSAMPIMAGE [output_buf(eax)]
- mov ecx, JDIMENSION [output_row(eax)]
- mov edi, JSAMPARRAY [esi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [esi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [esi+2*SIZEOF_JSAMPARRAY]
- lea edi, [edi+ecx*SIZEOF_JSAMPROW]
- lea ebx, [ebx+ecx*SIZEOF_JSAMPROW]
- lea edx, [edx+ecx*SIZEOF_JSAMPROW]
-
- pop ecx
-
- mov esi, JSAMPARRAY [input_buf(eax)]
- mov eax, INT [num_rows(eax)]
- test eax,eax
- jle near .return
- alignx 16,7
-.rowloop:
- pushpic eax
- push edx
- push ebx
- push edi
- push esi
- push ecx ; col
-
- mov esi, JSAMPROW [esi] ; inptr
- mov edi, JSAMPROW [edi] ; outptr0
- mov ebx, JSAMPROW [ebx] ; outptr1
- mov edx, JSAMPROW [edx] ; outptr2
- movpic eax, POINTER [gotptr] ; load GOT address (eax)
-
- cmp ecx, byte SIZEOF_XMMWORD
- jae near .columnloop
- alignx 16,7
-
-%if RGB_PIXELSIZE == 3 ; ---------------
-
-.column_ld1:
- push eax
- push edx
- lea ecx,[ecx+ecx*2] ; imul ecx,RGB_PIXELSIZE
- test cl, SIZEOF_BYTE
- jz short .column_ld2
- sub ecx, byte SIZEOF_BYTE
- movzx eax, BYTE [esi+ecx]
-.column_ld2:
- test cl, SIZEOF_WORD
- jz short .column_ld4
- sub ecx, byte SIZEOF_WORD
- movzx edx, WORD [esi+ecx]
- shl eax, WORD_BIT
- or eax,edx
-.column_ld4:
- movd xmmA,eax
- pop edx
- pop eax
- test cl, SIZEOF_DWORD
- jz short .column_ld8
- sub ecx, byte SIZEOF_DWORD
- movd xmmF, _DWORD [esi+ecx]
- pslldq xmmA, SIZEOF_DWORD
- por xmmA,xmmF
-.column_ld8:
- test cl, SIZEOF_MMWORD
- jz short .column_ld16
- sub ecx, byte SIZEOF_MMWORD
- movq xmmB, _MMWORD [esi+ecx]
- pslldq xmmA, SIZEOF_MMWORD
- por xmmA,xmmB
-.column_ld16:
- test cl, SIZEOF_XMMWORD
- jz short .column_ld32
- movdqa xmmF,xmmA
- movdqu xmmA, XMMWORD [esi+0*SIZEOF_XMMWORD]
- mov ecx, SIZEOF_XMMWORD
- jmp short .rgb_ycc_cnv
-.column_ld32:
- test cl, 2*SIZEOF_XMMWORD
- mov ecx, SIZEOF_XMMWORD
- jz short .rgb_ycc_cnv
- movdqa xmmB,xmmA
- movdqu xmmA, XMMWORD [esi+0*SIZEOF_XMMWORD]
- movdqu xmmF, XMMWORD [esi+1*SIZEOF_XMMWORD]
- jmp short .rgb_ycc_cnv
- alignx 16,7
-
-.columnloop:
- movdqu xmmA, XMMWORD [esi+0*SIZEOF_XMMWORD]
- movdqu xmmF, XMMWORD [esi+1*SIZEOF_XMMWORD]
- movdqu xmmB, XMMWORD [esi+2*SIZEOF_XMMWORD]
-
-.rgb_ycc_cnv:
- ; xmmA=(00 10 20 01 11 21 02 12 22 03 13 23 04 14 24 05)
- ; xmmF=(15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A)
- ; xmmB=(2A 0B 1B 2B 0C 1C 2C 0D 1D 2D 0E 1E 2E 0F 1F 2F)
-
- movdqa xmmG,xmmA
- pslldq xmmA,8 ; xmmA=(-- -- -- -- -- -- -- -- 00 10 20 01 11 21 02 12)
- psrldq xmmG,8 ; xmmG=(22 03 13 23 04 14 24 05 -- -- -- -- -- -- -- --)
-
- punpckhbw xmmA,xmmF ; xmmA=(00 08 10 18 20 28 01 09 11 19 21 29 02 0A 12 1A)
- pslldq xmmF,8 ; xmmF=(-- -- -- -- -- -- -- -- 15 25 06 16 26 07 17 27)
-
- punpcklbw xmmG,xmmB ; xmmG=(22 2A 03 0B 13 1B 23 2B 04 0C 14 1C 24 2C 05 0D)
- punpckhbw xmmF,xmmB ; xmmF=(15 1D 25 2D 06 0E 16 1E 26 2E 07 0F 17 1F 27 2F)
-
- movdqa xmmD,xmmA
- pslldq xmmA,8 ; xmmA=(-- -- -- -- -- -- -- -- 00 08 10 18 20 28 01 09)
- psrldq xmmD,8 ; xmmD=(11 19 21 29 02 0A 12 1A -- -- -- -- -- -- -- --)
-
- punpckhbw xmmA,xmmG ; xmmA=(00 04 08 0C 10 14 18 1C 20 24 28 2C 01 05 09 0D)
- pslldq xmmG,8 ; xmmG=(-- -- -- -- -- -- -- -- 22 2A 03 0B 13 1B 23 2B)
-
- punpcklbw xmmD,xmmF ; xmmD=(11 15 19 1D 21 25 29 2D 02 06 0A 0E 12 16 1A 1E)
- punpckhbw xmmG,xmmF ; xmmG=(22 26 2A 2E 03 07 0B 0F 13 17 1B 1F 23 27 2B 2F)
-
- movdqa xmmE,xmmA
- pslldq xmmA,8 ; xmmA=(-- -- -- -- -- -- -- -- 00 04 08 0C 10 14 18 1C)
- psrldq xmmE,8 ; xmmE=(20 24 28 2C 01 05 09 0D -- -- -- -- -- -- -- --)
-
- punpckhbw xmmA,xmmD ; xmmA=(00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E)
- pslldq xmmD,8 ; xmmD=(-- -- -- -- -- -- -- -- 11 15 19 1D 21 25 29 2D)
-
- punpcklbw xmmE,xmmG ; xmmE=(20 22 24 26 28 2A 2C 2E 01 03 05 07 09 0B 0D 0F)
- punpckhbw xmmD,xmmG ; xmmD=(11 13 15 17 19 1B 1D 1F 21 23 25 27 29 2B 2D 2F)
-
- pxor xmmH,xmmH
-
- movdqa xmmC,xmmA
- punpcklbw xmmA,xmmH ; xmmA=(00 02 04 06 08 0A 0C 0E)
- punpckhbw xmmC,xmmH ; xmmC=(10 12 14 16 18 1A 1C 1E)
-
- movdqa xmmB,xmmE
- punpcklbw xmmE,xmmH ; xmmE=(20 22 24 26 28 2A 2C 2E)
- punpckhbw xmmB,xmmH ; xmmB=(01 03 05 07 09 0B 0D 0F)
-
- movdqa xmmF,xmmD
- punpcklbw xmmD,xmmH ; xmmD=(11 13 15 17 19 1B 1D 1F)
- punpckhbw xmmF,xmmH ; xmmF=(21 23 25 27 29 2B 2D 2F)
-
-%else ; RGB_PIXELSIZE == 4 ; -----------
-
-.column_ld1:
- test cl, SIZEOF_XMMWORD/16
- jz short .column_ld2
- sub ecx, byte SIZEOF_XMMWORD/16
- movd xmmA, _DWORD [esi+ecx*RGB_PIXELSIZE]
-.column_ld2:
- test cl, SIZEOF_XMMWORD/8
- jz short .column_ld4
- sub ecx, byte SIZEOF_XMMWORD/8
- movq xmmE, _MMWORD [esi+ecx*RGB_PIXELSIZE]
- pslldq xmmA, SIZEOF_MMWORD
- por xmmA,xmmE
-.column_ld4:
- test cl, SIZEOF_XMMWORD/4
- jz short .column_ld8
- sub ecx, byte SIZEOF_XMMWORD/4
- movdqa xmmE,xmmA
- movdqu xmmA, XMMWORD [esi+ecx*RGB_PIXELSIZE]
-.column_ld8:
- test cl, SIZEOF_XMMWORD/2
- mov ecx, SIZEOF_XMMWORD
- jz short .rgb_ycc_cnv
- movdqa xmmF,xmmA
- movdqa xmmH,xmmE
- movdqu xmmA, XMMWORD [esi+0*SIZEOF_XMMWORD]
- movdqu xmmE, XMMWORD [esi+1*SIZEOF_XMMWORD]
- jmp short .rgb_ycc_cnv
- alignx 16,7
-
-.columnloop:
- movdqu xmmA, XMMWORD [esi+0*SIZEOF_XMMWORD]
- movdqu xmmE, XMMWORD [esi+1*SIZEOF_XMMWORD]
- movdqu xmmF, XMMWORD [esi+2*SIZEOF_XMMWORD]
- movdqu xmmH, XMMWORD [esi+3*SIZEOF_XMMWORD]
-
-.rgb_ycc_cnv:
- ; xmmA=(00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33)
- ; xmmE=(04 14 24 34 05 15 25 35 06 16 26 36 07 17 27 37)
- ; xmmF=(08 18 28 38 09 19 29 39 0A 1A 2A 3A 0B 1B 2B 3B)
- ; xmmH=(0C 1C 2C 3C 0D 1D 2D 3D 0E 1E 2E 3E 0F 1F 2F 3F)
-
- movdqa xmmD,xmmA
- punpcklbw xmmA,xmmE ; xmmA=(00 04 10 14 20 24 30 34 01 05 11 15 21 25 31 35)
- punpckhbw xmmD,xmmE ; xmmD=(02 06 12 16 22 26 32 36 03 07 13 17 23 27 33 37)
-
- movdqa xmmC,xmmF
- punpcklbw xmmF,xmmH ; xmmF=(08 0C 18 1C 28 2C 38 3C 09 0D 19 1D 29 2D 39 3D)
- punpckhbw xmmC,xmmH ; xmmC=(0A 0E 1A 1E 2A 2E 3A 3E 0B 0F 1B 1F 2B 2F 3B 3F)
-
- movdqa xmmB,xmmA
- punpcklwd xmmA,xmmF ; xmmA=(00 04 08 0C 10 14 18 1C 20 24 28 2C 30 34 38 3C)
- punpckhwd xmmB,xmmF ; xmmB=(01 05 09 0D 11 15 19 1D 21 25 29 2D 31 35 39 3D)
-
- movdqa xmmG,xmmD
- punpcklwd xmmD,xmmC ; xmmD=(02 06 0A 0E 12 16 1A 1E 22 26 2A 2E 32 36 3A 3E)
- punpckhwd xmmG,xmmC ; xmmG=(03 07 0B 0F 13 17 1B 1F 23 27 2B 2F 33 37 3B 3F)
-
- movdqa xmmE,xmmA
- punpcklbw xmmA,xmmD ; xmmA=(00 02 04 06 08 0A 0C 0E 10 12 14 16 18 1A 1C 1E)
- punpckhbw xmmE,xmmD ; xmmE=(20 22 24 26 28 2A 2C 2E 30 32 34 36 38 3A 3C 3E)
-
- movdqa xmmH,xmmB
- punpcklbw xmmB,xmmG ; xmmB=(01 03 05 07 09 0B 0D 0F 11 13 15 17 19 1B 1D 1F)
- punpckhbw xmmH,xmmG ; xmmH=(21 23 25 27 29 2B 2D 2F 31 33 35 37 39 3B 3D 3F)
-
- pxor xmmF,xmmF
-
- movdqa xmmC,xmmA
- punpcklbw xmmA,xmmF ; xmmA=(00 02 04 06 08 0A 0C 0E)
- punpckhbw xmmC,xmmF ; xmmC=(10 12 14 16 18 1A 1C 1E)
-
- movdqa xmmD,xmmB
- punpcklbw xmmB,xmmF ; xmmB=(01 03 05 07 09 0B 0D 0F)
- punpckhbw xmmD,xmmF ; xmmD=(11 13 15 17 19 1B 1D 1F)
-
- movdqa xmmG,xmmE
- punpcklbw xmmE,xmmF ; xmmE=(20 22 24 26 28 2A 2C 2E)
- punpckhbw xmmG,xmmF ; xmmG=(30 32 34 36 38 3A 3C 3E)
-
- punpcklbw xmmF,xmmH
- punpckhbw xmmH,xmmH
- psrlw xmmF,BYTE_BIT ; xmmF=(21 23 25 27 29 2B 2D 2F)
- psrlw xmmH,BYTE_BIT ; xmmH=(31 33 35 37 39 3B 3D 3F)
-
-%endif ; RGB_PIXELSIZE ; ---------------
-
- ; xmm0=R(02468ACE)=RE, xmm2=G(02468ACE)=GE, xmm4=B(02468ACE)=BE
- ; xmm1=R(13579BDF)=RO, xmm3=G(13579BDF)=GO, xmm5=B(13579BDF)=BO
-
- ; (Original)
- ; Y = 0.29900 * R + 0.58700 * G + 0.11400 * B
- ; Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE
- ; Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE
- ;
- ; (This implementation)
- ; Y = 0.29900 * R + 0.33700 * G + 0.11400 * B + 0.25000 * G
- ; Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE
- ; Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE
-
- movdqa XMMWORD [wk(0)], xmm0 ; wk(0)=RE
- movdqa XMMWORD [wk(1)], xmm1 ; wk(1)=RO
- movdqa XMMWORD [wk(2)], xmm4 ; wk(2)=BE
- movdqa XMMWORD [wk(3)], xmm5 ; wk(3)=BO
-
- movdqa xmm6,xmm1
- punpcklwd xmm1,xmm3
- punpckhwd xmm6,xmm3
- movdqa xmm7,xmm1
- movdqa xmm4,xmm6
- pmaddwd xmm1,[GOTOFF(eax,PW_F0299_F0337)] ; xmm1=ROL*FIX(0.299)+GOL*FIX(0.337)
- pmaddwd xmm6,[GOTOFF(eax,PW_F0299_F0337)] ; xmm6=ROH*FIX(0.299)+GOH*FIX(0.337)
- pmaddwd xmm7,[GOTOFF(eax,PW_MF016_MF033)] ; xmm7=ROL*-FIX(0.168)+GOL*-FIX(0.331)
- pmaddwd xmm4,[GOTOFF(eax,PW_MF016_MF033)] ; xmm4=ROH*-FIX(0.168)+GOH*-FIX(0.331)
-
- movdqa XMMWORD [wk(4)], xmm1 ; wk(4)=ROL*FIX(0.299)+GOL*FIX(0.337)
- movdqa XMMWORD [wk(5)], xmm6 ; wk(5)=ROH*FIX(0.299)+GOH*FIX(0.337)
-
- pxor xmm1,xmm1
- pxor xmm6,xmm6
- punpcklwd xmm1,xmm5 ; xmm1=BOL
- punpckhwd xmm6,xmm5 ; xmm6=BOH
- psrld xmm1,1 ; xmm1=BOL*FIX(0.500)
- psrld xmm6,1 ; xmm6=BOH*FIX(0.500)
-
- movdqa xmm5,[GOTOFF(eax,PD_ONEHALFM1_CJ)] ; xmm5=[PD_ONEHALFM1_CJ]
-
- paddd xmm7,xmm1
- paddd xmm4,xmm6
- paddd xmm7,xmm5
- paddd xmm4,xmm5
- psrld xmm7,SCALEBITS ; xmm7=CbOL
- psrld xmm4,SCALEBITS ; xmm4=CbOH
- packssdw xmm7,xmm4 ; xmm7=CbO
-
- movdqa xmm1, XMMWORD [wk(2)] ; xmm1=BE
-
- movdqa xmm6,xmm0
- punpcklwd xmm0,xmm2
- punpckhwd xmm6,xmm2
- movdqa xmm5,xmm0
- movdqa xmm4,xmm6
- pmaddwd xmm0,[GOTOFF(eax,PW_F0299_F0337)] ; xmm0=REL*FIX(0.299)+GEL*FIX(0.337)
- pmaddwd xmm6,[GOTOFF(eax,PW_F0299_F0337)] ; xmm6=REH*FIX(0.299)+GEH*FIX(0.337)
- pmaddwd xmm5,[GOTOFF(eax,PW_MF016_MF033)] ; xmm5=REL*-FIX(0.168)+GEL*-FIX(0.331)
- pmaddwd xmm4,[GOTOFF(eax,PW_MF016_MF033)] ; xmm4=REH*-FIX(0.168)+GEH*-FIX(0.331)
-
- movdqa XMMWORD [wk(6)], xmm0 ; wk(6)=REL*FIX(0.299)+GEL*FIX(0.337)
- movdqa XMMWORD [wk(7)], xmm6 ; wk(7)=REH*FIX(0.299)+GEH*FIX(0.337)
-
- pxor xmm0,xmm0
- pxor xmm6,xmm6
- punpcklwd xmm0,xmm1 ; xmm0=BEL
- punpckhwd xmm6,xmm1 ; xmm6=BEH
- psrld xmm0,1 ; xmm0=BEL*FIX(0.500)
- psrld xmm6,1 ; xmm6=BEH*FIX(0.500)
-
- movdqa xmm1,[GOTOFF(eax,PD_ONEHALFM1_CJ)] ; xmm1=[PD_ONEHALFM1_CJ]
-
- paddd xmm5,xmm0
- paddd xmm4,xmm6
- paddd xmm5,xmm1
- paddd xmm4,xmm1
- psrld xmm5,SCALEBITS ; xmm5=CbEL
- psrld xmm4,SCALEBITS ; xmm4=CbEH
- packssdw xmm5,xmm4 ; xmm5=CbE
-
- psllw xmm7,BYTE_BIT
- por xmm5,xmm7 ; xmm5=Cb
- movdqa XMMWORD [ebx], xmm5 ; Save Cb
-
- movdqa xmm0, XMMWORD [wk(3)] ; xmm0=BO
- movdqa xmm6, XMMWORD [wk(2)] ; xmm6=BE
- movdqa xmm1, XMMWORD [wk(1)] ; xmm1=RO
-
- movdqa xmm4,xmm0
- punpcklwd xmm0,xmm3
- punpckhwd xmm4,xmm3
- movdqa xmm7,xmm0
- movdqa xmm5,xmm4
- pmaddwd xmm0,[GOTOFF(eax,PW_F0114_F0250)] ; xmm0=BOL*FIX(0.114)+GOL*FIX(0.250)
- pmaddwd xmm4,[GOTOFF(eax,PW_F0114_F0250)] ; xmm4=BOH*FIX(0.114)+GOH*FIX(0.250)
- pmaddwd xmm7,[GOTOFF(eax,PW_MF008_MF041)] ; xmm7=BOL*-FIX(0.081)+GOL*-FIX(0.418)
- pmaddwd xmm5,[GOTOFF(eax,PW_MF008_MF041)] ; xmm5=BOH*-FIX(0.081)+GOH*-FIX(0.418)
-
- movdqa xmm3,[GOTOFF(eax,PD_ONEHALF)] ; xmm3=[PD_ONEHALF]
-
- paddd xmm0, XMMWORD [wk(4)]
- paddd xmm4, XMMWORD [wk(5)]
- paddd xmm0,xmm3
- paddd xmm4,xmm3
- psrld xmm0,SCALEBITS ; xmm0=YOL
- psrld xmm4,SCALEBITS ; xmm4=YOH
- packssdw xmm0,xmm4 ; xmm0=YO
-
- pxor xmm3,xmm3
- pxor xmm4,xmm4
- punpcklwd xmm3,xmm1 ; xmm3=ROL
- punpckhwd xmm4,xmm1 ; xmm4=ROH
- psrld xmm3,1 ; xmm3=ROL*FIX(0.500)
- psrld xmm4,1 ; xmm4=ROH*FIX(0.500)
-
- movdqa xmm1,[GOTOFF(eax,PD_ONEHALFM1_CJ)] ; xmm1=[PD_ONEHALFM1_CJ]
-
- paddd xmm7,xmm3
- paddd xmm5,xmm4
- paddd xmm7,xmm1
- paddd xmm5,xmm1
- psrld xmm7,SCALEBITS ; xmm7=CrOL
- psrld xmm5,SCALEBITS ; xmm5=CrOH
- packssdw xmm7,xmm5 ; xmm7=CrO
-
- movdqa xmm3, XMMWORD [wk(0)] ; xmm3=RE
-
- movdqa xmm4,xmm6
- punpcklwd xmm6,xmm2
- punpckhwd xmm4,xmm2
- movdqa xmm1,xmm6
- movdqa xmm5,xmm4
- pmaddwd xmm6,[GOTOFF(eax,PW_F0114_F0250)] ; xmm6=BEL*FIX(0.114)+GEL*FIX(0.250)
- pmaddwd xmm4,[GOTOFF(eax,PW_F0114_F0250)] ; xmm4=BEH*FIX(0.114)+GEH*FIX(0.250)
- pmaddwd xmm1,[GOTOFF(eax,PW_MF008_MF041)] ; xmm1=BEL*-FIX(0.081)+GEL*-FIX(0.418)
- pmaddwd xmm5,[GOTOFF(eax,PW_MF008_MF041)] ; xmm5=BEH*-FIX(0.081)+GEH*-FIX(0.418)
-
- movdqa xmm2,[GOTOFF(eax,PD_ONEHALF)] ; xmm2=[PD_ONEHALF]
-
- paddd xmm6, XMMWORD [wk(6)]
- paddd xmm4, XMMWORD [wk(7)]
- paddd xmm6,xmm2
- paddd xmm4,xmm2
- psrld xmm6,SCALEBITS ; xmm6=YEL
- psrld xmm4,SCALEBITS ; xmm4=YEH
- packssdw xmm6,xmm4 ; xmm6=YE
-
- psllw xmm0,BYTE_BIT
- por xmm6,xmm0 ; xmm6=Y
- movdqa XMMWORD [edi], xmm6 ; Save Y
-
- pxor xmm2,xmm2
- pxor xmm4,xmm4
- punpcklwd xmm2,xmm3 ; xmm2=REL
- punpckhwd xmm4,xmm3 ; xmm4=REH
- psrld xmm2,1 ; xmm2=REL*FIX(0.500)
- psrld xmm4,1 ; xmm4=REH*FIX(0.500)
-
- movdqa xmm0,[GOTOFF(eax,PD_ONEHALFM1_CJ)] ; xmm0=[PD_ONEHALFM1_CJ]
-
- paddd xmm1,xmm2
- paddd xmm5,xmm4
- paddd xmm1,xmm0
- paddd xmm5,xmm0
- psrld xmm1,SCALEBITS ; xmm1=CrEL
- psrld xmm5,SCALEBITS ; xmm5=CrEH
- packssdw xmm1,xmm5 ; xmm1=CrE
-
- psllw xmm7,BYTE_BIT
- por xmm1,xmm7 ; xmm1=Cr
- movdqa XMMWORD [edx], xmm1 ; Save Cr
-
- sub ecx, byte SIZEOF_XMMWORD
- add esi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; inptr
- add edi, byte SIZEOF_XMMWORD ; outptr0
- add ebx, byte SIZEOF_XMMWORD ; outptr1
- add edx, byte SIZEOF_XMMWORD ; outptr2
- cmp ecx, byte SIZEOF_XMMWORD
- jae near .columnloop
- test ecx,ecx
- jnz near .column_ld1
-
- pop ecx ; col
- pop esi
- pop edi
- pop ebx
- pop edx
- poppic eax
-
- add esi, byte SIZEOF_JSAMPROW ; input_buf
- add edi, byte SIZEOF_JSAMPROW
- add ebx, byte SIZEOF_JSAMPROW
- add edx, byte SIZEOF_JSAMPROW
- dec eax ; num_rows
- jg near .rowloop
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JCCOLOR_RGBYCC_SSE2_SUPPORTED
-%endif ; RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
diff --git a/jcdctmgr.c b/jcdctmgr.c
index 3a89eb4..75d48e0 100644
--- a/jcdctmgr.c
+++ b/jcdctmgr.c
@@ -2,16 +2,10 @@
* jcdctmgr.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : December 24, 2005
- * ---------------------------------------------------------------------
- *
* This file contains the forward-DCT management logic.
* This code selects a particular DCT implementation to be used,
* and it performs related housekeeping chores including coefficient
@@ -22,17 +16,35 @@
#include "jinclude.h"
#include "jpeglib.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
+#include "jsimddct.h"
/* Private subobject for this module */
+typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));
+typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));
+
+typedef JMETHOD(void, convsamp_method_ptr,
+ (JSAMPARRAY sample_data, JDIMENSION start_col,
+ DCTELEM * workspace));
+typedef JMETHOD(void, float_convsamp_method_ptr,
+ (JSAMPARRAY sample_data, JDIMENSION start_col,
+ FAST_FLOAT *workspace));
+
+typedef JMETHOD(void, quantize_method_ptr,
+ (JCOEFPTR coef_block, DCTELEM * divisors,
+ DCTELEM * workspace));
+typedef JMETHOD(void, float_quantize_method_ptr,
+ (JCOEFPTR coef_block, FAST_FLOAT * divisors,
+ FAST_FLOAT * workspace));
+
typedef struct {
struct jpeg_forward_dct pub; /* public fields */
/* Pointer to the DCT routine actually in use */
- forward_DCT_method_ptr do_dct;
- convsamp_int_method_ptr convsamp;
- quantize_int_method_ptr quantize;
+ forward_DCT_method_ptr dct;
+ convsamp_method_ptr convsamp;
+ quantize_method_ptr quantize;
/* The actual post-DCT divisors --- not identical to the quant table
* entries, because of scaling (especially for an unnormalized DCT).
@@ -42,76 +54,15 @@
#ifdef DCT_FLOAT_SUPPORTED
/* Same as above for the floating-point case. */
- float_DCT_method_ptr do_float_dct;
- convsamp_float_method_ptr float_convsamp;
- quantize_float_method_ptr float_quantize;
+ float_DCT_method_ptr float_dct;
+ float_convsamp_method_ptr float_convsamp;
+ float_quantize_method_ptr float_quantize;
FAST_FLOAT * float_divisors[NUM_QUANT_TBLS];
#endif
} my_fdct_controller;
typedef my_fdct_controller * my_fdct_ptr;
-/*
- * SIMD Ext: Most of SSE/SSE2 instructions require that the memory address
- * is aligned to a 16-byte boundary; if not, a general-protection exception
- * (#GP) is generated.
- */
-
-#define ALIGN_SIZE 16 /* sizeof SSE/SSE2 register */
-#define ALIGN_MEM(p,a) ((void *) (((size_t) (p) + (a) - 1) & -(a)))
-
-#ifdef JFDCT_INT_QUANTIZE_WITH_DIVISION
-#undef jpeg_quantize_int
-#undef jpeg_quantize_int_mmx
-#undef jpeg_quantize_int_sse2
-#define jpeg_quantize_int jpeg_quantize_idiv
-#define jpeg_quantize_int_mmx jpeg_quantize_idiv
-#define jpeg_quantize_int_sse2 jpeg_quantize_idiv
-#endif
-
-
-#ifndef JFDCT_INT_QUANTIZE_WITH_DIVISION
-
-/*
- * SIMD Ext: compute the reciprocal of the divisor
- *
- * This implementation is based on an algorithm described in
- * "How to optimize for the Pentium family of microprocessors"
- * (http://www.agner.org/assem/).
- */
-
-LOCAL(void)
-compute_reciprocal (DCTELEM divisor, DCTELEM * dtbl)
-{
- unsigned long d = ((unsigned long) divisor) & 0x0000FFFF;
- unsigned long fq, fr;
- int b, r, c;
-
- for (b = 0; (1UL << b) <= d; b++) ;
-
- r = 16 + (--b);
- fq = (1UL << r) / d;
- fr = (1UL << r) % d;
- r -= 16;
- c = 0;
-
- if (fr == 0) {
- fq >>= 1;
- r--;
- } else if (fr <= (d / 2)) {
- c++;
- } else {
- fq++;
- }
-
- dtbl[DCTSIZE2 * 0] = (DCTELEM) fq; /* reciprocal */
- dtbl[DCTSIZE2 * 1] = (DCTELEM) (c + (d / 2)); /* correction + roundfactor */
- dtbl[DCTSIZE2 * 2] = (DCTELEM) (1 << (16 - (r + 1 + 1))); /* scale */
- dtbl[DCTSIZE2 * 3] = (DCTELEM) (r + 1); /* shift */
-}
-
-#endif /* JFDCT_INT_QUANTIZE_WITH_DIVISION */
-
/*
* Initialize for a processing pass.
@@ -147,18 +98,6 @@
/* For LL&M IDCT method, divisors are equal to raw quantization
* coefficients multiplied by 8 (to counteract scaling).
*/
-#ifndef JFDCT_INT_QUANTIZE_WITH_DIVISION
- if (fdct->divisors[qtblno] == NULL) {
- fdct->divisors[qtblno] = (DCTELEM *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (DCTSIZE2 * 4) * SIZEOF(DCTELEM));
- }
- dtbl = fdct->divisors[qtblno];
- for (i = 0; i < DCTSIZE2; i++) {
- compute_reciprocal ((DCTELEM) (qtbl->quantval[i] << 3), &dtbl[i]);
- }
- break;
-#else /* JFDCT_INT_QUANTIZE_WITH_DIVISION */
if (fdct->divisors[qtblno] == NULL) {
fdct->divisors[qtblno] = (DCTELEM *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -169,8 +108,7 @@
dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3;
}
break;
-#endif /* JFDCT_INT_QUANTIZE_WITH_DIVISION */
-#endif /* DCT_ISLOW_SUPPORTED */
+#endif
#ifdef DCT_IFAST_SUPPORTED
case JDCT_IFAST:
{
@@ -194,21 +132,6 @@
};
SHIFT_TEMPS
-#ifndef JFDCT_INT_QUANTIZE_WITH_DIVISION
- if (fdct->divisors[qtblno] == NULL) {
- fdct->divisors[qtblno] = (DCTELEM *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (DCTSIZE2 * 4) * SIZEOF(DCTELEM));
- }
- dtbl = fdct->divisors[qtblno];
- for (i = 0; i < DCTSIZE2; i++) {
- compute_reciprocal ((DCTELEM)
- DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i],
- (INT32) aanscales[i]),
- CONST_BITS-3),
- &dtbl[i]);
- }
-#else /* JFDCT_INT_QUANTIZE_WITH_DIVISION */
if (fdct->divisors[qtblno] == NULL) {
fdct->divisors[qtblno] = (DCTELEM *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -221,10 +144,9 @@
(INT32) aanscales[i]),
CONST_BITS-3);
}
-#endif /* JFDCT_INT_QUANTIZE_WITH_DIVISION */
}
break;
-#endif /* DCT_IFAST_SUPPORTED */
+#endif
#ifdef DCT_FLOAT_SUPPORTED
case JDCT_FLOAT:
{
@@ -270,6 +192,88 @@
/*
+ * Load data into workspace, applying unsigned->signed conversion.
+ */
+
+METHODDEF(void)
+convsamp (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace)
+{
+ register DCTELEM *workspaceptr;
+ register JSAMPROW elemptr;
+ register int elemr;
+
+ workspaceptr = workspace;
+ for (elemr = 0; elemr < DCTSIZE; elemr++) {
+ elemptr = sample_data[elemr] + start_col;
+
+#if DCTSIZE == 8 /* unroll the inner loop */
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+#else
+ {
+ register int elemc;
+ for (elemc = DCTSIZE; elemc > 0; elemc--)
+ *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE;
+ }
+#endif
+ }
+}
+
+
+/*
+ * Quantize/descale the coefficients, and store into coef_blocks[].
+ */
+
+METHODDEF(void)
+quantize (JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace)
+{
+ register DCTELEM temp, qval;
+ register int i;
+ register JCOEFPTR output_ptr = coef_block;
+
+ for (i = 0; i < DCTSIZE2; i++) {
+ qval = divisors[i];
+ temp = workspace[i];
+
+ /* Divide the coefficient value by qval, ensuring proper rounding.
+ * Since C does not specify the direction of rounding for negative
+ * quotients, we have to force the dividend positive for portability.
+ *
+ * In most files, at least half of the output values will be zero
+ * (at default quantization settings, more like three-quarters...)
+ * so we should ensure that this case is fast. On many machines,
+ * a comparison is enough cheaper than a divide to make a special test
+ * a win. Since both inputs will be nonnegative, we need only test
+ * for a < b to discover whether a/b is 0.
+ * If your machine's division is fast enough, define FAST_DIVIDE.
+ */
+#ifdef FAST_DIVIDE
+#define DIVIDE_BY(a,b) a /= b
+#else
+#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0
+#endif
+
+ if (temp < 0) {
+ temp = -temp;
+ temp += qval>>1; /* for rounding */
+ DIVIDE_BY(temp, qval);
+ temp = -temp;
+ } else {
+ temp += qval>>1; /* for rounding */
+ DIVIDE_BY(temp, qval);
+ }
+ output_ptr[i] = (JCOEF) temp;
+ }
+}
+
+
+/*
* Perform forward DCT on one or more blocks of a component.
*
* The input samples are taken from the sample_data[] array starting at
@@ -284,29 +288,88 @@
JDIMENSION num_blocks)
/* This version is used for integer DCT implementations. */
{
+ /* This routine is heavily used, so it's worth coding it tightly. */
my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no];
- DCTELEM workspace[DCTSIZE2 + ALIGN_SIZE/sizeof(DCTELEM)];
- DCTELEM * wkptr = (DCTELEM *) ALIGN_MEM(workspace, ALIGN_SIZE);
+ DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */
JDIMENSION bi;
+ /* Make sure the compiler doesn't look up these every pass */
+ forward_DCT_method_ptr do_dct = fdct->dct;
+ convsamp_method_ptr do_convsamp = fdct->convsamp;
+ quantize_method_ptr do_quantize = fdct->quantize;
+
sample_data += start_row; /* fold in the vertical offset once */
for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {
/* Load data into workspace, applying unsigned->signed conversion */
- (*fdct->convsamp) (sample_data, start_col, wkptr);
+ (*do_convsamp) (sample_data, start_col, workspace);
/* Perform the DCT */
- (*fdct->do_dct) (wkptr);
+ (*do_dct) (workspace);
/* Quantize/descale the coefficients, and store into coef_blocks[] */
- (*fdct->quantize) (coef_blocks[bi], divisors, wkptr);
+ (*do_quantize) (coef_blocks[bi], divisors, workspace);
}
}
#ifdef DCT_FLOAT_SUPPORTED
+
+METHODDEF(void)
+convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT * workspace)
+{
+ register FAST_FLOAT *workspaceptr;
+ register JSAMPROW elemptr;
+ register int elemr;
+
+ workspaceptr = workspace;
+ for (elemr = 0; elemr < DCTSIZE; elemr++) {
+ elemptr = sample_data[elemr] + start_col;
+#if DCTSIZE == 8 /* unroll the inner loop */
+ *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+ *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+ *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+ *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+ *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+ *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+ *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+ *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+#else
+ {
+ register int elemc;
+ for (elemc = DCTSIZE; elemc > 0; elemc--)
+ *workspaceptr++ = (FAST_FLOAT)
+ (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE);
+ }
+#endif
+ }
+}
+
+
+METHODDEF(void)
+quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace)
+{
+ register FAST_FLOAT temp;
+ register int i;
+ register JCOEFPTR output_ptr = coef_block;
+
+ for (i = 0; i < DCTSIZE2; i++) {
+ /* Apply the quantization and scaling factor */
+ temp = workspace[i] * divisors[i];
+
+ /* Round to nearest integer.
+ * Since C does not specify the direction of rounding for negative
+ * quotients, we have to force the dividend positive for portability.
+ * The maximum coefficient size is +-16K (for 12-bit data), so this
+ * code should work for either 16-bit or 32-bit ints.
+ */
+ output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384);
+ }
+}
+
+
METHODDEF(void)
forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
@@ -314,23 +377,28 @@
JDIMENSION num_blocks)
/* This version is used for floating-point DCT implementations. */
{
+ /* This routine is heavily used, so it's worth coding it tightly. */
my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no];
- FAST_FLOAT workspace[DCTSIZE2 + ALIGN_SIZE/sizeof(FAST_FLOAT)];
- FAST_FLOAT * wkptr = (FAST_FLOAT *) ALIGN_MEM(workspace, ALIGN_SIZE);
+ FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */
JDIMENSION bi;
+ /* Make sure the compiler doesn't look up these every pass */
+ float_DCT_method_ptr do_dct = fdct->float_dct;
+ float_convsamp_method_ptr do_convsamp = fdct->float_convsamp;
+ float_quantize_method_ptr do_quantize = fdct->float_quantize;
+
sample_data += start_row; /* fold in the vertical offset once */
for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) {
/* Load data into workspace, applying unsigned->signed conversion */
- (*fdct->float_convsamp) (sample_data, start_col, wkptr);
+ (*do_convsamp) (sample_data, start_col, workspace);
/* Perform the DCT */
- (*fdct->do_float_dct) (wkptr);
+ (*do_dct) (workspace);
/* Quantize/descale the coefficients, and store into coef_blocks[] */
- (*fdct->float_quantize) (coef_blocks[bi], divisors, wkptr);
+ (*do_quantize) (coef_blocks[bi], divisors, workspace);
}
}
@@ -346,7 +414,6 @@
{
my_fdct_ptr fdct;
int i;
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
fdct = (my_fdct_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -354,90 +421,71 @@
cinfo->fdct = (struct jpeg_forward_dct *) fdct;
fdct->pub.start_pass = start_pass_fdctmgr;
+ /* First determine the DCT... */
switch (cinfo->dct_method) {
#ifdef DCT_ISLOW_SUPPORTED
case JDCT_ISLOW:
fdct->pub.forward_DCT = forward_DCT;
-#ifdef JFDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fdct_islow_sse2)) {
- fdct->do_dct = jpeg_fdct_islow_sse2;
- fdct->convsamp = jpeg_convsamp_int_sse2;
- fdct->quantize = jpeg_quantize_int_sse2;
- } else
-#endif
-#ifdef JFDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX) {
- fdct->do_dct = jpeg_fdct_islow_mmx;
- fdct->convsamp = jpeg_convsamp_int_mmx;
- fdct->quantize = jpeg_quantize_int_mmx;
- } else
-#endif
- {
- fdct->do_dct = jpeg_fdct_islow;
- fdct->convsamp = jpeg_convsamp_int;
- fdct->quantize = jpeg_quantize_int;
- }
+ if (jsimd_can_fdct_islow())
+ fdct->dct = jsimd_fdct_islow;
+ else
+ fdct->dct = jpeg_fdct_islow;
break;
-#endif /* DCT_ISLOW_SUPPORTED */
+#endif
#ifdef DCT_IFAST_SUPPORTED
case JDCT_IFAST:
fdct->pub.forward_DCT = forward_DCT;
-#ifdef JFDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fdct_ifast_sse2)) {
- fdct->do_dct = jpeg_fdct_ifast_sse2;
- fdct->convsamp = jpeg_convsamp_int_sse2;
- fdct->quantize = jpeg_quantize_int_sse2;
- } else
-#endif
-#ifdef JFDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX) {
- fdct->do_dct = jpeg_fdct_ifast_mmx;
- fdct->convsamp = jpeg_convsamp_int_mmx;
- fdct->quantize = jpeg_quantize_int_mmx;
- } else
-#endif
- {
- fdct->do_dct = jpeg_fdct_ifast;
- fdct->convsamp = jpeg_convsamp_int;
- fdct->quantize = jpeg_quantize_int;
- }
+ if (jsimd_can_fdct_ifast())
+ fdct->dct = jsimd_fdct_ifast;
+ else
+ fdct->dct = jpeg_fdct_ifast;
break;
-#endif /* DCT_IFAST_SUPPORTED */
+#endif
#ifdef DCT_FLOAT_SUPPORTED
case JDCT_FLOAT:
fdct->pub.forward_DCT = forward_DCT_float;
-#ifdef JFDCT_FLT_SSE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE && simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fdct_float_sse)) {
- fdct->do_float_dct = jpeg_fdct_float_sse;
- fdct->float_convsamp = jpeg_convsamp_flt_sse2;
- fdct->float_quantize = jpeg_quantize_flt_sse2;
- } else
-#endif
-#ifdef JFDCT_FLT_SSE_MMX_SUPPORTED
- if (simd & JSIMD_SSE &&
- IS_CONST_ALIGNED_16(jconst_fdct_float_sse)) {
- fdct->do_float_dct = jpeg_fdct_float_sse;
- fdct->float_convsamp = jpeg_convsamp_flt_sse;
- fdct->float_quantize = jpeg_quantize_flt_sse;
- } else
-#endif
-#ifdef JFDCT_FLT_3DNOW_MMX_SUPPORTED
- if (simd & JSIMD_3DNOW) {
- fdct->do_float_dct = jpeg_fdct_float_3dnow;
- fdct->float_convsamp = jpeg_convsamp_flt_3dnow;
- fdct->float_quantize = jpeg_quantize_flt_3dnow;
- } else
-#endif
- {
- fdct->do_float_dct = jpeg_fdct_float;
- fdct->float_convsamp = jpeg_convsamp_float;
- fdct->float_quantize = jpeg_quantize_float;
- }
+ if (jsimd_can_fdct_float())
+ fdct->float_dct = jsimd_fdct_float;
+ else
+ fdct->float_dct = jpeg_fdct_float;
break;
-#endif /* DCT_FLOAT_SUPPORTED */
+#endif
+ default:
+ ERREXIT(cinfo, JERR_NOT_COMPILED);
+ break;
+ }
+
+ /* ...then the supporting stages. */
+ switch (cinfo->dct_method) {
+#ifdef DCT_ISLOW_SUPPORTED
+ case JDCT_ISLOW:
+#endif
+#ifdef DCT_IFAST_SUPPORTED
+ case JDCT_IFAST:
+#endif
+#if defined(DCT_ISLOW_SUPPORTED) || defined(DCT_IFAST_SUPPORTED)
+ if (jsimd_can_convsamp())
+ fdct->convsamp = jsimd_convsamp;
+ else
+ fdct->convsamp = convsamp;
+ if (jsimd_can_quantize())
+ fdct->quantize = jsimd_quantize;
+ else
+ fdct->quantize = quantize;
+ break;
+#endif
+#ifdef DCT_FLOAT_SUPPORTED
+ case JDCT_FLOAT:
+ if (jsimd_can_convsamp_float())
+ fdct->float_convsamp = jsimd_convsamp_float;
+ else
+ fdct->float_convsamp = convsamp_float;
+ if (jsimd_can_quantize_float())
+ fdct->float_quantize = jsimd_quantize_float;
+ else
+ fdct->float_quantize = quantize_float;
+ break;
+#endif
default:
ERREXIT(cinfo, JERR_NOT_COMPILED);
break;
@@ -451,65 +499,3 @@
#endif
}
}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-GLOBAL(unsigned int)
-jpeg_simd_forward_dct (j_compress_ptr cinfo, int method)
-{
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
-
- switch (method) {
-#ifdef DCT_ISLOW_SUPPORTED
- case JDCT_ISLOW:
-#ifdef JFDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fdct_islow_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JFDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
- return JSIMD_NONE;
-#endif /* DCT_ISLOW_SUPPORTED */
-#ifdef DCT_IFAST_SUPPORTED
- case JDCT_IFAST:
-#ifdef JFDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fdct_ifast_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JFDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
- return JSIMD_NONE;
-#endif /* DCT_IFAST_SUPPORTED */
-#ifdef DCT_FLOAT_SUPPORTED
- case JDCT_FLOAT:
-#ifdef JFDCT_FLT_SSE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE && simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fdct_float_sse))
- return JSIMD_SSE; /* (JSIMD_SSE | JSIMD_SSE2); */
-#endif
-#ifdef JFDCT_FLT_SSE_MMX_SUPPORTED
- if (simd & JSIMD_SSE &&
- IS_CONST_ALIGNED_16(jconst_fdct_float_sse))
- return JSIMD_SSE; /* (JSIMD_SSE | JSIMD_MMX); */
-#endif
-#ifdef JFDCT_FLT_3DNOW_MMX_SUPPORTED
- if (simd & JSIMD_3DNOW)
- return JSIMD_3DNOW; /* (JSIMD_3DNOW | JSIMD_MMX); */
-#endif
- return JSIMD_NONE;
-#endif /* DCT_FLOAT_SUPPORTED */
- default:
- ;
- }
-
- return JSIMD_NONE; /* not compiled */
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
diff --git a/jchuff.c b/jchuff.c
index f235250..20388bd 100644
--- a/jchuff.c
+++ b/jchuff.c
@@ -297,7 +297,7 @@
* between calls, so 24 bits are sufficient.
*/
-INLINE
+inline
LOCAL(boolean)
emit_bits (working_state * state, unsigned int code, int size)
/* Emit some bits; return TRUE if successful, FALSE if must suspend */
diff --git a/jcolsamp.h b/jcolsamp.h
deleted file mode 100644
index 2a27b53..0000000
--- a/jcolsamp.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * jcolsamp.h - private declarations for color conversion & up/downsampling
- *
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * For conditions of distribution and use, see copyright notice in jsimdext.inc
- *
- * Last Modified : February 4, 2006
- *
- * [TAB8]
- */
-
-
-/* configuration check: BITS_IN_JSAMPLE==8 (8-bit sample values) is the only
- * valid setting on this SIMD extension.
- */
-#if BITS_IN_JSAMPLE != 8
-#error "Sorry, this SIMD code only copes with 8-bit sample values."
-#endif
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_rgb_ycc_convert_mmx jMRgbYccCnv /* jccolmmx.asm */
-#define jpeg_rgb_ycc_convert_sse2 jSRgbYccCnv /* jccolss2.asm */
-#define jpeg_h2v1_downsample_mmx jM21Downsample /* jcsammmx.asm */
-#define jpeg_h2v2_downsample_mmx jM22Downsample /* jcsammmx.asm */
-#define jpeg_h2v1_downsample_sse2 jS21Downsample /* jcsamss2.asm */
-#define jpeg_h2v2_downsample_sse2 jS22Downsample /* jcsamss2.asm */
-#define jpeg_ycc_rgb_convert_mmx jMYccRgbCnv /* jdcolmmx.asm */
-#define jpeg_ycc_rgb_convert_sse2 jSYccRgbCnv /* jdcolss2.asm */
-#define jpeg_h2v1_merged_upsample_mmx jM21MerUpsample /* jdmermmx.asm */
-#define jpeg_h2v2_merged_upsample_mmx jM22MerUpsample /* jdmermmx.asm */
-#define jpeg_h2v1_merged_upsample_sse2 jS21MerUpsample /* jdmerss2.asm */
-#define jpeg_h2v2_merged_upsample_sse2 jS22MerUpsample /* jdmerss2.asm */
-#define jpeg_h2v1_fancy_upsample_mmx jM21FanUpsample /* jdsammmx.asm */
-#define jpeg_h2v2_fancy_upsample_mmx jM22FanUpsample /* jdsammmx.asm */
-#define jpeg_h1v2_fancy_upsample_mmx jM12FanUpsample /* jdsammmx.asm */
-#define jpeg_h2v1_upsample_mmx jM21Upsample /* jdsammmx.asm */
-#define jpeg_h2v2_upsample_mmx jM22Upsample /* jdsammmx.asm */
-#define jpeg_h2v1_fancy_upsample_sse2 jS21FanUpsample /* jdsamss2.asm */
-#define jpeg_h2v2_fancy_upsample_sse2 jS22FanUpsample /* jdsamss2.asm */
-#define jpeg_h1v2_fancy_upsample_sse2 jS12FanUpsample /* jdsamss2.asm */
-#define jpeg_h2v1_upsample_sse2 jS21Upsample /* jdsamss2.asm */
-#define jpeg_h2v2_upsample_sse2 jS22Upsample /* jdsamss2.asm */
-#define jconst_rgb_ycc_convert_mmx jMCRgbYccCnv /* jccolmmx.asm */
-#define jconst_rgb_ycc_convert_sse2 jSCRgbYccCnv /* jccolss2.asm */
-#define jconst_ycc_rgb_convert_mmx jMCYccRgbCnv /* jdcolmmx.asm */
-#define jconst_ycc_rgb_convert_sse2 jSCYccRgbCnv /* jdcolss2.asm */
-#define jconst_merged_upsample_mmx jMCMerUpsample /* jdmermmx.asm */
-#define jconst_merged_upsample_sse2 jSCMerUpsample /* jdmerss2.asm */
-#define jconst_fancy_upsample_mmx jMCFanUpsample /* jdsammmx.asm */
-#define jconst_fancy_upsample_sse2 jSCFanUpsample /* jdsamss2.asm */
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-#define jpeg_simd_merged_upsampler jSiMUpsampler /* jdmerge.c */
-#endif
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-/* Extern declarations for color conversion & up/downsampling routines. */
-
-EXTERN(void) jpeg_rgb_ycc_convert_mmx
- JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-EXTERN(void) jpeg_rgb_ycc_convert_sse2
- JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows));
-
-EXTERN(void) jpeg_h2v1_downsample_mmx
- JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
-EXTERN(void) jpeg_h2v2_downsample_mmx
- JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
-EXTERN(void) jpeg_h2v1_downsample_sse2
- JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
-EXTERN(void) jpeg_h2v2_downsample_sse2
- JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY output_data));
-
-EXTERN(void) jpeg_ycc_rgb_convert_mmx
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-EXTERN(void) jpeg_ycc_rgb_convert_sse2
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows));
-
-EXTERN(void) jpeg_h2v1_merged_upsample_mmx
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jpeg_h2v2_merged_upsample_mmx
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jpeg_h2v1_merged_upsample_sse2
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-EXTERN(void) jpeg_h2v2_merged_upsample_sse2
- JPP((j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf));
-
-EXTERN(void) jpeg_h2v1_fancy_upsample_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h2v2_fancy_upsample_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h1v2_fancy_upsample_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h2v1_upsample_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h2v2_upsample_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h2v1_fancy_upsample_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h2v2_fancy_upsample_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h1v2_fancy_upsample_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h2v1_upsample_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-EXTERN(void) jpeg_h2v2_upsample_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
-
-extern const int jconst_rgb_ycc_convert_mmx[];
-extern const int jconst_rgb_ycc_convert_sse2[];
-extern const int jconst_ycc_rgb_convert_mmx[];
-extern const int jconst_ycc_rgb_convert_sse2[];
-extern const int jconst_merged_upsample_mmx[];
-extern const int jconst_merged_upsample_sse2[];
-extern const int jconst_fancy_upsample_mmx[];
-extern const int jconst_fancy_upsample_sse2[];
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-EXTERN(unsigned int) jpeg_simd_merged_upsampler JPP((j_decompress_ptr cinfo));
-#endif
diff --git a/jcolsamp.inc b/jcolsamp.inc
deleted file mode 100644
index 03f5dbd..0000000
--- a/jcolsamp.inc
+++ /dev/null
@@ -1,156 +0,0 @@
-;
-; jcolsamp.inc - private declarations for color conversion & up/downsampling
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; Last Modified : January 5, 2006
-;
-; [TAB8]
-
-; --------------------------------------------------------------------------
-;
-; configuration check: BITS_IN_JSAMPLE==8 (8-bit sample values) is the only
-; valid setting on this SIMD extension.
-;
-%if BITS_IN_JSAMPLE != 8
-%error "Sorry, this SIMD code only copes with 8-bit sample values."
-%endif
-
-; Short forms of external names for systems with brain-damaged linkers.
-;
-%ifdef NEED_SHORT_EXTERNAL_NAMES
-%define jpeg_rgb_ycc_convert_mmx jMRgbYccCnv ; jccolmmx.asm
-%define jpeg_rgb_ycc_convert_sse2 jSRgbYccCnv ; jccolss2.asm
-%define jpeg_h2v1_downsample_mmx jM21Downsample ; jcsammmx.asm
-%define jpeg_h2v2_downsample_mmx jM22Downsample ; jcsammmx.asm
-%define jpeg_h2v1_downsample_sse2 jS21Downsample ; jcsamss2.asm
-%define jpeg_h2v2_downsample_sse2 jS22Downsample ; jcsamss2.asm
-%define jpeg_ycc_rgb_convert_mmx jMYccRgbCnv ; jdcolmmx.asm
-%define jpeg_ycc_rgb_convert_sse2 jSYccRgbCnv ; jdcolss2.asm
-%define jpeg_h2v1_merged_upsample_mmx jM21MerUpsample ; jdmermmx.asm
-%define jpeg_h2v2_merged_upsample_mmx jM22MerUpsample ; jdmermmx.asm
-%define jpeg_h2v1_merged_upsample_sse2 jS21MerUpsample ; jdmerss2.asm
-%define jpeg_h2v2_merged_upsample_sse2 jS22MerUpsample ; jdmerss2.asm
-%define jpeg_h2v1_fancy_upsample_mmx jM21FanUpsample ; jdsammmx.asm
-%define jpeg_h2v2_fancy_upsample_mmx jM22FanUpsample ; jdsammmx.asm
-%define jpeg_h1v2_fancy_upsample_mmx jM12FanUpsample ; jdsammmx.asm
-%define jpeg_h2v1_upsample_mmx jM21Upsample ; jdsammmx.asm
-%define jpeg_h2v2_upsample_mmx jM22Upsample ; jdsammmx.asm
-%define jpeg_h2v1_fancy_upsample_sse2 jS21FanUpsample ; jdsamss2.asm
-%define jpeg_h2v2_fancy_upsample_sse2 jS22FanUpsample ; jdsamss2.asm
-%define jpeg_h1v2_fancy_upsample_sse2 jS12FanUpsample ; jdsamss2.asm
-%define jpeg_h2v1_upsample_sse2 jS21Upsample ; jdsamss2.asm
-%define jpeg_h2v2_upsample_sse2 jS22Upsample ; jdsamss2.asm
-%define jconst_rgb_ycc_convert_mmx jMCRgbYccCnv ; jccolmmx.asm
-%define jconst_rgb_ycc_convert_sse2 jSCRgbYccCnv ; jccolss2.asm
-%define jconst_ycc_rgb_convert_mmx jMCYccRgbCnv ; jdcolmmx.asm
-%define jconst_ycc_rgb_convert_sse2 jSCYccRgbCnv ; jdcolss2.asm
-%define jconst_merged_upsample_mmx jMCMerUpsample ; jdmermmx.asm
-%define jconst_merged_upsample_sse2 jSCMerUpsample ; jdmerss2.asm
-%define jconst_fancy_upsample_mmx jMCFanUpsample ; jdsammmx.asm
-%define jconst_fancy_upsample_sse2 jSCFanUpsample ; jdsamss2.asm
-%endif ; NEED_SHORT_EXTERNAL_NAMES
-
-; --------------------------------------------------------------------------
-
-; pseudo-resisters to make ordering of RGB configurable
-;
-%if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-%if RGB_RED < 0 || RGB_RED >= RGB_PIXELSIZE || RGB_GREEN < 0 || \
- RGB_GREEN >= RGB_PIXELSIZE || RGB_BLUE < 0 || RGB_BLUE >= RGB_PIXELSIZE || \
- RGB_RED == RGB_GREEN || RGB_GREEN == RGB_BLUE || RGB_RED == RGB_BLUE
-%error "Incorrect RGB pixel offset."
-%endif
-
-%if RGB_RED == 0
-%define mmA mm0
-%define mmB mm1
-%define xmmA xmm0
-%define xmmB xmm1
-%elif RGB_GREEN == 0
-%define mmA mm2
-%define mmB mm3
-%define xmmA xmm2
-%define xmmB xmm3
-%elif RGB_BLUE == 0
-%define mmA mm4
-%define mmB mm5
-%define xmmA xmm4
-%define xmmB xmm5
-%else
-%define mmA mm6
-%define mmB mm7
-%define xmmA xmm6
-%define xmmB xmm7
-%endif
-
-%if RGB_RED == 1
-%define mmC mm0
-%define mmD mm1
-%define xmmC xmm0
-%define xmmD xmm1
-%elif RGB_GREEN == 1
-%define mmC mm2
-%define mmD mm3
-%define xmmC xmm2
-%define xmmD xmm3
-%elif RGB_BLUE == 1
-%define mmC mm4
-%define mmD mm5
-%define xmmC xmm4
-%define xmmD xmm5
-%else
-%define mmC mm6
-%define mmD mm7
-%define xmmC xmm6
-%define xmmD xmm7
-%endif
-
-%if RGB_RED == 2
-%define mmE mm0
-%define mmF mm1
-%define xmmE xmm0
-%define xmmF xmm1
-%elif RGB_GREEN == 2
-%define mmE mm2
-%define mmF mm3
-%define xmmE xmm2
-%define xmmF xmm3
-%elif RGB_BLUE == 2
-%define mmE mm4
-%define mmF mm5
-%define xmmE xmm4
-%define xmmF xmm5
-%else
-%define mmE mm6
-%define mmF mm7
-%define xmmE xmm6
-%define xmmF xmm7
-%endif
-
-%if RGB_RED == 3
-%define mmG mm0
-%define mmH mm1
-%define xmmG xmm0
-%define xmmH xmm1
-%elif RGB_GREEN == 3
-%define mmG mm2
-%define mmH mm3
-%define xmmG xmm2
-%define xmmH xmm3
-%elif RGB_BLUE == 3
-%define mmG mm4
-%define mmH mm5
-%define xmmG xmm4
-%define xmmH xmm5
-%else
-%define mmG mm6
-%define mmH mm7
-%define xmmG xmm6
-%define xmmH xmm7
-%endif
-%endif ; RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-
-; --------------------------------------------------------------------------
diff --git a/jcomapi.c b/jcomapi.c
index e4235c0..9b1fa75 100644
--- a/jcomapi.c
+++ b/jcomapi.c
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : March 11, 2005
- * ---------------------------------------------------------------------
- *
* This file contains application interface routines that are used for both
* compression and decompression.
*/
@@ -111,54 +104,3 @@
tbl->sent_table = FALSE; /* make sure this is false in any new table */
return tbl;
}
-
-
-/*
- * SIMD Ext: Checking for support of SIMD instruction set.
- */
-
-GLOBAL(unsigned int)
-jpeg_simd_support (j_common_ptr cinfo)
-{
- enum { JSIMD_INVALID = ~0 };
- static volatile unsigned int simd_supported = JSIMD_INVALID;
-
- if (simd_supported == JSIMD_INVALID)
- simd_supported = jpeg_simd_os_support(jpeg_simd_cpu_support());
-
-#ifndef JSIMD_MASKFUNC_NOT_SUPPORTED
- if (cinfo != NULL) /* Turn off the masked flags */
- return simd_supported & ~jpeg_simd_mask(cinfo, JSIMD_NONE, JSIMD_NONE);
-#endif
- return simd_supported;
-}
-
-#ifndef JSIMD_MASKFUNC_NOT_SUPPORTED
-
-/*
- * SIMD Ext: modify/retrieve SIMD instruction mask
- */
-
-GLOBAL(unsigned int)
-jpeg_simd_mask (j_common_ptr cinfo, unsigned int remove, unsigned int add)
-{
- unsigned long *gp;
- unsigned int oldmask;
-
- if (cinfo->is_decompressor)
- gp = (unsigned long *) &((j_decompress_ptr) cinfo)->output_gamma;
- else /* compressor */
- gp = (unsigned long *) &((j_compress_ptr) cinfo)->input_gamma;
-
- if ((gp[1] == 0x3FF00000 || gp[1] == 0x00000000) && /* +1.0 or +0.0 */
- (gp[0] & ~JSIMD_ALL) == 0) {
- oldmask = gp[0];
- if (((remove | add) & ~JSIMD_ALL) == 0)
- gp[0] = (oldmask & ~remove) | add;
- } else {
- oldmask = 0; /* error */
- }
- return oldmask;
-}
-
-#endif /* !JSIMD_MASKFUNC_NOT_SUPPORTED */
diff --git a/jconfig.bc5 b/jconfig.bc5
deleted file mode 100644
index 50c309d..0000000
--- a/jconfig.bc5
+++ /dev/null
@@ -1,48 +0,0 @@
-/* jconfig.bc5 --- jconfig.h for Borland C++ Compiler 5.5 (win32) */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */
-
-/* Define "boolean" as unsigned char, not int, per Windows custom */
-#define TYPEDEF_UCHAR_BOOLEAN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#if defined(JPEG_INTERNALS) || defined(JPEG_INTERNAL_OPTIONS)
-#undef JSIMD_MMX_NOT_SUPPORTED
-#undef JSIMD_3DNOW_NOT_SUPPORTED
-#undef JSIMD_SSE_NOT_SUPPORTED
-#undef JSIMD_SSE2_NOT_SUPPORTED
-#endif
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define USE_SETMODE /* Borland has setmode() */
-#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/jconfig.cfg b/jconfig.cfg
deleted file mode 100644
index 147cb6b..0000000
--- a/jconfig.cfg
+++ /dev/null
@@ -1,56 +0,0 @@
-/* jconfig.cfg --- source file edited by configure script */
-/* see jconfig.doc for explanations */
-
-#undef HAVE_PROTOTYPES
-#undef HAVE_UNSIGNED_CHAR
-#undef HAVE_UNSIGNED_SHORT
-#undef void
-#undef const
-#undef CHAR_IS_UNSIGNED
-#undef HAVE_STDDEF_H
-#undef HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-/* Define this if you get warnings about undefined structures. */
-#undef INCOMPLETE_TYPES_BROKEN
-
-/* Define "boolean" as unsigned char, not int, per Windows custom */
-#undef TYPEDEF_UCHAR_BOOLEAN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-#undef INLINE
-/* These are for configuring the JPEG memory manager. */
-#undef DEFAULT_MAX_MEM
-#undef NO_MKTEMP
-
-#endif /* JPEG_INTERNALS */
-
-#if defined(JPEG_INTERNALS) || defined(JPEG_INTERNAL_OPTIONS)
-#undef JSIMD_MMX_NOT_SUPPORTED
-#undef JSIMD_3DNOW_NOT_SUPPORTED
-#undef JSIMD_SSE_NOT_SUPPORTED
-#undef JSIMD_SSE2_NOT_SUPPORTED
-#endif
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE
-#undef USE_SETMODE
-#undef USE_FDOPEN
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-
-/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
-#undef PROGRESS_REPORT
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/jconfig.dj b/jconfig.dj
deleted file mode 100644
index b5a2e47..0000000
--- a/jconfig.dj
+++ /dev/null
@@ -1,47 +0,0 @@
-/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#if defined(JPEG_INTERNALS) || defined(JPEG_INTERNAL_OPTIONS)
-#undef JSIMD_MMX_NOT_SUPPORTED
-#undef JSIMD_3DNOW_NOT_SUPPORTED
-#undef JSIMD_SSE_NOT_SUPPORTED
-#undef JSIMD_SSE2_NOT_SUPPORTED
-#endif
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE /* optional */
-#define USE_SETMODE /* Needed to make one-file style work in DJGPP */
-#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#define FREE_MEM_ESTIMATE 0 /* for alternate cjpeg/djpeg */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/jconfig.h.in b/jconfig.h.in
new file mode 100644
index 0000000..4e5e80e
--- /dev/null
+++ b/jconfig.h.in
@@ -0,0 +1,49 @@
+/* Define if your compiler supports prototypes */
+#undef HAVE_PROTOTYPES
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if the system has the type `unsigned char'. */
+#undef HAVE_UNSIGNED_CHAR
+
+/* Define to 1 if the system has the type `unsigned short'. */
+#undef HAVE_UNSIGNED_SHORT
+
+/* Define if you want use complete types */
+#undef INCOMPLETE_TYPES_BROKEN
+
+/* Define if you have BSD-like bzero and bcopy */
+#undef NEED_BSD_STRINGS
+
+/* Define if you need short function names */
+#undef NEED_SHORT_EXTERNAL_NAMES
+
+/* Define if you have sys/types.h */
+#undef NEED_SYS_TYPES_H
+
+/* Define if shift is unsigned */
+#undef RIGHT_SHIFT_IS_UNSIGNED
+
+/* Use accelerated SIMD routines. */
+#undef WITH_SIMD
+
+/* Define to 1 if type `char' is unsigned and you are not using gcc. */
+#ifndef __CHAR_UNSIGNED__
+# undef __CHAR_UNSIGNED__
+#endif
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/jconfig.linux b/jconfig.linux
deleted file mode 100644
index 6c38ed5..0000000
--- a/jconfig.linux
+++ /dev/null
@@ -1,44 +0,0 @@
-/* jconfig.linux --- jconfig.h for Linux ELF with gcc */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#if defined(JPEG_INTERNALS) || defined(JPEG_INTERNAL_OPTIONS)
-#undef JSIMD_MMX_NOT_SUPPORTED
-#undef JSIMD_3DNOW_NOT_SUPPORTED
-#undef JSIMD_SSE_NOT_SUPPORTED
-#undef JSIMD_SSE2_NOT_SUPPORTED
-#endif
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE
-#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/jconfig.mgw b/jconfig.mgw
deleted file mode 100644
index 83dfe1d..0000000
--- a/jconfig.mgw
+++ /dev/null
@@ -1,48 +0,0 @@
-/* jconfig.mgw --- jconfig.h for MinGW */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-/* Define "boolean" as unsigned char, not int, per Windows custom */
-#define TYPEDEF_UCHAR_BOOLEAN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#if defined(JPEG_INTERNALS) || defined(JPEG_INTERNAL_OPTIONS)
-#undef JSIMD_MMX_NOT_SUPPORTED
-#undef JSIMD_3DNOW_NOT_SUPPORTED
-#undef JSIMD_SSE_NOT_SUPPORTED
-#undef JSIMD_SSE2_NOT_SUPPORTED
-#endif
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE /* optional */
-#define USE_SETMODE /* MinGW has setmode() */
-#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/jcphuff.c b/jcphuff.c
index 07f9178..7b235d7 100644
--- a/jcphuff.c
+++ b/jcphuff.c
@@ -223,7 +223,7 @@
* between calls, so 24 bits are sufficient.
*/
-INLINE
+inline
LOCAL(void)
emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size)
/* Emit some bits, unless we are in gather mode */
@@ -276,7 +276,7 @@
* Emit (or just count) a Huffman symbol.
*/
-INLINE
+inline
LOCAL(void)
emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol)
{
diff --git a/jcqnt3dn.asm b/jcqnt3dn.asm
deleted file mode 100644
index 8197858..0000000
--- a/jcqnt3dn.asm
+++ /dev/null
@@ -1,240 +0,0 @@
-;
-; jcqnt3dn.asm - sample data conversion and quantization (3DNow! & MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : January 23, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-%ifdef JFDCT_FLT_3DNOW_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Load data into workspace, applying unsigned->signed conversion
-;
-; GLOBAL(void)
-; jpeg_convsamp_flt_3dnow (JSAMPARRAY sample_data, JDIMENSION start_col,
-; FAST_FLOAT * workspace);
-;
-
-%define sample_data ebp+8 ; JSAMPARRAY sample_data
-%define start_col ebp+12 ; JDIMENSION start_col
-%define workspace ebp+16 ; FAST_FLOAT * workspace
-
- align 16
- global EXTN(jpeg_convsamp_flt_3dnow)
-
-EXTN(jpeg_convsamp_flt_3dnow):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- pcmpeqw mm7,mm7
- psllw mm7,7
- packsswb mm7,mm7 ; mm7 = PB_CENTERJSAMPLE (0x808080..)
-
- mov esi, JSAMPARRAY [sample_data] ; (JSAMPROW *)
- mov eax, JDIMENSION [start_col]
- mov edi, POINTER [workspace] ; (DCTELEM *)
- mov ecx, DCTSIZE/2
- alignx 16,7
-.convloop:
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; (JSAMPLE *)
- mov edx, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; (JSAMPLE *)
-
- movq mm0, MMWORD [ebx+eax*SIZEOF_JSAMPLE]
- movq mm1, MMWORD [edx+eax*SIZEOF_JSAMPLE]
-
- psubb mm0,mm7 ; mm0=(01234567)
- psubb mm1,mm7 ; mm1=(89ABCDEF)
-
- punpcklbw mm2,mm0 ; mm2=(*0*1*2*3)
- punpckhbw mm0,mm0 ; mm0=(*4*5*6*7)
- punpcklbw mm3,mm1 ; mm3=(*8*9*A*B)
- punpckhbw mm1,mm1 ; mm1=(*C*D*E*F)
-
- punpcklwd mm4,mm2 ; mm4=(***0***1)
- punpckhwd mm2,mm2 ; mm2=(***2***3)
- punpcklwd mm5,mm0 ; mm5=(***4***5)
- punpckhwd mm0,mm0 ; mm0=(***6***7)
-
- psrad mm4,(DWORD_BIT-BYTE_BIT) ; mm4=(01)
- psrad mm2,(DWORD_BIT-BYTE_BIT) ; mm2=(23)
- pi2fd mm4,mm4
- pi2fd mm2,mm2
- psrad mm5,(DWORD_BIT-BYTE_BIT) ; mm5=(45)
- psrad mm0,(DWORD_BIT-BYTE_BIT) ; mm0=(67)
- pi2fd mm5,mm5
- pi2fd mm0,mm0
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], mm4
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], mm2
- movq MMWORD [MMBLOCK(0,2,edi,SIZEOF_FAST_FLOAT)], mm5
- movq MMWORD [MMBLOCK(0,3,edi,SIZEOF_FAST_FLOAT)], mm0
-
- punpcklwd mm6,mm3 ; mm6=(***8***9)
- punpckhwd mm3,mm3 ; mm3=(***A***B)
- punpcklwd mm4,mm1 ; mm4=(***C***D)
- punpckhwd mm1,mm1 ; mm1=(***E***F)
-
- psrad mm6,(DWORD_BIT-BYTE_BIT) ; mm6=(89)
- psrad mm3,(DWORD_BIT-BYTE_BIT) ; mm3=(AB)
- pi2fd mm6,mm6
- pi2fd mm3,mm3
- psrad mm4,(DWORD_BIT-BYTE_BIT) ; mm4=(CD)
- psrad mm1,(DWORD_BIT-BYTE_BIT) ; mm1=(EF)
- pi2fd mm4,mm4
- pi2fd mm1,mm1
-
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], mm6
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], mm3
- movq MMWORD [MMBLOCK(1,2,edi,SIZEOF_FAST_FLOAT)], mm4
- movq MMWORD [MMBLOCK(1,3,edi,SIZEOF_FAST_FLOAT)], mm1
-
- add esi, byte 2*SIZEOF_JSAMPROW
- add edi, byte 2*DCTSIZE*SIZEOF_FAST_FLOAT
- dec ecx
- jnz near .convloop
-
- femms ; empty MMX/3DNow! state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-
-; --------------------------------------------------------------------------
-;
-; Quantize/descale the coefficients, and store into coef_block
-;
-; GLOBAL(void)
-; jpeg_quantize_flt_3dnow (JCOEFPTR coef_block, FAST_FLOAT * divisors,
-; FAST_FLOAT * workspace);
-;
-
-%define coef_block ebp+8 ; JCOEFPTR coef_block
-%define divisors ebp+12 ; FAST_FLOAT * divisors
-%define workspace ebp+16 ; FAST_FLOAT * workspace
-
- align 16
- global EXTN(jpeg_quantize_flt_3dnow)
-
-EXTN(jpeg_quantize_flt_3dnow):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; unused
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov eax, 0x4B400000 ; (float)0x00C00000 (rndint_magic)
- movd mm7,eax
- punpckldq mm7,mm7 ; mm7={12582912.0F 12582912.0F}
-
- mov esi, POINTER [workspace]
- mov edx, POINTER [divisors]
- mov edi, JCOEFPTR [coef_block]
- mov eax, DCTSIZE2/16
- alignx 16,7
-.quantloop:
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_FAST_FLOAT)]
- movq mm1, MMWORD [MMBLOCK(0,1,esi,SIZEOF_FAST_FLOAT)]
- pfmul mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)]
- pfmul mm1, MMWORD [MMBLOCK(0,1,edx,SIZEOF_FAST_FLOAT)]
- movq mm2, MMWORD [MMBLOCK(0,2,esi,SIZEOF_FAST_FLOAT)]
- movq mm3, MMWORD [MMBLOCK(0,3,esi,SIZEOF_FAST_FLOAT)]
- pfmul mm2, MMWORD [MMBLOCK(0,2,edx,SIZEOF_FAST_FLOAT)]
- pfmul mm3, MMWORD [MMBLOCK(0,3,edx,SIZEOF_FAST_FLOAT)]
-
- pfadd mm0,mm7 ; mm0=(00 ** 01 **)
- pfadd mm1,mm7 ; mm1=(02 ** 03 **)
- pfadd mm2,mm7 ; mm0=(04 ** 05 **)
- pfadd mm3,mm7 ; mm1=(06 ** 07 **)
-
- movq mm4,mm0
- punpcklwd mm0,mm1 ; mm0=(00 02 ** **)
- punpckhwd mm4,mm1 ; mm4=(01 03 ** **)
- movq mm5,mm2
- punpcklwd mm2,mm3 ; mm2=(04 06 ** **)
- punpckhwd mm5,mm3 ; mm5=(05 07 ** **)
-
- punpcklwd mm0,mm4 ; mm0=(00 01 02 03)
- punpcklwd mm2,mm5 ; mm2=(04 05 06 07)
-
- movq mm6, MMWORD [MMBLOCK(1,0,esi,SIZEOF_FAST_FLOAT)]
- movq mm1, MMWORD [MMBLOCK(1,1,esi,SIZEOF_FAST_FLOAT)]
- pfmul mm6, MMWORD [MMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)]
- pfmul mm1, MMWORD [MMBLOCK(1,1,edx,SIZEOF_FAST_FLOAT)]
- movq mm3, MMWORD [MMBLOCK(1,2,esi,SIZEOF_FAST_FLOAT)]
- movq mm4, MMWORD [MMBLOCK(1,3,esi,SIZEOF_FAST_FLOAT)]
- pfmul mm3, MMWORD [MMBLOCK(1,2,edx,SIZEOF_FAST_FLOAT)]
- pfmul mm4, MMWORD [MMBLOCK(1,3,edx,SIZEOF_FAST_FLOAT)]
-
- pfadd mm6,mm7 ; mm0=(10 ** 11 **)
- pfadd mm1,mm7 ; mm4=(12 ** 13 **)
- pfadd mm3,mm7 ; mm0=(14 ** 15 **)
- pfadd mm4,mm7 ; mm4=(16 ** 17 **)
-
- movq mm5,mm6
- punpcklwd mm6,mm1 ; mm6=(10 12 ** **)
- punpckhwd mm5,mm1 ; mm5=(11 13 ** **)
- movq mm1,mm3
- punpcklwd mm3,mm4 ; mm3=(14 16 ** **)
- punpckhwd mm1,mm4 ; mm1=(15 17 ** **)
-
- punpcklwd mm6,mm5 ; mm6=(10 11 12 13)
- punpcklwd mm3,mm1 ; mm3=(14 15 16 17)
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_JCOEF)], mm6
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_JCOEF)], mm3
-
- add esi, byte 16*SIZEOF_FAST_FLOAT
- add edx, byte 16*SIZEOF_FAST_FLOAT
- add edi, byte 16*SIZEOF_JCOEF
- dec eax
- jnz near .quantloop
-
- femms ; empty MMX/3DNow! state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; unused
-; pop ebx ; unused
- pop ebp
- ret
-
-%endif ; JFDCT_FLT_3DNOW_MMX_SUPPORTED
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/jcqntflt.asm b/jcqntflt.asm
deleted file mode 100644
index 4631a06..0000000
--- a/jcqntflt.asm
+++ /dev/null
@@ -1,202 +0,0 @@
-;
-; jcqntflt.asm - sample data conversion and quantization (non-SIMD, FP)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : March 21, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Load data into workspace, applying unsigned->signed conversion
-;
-; GLOBAL(void)
-; jpeg_convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col,
-; FAST_FLOAT * workspace);
-;
-
-%define sample_data ebp+8 ; JSAMPARRAY sample_data
-%define start_col ebp+12 ; JDIMENSION start_col
-%define workspace ebp+16 ; FAST_FLOAT * workspace
-
- align 16
- global EXTN(jpeg_convsamp_float)
-
-EXTN(jpeg_convsamp_float):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov esi, JSAMPARRAY [sample_data] ; (JSAMPROW *)
- mov edi, POINTER [workspace] ; (DCTELEM *)
- mov ecx, DCTSIZE
- alignx 16,7
-.convloop:
- mov ebx, JSAMPROW [esi] ; (JSAMPLE *)
- add ebx, JDIMENSION [start_col]
-
-%assign i 0 ; i=0
-%rep 4 ; -- repeat 4 times ---
- xor eax,eax
- xor edx,edx
- mov al, JSAMPLE [ebx+(i+0)*SIZEOF_JSAMPLE]
- mov dl, JSAMPLE [ebx+(i+1)*SIZEOF_JSAMPLE]
- add eax, byte -CENTERJSAMPLE
- add edx, byte -CENTERJSAMPLE
- push eax
- push edx
-%assign i i+2 ; i+=2
-%endrep ; -- repeat end ---
-
- fild INT32 [esp+0*SIZEOF_INT32]
- fild INT32 [esp+1*SIZEOF_INT32]
- fild INT32 [esp+2*SIZEOF_INT32]
- fild INT32 [esp+3*SIZEOF_INT32]
- fild INT32 [esp+4*SIZEOF_INT32]
- fild INT32 [esp+5*SIZEOF_INT32]
- fild INT32 [esp+6*SIZEOF_INT32]
- fild INT32 [esp+7*SIZEOF_INT32]
-
- add esp, byte DCTSIZE*SIZEOF_INT32
-
- fstp FAST_FLOAT [edi+0*SIZEOF_FAST_FLOAT]
- fstp FAST_FLOAT [edi+1*SIZEOF_FAST_FLOAT]
- fstp FAST_FLOAT [edi+2*SIZEOF_FAST_FLOAT]
- fstp FAST_FLOAT [edi+3*SIZEOF_FAST_FLOAT]
- fstp FAST_FLOAT [edi+4*SIZEOF_FAST_FLOAT]
- fstp FAST_FLOAT [edi+5*SIZEOF_FAST_FLOAT]
- fstp FAST_FLOAT [edi+6*SIZEOF_FAST_FLOAT]
- fstp FAST_FLOAT [edi+7*SIZEOF_FAST_FLOAT]
-
- add esi, byte SIZEOF_JSAMPROW
- add edi, byte DCTSIZE*SIZEOF_FAST_FLOAT
- dec ecx
- jnz near .convloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-
-; --------------------------------------------------------------------------
-;
-; Quantize/descale the coefficients, and store into coef_block
-;
-; GLOBAL(void)
-; jpeg_quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors,
-; FAST_FLOAT * workspace);
-;
-
-%define coef_block ebp+8 ; JCOEFPTR coef_block
-%define divisors ebp+12 ; FAST_FLOAT * divisors
-%define workspace ebp+16 ; FAST_FLOAT * workspace
-
-%define FLT_ROUNDS 1 ; from <float.h>
-
- align 16
- global EXTN(jpeg_quantize_float)
-
-EXTN(jpeg_quantize_float):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; unused
-; push edx ; unused
- push esi
- push edi
-
-%if (FLT_ROUNDS != 1)
- push eax
- fnstcw word [esp]
- mov eax, [esp]
- and eax, (~0x0C00) ; round to nearest integer
- push eax
- fldcw word [esp]
- pop eax
-%endif
- mov esi, POINTER [workspace]
- mov ebx, POINTER [divisors]
- mov edi, JCOEFPTR [coef_block]
- mov eax, DCTSIZE2/8
- alignx 16,7
-.quantloop:
- fld FAST_FLOAT [esi+0*SIZEOF_FAST_FLOAT]
- fmul FAST_FLOAT [ebx+0*SIZEOF_FAST_FLOAT]
- fld FAST_FLOAT [esi+1*SIZEOF_FAST_FLOAT]
- fmul FAST_FLOAT [ebx+1*SIZEOF_FAST_FLOAT]
- fld FAST_FLOAT [esi+2*SIZEOF_FAST_FLOAT]
- fmul FAST_FLOAT [ebx+2*SIZEOF_FAST_FLOAT]
- fld FAST_FLOAT [esi+3*SIZEOF_FAST_FLOAT]
- fmul FAST_FLOAT [ebx+3*SIZEOF_FAST_FLOAT]
-
- fld FAST_FLOAT [esi+4*SIZEOF_FAST_FLOAT]
- fmul FAST_FLOAT [ebx+4*SIZEOF_FAST_FLOAT]
- fxch st0,st1
- fld FAST_FLOAT [esi+5*SIZEOF_FAST_FLOAT]
- fmul FAST_FLOAT [ebx+5*SIZEOF_FAST_FLOAT]
- fxch st0,st3
- fld FAST_FLOAT [esi+6*SIZEOF_FAST_FLOAT]
- fmul FAST_FLOAT [ebx+6*SIZEOF_FAST_FLOAT]
- fxch st0,st5
- fld FAST_FLOAT [esi+7*SIZEOF_FAST_FLOAT]
- fmul FAST_FLOAT [ebx+7*SIZEOF_FAST_FLOAT]
- fxch st0,st7
-
- fistp JCOEF [edi+0*SIZEOF_JCOEF]
- fistp JCOEF [edi+1*SIZEOF_JCOEF]
- fistp JCOEF [edi+2*SIZEOF_JCOEF]
- fistp JCOEF [edi+3*SIZEOF_JCOEF]
- fistp JCOEF [edi+4*SIZEOF_JCOEF]
- fistp JCOEF [edi+5*SIZEOF_JCOEF]
- fistp JCOEF [edi+6*SIZEOF_JCOEF]
- fistp JCOEF [edi+7*SIZEOF_JCOEF]
-
- add esi, byte 8*SIZEOF_FAST_FLOAT
- add ebx, byte 8*SIZEOF_FAST_FLOAT
- add edi, byte 8*SIZEOF_JCOEF
- dec eax
- jnz short .quantloop
-
-%if (FLT_ROUNDS != 1)
- fldcw word [esp]
- pop eax ; pop old control word
-%endif
- pop edi
- pop esi
-; pop edx ; unused
-; pop ecx ; unused
- pop ebx
- pop ebp
- ret
-
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/jcqntint.asm b/jcqntint.asm
deleted file mode 100644
index e0de1cb..0000000
--- a/jcqntint.asm
+++ /dev/null
@@ -1,243 +0,0 @@
-;
-; jcqntint.asm - sample data conversion and quantization (non-SIMD, integer)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : January 27, 2005
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Load data into workspace, applying unsigned->signed conversion
-;
-; GLOBAL(void)
-; jpeg_convsamp_int (JSAMPARRAY sample_data, JDIMENSION start_col,
-; DCTELEM * workspace);
-;
-
-%define sample_data ebp+8 ; JSAMPARRAY sample_data
-%define start_col ebp+12 ; JDIMENSION start_col
-%define workspace ebp+16 ; DCTELEM * workspace
-
- align 16
- global EXTN(jpeg_convsamp_int)
-
-EXTN(jpeg_convsamp_int):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov esi, JSAMPARRAY [sample_data] ; (JSAMPROW *)
- mov edi, POINTER [workspace] ; (DCTELEM *)
- mov ecx, DCTSIZE
- alignx 16,7
-.convloop:
- mov ebx, JSAMPROW [esi] ; (JSAMPLE *)
- add ebx, JDIMENSION [start_col]
-
-%assign i 0 ; i=0
-%rep 4 ; -- repeat 4 times ---
- xor eax,eax
- xor edx,edx
- mov al, JSAMPLE [ebx+(i+0)*SIZEOF_JSAMPLE]
- mov dl, JSAMPLE [ebx+(i+1)*SIZEOF_JSAMPLE]
- add eax, byte -CENTERJSAMPLE
- add edx, byte -CENTERJSAMPLE
- mov DCTELEM [edi+(i+0)*SIZEOF_DCTELEM], ax
- mov DCTELEM [edi+(i+1)*SIZEOF_DCTELEM], dx
-%assign i i+2 ; i+=2
-%endrep ; -- repeat end ---
-
- add esi, byte SIZEOF_JSAMPROW
- add edi, byte DCTSIZE*SIZEOF_DCTELEM
- dec ecx
- jnz short .convloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%ifndef JFDCT_INT_QUANTIZE_WITH_DIVISION
-
-; --------------------------------------------------------------------------
-;
-; Quantize/descale the coefficients, and store into coef_block
-;
-; This implementation is based on an algorithm described in
-; "How to optimize for the Pentium family of microprocessors"
-; (http://www.agner.org/assem/).
-;
-; GLOBAL(void)
-; jpeg_quantize_int (JCOEFPTR coef_block, DCTELEM * divisors,
-; DCTELEM * workspace);
-;
-
-%define RECIPROCAL(i,b) ((b)+((i)+DCTSIZE2*0)*SIZEOF_DCTELEM)
-%define CORRECTION(i,b) ((b)+((i)+DCTSIZE2*1)*SIZEOF_DCTELEM)
-%define SHIFT(i,b) ((b)+((i)+DCTSIZE2*3)*SIZEOF_DCTELEM)
-
-%define coef_block ebp+8 ; JCOEFPTR coef_block
-%define divisors ebp+12 ; DCTELEM * divisors
-%define workspace ebp+16 ; DCTELEM * workspace
-
-%define UNROLL 2
-
- align 16
- global EXTN(jpeg_quantize_int)
-
-EXTN(jpeg_quantize_int):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov esi, POINTER [workspace]
- mov ebx, POINTER [divisors]
- mov edi, JCOEFPTR [coef_block]
- mov ecx, DCTSIZE2/UNROLL
- alignx 16,7
-.quantloop:
- push ecx
-
-%assign i 0 ; i=0;
-%rep UNROLL ; ---- repeat (UNROLL) times ----
- mov cx, DCTELEM [esi+(i)*SIZEOF_DCTELEM]
- mov ax,cx
- sar cx,(WORD_BIT-1)
- xor ax,cx ; if (ax < 0) ax = -ax;
- sub ax,cx
- add ax, DCTELEM [CORRECTION(i,ebx)] ; correction + roundfactor
- shl ax,1
- mul DCTELEM [RECIPROCAL(i,ebx)] ; reciprocal
- mov ax,cx
- mov cx, DCTELEM [SHIFT(i,ebx)] ; shift
- shr dx,cl
- xor dx,ax
- sub dx,ax
- mov JCOEF [edi+(i)*SIZEOF_JCOEF], dx
-%assign i i+1 ; i++;
-%endrep ; ---- repeat end ----
-
- pop ecx
-
- add esi, byte UNROLL*SIZEOF_DCTELEM
- add ebx, byte UNROLL*SIZEOF_DCTELEM
- add edi, byte UNROLL*SIZEOF_JCOEF
- dec ecx
- jnz .quantloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%else ; JFDCT_INT_QUANTIZE_WITH_DIVISION
-
-; --------------------------------------------------------------------------
-;
-; Quantize/descale the coefficients, and store into coef_block
-;
-; GLOBAL(void)
-; jpeg_quantize_idiv (JCOEFPTR coef_block, DCTELEM * divisors,
-; DCTELEM * workspace);
-;
-
-%define coef_block ebp+8 ; JCOEFPTR coef_block
-%define divisors ebp+12 ; DCTELEM * divisors
-%define workspace ebp+16 ; DCTELEM * workspace
-
- align 16
- global EXTN(jpeg_quantize_idiv)
-
-EXTN(jpeg_quantize_idiv):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov esi, POINTER [workspace]
- mov ebx, POINTER [divisors]
- mov edi, JCOEFPTR [coef_block]
- mov ecx, DCTSIZE2
- alignx 16,7
-.quantloop:
- push ecx
-
- movsx ecx, DCTELEM [esi] ; temp
- mov eax,ecx
- sar ecx,(DWORD_BIT-1)
- xor edx,edx
- mov dx, DCTELEM [ebx] ; qval
- xor eax,ecx ; if (eax < 0) eax = -eax;
- shr edx,1
- sub eax,ecx
- cmp eax,edx ; if (temp + qval/2 >= qval)
- jge short .quant
- ; ---- if the quantized coefficient is zero
- xor eax,eax
- jmp short .output
- alignx 16,7
-.quant: ; ---- do quantization
- add eax,edx
- xor edx,edx
- div DCTELEM [ebx] ; Q:ax,R:dx
- xor ax,cx
- sub ax,cx
- alignx 16,7
-.output:
- mov JCOEF [edi], ax
-
- pop ecx
-
- add esi, byte SIZEOF_DCTELEM
- add ebx, byte SIZEOF_DCTELEM
- add edi, byte SIZEOF_JCOEF
- dec ecx
- jnz short .quantloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%endif ; !JFDCT_INT_QUANTIZE_WITH_DIVISION
diff --git a/jcqntmmx.asm b/jcqntmmx.asm
deleted file mode 100644
index 9cdf584..0000000
--- a/jcqntmmx.asm
+++ /dev/null
@@ -1,254 +0,0 @@
-;
-; jcqntmmx.asm - sample data conversion and quantization (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : January 27, 2005
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef JFDCT_INT_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Load data into workspace, applying unsigned->signed conversion
-;
-; GLOBAL(void)
-; jpeg_convsamp_int_mmx (JSAMPARRAY sample_data, JDIMENSION start_col,
-; DCTELEM * workspace);
-;
-
-%define sample_data ebp+8 ; JSAMPARRAY sample_data
-%define start_col ebp+12 ; JDIMENSION start_col
-%define workspace ebp+16 ; DCTELEM * workspace
-
- align 16
- global EXTN(jpeg_convsamp_int_mmx)
-
-EXTN(jpeg_convsamp_int_mmx):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- pxor mm6,mm6 ; mm6=(all 0's)
- pcmpeqw mm7,mm7
- psllw mm7,7 ; mm7={0xFF80 0xFF80 0xFF80 0xFF80}
-
- mov esi, JSAMPARRAY [sample_data] ; (JSAMPROW *)
- mov eax, JDIMENSION [start_col]
- mov edi, POINTER [workspace] ; (DCTELEM *)
- mov ecx, DCTSIZE/4
- alignx 16,7
-.convloop:
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; (JSAMPLE *)
- mov edx, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; (JSAMPLE *)
-
- movq mm0, MMWORD [ebx+eax*SIZEOF_JSAMPLE] ; mm0=(01234567)
- movq mm1, MMWORD [edx+eax*SIZEOF_JSAMPLE] ; mm1=(89ABCDEF)
-
- mov ebx, JSAMPROW [esi+2*SIZEOF_JSAMPROW] ; (JSAMPLE *)
- mov edx, JSAMPROW [esi+3*SIZEOF_JSAMPROW] ; (JSAMPLE *)
-
- movq mm2, MMWORD [ebx+eax*SIZEOF_JSAMPLE] ; mm2=(GHIJKLMN)
- movq mm3, MMWORD [edx+eax*SIZEOF_JSAMPLE] ; mm3=(OPQRSTUV)
-
- movq mm4,mm0
- punpcklbw mm0,mm6 ; mm0=(0123)
- punpckhbw mm4,mm6 ; mm4=(4567)
- movq mm5,mm1
- punpcklbw mm1,mm6 ; mm1=(89AB)
- punpckhbw mm5,mm6 ; mm5=(CDEF)
-
- paddw mm0,mm7
- paddw mm4,mm7
- paddw mm1,mm7
- paddw mm5,mm7
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_DCTELEM)], mm0
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_DCTELEM)], mm4
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_DCTELEM)], mm1
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_DCTELEM)], mm5
-
- movq mm0,mm2
- punpcklbw mm2,mm6 ; mm2=(GHIJ)
- punpckhbw mm0,mm6 ; mm0=(KLMN)
- movq mm4,mm3
- punpcklbw mm3,mm6 ; mm3=(OPQR)
- punpckhbw mm4,mm6 ; mm4=(STUV)
-
- paddw mm2,mm7
- paddw mm0,mm7
- paddw mm3,mm7
- paddw mm4,mm7
-
- movq MMWORD [MMBLOCK(2,0,edi,SIZEOF_DCTELEM)], mm2
- movq MMWORD [MMBLOCK(2,1,edi,SIZEOF_DCTELEM)], mm0
- movq MMWORD [MMBLOCK(3,0,edi,SIZEOF_DCTELEM)], mm3
- movq MMWORD [MMBLOCK(3,1,edi,SIZEOF_DCTELEM)], mm4
-
- add esi, byte 4*SIZEOF_JSAMPROW
- add edi, byte 4*DCTSIZE*SIZEOF_DCTELEM
- dec ecx
- jnz short .convloop
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%ifndef JFDCT_INT_QUANTIZE_WITH_DIVISION
-
-; --------------------------------------------------------------------------
-;
-; Quantize/descale the coefficients, and store into coef_block
-;
-; This implementation is based on an algorithm described in
-; "How to optimize for the Pentium family of microprocessors"
-; (http://www.agner.org/assem/).
-;
-; GLOBAL(void)
-; jpeg_quantize_int_mmx (JCOEFPTR coef_block, DCTELEM * divisors,
-; DCTELEM * workspace);
-;
-
-%define RECIPROCAL(m,n,b) MMBLOCK(DCTSIZE*0+(m),(n),(b),SIZEOF_DCTELEM)
-%define CORRECTION(m,n,b) MMBLOCK(DCTSIZE*1+(m),(n),(b),SIZEOF_DCTELEM)
-%define SCALE(m,n,b) MMBLOCK(DCTSIZE*2+(m),(n),(b),SIZEOF_DCTELEM)
-
-%define coef_block ebp+8 ; JCOEFPTR coef_block
-%define divisors ebp+12 ; DCTELEM * divisors
-%define workspace ebp+16 ; DCTELEM * workspace
-
- align 16
- global EXTN(jpeg_quantize_int_mmx)
-
-EXTN(jpeg_quantize_int_mmx):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; unused
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov esi, POINTER [workspace]
- mov edx, POINTER [divisors]
- mov edi, JCOEFPTR [coef_block]
- mov ah, 2
- alignx 16,7
-.quantloop1:
- mov al, DCTSIZE2/8/2
- alignx 16,7
-.quantloop2:
- movq mm2, MMWORD [MMBLOCK(0,0,esi,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(0,1,esi,SIZEOF_DCTELEM)]
- movq mm0,mm2
- movq mm1,mm3
- psraw mm2,(WORD_BIT-1)
- psraw mm3,(WORD_BIT-1)
- pxor mm0,mm2
- pxor mm1,mm3
- psubw mm0,mm2 ; if (mm0 < 0) mm0 = -mm0;
- psubw mm1,mm3 ; if (mm1 < 0) mm1 = -mm1;
-
- ; unsigned long unsigned_multiply(unsigned short x, unsigned short y)
- ; {
- ; enum { SHORT_BIT = 16 };
- ; signed short sx = (signed short) x;
- ; signed short sy = (signed short) y;
- ; signed long sz;
- ;
- ; sz = (long) sx * (long) sy; /* signed multiply */
- ;
- ; if (sx < 0) sz += (long) sy << SHORT_BIT;
- ; if (sy < 0) sz += (long) sx << SHORT_BIT;
- ;
- ; return (unsigned long) sz;
- ; }
-
- paddw mm0, MMWORD [CORRECTION(0,0,edx)] ; correction + roundfactor
- paddw mm1, MMWORD [CORRECTION(0,1,edx)]
- psllw mm0,1
- psllw mm1,1
- movq mm4,mm0
- movq mm5,mm1
- pmulhw mm0, MMWORD [RECIPROCAL(0,0,edx)] ; reciprocal
- pmulhw mm1, MMWORD [RECIPROCAL(0,1,edx)]
- movq mm6, MMWORD [SCALE(0,0,edx)] ; scale
- movq mm7, MMWORD [SCALE(0,1,edx)]
- paddw mm0,mm4 ; reciprocal is always negative (MSB=1)
- paddw mm1,mm5
- psllw mm0,1
- psllw mm1,1
- movq mm4,mm0
- movq mm5,mm1
- pmulhw mm0,mm6
- pmulhw mm1,mm7
- psraw mm6,(WORD_BIT-1)
- psraw mm7,(WORD_BIT-1)
- pand mm6,mm4
- pand mm7,mm5
- paddw mm0,mm6
- paddw mm1,mm7
- psraw mm4,(WORD_BIT-1)
- psraw mm5,(WORD_BIT-1)
- pand mm4, MMWORD [SCALE(0,0,edx)] ; scale
- pand mm5, MMWORD [SCALE(0,1,edx)]
- paddw mm0,mm4
- paddw mm1,mm5
-
- pxor mm0,mm2
- pxor mm1,mm3
- psubw mm0,mm2
- psubw mm1,mm3
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_DCTELEM)], mm0
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_DCTELEM)], mm1
-
- add esi, byte 8*SIZEOF_DCTELEM
- add edx, byte 8*SIZEOF_DCTELEM
- add edi, byte 8*SIZEOF_JCOEF
- dec al
- jnz near .quantloop2
- dec ah
- jnz near .quantloop1 ; to avoid branch misprediction
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; unused
-; pop ebx ; unused
- pop ebp
- ret
-
-%endif ; !JFDCT_INT_QUANTIZE_WITH_DIVISION
-%endif ; JFDCT_INT_MMX_SUPPORTED
diff --git a/jcqnts2f.asm b/jcqnts2f.asm
deleted file mode 100644
index faf663e..0000000
--- a/jcqnts2f.asm
+++ /dev/null
@@ -1,178 +0,0 @@
-;
-; jcqnts2f.asm - sample data conversion and quantization (SSE & SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : January 18, 2005
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-%ifdef JFDCT_FLT_SSE_SSE2_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Load data into workspace, applying unsigned->signed conversion
-;
-; GLOBAL(void)
-; jpeg_convsamp_flt_sse2 (JSAMPARRAY sample_data, JDIMENSION start_col,
-; FAST_FLOAT * workspace);
-;
-
-%define sample_data ebp+8 ; JSAMPARRAY sample_data
-%define start_col ebp+12 ; JDIMENSION start_col
-%define workspace ebp+16 ; FAST_FLOAT * workspace
-
- align 16
- global EXTN(jpeg_convsamp_flt_sse2)
-
-EXTN(jpeg_convsamp_flt_sse2):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- pcmpeqw xmm7,xmm7
- psllw xmm7,7
- packsswb xmm7,xmm7 ; xmm7 = PB_CENTERJSAMPLE (0x808080..)
-
- mov esi, JSAMPARRAY [sample_data] ; (JSAMPROW *)
- mov eax, JDIMENSION [start_col]
- mov edi, POINTER [workspace] ; (DCTELEM *)
- mov ecx, DCTSIZE/2
- alignx 16,7
-.convloop:
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; (JSAMPLE *)
- mov edx, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; (JSAMPLE *)
-
- movq xmm0, _MMWORD [ebx+eax*SIZEOF_JSAMPLE]
- movq xmm1, _MMWORD [edx+eax*SIZEOF_JSAMPLE]
-
- psubb xmm0,xmm7 ; xmm0=(01234567)
- psubb xmm1,xmm7 ; xmm1=(89ABCDEF)
-
- punpcklbw xmm0,xmm0 ; xmm0=(*0*1*2*3*4*5*6*7)
- punpcklbw xmm1,xmm1 ; xmm1=(*8*9*A*B*C*D*E*F)
-
- punpcklwd xmm2,xmm0 ; xmm2=(***0***1***2***3)
- punpckhwd xmm0,xmm0 ; xmm0=(***4***5***6***7)
- punpcklwd xmm3,xmm1 ; xmm3=(***8***9***A***B)
- punpckhwd xmm1,xmm1 ; xmm1=(***C***D***E***F)
-
- psrad xmm2,(DWORD_BIT-BYTE_BIT) ; xmm2=(0123)
- psrad xmm0,(DWORD_BIT-BYTE_BIT) ; xmm0=(4567)
- cvtdq2ps xmm2,xmm2 ; xmm2=(0123)
- cvtdq2ps xmm0,xmm0 ; xmm0=(4567)
- psrad xmm3,(DWORD_BIT-BYTE_BIT) ; xmm3=(89AB)
- psrad xmm1,(DWORD_BIT-BYTE_BIT) ; xmm1=(CDEF)
- cvtdq2ps xmm3,xmm3 ; xmm3=(89AB)
- cvtdq2ps xmm1,xmm1 ; xmm1=(CDEF)
-
- movaps XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], xmm2
- movaps XMMWORD [XMMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], xmm0
- movaps XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], xmm3
- movaps XMMWORD [XMMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], xmm1
-
- add esi, byte 2*SIZEOF_JSAMPROW
- add edi, byte 2*DCTSIZE*SIZEOF_FAST_FLOAT
- dec ecx
- jnz short .convloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-
-; --------------------------------------------------------------------------
-;
-; Quantize/descale the coefficients, and store into coef_block
-;
-; GLOBAL(void)
-; jpeg_quantize_flt_sse2 (JCOEFPTR coef_block, FAST_FLOAT * divisors,
-; FAST_FLOAT * workspace);
-;
-
-%define coef_block ebp+8 ; JCOEFPTR coef_block
-%define divisors ebp+12 ; FAST_FLOAT * divisors
-%define workspace ebp+16 ; FAST_FLOAT * workspace
-
- align 16
- global EXTN(jpeg_quantize_flt_sse2)
-
-EXTN(jpeg_quantize_flt_sse2):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; unused
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov esi, POINTER [workspace]
- mov edx, POINTER [divisors]
- mov edi, JCOEFPTR [coef_block]
- mov eax, DCTSIZE2/16
- alignx 16,7
-.quantloop:
- movaps xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(0,1,esi,SIZEOF_FAST_FLOAT)]
- mulps xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)]
- mulps xmm1, XMMWORD [XMMBLOCK(0,1,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm2, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(1,1,esi,SIZEOF_FAST_FLOAT)]
- mulps xmm2, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)]
- mulps xmm3, XMMWORD [XMMBLOCK(1,1,edx,SIZEOF_FAST_FLOAT)]
-
- cvtps2dq xmm0,xmm0
- cvtps2dq xmm1,xmm1
- cvtps2dq xmm2,xmm2
- cvtps2dq xmm3,xmm3
-
- packssdw xmm0,xmm1
- packssdw xmm2,xmm3
-
- movdqa XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_JCOEF)], xmm0
- movdqa XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_JCOEF)], xmm2
-
- add esi, byte 16*SIZEOF_FAST_FLOAT
- add edx, byte 16*SIZEOF_FAST_FLOAT
- add edi, byte 16*SIZEOF_JCOEF
- dec eax
- jnz short .quantloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; unused
-; pop ebx ; unused
- pop ebp
- ret
-
-%endif ; JFDCT_FLT_SSE_SSE2_SUPPORTED
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/jcqnts2i.asm b/jcqnts2i.asm
deleted file mode 100644
index 71bae2c..0000000
--- a/jcqnts2i.asm
+++ /dev/null
@@ -1,216 +0,0 @@
-;
-; jcqnts2i.asm - sample data conversion and quantization (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : January 27, 2005
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef JFDCT_INT_SSE2_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Load data into workspace, applying unsigned->signed conversion
-;
-; GLOBAL(void)
-; jpeg_convsamp_int_sse2 (JSAMPARRAY sample_data, JDIMENSION start_col,
-; DCTELEM * workspace);
-;
-
-%define sample_data ebp+8 ; JSAMPARRAY sample_data
-%define start_col ebp+12 ; JDIMENSION start_col
-%define workspace ebp+16 ; DCTELEM * workspace
-
- align 16
- global EXTN(jpeg_convsamp_int_sse2)
-
-EXTN(jpeg_convsamp_int_sse2):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- pxor xmm6,xmm6 ; xmm6=(all 0's)
- pcmpeqw xmm7,xmm7
- psllw xmm7,7 ; xmm7={0xFF80 0xFF80 0xFF80 0xFF80 ..}
-
- mov esi, JSAMPARRAY [sample_data] ; (JSAMPROW *)
- mov eax, JDIMENSION [start_col]
- mov edi, POINTER [workspace] ; (DCTELEM *)
- mov ecx, DCTSIZE/4
- alignx 16,7
-.convloop:
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; (JSAMPLE *)
- mov edx, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; (JSAMPLE *)
-
- movq xmm0, _MMWORD [ebx+eax*SIZEOF_JSAMPLE] ; xmm0=(01234567)
- movq xmm1, _MMWORD [edx+eax*SIZEOF_JSAMPLE] ; xmm1=(89ABCDEF)
-
- mov ebx, JSAMPROW [esi+2*SIZEOF_JSAMPROW] ; (JSAMPLE *)
- mov edx, JSAMPROW [esi+3*SIZEOF_JSAMPROW] ; (JSAMPLE *)
-
- movq xmm2, _MMWORD [ebx+eax*SIZEOF_JSAMPLE] ; xmm2=(GHIJKLMN)
- movq xmm3, _MMWORD [edx+eax*SIZEOF_JSAMPLE] ; xmm3=(OPQRSTUV)
-
- punpcklbw xmm0,xmm6 ; xmm0=(01234567)
- punpcklbw xmm1,xmm6 ; xmm1=(89ABCDEF)
- paddw xmm0,xmm7
- paddw xmm1,xmm7
- punpcklbw xmm2,xmm6 ; xmm2=(GHIJKLMN)
- punpcklbw xmm3,xmm6 ; xmm3=(OPQRSTUV)
- paddw xmm2,xmm7
- paddw xmm3,xmm7
-
- movdqa XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_DCTELEM)], xmm0
- movdqa XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_DCTELEM)], xmm1
- movdqa XMMWORD [XMMBLOCK(2,0,edi,SIZEOF_DCTELEM)], xmm2
- movdqa XMMWORD [XMMBLOCK(3,0,edi,SIZEOF_DCTELEM)], xmm3
-
- add esi, byte 4*SIZEOF_JSAMPROW
- add edi, byte 4*DCTSIZE*SIZEOF_DCTELEM
- dec ecx
- jnz short .convloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%ifndef JFDCT_INT_QUANTIZE_WITH_DIVISION
-
-; --------------------------------------------------------------------------
-;
-; Quantize/descale the coefficients, and store into coef_block
-;
-; This implementation is based on an algorithm described in
-; "How to optimize for the Pentium family of microprocessors"
-; (http://www.agner.org/assem/).
-;
-; GLOBAL(void)
-; jpeg_quantize_int_sse2 (JCOEFPTR coef_block, DCTELEM * divisors,
-; DCTELEM * workspace);
-;
-
-%define RECIPROCAL(m,n,b) XMMBLOCK(DCTSIZE*0+(m),(n),(b),SIZEOF_DCTELEM)
-%define CORRECTION(m,n,b) XMMBLOCK(DCTSIZE*1+(m),(n),(b),SIZEOF_DCTELEM)
-%define SCALE(m,n,b) XMMBLOCK(DCTSIZE*2+(m),(n),(b),SIZEOF_DCTELEM)
-
-%define coef_block ebp+8 ; JCOEFPTR coef_block
-%define divisors ebp+12 ; DCTELEM * divisors
-%define workspace ebp+16 ; DCTELEM * workspace
-
- align 16
- global EXTN(jpeg_quantize_int_sse2)
-
-EXTN(jpeg_quantize_int_sse2):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; unused
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov esi, POINTER [workspace]
- mov edx, POINTER [divisors]
- mov edi, JCOEFPTR [coef_block]
- mov eax, DCTSIZE2/32
- alignx 16,7
-.quantloop:
- movdqa xmm4, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_DCTELEM)]
- movdqa xmm5, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_DCTELEM)]
- movdqa xmm6, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_DCTELEM)]
- movdqa xmm7, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_DCTELEM)]
- movdqa xmm0,xmm4
- movdqa xmm1,xmm5
- movdqa xmm2,xmm6
- movdqa xmm3,xmm7
- psraw xmm4,(WORD_BIT-1)
- psraw xmm5,(WORD_BIT-1)
- psraw xmm6,(WORD_BIT-1)
- psraw xmm7,(WORD_BIT-1)
- pxor xmm0,xmm4
- pxor xmm1,xmm5
- pxor xmm2,xmm6
- pxor xmm3,xmm7
- psubw xmm0,xmm4 ; if (xmm0 < 0) xmm0 = -xmm0;
- psubw xmm1,xmm5 ; if (xmm1 < 0) xmm1 = -xmm1;
- psubw xmm2,xmm6 ; if (xmm2 < 0) xmm2 = -xmm2;
- psubw xmm3,xmm7 ; if (xmm3 < 0) xmm3 = -xmm3;
-
- paddw xmm0, XMMWORD [CORRECTION(0,0,edx)] ; correction + roundfactor
- paddw xmm1, XMMWORD [CORRECTION(1,0,edx)]
- paddw xmm2, XMMWORD [CORRECTION(2,0,edx)]
- paddw xmm3, XMMWORD [CORRECTION(3,0,edx)]
- psllw xmm0,1
- psllw xmm1,1
- psllw xmm2,1
- psllw xmm3,1
- pmulhuw xmm0, XMMWORD [RECIPROCAL(0,0,edx)] ; reciprocal
- pmulhuw xmm1, XMMWORD [RECIPROCAL(1,0,edx)]
- pmulhuw xmm2, XMMWORD [RECIPROCAL(2,0,edx)]
- pmulhuw xmm3, XMMWORD [RECIPROCAL(3,0,edx)]
- psllw xmm0,1
- psllw xmm1,1
- psllw xmm2,1
- psllw xmm3,1
- pmulhuw xmm0, XMMWORD [SCALE(0,0,edx)] ; scale
- pmulhuw xmm1, XMMWORD [SCALE(1,0,edx)]
- pmulhuw xmm2, XMMWORD [SCALE(2,0,edx)]
- pmulhuw xmm3, XMMWORD [SCALE(3,0,edx)]
-
- pxor xmm0,xmm4
- pxor xmm1,xmm5
- pxor xmm2,xmm6
- pxor xmm3,xmm7
- psubw xmm0,xmm4
- psubw xmm1,xmm5
- psubw xmm2,xmm6
- psubw xmm3,xmm7
- movdqa XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_DCTELEM)], xmm0
- movdqa XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_DCTELEM)], xmm1
- movdqa XMMWORD [XMMBLOCK(2,0,edi,SIZEOF_DCTELEM)], xmm2
- movdqa XMMWORD [XMMBLOCK(3,0,edi,SIZEOF_DCTELEM)], xmm3
-
- add esi, byte 32*SIZEOF_DCTELEM
- add edx, byte 32*SIZEOF_DCTELEM
- add edi, byte 32*SIZEOF_JCOEF
- dec eax
- jnz near .quantloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; unused
-; pop ebx ; unused
- pop ebp
- ret
-
-%endif ; !JFDCT_INT_QUANTIZE_WITH_DIVISION
-%endif ; JFDCT_INT_SSE2_SUPPORTED
diff --git a/jcqntsse.asm b/jcqntsse.asm
deleted file mode 100644
index fe99a20..0000000
--- a/jcqntsse.asm
+++ /dev/null
@@ -1,218 +0,0 @@
-;
-; jcqntsse.asm - sample data conversion and quantization (SSE & MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : January 12, 2005
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-%ifdef JFDCT_FLT_SSE_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Load data into workspace, applying unsigned->signed conversion
-;
-; GLOBAL(void)
-; jpeg_convsamp_flt_sse (JSAMPARRAY sample_data, JDIMENSION start_col,
-; FAST_FLOAT * workspace);
-;
-
-%define sample_data ebp+8 ; JSAMPARRAY sample_data
-%define start_col ebp+12 ; JDIMENSION start_col
-%define workspace ebp+16 ; FAST_FLOAT * workspace
-
- align 16
- global EXTN(jpeg_convsamp_flt_sse)
-
-EXTN(jpeg_convsamp_flt_sse):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- pcmpeqw mm7,mm7
- psllw mm7,7
- packsswb mm7,mm7 ; mm7 = PB_CENTERJSAMPLE (0x808080..)
-
- mov esi, JSAMPARRAY [sample_data] ; (JSAMPROW *)
- mov eax, JDIMENSION [start_col]
- mov edi, POINTER [workspace] ; (DCTELEM *)
- mov ecx, DCTSIZE/2
- alignx 16,7
-.convloop:
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; (JSAMPLE *)
- mov edx, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; (JSAMPLE *)
-
- movq mm0, MMWORD [ebx+eax*SIZEOF_JSAMPLE]
- movq mm1, MMWORD [edx+eax*SIZEOF_JSAMPLE]
-
- psubb mm0,mm7 ; mm0=(01234567)
- psubb mm1,mm7 ; mm1=(89ABCDEF)
-
- punpcklbw mm2,mm0 ; mm2=(*0*1*2*3)
- punpckhbw mm0,mm0 ; mm0=(*4*5*6*7)
- punpcklbw mm3,mm1 ; mm3=(*8*9*A*B)
- punpckhbw mm1,mm1 ; mm1=(*C*D*E*F)
-
- punpcklwd mm4,mm2 ; mm4=(***0***1)
- punpckhwd mm2,mm2 ; mm2=(***2***3)
- punpcklwd mm5,mm0 ; mm5=(***4***5)
- punpckhwd mm0,mm0 ; mm0=(***6***7)
-
- psrad mm4,(DWORD_BIT-BYTE_BIT) ; mm4=(01)
- psrad mm2,(DWORD_BIT-BYTE_BIT) ; mm2=(23)
- cvtpi2ps xmm0,mm4 ; xmm0=(01**)
- cvtpi2ps xmm1,mm2 ; xmm1=(23**)
- psrad mm5,(DWORD_BIT-BYTE_BIT) ; mm5=(45)
- psrad mm0,(DWORD_BIT-BYTE_BIT) ; mm0=(67)
- cvtpi2ps xmm2,mm5 ; xmm2=(45**)
- cvtpi2ps xmm3,mm0 ; xmm3=(67**)
-
- punpcklwd mm6,mm3 ; mm6=(***8***9)
- punpckhwd mm3,mm3 ; mm3=(***A***B)
- punpcklwd mm4,mm1 ; mm4=(***C***D)
- punpckhwd mm1,mm1 ; mm1=(***E***F)
-
- psrad mm6,(DWORD_BIT-BYTE_BIT) ; mm6=(89)
- psrad mm3,(DWORD_BIT-BYTE_BIT) ; mm3=(AB)
- cvtpi2ps xmm4,mm6 ; xmm4=(89**)
- cvtpi2ps xmm5,mm3 ; xmm5=(AB**)
- psrad mm4,(DWORD_BIT-BYTE_BIT) ; mm4=(CD)
- psrad mm1,(DWORD_BIT-BYTE_BIT) ; mm1=(EF)
- cvtpi2ps xmm6,mm4 ; xmm6=(CD**)
- cvtpi2ps xmm7,mm1 ; xmm7=(EF**)
-
- movlhps xmm0,xmm1 ; xmm0=(0123)
- movlhps xmm2,xmm3 ; xmm2=(4567)
- movlhps xmm4,xmm5 ; xmm4=(89AB)
- movlhps xmm6,xmm7 ; xmm6=(CDEF)
-
- movaps XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], xmm0
- movaps XMMWORD [XMMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], xmm2
- movaps XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], xmm4
- movaps XMMWORD [XMMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], xmm6
-
- add esi, byte 2*SIZEOF_JSAMPROW
- add edi, byte 2*DCTSIZE*SIZEOF_FAST_FLOAT
- dec ecx
- jnz near .convloop
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-
-; --------------------------------------------------------------------------
-;
-; Quantize/descale the coefficients, and store into coef_block
-;
-; GLOBAL(void)
-; jpeg_quantize_flt_sse (JCOEFPTR coef_block, FAST_FLOAT * divisors,
-; FAST_FLOAT * workspace);
-;
-
-%define coef_block ebp+8 ; JCOEFPTR coef_block
-%define divisors ebp+12 ; FAST_FLOAT * divisors
-%define workspace ebp+16 ; FAST_FLOAT * workspace
-
- align 16
- global EXTN(jpeg_quantize_flt_sse)
-
-EXTN(jpeg_quantize_flt_sse):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; unused
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov esi, POINTER [workspace]
- mov edx, POINTER [divisors]
- mov edi, JCOEFPTR [coef_block]
- mov eax, DCTSIZE2/16
- alignx 16,7
-.quantloop:
- movaps xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(0,1,esi,SIZEOF_FAST_FLOAT)]
- mulps xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)]
- mulps xmm1, XMMWORD [XMMBLOCK(0,1,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm2, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(1,1,esi,SIZEOF_FAST_FLOAT)]
- mulps xmm2, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)]
- mulps xmm3, XMMWORD [XMMBLOCK(1,1,edx,SIZEOF_FAST_FLOAT)]
-
- movhlps xmm4,xmm0
- movhlps xmm5,xmm1
-
- cvtps2pi mm0,xmm0
- cvtps2pi mm1,xmm1
- cvtps2pi mm4,xmm4
- cvtps2pi mm5,xmm5
-
- movhlps xmm6,xmm2
- movhlps xmm7,xmm3
-
- cvtps2pi mm2,xmm2
- cvtps2pi mm3,xmm3
- cvtps2pi mm6,xmm6
- cvtps2pi mm7,xmm7
-
- packssdw mm0,mm4
- packssdw mm1,mm5
- packssdw mm2,mm6
- packssdw mm3,mm7
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_JCOEF)], mm3
-
- add esi, byte 16*SIZEOF_FAST_FLOAT
- add edx, byte 16*SIZEOF_FAST_FLOAT
- add edi, byte 16*SIZEOF_JCOEF
- dec eax
- jnz short .quantloop
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; unused
-; pop ebx ; unused
- pop ebp
- ret
-
-%endif ; JFDCT_FLT_SSE_MMX_SUPPORTED
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/jcsammmx.asm b/jcsammmx.asm
deleted file mode 100644
index 95fc825..0000000
--- a/jcsammmx.asm
+++ /dev/null
@@ -1,328 +0,0 @@
-;
-; jcsammmx.asm - downsampling (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : January 23, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%ifdef JCSAMPLE_MMX_SUPPORTED
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Downsample pixel values of a single component.
-; This version handles the common case of 2:1 horizontal and 1:1 vertical,
-; without smoothing.
-;
-; GLOBAL(void)
-; jpeg_h2v1_downsample_mmx (j_compress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data, JSAMPARRAY output_data);
-;
-
-%define cinfo(b) (b)+8 ; j_compress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data(b) (b)+20 ; JSAMPARRAY output_data
-
- align 16
- global EXTN(jpeg_h2v1_downsample_mmx)
-
-EXTN(jpeg_h2v1_downsample_mmx):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov ecx, POINTER [compptr(ebp)]
- mov ecx, JDIMENSION [jcompinfo_width_in_blocks(ecx)]
- shl ecx,3 ; imul ecx,DCTSIZE (ecx = output_cols)
- jz near .return
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, JDIMENSION [jcstruct_image_width(edx)]
-
- ; -- expand_right_edge
-
- push ecx
- shl ecx,1 ; output_cols * 2
- sub ecx,edx
- jle short .expand_end
-
- mov eax, POINTER [cinfo(ebp)]
- mov eax, INT [jcstruct_max_v_samp_factor(eax)]
- test eax,eax
- jle short .expand_end
-
- cld
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- alignx 16,7
-.expandloop:
- push eax
- push ecx
-
- mov edi, JSAMPROW [esi]
- add edi,edx
- mov al, JSAMPLE [edi-1]
-
- rep stosb
-
- pop ecx
- pop eax
-
- add esi, byte SIZEOF_JSAMPROW
- dec eax
- jg short .expandloop
-
-.expand_end:
- pop ecx ; output_cols
-
- ; -- h2v1_downsample
-
- mov eax, POINTER [compptr(ebp)]
- mov eax, JDIMENSION [jcompinfo_v_samp_factor(eax)] ; rowctr
- test eax,eax
- jle short .return
-
- mov edx, 0x00010000 ; bias pattern
- movd mm7,edx
- pcmpeqw mm6,mm6
- punpckldq mm7,mm7 ; mm7={0, 1, 0, 1}
- psrlw mm6,BYTE_BIT ; mm6={0xFF 0x00 0xFF 0x00 ..}
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, JSAMPARRAY [output_data(ebp)] ; output_data
- alignx 16,7
-.rowloop:
- push ecx
- push edi
- push esi
-
- mov esi, JSAMPROW [esi] ; inptr
- mov edi, JSAMPROW [edi] ; outptr
- alignx 16,7
-.columnloop:
-
- movq mm0, MMWORD [esi+0*SIZEOF_MMWORD]
- movq mm1, MMWORD [esi+1*SIZEOF_MMWORD]
- movq mm2,mm0
- movq mm3,mm1
-
- pand mm0,mm6
- psrlw mm2,BYTE_BIT
- pand mm1,mm6
- psrlw mm3,BYTE_BIT
-
- paddw mm0,mm2
- paddw mm1,mm3
- paddw mm0,mm7
- paddw mm1,mm7
- psrlw mm0,1
- psrlw mm1,1
-
- packuswb mm0,mm1
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mm0
-
- add esi, byte 2*SIZEOF_MMWORD ; inptr
- add edi, byte 1*SIZEOF_MMWORD ; outptr
- sub ecx, byte SIZEOF_MMWORD ; outcol
- jnz short .columnloop
-
- pop esi
- pop edi
- pop ecx
-
- add esi, byte SIZEOF_JSAMPROW ; input_data
- add edi, byte SIZEOF_JSAMPROW ; output_data
- dec eax ; rowctr
- jg short .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
-; pop ebx ; unused
- pop ebp
- ret
-
-; --------------------------------------------------------------------------
-;
-; Downsample pixel values of a single component.
-; This version handles the standard case of 2:1 horizontal and 2:1 vertical,
-; without smoothing.
-;
-; GLOBAL(void)
-; jpeg_h2v2_downsample_mmx (j_compress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data, JSAMPARRAY output_data);
-;
-
-%define cinfo(b) (b)+8 ; j_compress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data(b) (b)+20 ; JSAMPARRAY output_data
-
- align 16
- global EXTN(jpeg_h2v2_downsample_mmx)
-
-EXTN(jpeg_h2v2_downsample_mmx):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov ecx, POINTER [compptr(ebp)]
- mov ecx, JDIMENSION [jcompinfo_width_in_blocks(ecx)]
- shl ecx,3 ; imul ecx,DCTSIZE (ecx = output_cols)
- jz near .return
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, JDIMENSION [jcstruct_image_width(edx)]
-
- ; -- expand_right_edge
-
- push ecx
- shl ecx,1 ; output_cols * 2
- sub ecx,edx
- jle short .expand_end
-
- mov eax, POINTER [cinfo(ebp)]
- mov eax, INT [jcstruct_max_v_samp_factor(eax)]
- test eax,eax
- jle short .expand_end
-
- cld
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- alignx 16,7
-.expandloop:
- push eax
- push ecx
-
- mov edi, JSAMPROW [esi]
- add edi,edx
- mov al, JSAMPLE [edi-1]
-
- rep stosb
-
- pop ecx
- pop eax
-
- add esi, byte SIZEOF_JSAMPROW
- dec eax
- jg short .expandloop
-
-.expand_end:
- pop ecx ; output_cols
-
- ; -- h2v2_downsample
-
- mov eax, POINTER [compptr(ebp)]
- mov eax, JDIMENSION [jcompinfo_v_samp_factor(eax)] ; rowctr
- test eax,eax
- jle near .return
-
- mov edx, 0x00020001 ; bias pattern
- movd mm7,edx
- pcmpeqw mm6,mm6
- punpckldq mm7,mm7 ; mm7={1, 2, 1, 2}
- psrlw mm6,BYTE_BIT ; mm6={0xFF 0x00 0xFF 0x00 ..}
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, JSAMPARRAY [output_data(ebp)] ; output_data
- alignx 16,7
-.rowloop:
- push ecx
- push edi
- push esi
-
- mov edx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; inptr0
- mov esi, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; inptr1
- mov edi, JSAMPROW [edi] ; outptr
- alignx 16,7
-.columnloop:
-
- movq mm0, MMWORD [edx+0*SIZEOF_MMWORD]
- movq mm1, MMWORD [esi+0*SIZEOF_MMWORD]
- movq mm2, MMWORD [edx+1*SIZEOF_MMWORD]
- movq mm3, MMWORD [esi+1*SIZEOF_MMWORD]
-
- movq mm4,mm0
- movq mm5,mm1
- pand mm0,mm6
- psrlw mm4,BYTE_BIT
- pand mm1,mm6
- psrlw mm5,BYTE_BIT
- paddw mm0,mm4
- paddw mm1,mm5
-
- movq mm4,mm2
- movq mm5,mm3
- pand mm2,mm6
- psrlw mm4,BYTE_BIT
- pand mm3,mm6
- psrlw mm5,BYTE_BIT
- paddw mm2,mm4
- paddw mm3,mm5
-
- paddw mm0,mm1
- paddw mm2,mm3
- paddw mm0,mm7
- paddw mm2,mm7
- psrlw mm0,2
- psrlw mm2,2
-
- packuswb mm0,mm2
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mm0
-
- add edx, byte 2*SIZEOF_MMWORD ; inptr0
- add esi, byte 2*SIZEOF_MMWORD ; inptr1
- add edi, byte 1*SIZEOF_MMWORD ; outptr
- sub ecx, byte SIZEOF_MMWORD ; outcol
- jnz near .columnloop
-
- pop esi
- pop edi
- pop ecx
-
- add esi, byte 2*SIZEOF_JSAMPROW ; input_data
- add edi, byte 1*SIZEOF_JSAMPROW ; output_data
- dec eax ; rowctr
- jg near .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
-; pop ebx ; unused
- pop ebp
- ret
-
-%endif ; JCSAMPLE_MMX_SUPPORTED
diff --git a/jcsample.c b/jcsample.c
index 9af7f15..eea376f 100644
--- a/jcsample.c
+++ b/jcsample.c
@@ -2,16 +2,10 @@
* jcsample.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 5, 2006
- * ---------------------------------------------------------------------
- *
* This file contains downsampling routines.
*
* Downsampling input data is counted in "row groups". A row group
@@ -55,7 +49,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "jcolsamp.h" /* Private declarations */
+#include "jsimd.h"
/* Pointer to routine to downsample a single component */
@@ -475,7 +469,6 @@
int ci;
jpeg_component_info * compptr;
boolean smoothok = TRUE;
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
downsample = (my_downsample_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -503,17 +496,10 @@
} else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&
compptr->v_samp_factor == cinfo->max_v_samp_factor) {
smoothok = FALSE;
-#ifdef JCSAMPLE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2)
- downsample->methods[ci] = jpeg_h2v1_downsample_sse2;
+ if (jsimd_can_h2v1_downsample())
+ downsample->methods[ci] = jsimd_h2v1_downsample;
else
-#endif
-#ifdef JCSAMPLE_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- downsample->methods[ci] = jpeg_h2v1_downsample_mmx;
- else
-#endif
- downsample->methods[ci] = h2v1_downsample;
+ downsample->methods[ci] = h2v1_downsample;
} else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor &&
compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) {
#ifdef INPUT_SMOOTHING_SUPPORTED
@@ -522,17 +508,10 @@
downsample->pub.need_context_rows = TRUE;
} else
#endif
-#ifdef JCSAMPLE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2)
- downsample->methods[ci] = jpeg_h2v2_downsample_sse2;
- else
-#endif
-#ifdef JCSAMPLE_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- downsample->methods[ci] = jpeg_h2v2_downsample_mmx;
- else
-#endif
- downsample->methods[ci] = h2v2_downsample;
+ if (jsimd_can_h2v2_downsample())
+ downsample->methods[ci] = jsimd_h2v2_downsample;
+ else
+ downsample->methods[ci] = h2v2_downsample;
} else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 &&
(cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) {
smoothok = FALSE;
@@ -546,25 +525,3 @@
TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL);
#endif
}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-GLOBAL(unsigned int)
-jpeg_simd_downsampler (j_compress_ptr cinfo)
-{
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
-
-#ifdef JCSAMPLE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2)
- return JSIMD_SSE2;
-#endif
-#ifdef JCSAMPLE_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
-
- return JSIMD_NONE;
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
diff --git a/jcsamss2.asm b/jcsamss2.asm
deleted file mode 100644
index e187d63..0000000
--- a/jcsamss2.asm
+++ /dev/null
@@ -1,355 +0,0 @@
-;
-; jcsamss2.asm - downsampling (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : January 23, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%ifdef JCSAMPLE_SSE2_SUPPORTED
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Downsample pixel values of a single component.
-; This version handles the common case of 2:1 horizontal and 1:1 vertical,
-; without smoothing.
-;
-; GLOBAL(void)
-; jpeg_h2v1_downsample_sse2 (j_compress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data, JSAMPARRAY output_data);
-;
-
-%define cinfo(b) (b)+8 ; j_compress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data(b) (b)+20 ; JSAMPARRAY output_data
-
- align 16
- global EXTN(jpeg_h2v1_downsample_sse2)
-
-EXTN(jpeg_h2v1_downsample_sse2):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov ecx, POINTER [compptr(ebp)]
- mov ecx, JDIMENSION [jcompinfo_width_in_blocks(ecx)]
- shl ecx,3 ; imul ecx,DCTSIZE (ecx = output_cols)
- jz near .return
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, JDIMENSION [jcstruct_image_width(edx)]
-
- ; -- expand_right_edge
-
- push ecx
- shl ecx,1 ; output_cols * 2
- sub ecx,edx
- jle short .expand_end
-
- mov eax, POINTER [cinfo(ebp)]
- mov eax, INT [jcstruct_max_v_samp_factor(eax)]
- test eax,eax
- jle short .expand_end
-
- cld
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- alignx 16,7
-.expandloop:
- push eax
- push ecx
-
- mov edi, JSAMPROW [esi]
- add edi,edx
- mov al, JSAMPLE [edi-1]
-
- rep stosb
-
- pop ecx
- pop eax
-
- add esi, byte SIZEOF_JSAMPROW
- dec eax
- jg short .expandloop
-
-.expand_end:
- pop ecx ; output_cols
-
- ; -- h2v1_downsample
-
- mov eax, POINTER [compptr(ebp)]
- mov eax, JDIMENSION [jcompinfo_v_samp_factor(eax)] ; rowctr
- test eax,eax
- jle near .return
-
- mov edx, 0x00010000 ; bias pattern
- movd xmm7,edx
- pcmpeqw xmm6,xmm6
- pshufd xmm7,xmm7,0x00 ; xmm7={0, 1, 0, 1, 0, 1, 0, 1}
- psrlw xmm6,BYTE_BIT ; xmm6={0xFF 0x00 0xFF 0x00 ..}
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, JSAMPARRAY [output_data(ebp)] ; output_data
- alignx 16,7
-.rowloop:
- push ecx
- push edi
- push esi
-
- mov esi, JSAMPROW [esi] ; inptr
- mov edi, JSAMPROW [edi] ; outptr
-
- cmp ecx, byte SIZEOF_XMMWORD
- jae short .columnloop
- alignx 16,7
-
-.columnloop_r8:
- movdqa xmm0, XMMWORD [esi+0*SIZEOF_XMMWORD]
- pxor xmm1,xmm1
- mov ecx, SIZEOF_XMMWORD
- jmp short .downsample
- alignx 16,7
-
-.columnloop:
- movdqa xmm0, XMMWORD [esi+0*SIZEOF_XMMWORD]
- movdqa xmm1, XMMWORD [esi+1*SIZEOF_XMMWORD]
-
-.downsample:
- movdqa xmm2,xmm0
- movdqa xmm3,xmm1
-
- pand xmm0,xmm6
- psrlw xmm2,BYTE_BIT
- pand xmm1,xmm6
- psrlw xmm3,BYTE_BIT
-
- paddw xmm0,xmm2
- paddw xmm1,xmm3
- paddw xmm0,xmm7
- paddw xmm1,xmm7
- psrlw xmm0,1
- psrlw xmm1,1
-
- packuswb xmm0,xmm1
-
- movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm0
-
- sub ecx, byte SIZEOF_XMMWORD ; outcol
- add esi, byte 2*SIZEOF_XMMWORD ; inptr
- add edi, byte 1*SIZEOF_XMMWORD ; outptr
- cmp ecx, byte SIZEOF_XMMWORD
- jae short .columnloop
- test ecx,ecx
- jnz short .columnloop_r8
-
- pop esi
- pop edi
- pop ecx
-
- add esi, byte SIZEOF_JSAMPROW ; input_data
- add edi, byte SIZEOF_JSAMPROW ; output_data
- dec eax ; rowctr
- jg near .rowloop
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
-; pop ebx ; unused
- pop ebp
- ret
-
-; --------------------------------------------------------------------------
-;
-; Downsample pixel values of a single component.
-; This version handles the standard case of 2:1 horizontal and 2:1 vertical,
-; without smoothing.
-;
-; GLOBAL(void)
-; jpeg_h2v2_downsample_sse2 (j_compress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data, JSAMPARRAY output_data);
-;
-
-%define cinfo(b) (b)+8 ; j_compress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data(b) (b)+20 ; JSAMPARRAY output_data
-
- align 16
- global EXTN(jpeg_h2v2_downsample_sse2)
-
-EXTN(jpeg_h2v2_downsample_sse2):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov ecx, POINTER [compptr(ebp)]
- mov ecx, JDIMENSION [jcompinfo_width_in_blocks(ecx)]
- shl ecx,3 ; imul ecx,DCTSIZE (ecx = output_cols)
- jz near .return
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, JDIMENSION [jcstruct_image_width(edx)]
-
- ; -- expand_right_edge
-
- push ecx
- shl ecx,1 ; output_cols * 2
- sub ecx,edx
- jle short .expand_end
-
- mov eax, POINTER [cinfo(ebp)]
- mov eax, INT [jcstruct_max_v_samp_factor(eax)]
- test eax,eax
- jle short .expand_end
-
- cld
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- alignx 16,7
-.expandloop:
- push eax
- push ecx
-
- mov edi, JSAMPROW [esi]
- add edi,edx
- mov al, JSAMPLE [edi-1]
-
- rep stosb
-
- pop ecx
- pop eax
-
- add esi, byte SIZEOF_JSAMPROW
- dec eax
- jg short .expandloop
-
-.expand_end:
- pop ecx ; output_cols
-
- ; -- h2v2_downsample
-
- mov eax, POINTER [compptr(ebp)]
- mov eax, JDIMENSION [jcompinfo_v_samp_factor(eax)] ; rowctr
- test eax,eax
- jle near .return
-
- mov edx, 0x00020001 ; bias pattern
- movd xmm7,edx
- pcmpeqw xmm6,xmm6
- pshufd xmm7,xmm7,0x00 ; xmm7={1, 2, 1, 2, 1, 2, 1, 2}
- psrlw xmm6,BYTE_BIT ; xmm6={0xFF 0x00 0xFF 0x00 ..}
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, JSAMPARRAY [output_data(ebp)] ; output_data
- alignx 16,7
-.rowloop:
- push ecx
- push edi
- push esi
-
- mov edx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; inptr0
- mov esi, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; inptr1
- mov edi, JSAMPROW [edi] ; outptr
-
- cmp ecx, byte SIZEOF_XMMWORD
- jae short .columnloop
- alignx 16,7
-
-.columnloop_r8:
- movdqa xmm0, XMMWORD [edx+0*SIZEOF_XMMWORD]
- movdqa xmm1, XMMWORD [esi+0*SIZEOF_XMMWORD]
- pxor xmm2,xmm2
- pxor xmm3,xmm3
- mov ecx, SIZEOF_XMMWORD
- jmp short .downsample
- alignx 16,7
-
-.columnloop:
- movdqa xmm0, XMMWORD [edx+0*SIZEOF_XMMWORD]
- movdqa xmm1, XMMWORD [esi+0*SIZEOF_XMMWORD]
- movdqa xmm2, XMMWORD [edx+1*SIZEOF_XMMWORD]
- movdqa xmm3, XMMWORD [esi+1*SIZEOF_XMMWORD]
-
-.downsample:
- movdqa xmm4,xmm0
- movdqa xmm5,xmm1
- pand xmm0,xmm6
- psrlw xmm4,BYTE_BIT
- pand xmm1,xmm6
- psrlw xmm5,BYTE_BIT
- paddw xmm0,xmm4
- paddw xmm1,xmm5
-
- movdqa xmm4,xmm2
- movdqa xmm5,xmm3
- pand xmm2,xmm6
- psrlw xmm4,BYTE_BIT
- pand xmm3,xmm6
- psrlw xmm5,BYTE_BIT
- paddw xmm2,xmm4
- paddw xmm3,xmm5
-
- paddw xmm0,xmm1
- paddw xmm2,xmm3
- paddw xmm0,xmm7
- paddw xmm2,xmm7
- psrlw xmm0,2
- psrlw xmm2,2
-
- packuswb xmm0,xmm2
-
- movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm0
-
- sub ecx, byte SIZEOF_XMMWORD ; outcol
- add edx, byte 2*SIZEOF_XMMWORD ; inptr0
- add esi, byte 2*SIZEOF_XMMWORD ; inptr1
- add edi, byte 1*SIZEOF_XMMWORD ; outptr
- cmp ecx, byte SIZEOF_XMMWORD
- jae near .columnloop
- test ecx,ecx
- jnz near .columnloop_r8
-
- pop esi
- pop edi
- pop ecx
-
- add esi, byte 2*SIZEOF_JSAMPROW ; input_data
- add edi, byte 1*SIZEOF_JSAMPROW ; output_data
- dec eax ; rowctr
- jg near .rowloop
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
-; pop ebx ; unused
- pop ebp
- ret
-
-%endif ; JCSAMPLE_SSE2_SUPPORTED
diff --git a/jdcoefct.c b/jdcoefct.c
index 1a515d3..4938d20 100644
--- a/jdcoefct.c
+++ b/jdcoefct.c
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified to improve performance.
- * Last Modified : December 18, 2005
- * ---------------------------------------------------------------------
- *
* This file contains the coefficient buffer controller for decompression.
* This controller is the top level of the JPEG decompressor proper.
* The coefficient buffer lies between entropy decoding and inverse-DCT steps.
@@ -140,11 +133,6 @@
}
-#ifndef NEED_FAR_POINTERS
-#undef jzero_far
-#define jzero_far(target, bytestozero) MEMZERO(target, bytestozero)
-#endif
-
/*
* Decompress and return some data in the single-pass case.
* Always attempts to emit one fully interleaved MCU row ("iMCU" row).
@@ -162,61 +150,15 @@
JDIMENSION MCU_col_num; /* index of current MCU within row */
JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1;
JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1;
- int blkn, ci, ctr, xindex, yindex, yoffset;
+ int blkn, ci, xindex, yindex, yoffset, useful_width;
JSAMPARRAY output_ptr;
- JDIMENSION output_col;
+ JDIMENSION start_col, output_col;
jpeg_component_info *compptr;
inverse_DCT_method_ptr inverse_DCT;
- JSAMPARRAY output_ptr_blk[D_MAX_BLOCKS_IN_MCU];
- JDIMENSION output_col_off[D_MAX_BLOCKS_IN_MCU];
- jpeg_component_info *compptr_blk[D_MAX_BLOCKS_IN_MCU];
- inverse_DCT_method_ptr inverse_DCT_blk_1[D_MAX_BLOCKS_IN_MCU];
- inverse_DCT_method_ptr inverse_DCT_blk_2[D_MAX_BLOCKS_IN_MCU];
- inverse_DCT_method_ptr *inverse_DCT_blk;
/* Loop to process as much as one whole iMCU row */
for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
yoffset++) {
- /* Determine where data should go in output_buf and do the IDCT thing.
- * We skip dummy blocks at the right and bottom edges (but blkn gets
- * incremented past them!). Note the inner loop relies on having
- * allocated the MCU_buffer[] blocks sequentially.
- */
- blkn = 0; /* index of current DCT block within MCU */
- for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
- compptr = cinfo->cur_comp_info[ci];
- /* Don't bother to IDCT an uninteresting component. */
- if (! compptr->component_needed) {
- for (ctr = compptr->MCU_blocks; ctr > 0; ctr--) {
- inverse_DCT_blk_1[blkn] = inverse_DCT_blk_2[blkn] = NULL;
- blkn++;
- }
- continue;
- }
- inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index];
- output_ptr = output_buf[compptr->component_index] +
- yoffset * compptr->DCT_scaled_size;
- for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
- if (cinfo->input_iMCU_row < last_iMCU_row ||
- yoffset+yindex < compptr->last_row_height) {
- for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
- compptr_blk[blkn] = compptr;
- output_ptr_blk[blkn] = output_ptr;
- output_col_off[blkn] = xindex * compptr->DCT_scaled_size;
- inverse_DCT_blk_1[blkn] = inverse_DCT;
- inverse_DCT_blk_2[blkn] = (xindex < compptr->last_col_width) ?
- inverse_DCT : NULL;
- blkn++;
- }
- } else {
- for (ctr = compptr->MCU_width; ctr > 0; ctr--) {
- inverse_DCT_blk_1[blkn] = inverse_DCT_blk_2[blkn] = NULL;
- blkn++;
- }
- }
- output_ptr += compptr->DCT_scaled_size;
- }
- }
for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col;
MCU_col_num++) {
/* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */
@@ -228,17 +170,39 @@
coef->MCU_ctr = MCU_col_num;
return JPEG_SUSPENDED;
}
- inverse_DCT_blk = (MCU_col_num < last_MCU_col) ? inverse_DCT_blk_1
- : inverse_DCT_blk_2;
- for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- inverse_DCT = inverse_DCT_blk[blkn];
- if (inverse_DCT == NULL)
+ /* Determine where data should go in output_buf and do the IDCT thing.
+ * We skip dummy blocks at the right and bottom edges (but blkn gets
+ * incremented past them!). Note the inner loop relies on having
+ * allocated the MCU_buffer[] blocks sequentially.
+ */
+ blkn = 0; /* index of current DCT block within MCU */
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ /* Don't bother to IDCT an uninteresting component. */
+ if (! compptr->component_needed) {
+ blkn += compptr->MCU_blocks;
continue;
- compptr = compptr_blk[blkn];
- output_col = MCU_col_num * compptr->MCU_sample_width +
- output_col_off[blkn];
- (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) coef->MCU_buffer[blkn],
- output_ptr_blk[blkn], output_col);
+ }
+ inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index];
+ useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width
+ : compptr->last_col_width;
+ output_ptr = output_buf[compptr->component_index] +
+ yoffset * compptr->DCT_scaled_size;
+ start_col = MCU_col_num * compptr->MCU_sample_width;
+ for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
+ if (cinfo->input_iMCU_row < last_iMCU_row ||
+ yoffset+yindex < compptr->last_row_height) {
+ output_col = start_col;
+ for (xindex = 0; xindex < useful_width; xindex++) {
+ (*inverse_DCT) (cinfo, compptr,
+ (JCOEFPTR) coef->MCU_buffer[blkn+xindex],
+ output_ptr, output_col);
+ output_col += compptr->DCT_scaled_size;
+ }
+ }
+ blkn += compptr->MCU_width;
+ output_ptr += compptr->DCT_scaled_size;
+ }
}
}
/* Completed an MCU row, but perhaps not an iMCU row */
@@ -286,8 +250,6 @@
JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN];
JBLOCKROW buffer_ptr;
jpeg_component_info *compptr;
- int MCU_width[D_MAX_BLOCKS_IN_MCU];
- JBLOCKROW MCU_buffer_base[D_MAX_BLOCKS_IN_MCU];
/* Align the virtual buffers for the components used in this scan. */
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
@@ -305,24 +267,19 @@
/* Loop to process one whole iMCU row */
for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row;
yoffset++) {
- /* Construct list of pointers to DCT blocks belonging to this MCU */
- blkn = 0; /* index of current DCT block within MCU */
- for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
- compptr = cinfo->cur_comp_info[ci];
- for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
- buffer_ptr = buffer[ci][yindex+yoffset];
- for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
- MCU_width[blkn] = compptr->MCU_width;
- MCU_buffer_base[blkn] = buffer_ptr++;
- blkn++;
- }
- }
- }
for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row;
MCU_col_num++) {
- for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- start_col = MCU_col_num * MCU_width[blkn];
- coef->MCU_buffer[blkn] = MCU_buffer_base[blkn] + start_col;
+ /* Construct list of pointers to DCT blocks belonging to this MCU */
+ blkn = 0; /* index of current DCT block within MCU */
+ for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
+ compptr = cinfo->cur_comp_info[ci];
+ start_col = MCU_col_num * compptr->MCU_width;
+ for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
+ buffer_ptr = buffer[ci][yindex+yoffset] + start_col;
+ for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
+ coef->MCU_buffer[blkn++] = buffer_ptr++;
+ }
+ }
}
/* Try to fetch the MCU. */
if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) {
@@ -497,15 +454,6 @@
/*
- * SIMD Ext: Most of SSE/SSE2 instructions require that the memory address
- * is aligned to a 16-byte boundary; if not, a general-protection exception
- * (#GP) is generated.
- */
-
-#define ALIGN_SIZE 16 /* sizeof SSE/SSE2 register */
-#define ALIGN_MEM(p,a) ((void *) (((size_t) (p) + (a) - 1) & -(a)))
-
-/*
* Variant of decompress_data for use when doing block smoothing.
*/
@@ -523,8 +471,7 @@
jpeg_component_info *compptr;
inverse_DCT_method_ptr inverse_DCT;
boolean first_row, last_row;
- JCOEF workspace[DCTSIZE2 + ALIGN_SIZE/sizeof(JCOEF)];
- JCOEF * workptr = (JCOEF *) ALIGN_MEM(workspace, ALIGN_SIZE);
+ JBLOCK workspace;
int *coef_bits;
JQUANT_TBL *quanttbl;
INT32 Q00,Q01,Q02,Q10,Q11,Q20, num;
@@ -613,7 +560,7 @@
last_block_column = compptr->width_in_blocks - 1;
for (block_num = 0; block_num <= last_block_column; block_num++) {
/* Fetch current DCT block into workspace so we can modify it. */
- jcopy_block_row(buffer_ptr, (JBLOCKROW) workptr, (JDIMENSION) 1);
+ jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1);
/* Update DC values */
if (block_num < last_block_column) {
DC3 = (int) prev_block_row[1][0];
@@ -625,7 +572,7 @@
* and is not known to be fully accurate.
*/
/* AC01 */
- if ((Al=coef_bits[1]) != 0 && workptr[1] == 0) {
+ if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) {
num = 36 * Q00 * (DC4 - DC6);
if (num >= 0) {
pred = (int) (((Q01<<7) + num) / (Q01<<8));
@@ -637,10 +584,10 @@
pred = (1<<Al)-1;
pred = -pred;
}
- workptr[1] = (JCOEF) pred;
+ workspace[1] = (JCOEF) pred;
}
/* AC10 */
- if ((Al=coef_bits[2]) != 0 && workptr[8] == 0) {
+ if ((Al=coef_bits[2]) != 0 && workspace[8] == 0) {
num = 36 * Q00 * (DC2 - DC8);
if (num >= 0) {
pred = (int) (((Q10<<7) + num) / (Q10<<8));
@@ -652,10 +599,10 @@
pred = (1<<Al)-1;
pred = -pred;
}
- workptr[8] = (JCOEF) pred;
+ workspace[8] = (JCOEF) pred;
}
/* AC20 */
- if ((Al=coef_bits[3]) != 0 && workptr[16] == 0) {
+ if ((Al=coef_bits[3]) != 0 && workspace[16] == 0) {
num = 9 * Q00 * (DC2 + DC8 - 2*DC5);
if (num >= 0) {
pred = (int) (((Q20<<7) + num) / (Q20<<8));
@@ -667,10 +614,10 @@
pred = (1<<Al)-1;
pred = -pred;
}
- workptr[16] = (JCOEF) pred;
+ workspace[16] = (JCOEF) pred;
}
/* AC11 */
- if ((Al=coef_bits[4]) != 0 && workptr[9] == 0) {
+ if ((Al=coef_bits[4]) != 0 && workspace[9] == 0) {
num = 5 * Q00 * (DC1 - DC3 - DC7 + DC9);
if (num >= 0) {
pred = (int) (((Q11<<7) + num) / (Q11<<8));
@@ -682,10 +629,10 @@
pred = (1<<Al)-1;
pred = -pred;
}
- workptr[9] = (JCOEF) pred;
+ workspace[9] = (JCOEF) pred;
}
/* AC02 */
- if ((Al=coef_bits[5]) != 0 && workptr[2] == 0) {
+ if ((Al=coef_bits[5]) != 0 && workspace[2] == 0) {
num = 9 * Q00 * (DC4 + DC6 - 2*DC5);
if (num >= 0) {
pred = (int) (((Q02<<7) + num) / (Q02<<8));
@@ -697,10 +644,10 @@
pred = (1<<Al)-1;
pred = -pred;
}
- workptr[2] = (JCOEF) pred;
+ workspace[2] = (JCOEF) pred;
}
/* OK, do the IDCT */
- (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) workptr,
+ (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) workspace,
output_ptr, output_col);
/* Advance for next column */
DC1 = DC2; DC2 = DC3;
diff --git a/jdcolmmx.asm b/jdcolmmx.asm
deleted file mode 100644
index e46622c..0000000
--- a/jdcolmmx.asm
+++ /dev/null
@@ -1,438 +0,0 @@
-;
-; jdcolmmx.asm - colorspace conversion (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-%ifdef JDCOLOR_YCCRGB_MMX_SUPPORTED
-
-; --------------------------------------------------------------------------
-
-%define SCALEBITS 16
-
-F_0_344 equ 22554 ; FIX(0.34414)
-F_0_714 equ 46802 ; FIX(0.71414)
-F_1_402 equ 91881 ; FIX(1.40200)
-F_1_772 equ 116130 ; FIX(1.77200)
-F_0_402 equ (F_1_402 - 65536) ; FIX(1.40200) - FIX(1)
-F_0_285 equ ( 65536 - F_0_714) ; FIX(1) - FIX(0.71414)
-F_0_228 equ (131072 - F_1_772) ; FIX(2) - FIX(1.77200)
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_ycc_rgb_convert_mmx)
-
-EXTN(jconst_ycc_rgb_convert_mmx):
-
-PW_F0402 times 4 dw F_0_402
-PW_MF0228 times 4 dw -F_0_228
-PW_MF0344_F0285 times 2 dw -F_0_344, F_0_285
-PW_ONE times 4 dw 1
-PD_ONEHALF times 2 dd 1 << (SCALEBITS-1)
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Convert some rows of samples to the output colorspace.
-;
-; GLOBAL(void)
-; jpeg_ycc_rgb_convert_mmx (j_decompress_ptr cinfo,
-; JSAMPIMAGE input_buf, JDIMENSION input_row,
-; JSAMPARRAY output_buf, int num_rows)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
-%define input_row(b) (b)+16 ; JDIMENSION input_row
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define num_rows(b) (b)+24 ; int num_rows
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 2
-%define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_ycc_rgb_convert_mmx)
-
-EXTN(jpeg_ycc_rgb_convert_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov ecx, POINTER [cinfo(eax)]
- mov ecx, JDIMENSION [jdstruct_output_width(ecx)] ; num_cols
- test ecx,ecx
- jz near .return
-
- push ecx
-
- mov edi, JSAMPIMAGE [input_buf(eax)]
- mov ecx, JDIMENSION [input_row(eax)]
- mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
- lea esi, [esi+ecx*SIZEOF_JSAMPROW]
- lea ebx, [ebx+ecx*SIZEOF_JSAMPROW]
- lea edx, [edx+ecx*SIZEOF_JSAMPROW]
-
- pop ecx
-
- mov edi, JSAMPARRAY [output_buf(eax)]
- mov eax, INT [num_rows(eax)]
- test eax,eax
- jle near .return
- alignx 16,7
-.rowloop:
- push eax
- push edi
- push edx
- push ebx
- push esi
- push ecx ; col
-
- mov esi, JSAMPROW [esi] ; inptr0
- mov ebx, JSAMPROW [ebx] ; inptr1
- mov edx, JSAMPROW [edx] ; inptr2
- mov edi, JSAMPROW [edi] ; outptr
- movpic eax, POINTER [gotptr] ; load GOT address (eax)
- alignx 16,7
-.columnloop:
-
- movq mm5, MMWORD [ebx] ; mm5=Cb(01234567)
- movq mm1, MMWORD [edx] ; mm1=Cr(01234567)
-
- pcmpeqw mm4,mm4
- pcmpeqw mm7,mm7
- psrlw mm4,BYTE_BIT
- psllw mm7,7 ; mm7={0xFF80 0xFF80 0xFF80 0xFF80}
- movq mm0,mm4 ; mm0=mm4={0xFF 0x00 0xFF 0x00 ..}
-
- pand mm4,mm5 ; mm4=Cb(0246)=CbE
- psrlw mm5,BYTE_BIT ; mm5=Cb(1357)=CbO
- pand mm0,mm1 ; mm0=Cr(0246)=CrE
- psrlw mm1,BYTE_BIT ; mm1=Cr(1357)=CrO
-
- paddw mm4,mm7
- paddw mm5,mm7
- paddw mm0,mm7
- paddw mm1,mm7
-
- ; (Original)
- ; R = Y + 1.40200 * Cr
- ; G = Y - 0.34414 * Cb - 0.71414 * Cr
- ; B = Y + 1.77200 * Cb
- ;
- ; (This implementation)
- ; R = Y + 0.40200 * Cr + Cr
- ; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr
- ; B = Y - 0.22800 * Cb + Cb + Cb
-
- movq mm2,mm4 ; mm2=CbE
- movq mm3,mm5 ; mm3=CbO
- paddw mm4,mm4 ; mm4=2*CbE
- paddw mm5,mm5 ; mm5=2*CbO
- movq mm6,mm0 ; mm6=CrE
- movq mm7,mm1 ; mm7=CrO
- paddw mm0,mm0 ; mm0=2*CrE
- paddw mm1,mm1 ; mm1=2*CrO
-
- pmulhw mm4,[GOTOFF(eax,PW_MF0228)] ; mm4=(2*CbE * -FIX(0.22800))
- pmulhw mm5,[GOTOFF(eax,PW_MF0228)] ; mm5=(2*CbO * -FIX(0.22800))
- pmulhw mm0,[GOTOFF(eax,PW_F0402)] ; mm0=(2*CrE * FIX(0.40200))
- pmulhw mm1,[GOTOFF(eax,PW_F0402)] ; mm1=(2*CrO * FIX(0.40200))
-
- paddw mm4,[GOTOFF(eax,PW_ONE)]
- paddw mm5,[GOTOFF(eax,PW_ONE)]
- psraw mm4,1 ; mm4=(CbE * -FIX(0.22800))
- psraw mm5,1 ; mm5=(CbO * -FIX(0.22800))
- paddw mm0,[GOTOFF(eax,PW_ONE)]
- paddw mm1,[GOTOFF(eax,PW_ONE)]
- psraw mm0,1 ; mm0=(CrE * FIX(0.40200))
- psraw mm1,1 ; mm1=(CrO * FIX(0.40200))
-
- paddw mm4,mm2
- paddw mm5,mm3
- paddw mm4,mm2 ; mm4=(CbE * FIX(1.77200))=(B-Y)E
- paddw mm5,mm3 ; mm5=(CbO * FIX(1.77200))=(B-Y)O
- paddw mm0,mm6 ; mm0=(CrE * FIX(1.40200))=(R-Y)E
- paddw mm1,mm7 ; mm1=(CrO * FIX(1.40200))=(R-Y)O
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=(B-Y)E
- movq MMWORD [wk(1)], mm5 ; wk(1)=(B-Y)O
-
- movq mm4,mm2
- movq mm5,mm3
- punpcklwd mm2,mm6
- punpckhwd mm4,mm6
- pmaddwd mm2,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd mm4,[GOTOFF(eax,PW_MF0344_F0285)]
- punpcklwd mm3,mm7
- punpckhwd mm5,mm7
- pmaddwd mm3,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd mm5,[GOTOFF(eax,PW_MF0344_F0285)]
-
- paddd mm2,[GOTOFF(eax,PD_ONEHALF)]
- paddd mm4,[GOTOFF(eax,PD_ONEHALF)]
- psrad mm2,SCALEBITS
- psrad mm4,SCALEBITS
- paddd mm3,[GOTOFF(eax,PD_ONEHALF)]
- paddd mm5,[GOTOFF(eax,PD_ONEHALF)]
- psrad mm3,SCALEBITS
- psrad mm5,SCALEBITS
-
- packssdw mm2,mm4 ; mm2=CbE*-FIX(0.344)+CrE*FIX(0.285)
- packssdw mm3,mm5 ; mm3=CbO*-FIX(0.344)+CrO*FIX(0.285)
- psubw mm2,mm6 ; mm2=CbE*-FIX(0.344)+CrE*-FIX(0.714)=(G-Y)E
- psubw mm3,mm7 ; mm3=CbO*-FIX(0.344)+CrO*-FIX(0.714)=(G-Y)O
-
- movq mm5, MMWORD [esi] ; mm5=Y(01234567)
-
- pcmpeqw mm4,mm4
- psrlw mm4,BYTE_BIT ; mm4={0xFF 0x00 0xFF 0x00 ..}
- pand mm4,mm5 ; mm4=Y(0246)=YE
- psrlw mm5,BYTE_BIT ; mm5=Y(1357)=YO
-
- paddw mm0,mm4 ; mm0=((R-Y)E+YE)=RE=(R0 R2 R4 R6)
- paddw mm1,mm5 ; mm1=((R-Y)O+YO)=RO=(R1 R3 R5 R7)
- packuswb mm0,mm0 ; mm0=(R0 R2 R4 R6 ** ** ** **)
- packuswb mm1,mm1 ; mm1=(R1 R3 R5 R7 ** ** ** **)
-
- paddw mm2,mm4 ; mm2=((G-Y)E+YE)=GE=(G0 G2 G4 G6)
- paddw mm3,mm5 ; mm3=((G-Y)O+YO)=GO=(G1 G3 G5 G7)
- packuswb mm2,mm2 ; mm2=(G0 G2 G4 G6 ** ** ** **)
- packuswb mm3,mm3 ; mm3=(G1 G3 G5 G7 ** ** ** **)
-
- paddw mm4, MMWORD [wk(0)] ; mm4=(YE+(B-Y)E)=BE=(B0 B2 B4 B6)
- paddw mm5, MMWORD [wk(1)] ; mm5=(YO+(B-Y)O)=BO=(B1 B3 B5 B7)
- packuswb mm4,mm4 ; mm4=(B0 B2 B4 B6 ** ** ** **)
- packuswb mm5,mm5 ; mm5=(B1 B3 B5 B7 ** ** ** **)
-
-%if RGB_PIXELSIZE == 3 ; ---------------
-
- ; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
- ; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
- ; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
- ; mmG=(** ** ** ** ** ** ** **), mmH=(** ** ** ** ** ** ** **)
-
- punpcklbw mmA,mmC ; mmA=(00 10 02 12 04 14 06 16)
- punpcklbw mmE,mmB ; mmE=(20 01 22 03 24 05 26 07)
- punpcklbw mmD,mmF ; mmD=(11 21 13 23 15 25 17 27)
-
- movq mmG,mmA
- movq mmH,mmA
- punpcklwd mmA,mmE ; mmA=(00 10 20 01 02 12 22 03)
- punpckhwd mmG,mmE ; mmG=(04 14 24 05 06 16 26 07)
-
- psrlq mmH,2*BYTE_BIT ; mmH=(02 12 04 14 06 16 -- --)
- psrlq mmE,2*BYTE_BIT ; mmE=(22 03 24 05 26 07 -- --)
-
- movq mmC,mmD
- movq mmB,mmD
- punpcklwd mmD,mmH ; mmD=(11 21 02 12 13 23 04 14)
- punpckhwd mmC,mmH ; mmC=(15 25 06 16 17 27 -- --)
-
- psrlq mmB,2*BYTE_BIT ; mmB=(13 23 15 25 17 27 -- --)
-
- movq mmF,mmE
- punpcklwd mmE,mmB ; mmE=(22 03 13 23 24 05 15 25)
- punpckhwd mmF,mmB ; mmF=(26 07 17 27 -- -- -- --)
-
- punpckldq mmA,mmD ; mmA=(00 10 20 01 11 21 02 12)
- punpckldq mmE,mmG ; mmE=(22 03 13 23 04 14 24 05)
- punpckldq mmC,mmF ; mmC=(15 25 06 16 26 07 17 27)
-
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st16
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
- movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
-
- sub ecx, byte SIZEOF_MMWORD
- jz short .nextrow
-
- add esi, byte SIZEOF_MMWORD ; inptr0
- add ebx, byte SIZEOF_MMWORD ; inptr1
- add edx, byte SIZEOF_MMWORD ; inptr2
- add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr
- jmp near .columnloop
- alignx 16,7
-
-.column_st16:
- lea ecx, [ecx+ecx*2] ; imul ecx, RGB_PIXELSIZE
- cmp ecx, byte 2*SIZEOF_MMWORD
- jb short .column_st8
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
- movq mmA,mmC
- sub ecx, byte 2*SIZEOF_MMWORD
- add edi, byte 2*SIZEOF_MMWORD
- jmp short .column_st4
-.column_st8:
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st4
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq mmA,mmE
- sub ecx, byte SIZEOF_MMWORD
- add edi, byte SIZEOF_MMWORD
-.column_st4:
- movd eax,mmA
- cmp ecx, byte SIZEOF_DWORD
- jb short .column_st2
- mov DWORD [edi+0*SIZEOF_DWORD], eax
- psrlq mmA,DWORD_BIT
- movd eax,mmA
- sub ecx, byte SIZEOF_DWORD
- add edi, byte SIZEOF_DWORD
-.column_st2:
- cmp ecx, byte SIZEOF_WORD
- jb short .column_st1
- mov WORD [edi+0*SIZEOF_WORD], ax
- shr eax,WORD_BIT
- sub ecx, byte SIZEOF_WORD
- add edi, byte SIZEOF_WORD
-.column_st1:
- cmp ecx, byte SIZEOF_BYTE
- jb short .nextrow
- mov BYTE [edi+0*SIZEOF_BYTE], al
-
-%else ; RGB_PIXELSIZE == 4 ; -----------
-
-%ifdef RGBX_FILLER_0XFF
- pcmpeqb mm6,mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
- pcmpeqb mm7,mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
-%else
- pxor mm6,mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
- pxor mm7,mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
-%endif
- ; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
- ; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
- ; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
- ; mmG=(30 32 34 36 ** ** ** **), mmH=(31 33 35 37 ** ** ** **)
-
- punpcklbw mmA,mmC ; mmA=(00 10 02 12 04 14 06 16)
- punpcklbw mmE,mmG ; mmE=(20 30 22 32 24 34 26 36)
- punpcklbw mmB,mmD ; mmB=(01 11 03 13 05 15 07 17)
- punpcklbw mmF,mmH ; mmF=(21 31 23 33 25 35 27 37)
-
- movq mmC,mmA
- punpcklwd mmA,mmE ; mmA=(00 10 20 30 02 12 22 32)
- punpckhwd mmC,mmE ; mmC=(04 14 24 34 06 16 26 36)
- movq mmG,mmB
- punpcklwd mmB,mmF ; mmB=(01 11 21 31 03 13 23 33)
- punpckhwd mmG,mmF ; mmG=(05 15 25 35 07 17 27 37)
-
- movq mmD,mmA
- punpckldq mmA,mmB ; mmA=(00 10 20 30 01 11 21 31)
- punpckhdq mmD,mmB ; mmD=(02 12 22 32 03 13 23 33)
- movq mmH,mmC
- punpckldq mmC,mmG ; mmC=(04 14 24 34 05 15 25 35)
- punpckhdq mmH,mmG ; mmH=(06 16 26 36 07 17 27 37)
-
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st16
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
- movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
- movq MMWORD [edi+3*SIZEOF_MMWORD], mmH
-
- sub ecx, byte SIZEOF_MMWORD
- jz short .nextrow
-
- add esi, byte SIZEOF_MMWORD ; inptr0
- add ebx, byte SIZEOF_MMWORD ; inptr1
- add edx, byte SIZEOF_MMWORD ; inptr2
- add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr
- jmp near .columnloop
- alignx 16,7
-
-.column_st16:
- cmp ecx, byte SIZEOF_MMWORD/2
- jb short .column_st8
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
- movq mmA,mmC
- movq mmD,mmH
- sub ecx, byte SIZEOF_MMWORD/2
- add edi, byte 2*SIZEOF_MMWORD
-.column_st8:
- cmp ecx, byte SIZEOF_MMWORD/4
- jb short .column_st4
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq mmA,mmD
- sub ecx, byte SIZEOF_MMWORD/4
- add edi, byte 1*SIZEOF_MMWORD
-.column_st4:
- cmp ecx, byte SIZEOF_MMWORD/8
- jb short .nextrow
- movd DWORD [edi+0*SIZEOF_DWORD], mmA
-
-%endif ; RGB_PIXELSIZE ; ---------------
-
- alignx 16,7
-
-.nextrow:
- pop ecx
- pop esi
- pop ebx
- pop edx
- pop edi
- pop eax
-
- add esi, byte SIZEOF_JSAMPROW
- add ebx, byte SIZEOF_JSAMPROW
- add edx, byte SIZEOF_JSAMPROW
- add edi, byte SIZEOF_JSAMPROW ; output_buf
- dec eax ; num_rows
- jg near .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JDCOLOR_YCCRGB_MMX_SUPPORTED
-%endif ; RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
diff --git a/jdcolor.c b/jdcolor.c
index 9a8c7ea..d2d1483 100644
--- a/jdcolor.c
+++ b/jdcolor.c
@@ -2,23 +2,17 @@
* jdcolor.c
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 5, 2006
- * ---------------------------------------------------------------------
- *
* This file contains output colorspace conversion routines.
*/
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "jcolsamp.h" /* Private declarations */
+#include "jsimd.h"
/* Private subobject */
@@ -113,17 +107,6 @@
}
-#if RGB_PIXELSIZE == 4
-/* offset of filler byte */
-#define RGB_FILLER (6 - (RGB_RED) - (RGB_GREEN) - (RGB_BLUE))
-/* byte pattern to fill with */
-#ifdef RGBX_FILLER_0XFF
-#define RGB_FILLER_BYTE 0xFF
-#else
-#define RGB_FILLER_BYTE 0x00
-#endif
-#endif /* RGB_PIXELSIZE == 4 */
-
/*
* Convert some rows of samples to the output colorspace.
*
@@ -170,9 +153,6 @@
((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
SCALEBITS))];
outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]];
-#if RGB_PIXELSIZE == 4
- outptr[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
outptr += RGB_PIXELSIZE;
}
}
@@ -250,9 +230,6 @@
for (col = 0; col < num_cols; col++) {
/* We can dispense with GETJSAMPLE() here */
outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
-#if RGB_PIXELSIZE == 4
- outptr[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
outptr += RGB_PIXELSIZE;
}
}
@@ -330,7 +307,6 @@
{
my_cconvert_ptr cconvert;
int ci;
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
cconvert = (my_cconvert_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -384,20 +360,9 @@
case JCS_RGB:
cinfo->out_color_components = RGB_PIXELSIZE;
if (cinfo->jpeg_color_space == JCS_YCbCr) {
-#if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-#ifdef JDCOLOR_YCCRGB_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_ycc_rgb_convert_sse2)) {
- cconvert->pub.color_convert = jpeg_ycc_rgb_convert_sse2;
- } else
-#endif
-#ifdef JDCOLOR_YCCRGB_MMX_SUPPORTED
- if (simd & JSIMD_MMX) {
- cconvert->pub.color_convert = jpeg_ycc_rgb_convert_mmx;
- } else
-#endif
-#endif /* RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4 */
- {
+ if (jsimd_can_ycc_rgb())
+ cconvert->pub.color_convert = jsimd_ycc_rgb_convert;
+ else {
cconvert->pub.color_convert = ycc_rgb_convert;
build_ycc_rgb_table(cinfo);
}
@@ -435,28 +400,3 @@
else
cinfo->output_components = cinfo->out_color_components;
}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-GLOBAL(unsigned int)
-jpeg_simd_color_deconverter (j_decompress_ptr cinfo)
-{
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
-
-#if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-#ifdef JDCOLOR_YCCRGB_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_ycc_rgb_convert_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JDCOLOR_YCCRGB_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
-#endif /* RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4 */
-
- return JSIMD_NONE;
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
diff --git a/jdcolss2.asm b/jdcolss2.asm
deleted file mode 100644
index fd6f04d..0000000
--- a/jdcolss2.asm
+++ /dev/null
@@ -1,536 +0,0 @@
-;
-; jdcolss2.asm - colorspace conversion (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-%ifdef JDCOLOR_YCCRGB_SSE2_SUPPORTED
-
-; --------------------------------------------------------------------------
-
-%define SCALEBITS 16
-
-F_0_344 equ 22554 ; FIX(0.34414)
-F_0_714 equ 46802 ; FIX(0.71414)
-F_1_402 equ 91881 ; FIX(1.40200)
-F_1_772 equ 116130 ; FIX(1.77200)
-F_0_402 equ (F_1_402 - 65536) ; FIX(1.40200) - FIX(1)
-F_0_285 equ ( 65536 - F_0_714) ; FIX(1) - FIX(0.71414)
-F_0_228 equ (131072 - F_1_772) ; FIX(2) - FIX(1.77200)
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_ycc_rgb_convert_sse2)
-
-EXTN(jconst_ycc_rgb_convert_sse2):
-
-PW_F0402 times 8 dw F_0_402
-PW_MF0228 times 8 dw -F_0_228
-PW_MF0344_F0285 times 4 dw -F_0_344, F_0_285
-PW_ONE times 8 dw 1
-PD_ONEHALF times 4 dd 1 << (SCALEBITS-1)
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Convert some rows of samples to the output colorspace.
-;
-; GLOBAL(void)
-; jpeg_ycc_rgb_convert_sse2 (j_decompress_ptr cinfo,
-; JSAMPIMAGE input_buf, JDIMENSION input_row,
-; JSAMPARRAY output_buf, int num_rows)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
-%define input_row(b) (b)+16 ; JDIMENSION input_row
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define num_rows(b) (b)+24 ; int num_rows
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 2
-%define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_ycc_rgb_convert_sse2)
-
-EXTN(jpeg_ycc_rgb_convert_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov ecx, POINTER [cinfo(eax)]
- mov ecx, JDIMENSION [jdstruct_output_width(ecx)] ; num_cols
- test ecx,ecx
- jz near .return
-
- push ecx
-
- mov edi, JSAMPIMAGE [input_buf(eax)]
- mov ecx, JDIMENSION [input_row(eax)]
- mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
- lea esi, [esi+ecx*SIZEOF_JSAMPROW]
- lea ebx, [ebx+ecx*SIZEOF_JSAMPROW]
- lea edx, [edx+ecx*SIZEOF_JSAMPROW]
-
- pop ecx
-
- mov edi, JSAMPARRAY [output_buf(eax)]
- mov eax, INT [num_rows(eax)]
- test eax,eax
- jle near .return
- alignx 16,7
-.rowloop:
- push eax
- push edi
- push edx
- push ebx
- push esi
- push ecx ; col
-
- mov esi, JSAMPROW [esi] ; inptr0
- mov ebx, JSAMPROW [ebx] ; inptr1
- mov edx, JSAMPROW [edx] ; inptr2
- mov edi, JSAMPROW [edi] ; outptr
- movpic eax, POINTER [gotptr] ; load GOT address (eax)
- alignx 16,7
-.columnloop:
-
- movdqa xmm5, XMMWORD [ebx] ; xmm5=Cb(0123456789ABCDEF)
- movdqa xmm1, XMMWORD [edx] ; xmm1=Cr(0123456789ABCDEF)
-
- pcmpeqw xmm4,xmm4
- pcmpeqw xmm7,xmm7
- psrlw xmm4,BYTE_BIT
- psllw xmm7,7 ; xmm7={0xFF80 0xFF80 0xFF80 0xFF80 ..}
- movdqa xmm0,xmm4 ; xmm0=xmm4={0xFF 0x00 0xFF 0x00 ..}
-
- pand xmm4,xmm5 ; xmm4=Cb(02468ACE)=CbE
- psrlw xmm5,BYTE_BIT ; xmm5=Cb(13579BDF)=CbO
- pand xmm0,xmm1 ; xmm0=Cr(02468ACE)=CrE
- psrlw xmm1,BYTE_BIT ; xmm1=Cr(13579BDF)=CrO
-
- paddw xmm4,xmm7
- paddw xmm5,xmm7
- paddw xmm0,xmm7
- paddw xmm1,xmm7
-
- ; (Original)
- ; R = Y + 1.40200 * Cr
- ; G = Y - 0.34414 * Cb - 0.71414 * Cr
- ; B = Y + 1.77200 * Cb
- ;
- ; (This implementation)
- ; R = Y + 0.40200 * Cr + Cr
- ; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr
- ; B = Y - 0.22800 * Cb + Cb + Cb
-
- movdqa xmm2,xmm4 ; xmm2=CbE
- movdqa xmm3,xmm5 ; xmm3=CbO
- paddw xmm4,xmm4 ; xmm4=2*CbE
- paddw xmm5,xmm5 ; xmm5=2*CbO
- movdqa xmm6,xmm0 ; xmm6=CrE
- movdqa xmm7,xmm1 ; xmm7=CrO
- paddw xmm0,xmm0 ; xmm0=2*CrE
- paddw xmm1,xmm1 ; xmm1=2*CrO
-
- pmulhw xmm4,[GOTOFF(eax,PW_MF0228)] ; xmm4=(2*CbE * -FIX(0.22800))
- pmulhw xmm5,[GOTOFF(eax,PW_MF0228)] ; xmm5=(2*CbO * -FIX(0.22800))
- pmulhw xmm0,[GOTOFF(eax,PW_F0402)] ; xmm0=(2*CrE * FIX(0.40200))
- pmulhw xmm1,[GOTOFF(eax,PW_F0402)] ; xmm1=(2*CrO * FIX(0.40200))
-
- paddw xmm4,[GOTOFF(eax,PW_ONE)]
- paddw xmm5,[GOTOFF(eax,PW_ONE)]
- psraw xmm4,1 ; xmm4=(CbE * -FIX(0.22800))
- psraw xmm5,1 ; xmm5=(CbO * -FIX(0.22800))
- paddw xmm0,[GOTOFF(eax,PW_ONE)]
- paddw xmm1,[GOTOFF(eax,PW_ONE)]
- psraw xmm0,1 ; xmm0=(CrE * FIX(0.40200))
- psraw xmm1,1 ; xmm1=(CrO * FIX(0.40200))
-
- paddw xmm4,xmm2
- paddw xmm5,xmm3
- paddw xmm4,xmm2 ; xmm4=(CbE * FIX(1.77200))=(B-Y)E
- paddw xmm5,xmm3 ; xmm5=(CbO * FIX(1.77200))=(B-Y)O
- paddw xmm0,xmm6 ; xmm0=(CrE * FIX(1.40200))=(R-Y)E
- paddw xmm1,xmm7 ; xmm1=(CrO * FIX(1.40200))=(R-Y)O
-
- movdqa XMMWORD [wk(0)], xmm4 ; wk(0)=(B-Y)E
- movdqa XMMWORD [wk(1)], xmm5 ; wk(1)=(B-Y)O
-
- movdqa xmm4,xmm2
- movdqa xmm5,xmm3
- punpcklwd xmm2,xmm6
- punpckhwd xmm4,xmm6
- pmaddwd xmm2,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd xmm4,[GOTOFF(eax,PW_MF0344_F0285)]
- punpcklwd xmm3,xmm7
- punpckhwd xmm5,xmm7
- pmaddwd xmm3,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd xmm5,[GOTOFF(eax,PW_MF0344_F0285)]
-
- paddd xmm2,[GOTOFF(eax,PD_ONEHALF)]
- paddd xmm4,[GOTOFF(eax,PD_ONEHALF)]
- psrad xmm2,SCALEBITS
- psrad xmm4,SCALEBITS
- paddd xmm3,[GOTOFF(eax,PD_ONEHALF)]
- paddd xmm5,[GOTOFF(eax,PD_ONEHALF)]
- psrad xmm3,SCALEBITS
- psrad xmm5,SCALEBITS
-
- packssdw xmm2,xmm4 ; xmm2=CbE*-FIX(0.344)+CrE*FIX(0.285)
- packssdw xmm3,xmm5 ; xmm3=CbO*-FIX(0.344)+CrO*FIX(0.285)
- psubw xmm2,xmm6 ; xmm2=CbE*-FIX(0.344)+CrE*-FIX(0.714)=(G-Y)E
- psubw xmm3,xmm7 ; xmm3=CbO*-FIX(0.344)+CrO*-FIX(0.714)=(G-Y)O
-
- movdqa xmm5, XMMWORD [esi] ; xmm5=Y(0123456789ABCDEF)
-
- pcmpeqw xmm4,xmm4
- psrlw xmm4,BYTE_BIT ; xmm4={0xFF 0x00 0xFF 0x00 ..}
- pand xmm4,xmm5 ; xmm4=Y(02468ACE)=YE
- psrlw xmm5,BYTE_BIT ; xmm5=Y(13579BDF)=YO
-
- paddw xmm0,xmm4 ; xmm0=((R-Y)E+YE)=RE=R(02468ACE)
- paddw xmm1,xmm5 ; xmm1=((R-Y)O+YO)=RO=R(13579BDF)
- packuswb xmm0,xmm0 ; xmm0=R(02468ACE********)
- packuswb xmm1,xmm1 ; xmm1=R(13579BDF********)
-
- paddw xmm2,xmm4 ; xmm2=((G-Y)E+YE)=GE=G(02468ACE)
- paddw xmm3,xmm5 ; xmm3=((G-Y)O+YO)=GO=G(13579BDF)
- packuswb xmm2,xmm2 ; xmm2=G(02468ACE********)
- packuswb xmm3,xmm3 ; xmm3=G(13579BDF********)
-
- paddw xmm4, XMMWORD [wk(0)] ; xmm4=(YE+(B-Y)E)=BE=B(02468ACE)
- paddw xmm5, XMMWORD [wk(1)] ; xmm5=(YO+(B-Y)O)=BO=B(13579BDF)
- packuswb xmm4,xmm4 ; xmm4=B(02468ACE********)
- packuswb xmm5,xmm5 ; xmm5=B(13579BDF********)
-
-%if RGB_PIXELSIZE == 3 ; ---------------
-
- ; xmmA=(00 02 04 06 08 0A 0C 0E **), xmmB=(01 03 05 07 09 0B 0D 0F **)
- ; xmmC=(10 12 14 16 18 1A 1C 1E **), xmmD=(11 13 15 17 19 1B 1D 1F **)
- ; xmmE=(20 22 24 26 28 2A 2C 2E **), xmmF=(21 23 25 27 29 2B 2D 2F **)
- ; xmmG=(** ** ** ** ** ** ** ** **), xmmH=(** ** ** ** ** ** ** ** **)
-
- punpcklbw xmmA,xmmC ; xmmA=(00 10 02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E)
- punpcklbw xmmE,xmmB ; xmmE=(20 01 22 03 24 05 26 07 28 09 2A 0B 2C 0D 2E 0F)
- punpcklbw xmmD,xmmF ; xmmD=(11 21 13 23 15 25 17 27 19 29 1B 2B 1D 2D 1F 2F)
-
- movdqa xmmG,xmmA
- movdqa xmmH,xmmA
- punpcklwd xmmA,xmmE ; xmmA=(00 10 20 01 02 12 22 03 04 14 24 05 06 16 26 07)
- punpckhwd xmmG,xmmE ; xmmG=(08 18 28 09 0A 1A 2A 0B 0C 1C 2C 0D 0E 1E 2E 0F)
-
- psrldq xmmH,2 ; xmmH=(02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E -- --)
- psrldq xmmE,2 ; xmmE=(22 03 24 05 26 07 28 09 2A 0B 2C 0D 2E 0F -- --)
-
- movdqa xmmC,xmmD
- movdqa xmmB,xmmD
- punpcklwd xmmD,xmmH ; xmmD=(11 21 02 12 13 23 04 14 15 25 06 16 17 27 08 18)
- punpckhwd xmmC,xmmH ; xmmC=(19 29 0A 1A 1B 2B 0C 1C 1D 2D 0E 1E 1F 2F -- --)
-
- psrldq xmmB,2 ; xmmB=(13 23 15 25 17 27 19 29 1B 2B 1D 2D 1F 2F -- --)
-
- movdqa xmmF,xmmE
- punpcklwd xmmE,xmmB ; xmmE=(22 03 13 23 24 05 15 25 26 07 17 27 28 09 19 29)
- punpckhwd xmmF,xmmB ; xmmF=(2A 0B 1B 2B 2C 0D 1D 2D 2E 0F 1F 2F -- -- -- --)
-
- pshufd xmmH,xmmA,0x4E; xmmH=(04 14 24 05 06 16 26 07 00 10 20 01 02 12 22 03)
- movdqa xmmB,xmmE
- punpckldq xmmA,xmmD ; xmmA=(00 10 20 01 11 21 02 12 02 12 22 03 13 23 04 14)
- punpckldq xmmE,xmmH ; xmmE=(22 03 13 23 04 14 24 05 24 05 15 25 06 16 26 07)
- punpckhdq xmmD,xmmB ; xmmD=(15 25 06 16 26 07 17 27 17 27 08 18 28 09 19 29)
-
- pshufd xmmH,xmmG,0x4E; xmmH=(0C 1C 2C 0D 0E 1E 2E 0F 08 18 28 09 0A 1A 2A 0B)
- movdqa xmmB,xmmF
- punpckldq xmmG,xmmC ; xmmG=(08 18 28 09 19 29 0A 1A 0A 1A 2A 0B 1B 2B 0C 1C)
- punpckldq xmmF,xmmH ; xmmF=(2A 0B 1B 2B 0C 1C 2C 0D 2C 0D 1D 2D 0E 1E 2E 0F)
- punpckhdq xmmC,xmmB ; xmmC=(1D 2D 0E 1E 2E 0F 1F 2F 1F 2F -- -- -- -- -- --)
-
- punpcklqdq xmmA,xmmE ; xmmA=(00 10 20 01 11 21 02 12 22 03 13 23 04 14 24 05)
- punpcklqdq xmmD,xmmG ; xmmD=(15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A)
- punpcklqdq xmmF,xmmC ; xmmF=(2A 0B 1B 2B 0C 1C 2C 0D 1D 2D 0E 1E 2E 0F 1F 2F)
-
- cmp ecx, byte SIZEOF_XMMWORD
- jb short .column_st32
-
- test edi, SIZEOF_XMMWORD-1
- jnz short .out1
- ; --(aligned)-------------------
- movntdq XMMWORD [edi+0*SIZEOF_XMMWORD], xmmA
- movntdq XMMWORD [edi+1*SIZEOF_XMMWORD], xmmD
- movntdq XMMWORD [edi+2*SIZEOF_XMMWORD], xmmF
- add edi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr
- jmp short .out0
-.out1: ; --(unaligned)-----------------
- pcmpeqb xmmH,xmmH ; xmmH=(all 1's)
- maskmovdqu xmmA,xmmH ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmD,xmmH ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmF,xmmH ; movntdqu XMMWORD [edi], xmmF
- add edi, byte SIZEOF_XMMWORD ; outptr
-.out0:
- sub ecx, byte SIZEOF_XMMWORD
- jz near .nextrow
-
- add esi, byte SIZEOF_XMMWORD ; inptr0
- add ebx, byte SIZEOF_XMMWORD ; inptr1
- add edx, byte SIZEOF_XMMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st32:
- pcmpeqb xmmH,xmmH ; xmmH=(all 1's)
- lea ecx, [ecx+ecx*2] ; imul ecx, RGB_PIXELSIZE
- cmp ecx, byte 2*SIZEOF_XMMWORD
- jb short .column_st16
- maskmovdqu xmmA,xmmH ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmD,xmmH ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr
- movdqa xmmA,xmmF
- sub ecx, byte 2*SIZEOF_XMMWORD
- jmp short .column_st15
-.column_st16:
- cmp ecx, byte SIZEOF_XMMWORD
- jb short .column_st15
- maskmovdqu xmmA,xmmH ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- movdqa xmmA,xmmD
- sub ecx, byte SIZEOF_XMMWORD
-.column_st15:
- mov eax,ecx
- xor ecx, byte 0x0F
- shl ecx, 2
- movd xmmB,ecx
- psrlq xmmH,4
- pcmpeqb xmmE,xmmE
- psrlq xmmH,xmmB
- psrlq xmmE,xmmB
- punpcklbw xmmE,xmmH
- ; ----------------
- mov ecx,edi
- and ecx, byte SIZEOF_XMMWORD-1
- jz short .adj0
- add eax,ecx
- cmp eax, byte SIZEOF_XMMWORD
- ja short .adj0
- and edi, byte (-SIZEOF_XMMWORD) ; align to 16-byte boundary
- shl ecx, 3 ; pslldq xmmA,ecx & pslldq xmmE,ecx
- movdqa xmmG,xmmA
- movdqa xmmC,xmmE
- pslldq xmmA, SIZEOF_XMMWORD/2
- pslldq xmmE, SIZEOF_XMMWORD/2
- movd xmmD,ecx
- sub ecx, byte (SIZEOF_XMMWORD/2)*BYTE_BIT
- jb short .adj1
- movd xmmF,ecx
- psllq xmmA,xmmF
- psllq xmmE,xmmF
- jmp short .adj0
-.adj1: neg ecx
- movd xmmF,ecx
- psrlq xmmA,xmmF
- psrlq xmmE,xmmF
- psllq xmmG,xmmD
- psllq xmmC,xmmD
- por xmmA,xmmG
- por xmmE,xmmC
-.adj0: ; ----------------
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
-
-%else ; RGB_PIXELSIZE == 4 ; -----------
-
-%ifdef RGBX_FILLER_0XFF
- pcmpeqb xmm6,xmm6 ; xmm6=XE=X(02468ACE********)
- pcmpeqb xmm7,xmm7 ; xmm7=XO=X(13579BDF********)
-%else
- pxor xmm6,xmm6 ; xmm6=XE=X(02468ACE********)
- pxor xmm7,xmm7 ; xmm7=XO=X(13579BDF********)
-%endif
- ; xmmA=(00 02 04 06 08 0A 0C 0E **), xmmB=(01 03 05 07 09 0B 0D 0F **)
- ; xmmC=(10 12 14 16 18 1A 1C 1E **), xmmD=(11 13 15 17 19 1B 1D 1F **)
- ; xmmE=(20 22 24 26 28 2A 2C 2E **), xmmF=(21 23 25 27 29 2B 2D 2F **)
- ; xmmG=(30 32 34 36 38 3A 3C 3E **), xmmH=(31 33 35 37 39 3B 3D 3F **)
-
- punpcklbw xmmA,xmmC ; xmmA=(00 10 02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E)
- punpcklbw xmmE,xmmG ; xmmE=(20 30 22 32 24 34 26 36 28 38 2A 3A 2C 3C 2E 3E)
- punpcklbw xmmB,xmmD ; xmmB=(01 11 03 13 05 15 07 17 09 19 0B 1B 0D 1D 0F 1F)
- punpcklbw xmmF,xmmH ; xmmF=(21 31 23 33 25 35 27 37 29 39 2B 3B 2D 3D 2F 3F)
-
- movdqa xmmC,xmmA
- punpcklwd xmmA,xmmE ; xmmA=(00 10 20 30 02 12 22 32 04 14 24 34 06 16 26 36)
- punpckhwd xmmC,xmmE ; xmmC=(08 18 28 38 0A 1A 2A 3A 0C 1C 2C 3C 0E 1E 2E 3E)
- movdqa xmmG,xmmB
- punpcklwd xmmB,xmmF ; xmmB=(01 11 21 31 03 13 23 33 05 15 25 35 07 17 27 37)
- punpckhwd xmmG,xmmF ; xmmG=(09 19 29 39 0B 1B 2B 3B 0D 1D 2D 3D 0F 1F 2F 3F)
-
- movdqa xmmD,xmmA
- punpckldq xmmA,xmmB ; xmmA=(00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33)
- punpckhdq xmmD,xmmB ; xmmD=(04 14 24 34 05 15 25 35 06 16 26 36 07 17 27 37)
- movdqa xmmH,xmmC
- punpckldq xmmC,xmmG ; xmmC=(08 18 28 38 09 19 29 39 0A 1A 2A 3A 0B 1B 2B 3B)
- punpckhdq xmmH,xmmG ; xmmH=(0C 1C 2C 3C 0D 1D 2D 3D 0E 1E 2E 3E 0F 1F 2F 3F)
-
- cmp ecx, byte SIZEOF_XMMWORD
- jb short .column_st32
-
- test edi, SIZEOF_XMMWORD-1
- jnz short .out1
- ; --(aligned)-------------------
- movntdq XMMWORD [edi+0*SIZEOF_XMMWORD], xmmA
- movntdq XMMWORD [edi+1*SIZEOF_XMMWORD], xmmD
- movntdq XMMWORD [edi+2*SIZEOF_XMMWORD], xmmC
- movntdq XMMWORD [edi+3*SIZEOF_XMMWORD], xmmH
- add edi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr
- jmp short .out0
-.out1: ; --(unaligned)-----------------
- pcmpeqb xmmE,xmmE ; xmmE=(all 1's)
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmD,xmmE ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmC,xmmE ; movntdqu XMMWORD [edi], xmmC
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmH,xmmE ; movntdqu XMMWORD [edi], xmmH
- add edi, byte SIZEOF_XMMWORD ; outptr
-.out0:
- sub ecx, byte SIZEOF_XMMWORD
- jz near .nextrow
-
- add esi, byte SIZEOF_XMMWORD ; inptr0
- add ebx, byte SIZEOF_XMMWORD ; inptr1
- add edx, byte SIZEOF_XMMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st32:
- pcmpeqb xmmE,xmmE ; xmmE=(all 1's)
- cmp ecx, byte SIZEOF_XMMWORD/2
- jb short .column_st16
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmD,xmmE ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr
- movdqa xmmA,xmmC
- movdqa xmmD,xmmH
- sub ecx, byte SIZEOF_XMMWORD/2
-.column_st16:
- cmp ecx, byte SIZEOF_XMMWORD/4
- jb short .column_st15
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- movdqa xmmA,xmmD
- sub ecx, byte SIZEOF_XMMWORD/4
-.column_st15:
- cmp ecx, byte SIZEOF_XMMWORD/16
- jb short .nextrow
- mov eax,ecx
- xor ecx, byte 0x03
- inc ecx
- shl ecx, 4
- movd xmmF,ecx
- psrlq xmmE,xmmF
- punpcklbw xmmE,xmmE
- ; ----------------
- mov ecx,edi
- and ecx, byte SIZEOF_XMMWORD-1
- jz short .adj0
- lea eax, [ecx+eax*4] ; RGB_PIXELSIZE
- cmp eax, byte SIZEOF_XMMWORD
- ja short .adj0
- and edi, byte (-SIZEOF_XMMWORD) ; align to 16-byte boundary
- shl ecx, 3 ; pslldq xmmA,ecx & pslldq xmmE,ecx
- movdqa xmmB,xmmA
- movdqa xmmG,xmmE
- pslldq xmmA, SIZEOF_XMMWORD/2
- pslldq xmmE, SIZEOF_XMMWORD/2
- movd xmmC,ecx
- sub ecx, byte (SIZEOF_XMMWORD/2)*BYTE_BIT
- jb short .adj1
- movd xmmH,ecx
- psllq xmmA,xmmH
- psllq xmmE,xmmH
- jmp short .adj0
-.adj1: neg ecx
- movd xmmH,ecx
- psrlq xmmA,xmmH
- psrlq xmmE,xmmH
- psllq xmmB,xmmC
- psllq xmmG,xmmC
- por xmmA,xmmB
- por xmmE,xmmG
-.adj0: ; ----------------
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
-
-%endif ; RGB_PIXELSIZE ; ---------------
-
- alignx 16,7
-
-.nextrow:
- pop ecx
- pop esi
- pop ebx
- pop edx
- pop edi
- pop eax
-
- add esi, byte SIZEOF_JSAMPROW
- add ebx, byte SIZEOF_JSAMPROW
- add edx, byte SIZEOF_JSAMPROW
- add edi, byte SIZEOF_JSAMPROW ; output_buf
- dec eax ; num_rows
- jg near .rowloop
-
- sfence ; flush the write buffer
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JDCOLOR_YCCRGB_SSE2_SUPPORTED
-%endif ; RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
diff --git a/jdct.h b/jdct.h
index 678a3d1..c3650ea 100644
--- a/jdct.h
+++ b/jdct.h
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 5, 2006
- * ---------------------------------------------------------------------
- *
* This include file contains common declarations for the forward and
* inverse DCT modules. These declarations are private to the DCT managers
* (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms.
@@ -20,13 +13,6 @@
*/
-/* SIMD Ext: configuration check */
-
-#if BITS_IN_JSAMPLE != 8
-#error "Sorry, this SIMD code only copes with 8-bit sample values."
-#endif
-
-
/*
* A forward DCT routine is given a pointer to a work area of type DCTELEM[];
* the DCT is to be performed in-place in that buffer. Type DCTELEM is int
@@ -40,25 +26,11 @@
* Quantization of the output coefficients is done by jcdctmgr.c.
*/
-/* SIMD Ext: To maximize parallelism, Type DCTELEM is changed to short
- * (originally, int).
- */
-typedef short DCTELEM; /* SIMD Ext: must be short */
-
-typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));
-typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data));
-typedef JMETHOD(void, convsamp_int_method_ptr,
- (JSAMPARRAY sample_data, JDIMENSION start_col,
- DCTELEM * workspace));
-typedef JMETHOD(void, convsamp_float_method_ptr,
- (JSAMPARRAY sample_data, JDIMENSION start_col,
- FAST_FLOAT *workspace));
-typedef JMETHOD(void, quantize_int_method_ptr,
- (JCOEFPTR coef_block, DCTELEM * divisors,
- DCTELEM * workspace));
-typedef JMETHOD(void, quantize_float_method_ptr,
- (JCOEFPTR coef_block, FAST_FLOAT * divisors,
- FAST_FLOAT * workspace));
+#if BITS_IN_JSAMPLE == 8
+typedef int DCTELEM; /* 16 or 32 bits is fine */
+#else
+typedef INT32 DCTELEM; /* must have 32 bits */
+#endif
/*
@@ -74,22 +46,19 @@
/* typedef inverse_DCT_method_ptr is declared in jpegint.h */
-/* SIMD Ext: To maximize parallelism, Type MULTIPLIER is changed to short.
- * Macro definitions of MULTIPLIER and FAST_FLOAT in jmorecfg.h are ignored.
- */
-#undef MULTIPLIER
-#define MULTIPLIER short /* SIMD Ext: must be short */
-#undef FAST_FLOAT
-#define FAST_FLOAT float /* SIMD Ext: must be float */
-
/*
* Each IDCT routine has its own ideas about the best dct_table element type.
*/
-typedef MULTIPLIER ISLOW_MULT_TYPE; /* SIMD Ext: must be short */
-typedef MULTIPLIER IFAST_MULT_TYPE; /* SIMD Ext: must be short */
+typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
+#if BITS_IN_JSAMPLE == 8
+typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */
-typedef FAST_FLOAT FLOAT_MULT_TYPE; /* SIMD Ext: must be float */
+#else
+typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */
+#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */
+#endif
+typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
/*
@@ -109,64 +78,15 @@
/* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jpeg_fdct_islow jFDislow /* jfdctint.asm */
-#define jpeg_fdct_ifast jFDifast /* jfdctfst.asm */
-#define jpeg_fdct_float jFDfloat /* jfdctflt.asm */
-#define jpeg_fdct_islow_mmx jFDMislow /* jfmmxint.asm */
-#define jpeg_fdct_ifast_mmx jFDMifast /* jfmmxfst.asm */
-#define jpeg_fdct_float_3dnow jFD3float /* jf3dnflt.asm */
-#define jpeg_fdct_islow_sse2 jFDSislow /* jfss2int.asm */
-#define jpeg_fdct_ifast_sse2 jFDSifast /* jfss2fst.asm */
-#define jpeg_fdct_float_sse jFDSfloat /* jfsseflt.asm */
-#define jpeg_convsamp_int jCnvInt /* jcqntint.asm */
-#define jpeg_quantize_int jQntInt /* jcqntint.asm */
-#define jpeg_quantize_idiv jQntIDiv /* jcqntint.asm */
-#define jpeg_convsamp_float jCnvFloat /* jcqntflt.asm */
-#define jpeg_quantize_float jQntFloat /* jcqntflt.asm */
-#define jpeg_convsamp_int_mmx jCnvMmx /* jcqntmmx.asm */
-#define jpeg_quantize_int_mmx jQntMmx /* jcqntmmx.asm */
-#define jpeg_convsamp_flt_3dnow jCnv3dnow /* jcqnt3dn.asm */
-#define jpeg_quantize_flt_3dnow jQnt3dnow /* jcqnt3dn.asm */
-#define jpeg_convsamp_int_sse2 jCnvISse2 /* jcqnts2i.asm */
-#define jpeg_quantize_int_sse2 jQntISse2 /* jcqnts2i.asm */
-#define jpeg_convsamp_flt_sse jCnvSse /* jcqntsse.asm */
-#define jpeg_quantize_flt_sse jQntSse /* jcqntsse.asm */
-#define jpeg_convsamp_flt_sse2 jCnvFSse2 /* jcqnts2f.asm */
-#define jpeg_quantize_flt_sse2 jQntFSse2 /* jcqnts2f.asm */
-#define jpeg_idct_islow jRDislow /* jidctint.asm */
-#define jpeg_idct_ifast jRDifast /* jidctfst.asm */
-#define jpeg_idct_float jRDfloat /* jidctflt.asm */
-#define jpeg_idct_4x4 jRD4x4 /* jidctred.asm */
-#define jpeg_idct_2x2 jRD2x2 /* jidctred.asm */
-#define jpeg_idct_1x1 jRD1x1 /* jidctred.asm */
-#define jpeg_idct_islow_mmx jRDMislow /* jimmxint.asm */
-#define jpeg_idct_ifast_mmx jRDMifast /* jimmxfst.asm */
-#define jpeg_idct_float_3dnow jRD3float /* ji3dnflt.asm */
-#define jpeg_idct_4x4_mmx jRDM4x4 /* jimmxred.asm */
-#define jpeg_idct_2x2_mmx jRDM2x2 /* jimmxred.asm */
-#define jpeg_idct_islow_sse2 jRDSislow /* jiss2int.asm */
-#define jpeg_idct_ifast_sse2 jRDSifast /* jiss2fst.asm */
-#define jpeg_idct_float_sse jRDSfloat /* jisseflt.asm */
-#define jpeg_idct_float_sse2 jRD2float /* jiss2flt.asm */
-#define jpeg_idct_4x4_sse2 jRDS4x4 /* jiss2red.asm */
-#define jpeg_idct_2x2_sse2 jRDS2x2 /* jiss2red.asm */
-#define jconst_fdct_float jFCfloat /* jfdctflt.asm */
-#define jconst_fdct_islow_mmx jFCMislow /* jfmmxint.asm */
-#define jconst_fdct_ifast_mmx jFCMifast /* jfmmxfst.asm */
-#define jconst_fdct_float_3dnow jFC3float /* jf3dnflt.asm */
-#define jconst_fdct_islow_sse2 jFCSislow /* jfss2int.asm */
-#define jconst_fdct_ifast_sse2 jFCSifast /* jfss2fst.asm */
-#define jconst_fdct_float_sse jFCSfloat /* jfsseflt.asm */
-#define jconst_idct_float jRCfloat /* jidctflt.asm */
-#define jconst_idct_islow_mmx jRCMislow /* jimmxint.asm */
-#define jconst_idct_ifast_mmx jRCMifast /* jimmxfst.asm */
-#define jconst_idct_float_3dnow jRC3float /* ji3dnflt.asm */
-#define jconst_idct_red_mmx jRCMred /* jimmxred.asm */
-#define jconst_idct_islow_sse2 jRCSislow /* jiss2int.asm */
-#define jconst_idct_ifast_sse2 jRCSifast /* jiss2fst.asm */
-#define jconst_idct_float_sse jRCSfloat /* jisseflt.asm */
-#define jconst_idct_float_sse2 jRC2float /* jiss2flt.asm */
-#define jconst_idct_red_sse2 jRCSred /* jiss2red.asm */
+#define jpeg_fdct_islow jFDislow
+#define jpeg_fdct_ifast jFDifast
+#define jpeg_fdct_float jFDfloat
+#define jpeg_idct_islow jRDislow
+#define jpeg_idct_ifast jRDifast
+#define jpeg_idct_float jRDfloat
+#define jpeg_idct_4x4 jRD4x4
+#define jpeg_idct_2x2 jRD2x2
+#define jpeg_idct_1x1 jRD1x1
#endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Extern declarations for the forward and inverse DCT routines. */
@@ -175,47 +95,6 @@
EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data));
EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data));
-EXTERN(void) jpeg_fdct_islow_mmx JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_ifast_mmx JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_float_3dnow JPP((FAST_FLOAT * data));
-
-EXTERN(void) jpeg_fdct_islow_sse2 JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_ifast_sse2 JPP((DCTELEM * data));
-EXTERN(void) jpeg_fdct_float_sse JPP((FAST_FLOAT * data));
-
-EXTERN(void) jpeg_convsamp_int
- JPP((JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace));
-EXTERN(void) jpeg_quantize_int
- JPP((JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace));
-EXTERN(void) jpeg_quantize_idiv
- JPP((JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace));
-EXTERN(void) jpeg_convsamp_float
- JPP((JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace));
-EXTERN(void) jpeg_quantize_float
- JPP((JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace));
-
-EXTERN(void) jpeg_convsamp_int_mmx
- JPP((JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace));
-EXTERN(void) jpeg_quantize_int_mmx
- JPP((JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace));
-EXTERN(void) jpeg_convsamp_flt_3dnow
- JPP((JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace));
-EXTERN(void) jpeg_quantize_flt_3dnow
- JPP((JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace));
-
-EXTERN(void) jpeg_convsamp_int_sse2
- JPP((JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM * workspace));
-EXTERN(void) jpeg_quantize_int_sse2
- JPP((JCOEFPTR coef_block, DCTELEM * divisors, DCTELEM * workspace));
-EXTERN(void) jpeg_convsamp_flt_sse
- JPP((JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace));
-EXTERN(void) jpeg_quantize_flt_sse
- JPP((JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace));
-EXTERN(void) jpeg_convsamp_flt_sse2
- JPP((JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace));
-EXTERN(void) jpeg_quantize_flt_sse2
- JPP((JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace));
-
EXTERN(void) jpeg_idct_islow
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
@@ -235,60 +114,6 @@
JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_islow_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_ifast_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_4x4_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_2x2_mmx
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-
-EXTERN(void) jpeg_idct_float_3dnow
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_float_sse
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_float_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-
-EXTERN(void) jpeg_idct_islow_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_ifast_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_4x4_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_2x2_sse2
- JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-
-extern const int jconst_fdct_float[];
-extern const int jconst_fdct_islow_mmx[];
-extern const int jconst_fdct_ifast_mmx[];
-extern const int jconst_fdct_float_3dnow[];
-extern const int jconst_fdct_islow_sse2[];
-extern const int jconst_fdct_ifast_sse2[];
-extern const int jconst_fdct_float_sse[];
-extern const int jconst_idct_float[];
-extern const int jconst_idct_islow_mmx[];
-extern const int jconst_idct_ifast_mmx[];
-extern const int jconst_idct_float_3dnow[];
-extern const int jconst_idct_red_mmx[];
-extern const int jconst_idct_islow_sse2[];
-extern const int jconst_idct_ifast_sse2[];
-extern const int jconst_idct_float_sse[];
-extern const int jconst_idct_float_sse2[];
-extern const int jconst_idct_red_sse2[];
-
/*
* Macros for handling fixed-point arithmetic; these are used by many
diff --git a/jdct.inc b/jdct.inc
deleted file mode 100644
index a6fb0ed..0000000
--- a/jdct.inc
+++ /dev/null
@@ -1,125 +0,0 @@
-;
-; jdct.inc - private declarations for forward & reverse DCT subsystems
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; Last Modified : January 5, 2006
-;
-; [TAB8]
-
-; ---- jdct.h --------------------------------------------------------------
-;
-; configuration check: BITS_IN_JSAMPLE==8 (8-bit sample values) is the only
-; valid setting on this SIMD extension.
-;
-%if BITS_IN_JSAMPLE != 8
-%error "Sorry, this SIMD code only copes with 8-bit sample values."
-%endif
-
-; A forward DCT routine is given a pointer to a work area of type DCTELEM[];
-; the DCT is to be performed in-place in that buffer.
-; To maximize parallelism, Type DCTELEM is changed to short (originally, int).
-;
-%define DCTELEM word ; short
-%define SIZEOF_DCTELEM SIZEOF_WORD ; sizeof(DCTELEM)
-
-; To maximize parallelism, Type MULTIPLIER is changed to short.
-;
-%define MULTIPLIER word ; short
-%define SIZEOF_MULTIPLIER SIZEOF_WORD ; sizeof(MULTIPLIER)
-%define FAST_FLOAT FP32 ; float
-%define SIZEOF_FAST_FLOAT SIZEOF_FP32 ; sizeof(FAST_FLOAT)
-
-; Each IDCT routine has its own ideas about the best dct_table element type.
-;
-%define ISLOW_MULT_TYPE MULTIPLIER ; must be short
-%define SIZEOF_ISLOW_MULT_TYPE SIZEOF_MULTIPLIER ; sizeof(ISLOW_MULT_TYPE)
-%define IFAST_MULT_TYPE MULTIPLIER ; must be short
-%define SIZEOF_IFAST_MULT_TYPE SIZEOF_MULTIPLIER ; sizeof(IFAST_MULT_TYPE)
-%define IFAST_SCALE_BITS 2 ; fractional bits in scale factors
-%define FLOAT_MULT_TYPE FAST_FLOAT ; must be float
-%define SIZEOF_FLOAT_MULT_TYPE SIZEOF_FAST_FLOAT ; sizeof(FLOAT_MULT_TYPE)
-
-; Each IDCT routine is responsible for range-limiting its results and
-; converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
-; be quite far out of range if the input data is corrupt, so a bulletproof
-; range-limiting step is required. We use a mask-and-table-lookup method
-; to do the combined operations quickly.
-;
-%define RANGE_MASK (MAXJSAMPLE * 4 + 3) ; 2 bits wider than legal samples
-
-; Short forms of external names for systems with brain-damaged linkers.
-;
-%ifdef NEED_SHORT_EXTERNAL_NAMES
-%define jpeg_fdct_islow jFDislow ; jfdctint.asm
-%define jpeg_fdct_ifast jFDifast ; jfdctfst.asm
-%define jpeg_fdct_float jFDfloat ; jfdctflt.asm
-%define jpeg_fdct_islow_mmx jFDMislow ; jfmmxint.asm
-%define jpeg_fdct_ifast_mmx jFDMifast ; jfmmxfst.asm
-%define jpeg_fdct_float_3dnow jFD3float ; jf3dnflt.asm
-%define jpeg_fdct_islow_sse2 jFDSislow ; jfss2int.asm
-%define jpeg_fdct_ifast_sse2 jFDSifast ; jfss2fst.asm
-%define jpeg_fdct_float_sse jFDSfloat ; jfsseflt.asm
-%define jpeg_convsamp_int jCnvInt ; jcqntint.asm
-%define jpeg_quantize_int jQntInt ; jcqntint.asm
-%define jpeg_quantize_idiv jQntIDiv ; jcqntint.asm
-%define jpeg_convsamp_float jCnvFloat ; jcqntflt.asm
-%define jpeg_quantize_float jQntFloat ; jcqntflt.asm
-%define jpeg_convsamp_int_mmx jCnvMmx ; jcqntmmx.asm
-%define jpeg_quantize_int_mmx jQntMmx ; jcqntmmx.asm
-%define jpeg_convsamp_flt_3dnow jCnv3dnow ; jcqnt3dn.asm
-%define jpeg_quantize_flt_3dnow jQnt3dnow ; jcqnt3dn.asm
-%define jpeg_convsamp_int_sse2 jCnvISse2 ; jcqnts2i.asm
-%define jpeg_quantize_int_sse2 jQntISse2 ; jcqnts2i.asm
-%define jpeg_convsamp_flt_sse jCnvSse ; jcqntsse.asm
-%define jpeg_quantize_flt_sse jQntSse ; jcqntsse.asm
-%define jpeg_convsamp_flt_sse2 jCnvFSse2 ; jcqnts2f.asm
-%define jpeg_quantize_flt_sse2 jQntFSse2 ; jcqnts2f.asm
-%define jpeg_idct_islow jRDislow ; jidctint.asm
-%define jpeg_idct_ifast jRDifast ; jidctfst.asm
-%define jpeg_idct_float jRDfloat ; jidctflt.asm
-%define jpeg_idct_4x4 jRD4x4 ; jidctred.asm
-%define jpeg_idct_2x2 jRD2x2 ; jidctred.asm
-%define jpeg_idct_1x1 jRD1x1 ; jidctred.asm
-%define jpeg_idct_islow_mmx jRDMislow ; jimmxint.asm
-%define jpeg_idct_ifast_mmx jRDMifast ; jimmxfst.asm
-%define jpeg_idct_float_3dnow jRD3float ; ji3dnflt.asm
-%define jpeg_idct_4x4_mmx jRDM4x4 ; jimmxred.asm
-%define jpeg_idct_2x2_mmx jRDM2x2 ; jimmxred.asm
-%define jpeg_idct_islow_sse2 jRDSislow ; jiss2int.asm
-%define jpeg_idct_ifast_sse2 jRDSifast ; jiss2fst.asm
-%define jpeg_idct_float_sse jRDSfloat ; jisseflt.asm
-%define jpeg_idct_float_sse2 jRD2float ; jiss2flt.asm
-%define jpeg_idct_4x4_sse2 jRDS4x4 ; jiss2red.asm
-%define jpeg_idct_2x2_sse2 jRDS2x2 ; jiss2red.asm
-%define jconst_fdct_float jFCfloat ; jfdctflt.asm
-%define jconst_fdct_islow_mmx jFCMislow ; jfmmxint.asm
-%define jconst_fdct_ifast_mmx jFCMifast ; jfmmxfst.asm
-%define jconst_fdct_float_3dnow jFC3float ; jf3dnflt.asm
-%define jconst_fdct_islow_sse2 jFCSislow ; jfss2int.asm
-%define jconst_fdct_ifast_sse2 jFCSifast ; jfss2fst.asm
-%define jconst_fdct_float_sse jFCSfloat ; jfsseflt.asm
-%define jconst_idct_float jRCfloat ; jidctflt.asm
-%define jconst_idct_islow_mmx jRCMislow ; jimmxint.asm
-%define jconst_idct_ifast_mmx jRCMifast ; jimmxfst.asm
-%define jconst_idct_float_3dnow jRC3float ; ji3dnflt.asm
-%define jconst_idct_red_mmx jRCMred ; jimmxred.asm
-%define jconst_idct_islow_sse2 jRCSislow ; jiss2int.asm
-%define jconst_idct_ifast_sse2 jRCSifast ; jiss2fst.asm
-%define jconst_idct_float_sse jRCSfloat ; jisseflt.asm
-%define jconst_idct_float_sse2 jRC2float ; jiss2flt.asm
-%define jconst_idct_red_sse2 jRCSred ; jiss2red.asm
-%endif ; NEED_SHORT_EXTERNAL_NAMES
-
-; --------------------------------------------------------------------------
-
-%define ROW(n,b,s) ((b)+(n)*(s))
-%define COL(n,b,s) ((b)+(n)*(s)*DCTSIZE)
-
-%define DWBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_DWORD)
-%define MMBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_MMWORD)
-%define XMMBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_XMMWORD)
-
-; --------------------------------------------------------------------------
diff --git a/jddctmgr.c b/jddctmgr.c
index de6df8d..52f5090 100644
--- a/jddctmgr.c
+++ b/jddctmgr.c
@@ -2,16 +2,10 @@
* jddctmgr.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : December 24, 2005
- * ---------------------------------------------------------------------
- *
* This file contains the inverse-DCT management logic.
* This code selects a particular IDCT implementation to be used,
* and it performs related housekeeping chores. No code in this file
@@ -26,6 +20,7 @@
#include "jinclude.h"
#include "jpeglib.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
+#include "jsimddct.h"
/*
@@ -101,7 +96,6 @@
int method = 0;
inverse_DCT_method_ptr method_ptr = NULL;
JQUANT_TBL * qtbl;
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
ci++, compptr++) {
@@ -113,95 +107,49 @@
method = JDCT_ISLOW; /* jidctred uses islow-style table */
break;
case 2:
-#ifdef JIDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_red_sse2))
- method_ptr = jpeg_idct_2x2_sse2;
+ if (jsimd_can_idct_2x2())
+ method_ptr = jsimd_idct_2x2;
else
-#endif
-#ifdef JIDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- method_ptr = jpeg_idct_2x2_mmx;
- else
-#endif
- method_ptr = jpeg_idct_2x2;
+ method_ptr = jpeg_idct_2x2;
method = JDCT_ISLOW; /* jidctred uses islow-style table */
break;
case 4:
-#ifdef JIDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_red_sse2))
- method_ptr = jpeg_idct_4x4_sse2;
+ if (jsimd_can_idct_4x4())
+ method_ptr = jsimd_idct_4x4;
else
-#endif
-#ifdef JIDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- method_ptr = jpeg_idct_4x4_mmx;
- else
-#endif
- method_ptr = jpeg_idct_4x4;
+ method_ptr = jpeg_idct_4x4;
method = JDCT_ISLOW; /* jidctred uses islow-style table */
break;
-#endif /* IDCT_SCALING_SUPPORTED */
+#endif
case DCTSIZE:
switch (cinfo->dct_method) {
#ifdef DCT_ISLOW_SUPPORTED
case JDCT_ISLOW:
-#ifdef JIDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_islow_sse2))
- method_ptr = jpeg_idct_islow_sse2;
+ if (jsimd_can_idct_islow())
+ method_ptr = jsimd_idct_islow;
else
-#endif
-#ifdef JIDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- method_ptr = jpeg_idct_islow_mmx;
- else
-#endif
method_ptr = jpeg_idct_islow;
method = JDCT_ISLOW;
break;
-#endif /* DCT_ISLOW_SUPPORTED */
+#endif
#ifdef DCT_IFAST_SUPPORTED
case JDCT_IFAST:
-#ifdef JIDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_ifast_sse2))
- method_ptr = jpeg_idct_ifast_sse2;
+ if (jsimd_can_idct_ifast())
+ method_ptr = jsimd_idct_ifast;
else
-#endif
-#ifdef JIDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- method_ptr = jpeg_idct_ifast_mmx;
- else
-#endif
method_ptr = jpeg_idct_ifast;
method = JDCT_IFAST;
break;
-#endif /* DCT_IFAST_SUPPORTED */
+#endif
#ifdef DCT_FLOAT_SUPPORTED
case JDCT_FLOAT:
-#ifdef JIDCT_FLT_SSE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE && simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_float_sse2))
- method_ptr = jpeg_idct_float_sse2;
+ if (jsimd_can_idct_float())
+ method_ptr = jsimd_idct_float;
else
-#endif
-#ifdef JIDCT_FLT_SSE_MMX_SUPPORTED
- if (simd & JSIMD_SSE &&
- IS_CONST_ALIGNED_16(jconst_idct_float_sse))
- method_ptr = jpeg_idct_float_sse;
- else
-#endif
-#ifdef JIDCT_FLT_3DNOW_MMX_SUPPORTED
- if (simd & JSIMD_3DNOW)
- method_ptr = jpeg_idct_float_3dnow;
- else
-#endif
method_ptr = jpeg_idct_float;
method = JDCT_FLOAT;
break;
-#endif /* DCT_FLOAT_SUPPORTED */
+#endif
default:
ERREXIT(cinfo, JERR_NOT_COMPILED);
break;
@@ -336,78 +284,3 @@
idct->cur_method[ci] = -1;
}
}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-GLOBAL(unsigned int)
-jpeg_simd_inverse_dct (j_decompress_ptr cinfo, int method)
-{
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
-
- switch (method) {
-#ifdef DCT_ISLOW_SUPPORTED
- case JDCT_ISLOW:
-#ifdef JIDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_islow_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JIDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
- return JSIMD_NONE;
-#endif /* DCT_ISLOW_SUPPORTED */
-#ifdef DCT_IFAST_SUPPORTED
- case JDCT_IFAST:
-#ifdef JIDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_ifast_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JIDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
- return JSIMD_NONE;
-#endif /* DCT_IFAST_SUPPORTED */
-#ifdef DCT_FLOAT_SUPPORTED
- case JDCT_FLOAT:
-#ifdef JIDCT_FLT_SSE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE && simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_float_sse2))
- return JSIMD_SSE; /* (JSIMD_SSE | JSIMD_SSE2); */
-#endif
-#ifdef JIDCT_FLT_SSE_MMX_SUPPORTED
- if (simd & JSIMD_SSE &&
- IS_CONST_ALIGNED_16(jconst_idct_float_sse))
- return JSIMD_SSE; /* (JSIMD_SSE | JSIMD_MMX); */
-#endif
-#ifdef JIDCT_FLT_3DNOW_MMX_SUPPORTED
- if (simd & JSIMD_3DNOW)
- return JSIMD_3DNOW; /* (JSIMD_3DNOW | JSIMD_MMX); */
-#endif
- return JSIMD_NONE;
-#endif /* DCT_FLOAT_SUPPORTED */
-#ifdef IDCT_SCALING_SUPPORTED
- case JDCT_FLOAT + 1:
-#ifdef JIDCT_INT_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_idct_red_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JIDCT_INT_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
- return JSIMD_NONE;
-#endif /* IDCT_SCALING_SUPPORTED */
- default:
- ;
- }
-
- return JSIMD_NONE; /* not compiled */
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
diff --git a/jdhuff.c b/jdhuff.c
index 4f75ebe..b5ba39f 100644
--- a/jdhuff.c
+++ b/jdhuff.c
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified to improve performance.
- * Last Modified : October 31, 2004
- * ---------------------------------------------------------------------
- *
* This file contains Huffman entropy decoding routines.
*
* Much of the complexity here has to do with supporting input suspension.
@@ -158,8 +151,8 @@
{
JHUFF_TBL *htbl;
d_derived_tbl *dtbl;
- int p, i, l, la, lx, si, numsymbols;
- int lookbits, look_end, sym, val, ctr;
+ int p, i, l, si, numsymbols;
+ int lookbits, ctr;
char huffsize[257];
unsigned int huffcode[257];
unsigned int code;
@@ -241,34 +234,18 @@
* with that code.
*/
- MEMZERO(dtbl->lookx_nbits, SIZEOF(dtbl->lookx_nbits));
+ MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits));
p = 0;
- for (l = 1; l <= HUFFX_LOOKAHEAD-1; l++) {
+ for (l = 1; l <= HUFF_LOOKAHEAD; l++) {
for (i = 1; i <= (int) htbl->bits[l]; i++, p++) {
/* l = current code's length, p = its index in huffcode[] & huffval[]. */
/* Generate left-justified code followed by all possible bit sequences */
- sym = htbl->huffval[p]; /* current symbol */
- la = sym & 15; /* length of additional bits field */
- lx = HUFFX_LOOKAHEAD - l;
- lookbits = huffcode[p] << lx;
- look_end = lookbits + (1 << lx);
- lx -= la;
- while (lookbits < look_end) {
- if (lx >= 0) {
- val = (lookbits >> lx) & ((1 << la) - 1);
- ctr = 1 << lx;
- } else {
- val = (lookbits << -lx) & ((1 << la) - 1);
- ctr = 1;
- }
- val = HUFF_EXTEND(val, la);
- for (; ctr > 0; ctr--) {
- dtbl->lookx_nbits[lookbits] = l + la;
- dtbl->lookx_val[lookbits] = val;
- dtbl->lookx_sym[lookbits] = sym;
- lookbits++;
- }
+ lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l);
+ for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) {
+ dtbl->look_nbits[lookbits] = l;
+ dtbl->look_sym[lookbits] = htbl->huffval[p];
+ lookbits++;
}
}
}
@@ -294,8 +271,23 @@
* See jdhuff.h for info about usage.
* Note: current values of get_buffer and bits_left are passed as parameters,
* but are returned in the corresponding fields of the state struct.
+ *
+ * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width
+ * of get_buffer to be used. (On machines with wider words, an even larger
+ * buffer could be used.) However, on some machines 32-bit shifts are
+ * quite slow and take time proportional to the number of places shifted.
+ * (This is true with most PC compilers, for instance.) In this case it may
+ * be a win to set MIN_GET_BITS to the minimum value of 15. This reduces the
+ * average shift distance at the cost of more calls to jpeg_fill_bit_buffer.
*/
+#ifdef SLOW_SHIFT_32
+#define MIN_GET_BITS 15 /* minimum allowable value */
+#else
+#define MIN_GET_BITS (BIT_BUF_SIZE-7)
+#endif
+
+
GLOBAL(boolean)
jpeg_fill_bit_buffer (bitread_working_state * state,
register bit_buf_type get_buffer, register int bits_left,
@@ -442,6 +434,32 @@
/*
+ * Figure F.12: extend sign bit.
+ * On some machines, a shift and add will be faster than a table lookup.
+ */
+
+#ifdef AVOID_TABLES
+
+#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
+
+#else
+
+#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))
+
+static const int extend_test[16] = /* entry n is 2**(n-1) */
+ { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
+ 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
+
+static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
+ { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
+ ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
+ ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
+ ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
+
+#endif /* AVOID_TABLES */
+
+
+/*
* Check for a restart marker & resynchronize decoder.
* Returns FALSE if must suspend.
*/
@@ -530,59 +548,13 @@
/* Decode a single block's worth of coefficients */
/* Section F.2.2.1: decode the DC coefficient difference */
- { /* HUFFX_DECODE */
- register int nb, look, t;
- if (bits_left < HUFFX_LOOKAHEAD) {
- register const JOCTET * next_input_byte = br_state.next_input_byte;
- register size_t bytes_in_buffer = br_state.bytes_in_buffer;
- if (cinfo->unread_marker == 0) {
- while (bits_left < MIN_GET_BITS) {
- register int c;
- if (bytes_in_buffer == 0 ||
- (c = GETJOCTET(*next_input_byte)) == 0xFF) {
- goto label11; }
- bytes_in_buffer--; next_input_byte++;
- get_buffer = (get_buffer << 8) | c;
- bits_left += 8;
- }
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- } else {
- label11:
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- if (! jpeg_fill_bit_buffer(&br_state,get_buffer,bits_left, 0)) {
- return FALSE; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- if (bits_left < HUFFX_LOOKAHEAD) {
- nb = 1; goto label1;
- }
- }
- }
- look = PEEK_BITS(HUFFX_LOOKAHEAD);
- if ((nb = dctbl->lookx_nbits[look]) != 0) {
- s = dctbl->lookx_val[look];
- if (nb <= HUFFX_LOOKAHEAD) {
- DROP_BITS(nb);
- } else {
- DROP_BITS(HUFFX_LOOKAHEAD);
- nb -= HUFFX_LOOKAHEAD;
- CHECK_BIT_BUFFER(br_state, nb, return FALSE);
- s += GET_BITS(nb);
- }
- } else {
- nb = HUFFX_LOOKAHEAD;
- label1:
- if ((s=jpeg_huff_decode(&br_state,get_buffer,bits_left,dctbl,nb))
- < 0) { return FALSE; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- if (s) {
- CHECK_BIT_BUFFER(br_state, s, return FALSE);
- t = GET_BITS(s);
- s = HUFF_EXTEND(t, s);
- }
- }
+ HUFF_DECODE(s, br_state, dctbl, return FALSE, label1);
+ if (s) {
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ r = GET_BITS(s);
+ s = HUFF_EXTEND(r, s);
}
+
if (entropy->dc_needed[blkn]) {
/* Convert DC difference to actual value, update last_dc_val */
int ci = cinfo->MCU_membership[blkn];
@@ -597,65 +569,16 @@
/* Section F.2.2.2: decode the AC coefficients */
/* Since zeroes are skipped, output area must be cleared beforehand */
for (k = 1; k < DCTSIZE2; k++) {
- { /* HUFFX_DECODE */
- register int nb, look, t;
- if (bits_left < HUFFX_LOOKAHEAD) {
- register const JOCTET * next_input_byte
- = br_state.next_input_byte;
- register size_t bytes_in_buffer = br_state.bytes_in_buffer;
- if (cinfo->unread_marker == 0) {
- while (bits_left < MIN_GET_BITS) {
- register int c;
- if (bytes_in_buffer == 0 ||
- (c = GETJOCTET(*next_input_byte)) == 0xFF) {
- goto label21; }
- bytes_in_buffer--; next_input_byte++;
- get_buffer = (get_buffer << 8) | c;
- bits_left += 8;
- }
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- } else {
- label21:
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- if (! jpeg_fill_bit_buffer(&br_state,get_buffer,bits_left,0)) {
- return FALSE; }
- get_buffer = br_state.get_buffer;
- bits_left = br_state.bits_left;
- if (bits_left < HUFFX_LOOKAHEAD) {
- nb = 1; goto label2;
- }
- }
- }
- look = PEEK_BITS(HUFFX_LOOKAHEAD);
- if ((nb = actbl->lookx_nbits[look]) != 0) {
- s = actbl->lookx_val[look];
- r = actbl->lookx_sym[look] >> 4;
- if (nb <= HUFFX_LOOKAHEAD) {
- DROP_BITS(nb);
- } else {
- DROP_BITS(HUFFX_LOOKAHEAD);
- nb -= HUFFX_LOOKAHEAD;
- CHECK_BIT_BUFFER(br_state, nb, return FALSE);
- s += GET_BITS(nb);
- }
- } else {
- nb = HUFFX_LOOKAHEAD;
- label2:
- if ((s=jpeg_huff_decode(&br_state,get_buffer,bits_left,actbl,nb))
- < 0) { return FALSE; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- r = s >> 4; s &= 15;
- if (s) {
- CHECK_BIT_BUFFER(br_state, s, return FALSE);
- t = GET_BITS(s);
- s = HUFF_EXTEND(t, s);
- }
- }
- }
+ HUFF_DECODE(s, br_state, actbl, return FALSE, label2);
+
+ r = s >> 4;
+ s &= 15;
+
if (s) {
k += r;
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ r = GET_BITS(s);
+ s = HUFF_EXTEND(r, s);
/* Output coefficient in natural (dezigzagged) order.
* Note: the extra entries in jpeg_natural_order[] will save us
* if k >= DCTSIZE2, which could happen if the data is corrupted.
@@ -673,64 +596,15 @@
/* Section F.2.2.2: decode the AC coefficients */
/* In this path we just discard the values */
for (k = 1; k < DCTSIZE2; k++) {
- { /* HUFFX_DECODE */
- register int nb, look;
- if (bits_left < HUFFX_LOOKAHEAD) {
- register const JOCTET * next_input_byte
- = br_state.next_input_byte;
- register size_t bytes_in_buffer = br_state.bytes_in_buffer;
- if (cinfo->unread_marker == 0) {
- while (bits_left < MIN_GET_BITS) {
- register int c;
- if (bytes_in_buffer == 0 ||
- (c = GETJOCTET(*next_input_byte)) == 0xFF) {
- goto label31; }
- bytes_in_buffer--; next_input_byte++;
- get_buffer = (get_buffer << 8) | c;
- bits_left += 8;
- }
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- } else {
- label31:
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- if (! jpeg_fill_bit_buffer(&br_state,get_buffer,bits_left,0)) {
- return FALSE; }
- get_buffer = br_state.get_buffer;
- bits_left = br_state.bits_left;
- if (bits_left < HUFFX_LOOKAHEAD) {
- nb = 1; goto label3;
- }
- }
- }
- look = PEEK_BITS(HUFFX_LOOKAHEAD);
- if ((nb = actbl->lookx_nbits[look]) != 0) {
- s = actbl->lookx_sym[look];
- r = s >> 4; s &= 15;
- if (nb <= HUFFX_LOOKAHEAD) {
- DROP_BITS(nb);
- } else {
- DROP_BITS(HUFFX_LOOKAHEAD);
- nb -= HUFFX_LOOKAHEAD;
- CHECK_BIT_BUFFER(br_state, nb, return FALSE);
- DROP_BITS(nb);
- }
- } else {
- nb = HUFFX_LOOKAHEAD;
- label3:
- if ((s=jpeg_huff_decode(&br_state,get_buffer,bits_left,actbl,nb))
- < 0) { return FALSE; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- r = s >> 4; s &= 15;
- if (s) {
- CHECK_BIT_BUFFER(br_state, s, return FALSE);
- DROP_BITS(s);
- }
- }
- }
+ HUFF_DECODE(s, br_state, actbl, return FALSE, label3);
+
+ r = s >> 4;
+ s &= 15;
+
if (s) {
k += r;
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ DROP_BITS(s);
} else {
if (r != 15)
break;
diff --git a/jdhuff.h b/jdhuff.h
index b5e193e..ae19b6c 100644
--- a/jdhuff.h
+++ b/jdhuff.h
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified to improve performance.
- * Last Modified : October 31, 2004
- * ---------------------------------------------------------------------
- *
* This file contains declarations for Huffman entropy decoding routines
* that are shared between the sequential decoder (jdhuff.c) and the
* progressive decoder (jdphuff.c). No other modules need to see these.
@@ -28,7 +21,7 @@
/* Derived data constructed for each Huffman table */
-#define HUFFX_LOOKAHEAD 9 /* # of bits of lookahead */
+#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */
typedef struct {
/* Basic tables: (element [0] of each array is unused) */
@@ -43,15 +36,13 @@
/* Link to public Huffman table (needed only in jpeg_huff_decode) */
JHUFF_TBL *pub;
- /* Lookahead tables: indexed by the next HUFFX_LOOKAHEAD bits of
+ /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of
* the input data stream. If the next Huffman code is no more
- * than HUFFX_LOOKAHEAD-1 bits long, we can obtain its length,
- * the corresponding symbol, and the encoded coefficient value
- * directly from these tables.
+ * than HUFF_LOOKAHEAD bits long, we can obtain its length and
+ * the corresponding symbol directly from these tables.
*/
- UINT8 lookx_nbits[1<<HUFFX_LOOKAHEAD]; /* # bits, or 0 if too long */
- INT16 lookx_val[1<<HUFFX_LOOKAHEAD]; /* coefficient value, or unused */
- UINT8 lookx_sym[1<<HUFFX_LOOKAHEAD]; /* symbol, or unused */
+ int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */
+ UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */
} d_derived_tbl;
/* Expand a Huffman table definition into the derived format */
@@ -88,21 +79,6 @@
* because not all machines measure sizeof in 8-bit bytes.
*/
-#ifdef SLOW_SHIFT_32
-#define MIN_GET_BITS 15 /* minimum allowable value */
-#else
-#define MIN_GET_BITS (BIT_BUF_SIZE-7)
-#endif
-
-/* On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width
- * of get_buffer to be used. (On machines with wider words, an even larger
- * buffer could be used.) However, on some machines 32-bit shifts are
- * quite slow and take time proportional to the number of places shifted.
- * (This is true with most PC compilers, for instance.) In this case it may
- * be a win to set MIN_GET_BITS to the minimum value of 15. This reduces the
- * average shift distance at the cost of more calls to jpeg_fill_bit_buffer.
- */
-
typedef struct { /* Bitreading state saved across MCUs */
bit_buf_type get_buffer; /* current bit-extraction buffer */
int bits_left; /* # of unused bits in it */
@@ -133,7 +109,7 @@
br_state.next_input_byte = cinfop->src->next_input_byte; \
br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \
get_buffer = permstate.get_buffer; \
- bits_left = permstate.bits_left
+ bits_left = permstate.bits_left;
#define BITREAD_SAVE_STATE(cinfop,permstate) \
cinfop->src->next_input_byte = br_state.next_input_byte; \
@@ -179,14 +155,47 @@
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
register int bits_left, int nbits));
+
+/*
+ * Code for extracting next Huffman-coded symbol from input bit stream.
+ * Again, this is time-critical and we make the main paths be macros.
+ *
+ * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits
+ * without looping. Usually, more than 95% of the Huffman codes will be 8
+ * or fewer bits long. The few overlength codes are handled with a loop,
+ * which need not be inline code.
+ *
+ * Notes about the HUFF_DECODE macro:
+ * 1. Near the end of the data segment, we may fail to get enough bits
+ * for a lookahead. In that case, we do it the hard way.
+ * 2. If the lookahead table contains no entry, the next code must be
+ * more than HUFF_LOOKAHEAD bits long.
+ * 3. jpeg_huff_decode returns -1 if forced to suspend.
+ */
+
+#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
+{ register int nb, look; \
+ if (bits_left < HUFF_LOOKAHEAD) { \
+ if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
+ get_buffer = state.get_buffer; bits_left = state.bits_left; \
+ if (bits_left < HUFF_LOOKAHEAD) { \
+ nb = 1; goto slowlabel; \
+ } \
+ } \
+ look = PEEK_BITS(HUFF_LOOKAHEAD); \
+ if ((nb = htbl->look_nbits[look]) != 0) { \
+ DROP_BITS(nb); \
+ result = htbl->look_sym[look]; \
+ } else { \
+ nb = HUFF_LOOKAHEAD+1; \
+slowlabel: \
+ if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
+ { failaction; } \
+ get_buffer = state.get_buffer; bits_left = state.bits_left; \
+ } \
+}
+
/* Out-of-line case for Huffman code fetching */
EXTERN(int) jpeg_huff_decode
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
register int bits_left, d_derived_tbl * htbl, int min_bits));
-
-
-/*
- * Figure F.12: extend sign bit.
- */
-
-#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
diff --git a/jdmerge.c b/jdmerge.c
index f440d40..7742941 100644
--- a/jdmerge.c
+++ b/jdmerge.c
@@ -2,16 +2,10 @@
* jdmerge.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 5, 2006
- * ---------------------------------------------------------------------
- *
* This file contains code for merged upsampling/color conversion.
*
* This file combines functions from jdsample.c and jdcolor.c;
@@ -42,7 +36,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "jcolsamp.h" /* Private declarations */
+#include "jsimd.h"
#ifdef UPSAMPLE_MERGING_SUPPORTED
@@ -226,17 +220,6 @@
*/
-#if RGB_PIXELSIZE == 4
-/* offset of filler byte */
-#define RGB_FILLER (6 - (RGB_RED) - (RGB_GREEN) - (RGB_BLUE))
-/* byte pattern to fill with */
-#ifdef RGBX_FILLER_0XFF
-#define RGB_FILLER_BYTE 0xFF
-#else
-#define RGB_FILLER_BYTE 0x00
-#endif
-#endif /* RGB_PIXELSIZE == 4 */
-
/*
* Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical.
*/
@@ -277,17 +260,11 @@
outptr[RGB_RED] = range_limit[y + cred];
outptr[RGB_GREEN] = range_limit[y + cgreen];
outptr[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
outptr += RGB_PIXELSIZE;
y = GETJSAMPLE(*inptr0++);
outptr[RGB_RED] = range_limit[y + cred];
outptr[RGB_GREEN] = range_limit[y + cgreen];
outptr[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
outptr += RGB_PIXELSIZE;
}
/* If image width is odd, do the last output column separately */
@@ -301,9 +278,6 @@
outptr[RGB_RED] = range_limit[y + cred];
outptr[RGB_GREEN] = range_limit[y + cgreen];
outptr[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
}
}
@@ -350,33 +324,21 @@
outptr0[RGB_RED] = range_limit[y + cred];
outptr0[RGB_GREEN] = range_limit[y + cgreen];
outptr0[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr0[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
outptr0 += RGB_PIXELSIZE;
y = GETJSAMPLE(*inptr00++);
outptr0[RGB_RED] = range_limit[y + cred];
outptr0[RGB_GREEN] = range_limit[y + cgreen];
outptr0[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr0[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
outptr0 += RGB_PIXELSIZE;
y = GETJSAMPLE(*inptr01++);
outptr1[RGB_RED] = range_limit[y + cred];
outptr1[RGB_GREEN] = range_limit[y + cgreen];
outptr1[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr1[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
outptr1 += RGB_PIXELSIZE;
y = GETJSAMPLE(*inptr01++);
outptr1[RGB_RED] = range_limit[y + cred];
outptr1[RGB_GREEN] = range_limit[y + cgreen];
outptr1[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr1[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
outptr1 += RGB_PIXELSIZE;
}
/* If image width is odd, do the last output column separately */
@@ -390,16 +352,10 @@
outptr0[RGB_RED] = range_limit[y + cred];
outptr0[RGB_GREEN] = range_limit[y + cgreen];
outptr0[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr0[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
y = GETJSAMPLE(*inptr01);
outptr1[RGB_RED] = range_limit[y + cred];
outptr1[RGB_GREEN] = range_limit[y + cgreen];
outptr1[RGB_BLUE] = range_limit[y + cblue];
-#if RGB_PIXELSIZE == 4
- outptr1[RGB_FILLER] = RGB_FILLER_BYTE;
-#endif
}
}
@@ -416,7 +372,6 @@
jinit_merged_upsampler (j_decompress_ptr cinfo)
{
my_upsample_ptr upsample;
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
upsample = (my_upsample_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -429,73 +384,25 @@
if (cinfo->max_v_samp_factor == 2) {
upsample->pub.upsample = merged_2v_upsample;
-#if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-#ifdef JDMERGE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_merged_upsample_sse2)) {
- upsample->upmethod = jpeg_h2v2_merged_upsample_sse2;
- } else
-#endif
-#ifdef JDMERGE_MMX_SUPPORTED
- if (simd & JSIMD_MMX) {
- upsample->upmethod = jpeg_h2v2_merged_upsample_mmx;
- } else
-#endif
-#endif /* RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4 */
- {
+ if (jsimd_can_h2v2_merged_upsample())
+ upsample->upmethod = jsimd_h2v2_merged_upsample;
+ else
upsample->upmethod = h2v2_merged_upsample;
- build_ycc_rgb_table(cinfo);
- }
/* Allocate a spare row buffer */
upsample->spare_row = (JSAMPROW)
(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(size_t) (upsample->out_row_width * SIZEOF(JSAMPLE)));
} else {
upsample->pub.upsample = merged_1v_upsample;
-#if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-#ifdef JDMERGE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_merged_upsample_sse2)) {
- upsample->upmethod = jpeg_h2v1_merged_upsample_sse2;
- } else
-#endif
-#ifdef JDMERGE_MMX_SUPPORTED
- if (simd & JSIMD_MMX) {
- upsample->upmethod = jpeg_h2v1_merged_upsample_mmx;
- } else
-#endif
-#endif /* RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4 */
- {
+ if (jsimd_can_h2v1_merged_upsample())
+ upsample->upmethod = jsimd_h2v1_merged_upsample;
+ else
upsample->upmethod = h2v1_merged_upsample;
- build_ycc_rgb_table(cinfo);
- }
/* No spare row needed */
upsample->spare_row = NULL;
}
+
+ build_ycc_rgb_table(cinfo);
}
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-GLOBAL(unsigned int)
-jpeg_simd_merged_upsampler (j_decompress_ptr cinfo)
-{
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
-
-#if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-#ifdef JDMERGE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_merged_upsample_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JDMERGE_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
-#endif /* RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4 */
-
- return JSIMD_NONE;
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
#endif /* UPSAMPLE_MERGING_SUPPORTED */
diff --git a/jdmermmx.asm b/jdmermmx.asm
deleted file mode 100644
index 4c88515..0000000
--- a/jdmermmx.asm
+++ /dev/null
@@ -1,981 +0,0 @@
-;
-; jdmermmx.asm - merged upsampling/color conversion (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-%ifdef UPSAMPLE_MERGING_SUPPORTED
-%ifdef JDMERGE_MMX_SUPPORTED
-
-; --------------------------------------------------------------------------
-
-%define SCALEBITS 16
-
-F_0_344 equ 22554 ; FIX(0.34414)
-F_0_714 equ 46802 ; FIX(0.71414)
-F_1_402 equ 91881 ; FIX(1.40200)
-F_1_772 equ 116130 ; FIX(1.77200)
-F_0_402 equ (F_1_402 - 65536) ; FIX(1.40200) - FIX(1)
-F_0_285 equ ( 65536 - F_0_714) ; FIX(1) - FIX(0.71414)
-F_0_228 equ (131072 - F_1_772) ; FIX(2) - FIX(1.77200)
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_merged_upsample_mmx)
-
-EXTN(jconst_merged_upsample_mmx):
-
-PW_F0402 times 4 dw F_0_402
-PW_MF0228 times 4 dw -F_0_228
-PW_MF0344_F0285 times 2 dw -F_0_344, F_0_285
-PW_ONE times 4 dw 1
-PD_ONEHALF times 2 dd 1 << (SCALEBITS-1)
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical.
-;
-; GLOBAL(void)
-; jpeg_h2v1_merged_upsample_mmx (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
-; JDIMENSION in_row_group_ctr,
-; JSAMPARRAY output_buf);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
-%define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 3
-%define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_h2v1_merged_upsample_mmx)
-
-EXTN(jpeg_h2v1_merged_upsample_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov ecx, POINTER [cinfo(eax)]
- mov ecx, JDIMENSION [jdstruct_output_width(ecx)] ; col
- test ecx,ecx
- jz near .return
-
- push ecx
-
- mov edi, JSAMPIMAGE [input_buf(eax)]
- mov ecx, JDIMENSION [in_row_group_ctr(eax)]
- mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
- mov edi, JSAMPARRAY [output_buf(eax)]
- mov esi, JSAMPROW [esi+ecx*SIZEOF_JSAMPROW] ; inptr0
- mov ebx, JSAMPROW [ebx+ecx*SIZEOF_JSAMPROW] ; inptr1
- mov edx, JSAMPROW [edx+ecx*SIZEOF_JSAMPROW] ; inptr2
- mov edi, JSAMPROW [edi] ; outptr
-
- pop ecx ; col
-
- alignx 16,7
-.columnloop:
- movpic eax, POINTER [gotptr] ; load GOT address (eax)
-
- movq mm6, MMWORD [ebx] ; mm6=Cb(01234567)
- movq mm7, MMWORD [edx] ; mm7=Cr(01234567)
-
- pxor mm1,mm1 ; mm1=(all 0's)
- pcmpeqw mm3,mm3
- psllw mm3,7 ; mm3={0xFF80 0xFF80 0xFF80 0xFF80}
-
- movq mm4,mm6
- punpckhbw mm6,mm1 ; mm6=Cb(4567)=CbH
- punpcklbw mm4,mm1 ; mm4=Cb(0123)=CbL
- movq mm0,mm7
- punpckhbw mm7,mm1 ; mm7=Cr(4567)=CrH
- punpcklbw mm0,mm1 ; mm0=Cr(0123)=CrL
-
- paddw mm6,mm3
- paddw mm4,mm3
- paddw mm7,mm3
- paddw mm0,mm3
-
- ; (Original)
- ; R = Y + 1.40200 * Cr
- ; G = Y - 0.34414 * Cb - 0.71414 * Cr
- ; B = Y + 1.77200 * Cb
- ;
- ; (This implementation)
- ; R = Y + 0.40200 * Cr + Cr
- ; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr
- ; B = Y - 0.22800 * Cb + Cb + Cb
-
- movq mm5,mm6 ; mm5=CbH
- movq mm2,mm4 ; mm2=CbL
- paddw mm6,mm6 ; mm6=2*CbH
- paddw mm4,mm4 ; mm4=2*CbL
- movq mm1,mm7 ; mm1=CrH
- movq mm3,mm0 ; mm3=CrL
- paddw mm7,mm7 ; mm7=2*CrH
- paddw mm0,mm0 ; mm0=2*CrL
-
- pmulhw mm6,[GOTOFF(eax,PW_MF0228)] ; mm6=(2*CbH * -FIX(0.22800))
- pmulhw mm4,[GOTOFF(eax,PW_MF0228)] ; mm4=(2*CbL * -FIX(0.22800))
- pmulhw mm7,[GOTOFF(eax,PW_F0402)] ; mm7=(2*CrH * FIX(0.40200))
- pmulhw mm0,[GOTOFF(eax,PW_F0402)] ; mm0=(2*CrL * FIX(0.40200))
-
- paddw mm6,[GOTOFF(eax,PW_ONE)]
- paddw mm4,[GOTOFF(eax,PW_ONE)]
- psraw mm6,1 ; mm6=(CbH * -FIX(0.22800))
- psraw mm4,1 ; mm4=(CbL * -FIX(0.22800))
- paddw mm7,[GOTOFF(eax,PW_ONE)]
- paddw mm0,[GOTOFF(eax,PW_ONE)]
- psraw mm7,1 ; mm7=(CrH * FIX(0.40200))
- psraw mm0,1 ; mm0=(CrL * FIX(0.40200))
-
- paddw mm6,mm5
- paddw mm4,mm2
- paddw mm6,mm5 ; mm6=(CbH * FIX(1.77200))=(B-Y)H
- paddw mm4,mm2 ; mm4=(CbL * FIX(1.77200))=(B-Y)L
- paddw mm7,mm1 ; mm7=(CrH * FIX(1.40200))=(R-Y)H
- paddw mm0,mm3 ; mm0=(CrL * FIX(1.40200))=(R-Y)L
-
- movq MMWORD [wk(0)], mm6 ; wk(0)=(B-Y)H
- movq MMWORD [wk(1)], mm7 ; wk(1)=(R-Y)H
-
- movq mm6,mm5
- movq mm7,mm2
- punpcklwd mm5,mm1
- punpckhwd mm6,mm1
- pmaddwd mm5,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd mm6,[GOTOFF(eax,PW_MF0344_F0285)]
- punpcklwd mm2,mm3
- punpckhwd mm7,mm3
- pmaddwd mm2,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd mm7,[GOTOFF(eax,PW_MF0344_F0285)]
-
- paddd mm5,[GOTOFF(eax,PD_ONEHALF)]
- paddd mm6,[GOTOFF(eax,PD_ONEHALF)]
- psrad mm5,SCALEBITS
- psrad mm6,SCALEBITS
- paddd mm2,[GOTOFF(eax,PD_ONEHALF)]
- paddd mm7,[GOTOFF(eax,PD_ONEHALF)]
- psrad mm2,SCALEBITS
- psrad mm7,SCALEBITS
-
- packssdw mm5,mm6 ; mm5=CbH*-FIX(0.344)+CrH*FIX(0.285)
- packssdw mm2,mm7 ; mm2=CbL*-FIX(0.344)+CrL*FIX(0.285)
- psubw mm5,mm1 ; mm5=CbH*-FIX(0.344)+CrH*-FIX(0.714)=(G-Y)H
- psubw mm2,mm3 ; mm2=CbL*-FIX(0.344)+CrL*-FIX(0.714)=(G-Y)L
-
- movq MMWORD [wk(2)], mm5 ; wk(2)=(G-Y)H
-
- mov al,2 ; Yctr
- jmp short .Yloop_1st
- alignx 16,7
-
-.Yloop_2nd:
- movq mm0, MMWORD [wk(1)] ; mm0=(R-Y)H
- movq mm2, MMWORD [wk(2)] ; mm2=(G-Y)H
- movq mm4, MMWORD [wk(0)] ; mm4=(B-Y)H
- alignx 16,7
-
-.Yloop_1st:
- movq mm7, MMWORD [esi] ; mm7=Y(01234567)
-
- pcmpeqw mm6,mm6
- psrlw mm6,BYTE_BIT ; mm6={0xFF 0x00 0xFF 0x00 ..}
- pand mm6,mm7 ; mm6=Y(0246)=YE
- psrlw mm7,BYTE_BIT ; mm7=Y(1357)=YO
-
- movq mm1,mm0 ; mm1=mm0=(R-Y)(L/H)
- movq mm3,mm2 ; mm3=mm2=(G-Y)(L/H)
- movq mm5,mm4 ; mm5=mm4=(B-Y)(L/H)
-
- paddw mm0,mm6 ; mm0=((R-Y)+YE)=RE=(R0 R2 R4 R6)
- paddw mm1,mm7 ; mm1=((R-Y)+YO)=RO=(R1 R3 R5 R7)
- packuswb mm0,mm0 ; mm0=(R0 R2 R4 R6 ** ** ** **)
- packuswb mm1,mm1 ; mm1=(R1 R3 R5 R7 ** ** ** **)
-
- paddw mm2,mm6 ; mm2=((G-Y)+YE)=GE=(G0 G2 G4 G6)
- paddw mm3,mm7 ; mm3=((G-Y)+YO)=GO=(G1 G3 G5 G7)
- packuswb mm2,mm2 ; mm2=(G0 G2 G4 G6 ** ** ** **)
- packuswb mm3,mm3 ; mm3=(G1 G3 G5 G7 ** ** ** **)
-
- paddw mm4,mm6 ; mm4=((B-Y)+YE)=BE=(B0 B2 B4 B6)
- paddw mm5,mm7 ; mm5=((B-Y)+YO)=BO=(B1 B3 B5 B7)
- packuswb mm4,mm4 ; mm4=(B0 B2 B4 B6 ** ** ** **)
- packuswb mm5,mm5 ; mm5=(B1 B3 B5 B7 ** ** ** **)
-
-%if RGB_PIXELSIZE == 3 ; ---------------
-
- ; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
- ; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
- ; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
- ; mmG=(** ** ** ** ** ** ** **), mmH=(** ** ** ** ** ** ** **)
-
- punpcklbw mmA,mmC ; mmA=(00 10 02 12 04 14 06 16)
- punpcklbw mmE,mmB ; mmE=(20 01 22 03 24 05 26 07)
- punpcklbw mmD,mmF ; mmD=(11 21 13 23 15 25 17 27)
-
- movq mmG,mmA
- movq mmH,mmA
- punpcklwd mmA,mmE ; mmA=(00 10 20 01 02 12 22 03)
- punpckhwd mmG,mmE ; mmG=(04 14 24 05 06 16 26 07)
-
- psrlq mmH,2*BYTE_BIT ; mmH=(02 12 04 14 06 16 -- --)
- psrlq mmE,2*BYTE_BIT ; mmE=(22 03 24 05 26 07 -- --)
-
- movq mmC,mmD
- movq mmB,mmD
- punpcklwd mmD,mmH ; mmD=(11 21 02 12 13 23 04 14)
- punpckhwd mmC,mmH ; mmC=(15 25 06 16 17 27 -- --)
-
- psrlq mmB,2*BYTE_BIT ; mmB=(13 23 15 25 17 27 -- --)
-
- movq mmF,mmE
- punpcklwd mmE,mmB ; mmE=(22 03 13 23 24 05 15 25)
- punpckhwd mmF,mmB ; mmF=(26 07 17 27 -- -- -- --)
-
- punpckldq mmA,mmD ; mmA=(00 10 20 01 11 21 02 12)
- punpckldq mmE,mmG ; mmE=(22 03 13 23 04 14 24 05)
- punpckldq mmC,mmF ; mmC=(15 25 06 16 26 07 17 27)
-
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st16
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
- movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
-
- sub ecx, byte SIZEOF_MMWORD
- jz short .endcolumn
-
- add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr
- add esi, byte SIZEOF_MMWORD ; inptr0
- dec al ; Yctr
- jnz near .Yloop_2nd
-
- add ebx, byte SIZEOF_MMWORD ; inptr1
- add edx, byte SIZEOF_MMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st16:
- lea ecx, [ecx+ecx*2] ; imul ecx, RGB_PIXELSIZE
- cmp ecx, byte 2*SIZEOF_MMWORD
- jb short .column_st8
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
- movq mmA,mmC
- sub ecx, byte 2*SIZEOF_MMWORD
- add edi, byte 2*SIZEOF_MMWORD
- jmp short .column_st4
-.column_st8:
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st4
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq mmA,mmE
- sub ecx, byte SIZEOF_MMWORD
- add edi, byte SIZEOF_MMWORD
-.column_st4:
- movd eax,mmA
- cmp ecx, byte SIZEOF_DWORD
- jb short .column_st2
- mov DWORD [edi+0*SIZEOF_DWORD], eax
- psrlq mmA,DWORD_BIT
- movd eax,mmA
- sub ecx, byte SIZEOF_DWORD
- add edi, byte SIZEOF_DWORD
-.column_st2:
- cmp ecx, byte SIZEOF_WORD
- jb short .column_st1
- mov WORD [edi+0*SIZEOF_WORD], ax
- shr eax,WORD_BIT
- sub ecx, byte SIZEOF_WORD
- add edi, byte SIZEOF_WORD
-.column_st1:
- cmp ecx, byte SIZEOF_BYTE
- jb short .endcolumn
- mov BYTE [edi+0*SIZEOF_BYTE], al
-
-%else ; RGB_PIXELSIZE == 4 ; -----------
-
-%ifdef RGBX_FILLER_0XFF
- pcmpeqb mm6,mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
- pcmpeqb mm7,mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
-%else
- pxor mm6,mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
- pxor mm7,mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
-%endif
- ; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
- ; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
- ; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
- ; mmG=(30 32 34 36 ** ** ** **), mmH=(31 33 35 37 ** ** ** **)
-
- punpcklbw mmA,mmC ; mmA=(00 10 02 12 04 14 06 16)
- punpcklbw mmE,mmG ; mmE=(20 30 22 32 24 34 26 36)
- punpcklbw mmB,mmD ; mmB=(01 11 03 13 05 15 07 17)
- punpcklbw mmF,mmH ; mmF=(21 31 23 33 25 35 27 37)
-
- movq mmC,mmA
- punpcklwd mmA,mmE ; mmA=(00 10 20 30 02 12 22 32)
- punpckhwd mmC,mmE ; mmC=(04 14 24 34 06 16 26 36)
- movq mmG,mmB
- punpcklwd mmB,mmF ; mmB=(01 11 21 31 03 13 23 33)
- punpckhwd mmG,mmF ; mmG=(05 15 25 35 07 17 27 37)
-
- movq mmD,mmA
- punpckldq mmA,mmB ; mmA=(00 10 20 30 01 11 21 31)
- punpckhdq mmD,mmB ; mmD=(02 12 22 32 03 13 23 33)
- movq mmH,mmC
- punpckldq mmC,mmG ; mmC=(04 14 24 34 05 15 25 35)
- punpckhdq mmH,mmG ; mmH=(06 16 26 36 07 17 27 37)
-
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st16
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
- movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
- movq MMWORD [edi+3*SIZEOF_MMWORD], mmH
-
- sub ecx, byte SIZEOF_MMWORD
- jz short .endcolumn
-
- add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr
- add esi, byte SIZEOF_MMWORD ; inptr0
- dec al ; Yctr
- jnz near .Yloop_2nd
-
- add ebx, byte SIZEOF_MMWORD ; inptr1
- add edx, byte SIZEOF_MMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st16:
- cmp ecx, byte SIZEOF_MMWORD/2
- jb short .column_st8
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
- movq mmA,mmC
- movq mmD,mmH
- sub ecx, byte SIZEOF_MMWORD/2
- add edi, byte 2*SIZEOF_MMWORD
-.column_st8:
- cmp ecx, byte SIZEOF_MMWORD/4
- jb short .column_st4
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq mmA,mmD
- sub ecx, byte SIZEOF_MMWORD/4
- add edi, byte 1*SIZEOF_MMWORD
-.column_st4:
- cmp ecx, byte SIZEOF_MMWORD/8
- jb short .endcolumn
- movd DWORD [edi+0*SIZEOF_DWORD], mmA
-
-%endif ; RGB_PIXELSIZE ; ---------------
-
-.endcolumn:
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%ifndef USE_DEDICATED_H2V2_MERGED_UPSAMPLE_MMX
-
-; --------------------------------------------------------------------------
-;
-; Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.
-;
-; GLOBAL(void)
-; jpeg_h2v2_merged_upsample_mmx (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
-; JDIMENSION in_row_group_ctr,
-; JSAMPARRAY output_buf);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
-%define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-
- align 16
- global EXTN(jpeg_h2v2_merged_upsample_mmx)
-
-EXTN(jpeg_h2v2_merged_upsample_mmx):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov eax, POINTER [cinfo(ebp)]
-
- mov edi, JSAMPIMAGE [input_buf(ebp)]
- mov ecx, JDIMENSION [in_row_group_ctr(ebp)]
- mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
- mov edi, JSAMPARRAY [output_buf(ebp)]
- lea esi, [esi+ecx*SIZEOF_JSAMPROW]
-
- push edx ; inptr2
- push ebx ; inptr1
- push esi ; inptr00
- mov ebx,esp
-
- push edi ; output_buf (outptr0)
- push ecx ; in_row_group_ctr
- push ebx ; input_buf
- push eax ; cinfo
-
- call near EXTN(jpeg_h2v1_merged_upsample_mmx)
-
- add esi, byte SIZEOF_JSAMPROW ; inptr01
- add edi, byte SIZEOF_JSAMPROW ; outptr1
- mov POINTER [ebx+0*SIZEOF_POINTER], esi
- mov POINTER [ebx-1*SIZEOF_POINTER], edi
-
- call near EXTN(jpeg_h2v1_merged_upsample_mmx)
-
- add esp, byte 7*SIZEOF_DWORD
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%else ; USE_DEDICATED_H2V2_MERGED_UPSAMPLE_MMX
-
-; --------------------------------------------------------------------------
-;
-; Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.
-;
-; GLOBAL(void)
-; jpeg_h2v2_merged_upsample_mmx (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
-; JDIMENSION in_row_group_ctr,
-; JSAMPARRAY output_buf);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
-%define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 10
-%define inptr1 wk(0)-SIZEOF_JSAMPROW ; JSAMPROW inptr1
-%define inptr2 inptr1-SIZEOF_JSAMPROW ; JSAMPROW inptr2
-%define gotptr inptr2-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_h2v2_merged_upsample_mmx)
-
-EXTN(jpeg_h2v2_merged_upsample_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [inptr2]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov ecx, POINTER [cinfo(eax)]
- mov ecx, JDIMENSION [jdstruct_output_width(ecx)] ; col
- test ecx,ecx
- jz near .return
-
- push ecx
-
- mov edi, JSAMPIMAGE [input_buf(eax)]
- mov ecx, JDIMENSION [in_row_group_ctr(eax)]
- mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
- mov edi, JSAMPARRAY [output_buf(eax)]
- mov eax, JSAMPROW [esi+(ecx*2+0)*SIZEOF_JSAMPROW] ; inptr00
- mov esi, JSAMPROW [esi+(ecx*2+1)*SIZEOF_JSAMPROW] ; inptr01
- mov ebx, JSAMPROW [ebx+ecx*SIZEOF_JSAMPROW] ; inptr1
- mov edx, JSAMPROW [edx+ecx*SIZEOF_JSAMPROW] ; inptr2
-
- pop ecx ; col
- push eax ; inptr00
- push esi ; inptr01
-
- mov esi, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0
- mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1
- alignx 16,7
-.columnloop:
- movpic eax, POINTER [gotptr] ; load GOT address (eax)
-
- movq mm6, MMWORD [ebx] ; mm6=Cb(01234567)
- movq mm7, MMWORD [edx] ; mm7=Cr(01234567)
-
- mov JSAMPROW [inptr1], ebx ; inptr1
- mov JSAMPROW [inptr2], edx ; inptr2
- pop edx ; edx=inptr01
- pop ebx ; ebx=inptr00
-
- pxor mm1,mm1 ; mm1=(all 0's)
- pcmpeqw mm3,mm3
- psllw mm3,7 ; mm3={0xFF80 0xFF80 0xFF80 0xFF80}
-
- movq mm4,mm6
- punpckhbw mm6,mm1 ; mm6=Cb(4567)=CbH
- punpcklbw mm4,mm1 ; mm4=Cb(0123)=CbL
- movq mm0,mm7
- punpckhbw mm7,mm1 ; mm7=Cr(4567)=CrH
- punpcklbw mm0,mm1 ; mm0=Cr(0123)=CrL
-
- paddw mm6,mm3
- paddw mm4,mm3
- paddw mm7,mm3
- paddw mm0,mm3
-
- ; (Original)
- ; R = Y + 1.40200 * Cr
- ; G = Y - 0.34414 * Cb - 0.71414 * Cr
- ; B = Y + 1.77200 * Cb
- ;
- ; (This implementation)
- ; R = Y + 0.40200 * Cr + Cr
- ; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr
- ; B = Y - 0.22800 * Cb + Cb + Cb
-
- movq mm5,mm6 ; mm5=CbH
- movq mm2,mm4 ; mm2=CbL
- paddw mm6,mm6 ; mm6=2*CbH
- paddw mm4,mm4 ; mm4=2*CbL
- movq mm1,mm7 ; mm1=CrH
- movq mm3,mm0 ; mm3=CrL
- paddw mm7,mm7 ; mm7=2*CrH
- paddw mm0,mm0 ; mm0=2*CrL
-
- pmulhw mm6,[GOTOFF(eax,PW_MF0228)] ; mm6=(2*CbH * -FIX(0.22800))
- pmulhw mm4,[GOTOFF(eax,PW_MF0228)] ; mm4=(2*CbL * -FIX(0.22800))
- pmulhw mm7,[GOTOFF(eax,PW_F0402)] ; mm7=(2*CrH * FIX(0.40200))
- pmulhw mm0,[GOTOFF(eax,PW_F0402)] ; mm0=(2*CrL * FIX(0.40200))
-
- paddw mm6,[GOTOFF(eax,PW_ONE)]
- paddw mm4,[GOTOFF(eax,PW_ONE)]
- psraw mm6,1 ; mm6=(CbH * -FIX(0.22800))
- psraw mm4,1 ; mm4=(CbL * -FIX(0.22800))
- paddw mm7,[GOTOFF(eax,PW_ONE)]
- paddw mm0,[GOTOFF(eax,PW_ONE)]
- psraw mm7,1 ; mm7=(CrH * FIX(0.40200))
- psraw mm0,1 ; mm0=(CrL * FIX(0.40200))
-
- paddw mm6,mm5
- paddw mm4,mm2
- paddw mm6,mm5 ; mm6=(CbH * FIX(1.77200))=(B-Y)H
- paddw mm4,mm2 ; mm4=(CbL * FIX(1.77200))=(B-Y)L
- paddw mm7,mm1 ; mm7=(CrH * FIX(1.40200))=(R-Y)H
- paddw mm0,mm3 ; mm0=(CrL * FIX(1.40200))=(R-Y)L
-
- movq MMWORD [wk(0)], mm6 ; wk(0)=(B-Y)H
- movq MMWORD [wk(1)], mm7 ; wk(1)=(R-Y)H
-
- movq mm6,mm5
- movq mm7,mm2
- punpcklwd mm5,mm1
- punpckhwd mm6,mm1
- pmaddwd mm5,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd mm6,[GOTOFF(eax,PW_MF0344_F0285)]
- punpcklwd mm2,mm3
- punpckhwd mm7,mm3
- pmaddwd mm2,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd mm7,[GOTOFF(eax,PW_MF0344_F0285)]
-
- paddd mm5,[GOTOFF(eax,PD_ONEHALF)]
- paddd mm6,[GOTOFF(eax,PD_ONEHALF)]
- psrad mm5,SCALEBITS
- psrad mm6,SCALEBITS
- paddd mm2,[GOTOFF(eax,PD_ONEHALF)]
- paddd mm7,[GOTOFF(eax,PD_ONEHALF)]
- psrad mm2,SCALEBITS
- psrad mm7,SCALEBITS
-
- packssdw mm5,mm6 ; mm5=CbH*-FIX(0.344)+CrH*FIX(0.285)
- packssdw mm2,mm7 ; mm2=CbL*-FIX(0.344)+CrL*FIX(0.285)
- psubw mm5,mm1 ; mm5=CbH*-FIX(0.344)+CrH*-FIX(0.714)=(G-Y)H
- psubw mm2,mm3 ; mm2=CbL*-FIX(0.344)+CrL*-FIX(0.714)=(G-Y)L
-
- movq MMWORD [wk(2)], mm5 ; wk(2)=(G-Y)H
-
- mov ah,2 ; YHctr
- jmp short .YHloop_1st
- alignx 16,7
-
-.YHloop_2nd:
- movq mm0, MMWORD [wk(1)] ; mm0=(R-Y)H
- movq mm2, MMWORD [wk(2)] ; mm2=(G-Y)H
- movq mm4, MMWORD [wk(0)] ; mm4=(B-Y)H
- alignx 16,7
-
-.YHloop_1st:
- movq MMWORD [wk(3)], mm0 ; wk(3)=(R-Y)(L/H)
- movq MMWORD [wk(4)], mm2 ; wk(4)=(G-Y)(L/H)
- movq MMWORD [wk(5)], mm4 ; wk(5)=(B-Y)(L/H)
-
- movq mm7, MMWORD [ebx] ; mm7=Y(01234567)
-
- mov al,2 ; YVctr
- jmp short .YVloop_1st
- alignx 16,7
-
-.YVloop_2nd:
- movq mm0, MMWORD [wk(3)] ; mm0=(R-Y)(L/H)
- movq mm2, MMWORD [wk(4)] ; mm2=(G-Y)(L/H)
- movq mm4, MMWORD [wk(5)] ; mm4=(B-Y)(L/H)
-
- movq mm7, MMWORD [edx] ; mm7=Y(01234567)
- alignx 16,7
-
-.YVloop_1st:
- pcmpeqw mm6,mm6
- psrlw mm6,BYTE_BIT ; mm6={0xFF 0x00 0xFF 0x00 ..}
- pand mm6,mm7 ; mm6=Y(0246)=YE
- psrlw mm7,BYTE_BIT ; mm7=Y(1357)=YO
-
- movq mm1,mm0 ; mm1=mm0=(R-Y)(L/H)
- movq mm3,mm2 ; mm3=mm2=(G-Y)(L/H)
- movq mm5,mm4 ; mm5=mm4=(B-Y)(L/H)
-
- paddw mm0,mm6 ; mm0=((R-Y)+YE)=RE=(R0 R2 R4 R6)
- paddw mm1,mm7 ; mm1=((R-Y)+YO)=RO=(R1 R3 R5 R7)
- packuswb mm0,mm0 ; mm0=(R0 R2 R4 R6 ** ** ** **)
- packuswb mm1,mm1 ; mm1=(R1 R3 R5 R7 ** ** ** **)
-
- paddw mm2,mm6 ; mm2=((G-Y)+YE)=GE=(G0 G2 G4 G6)
- paddw mm3,mm7 ; mm3=((G-Y)+YO)=GO=(G1 G3 G5 G7)
- packuswb mm2,mm2 ; mm2=(G0 G2 G4 G6 ** ** ** **)
- packuswb mm3,mm3 ; mm3=(G1 G3 G5 G7 ** ** ** **)
-
- paddw mm4,mm6 ; mm4=((B-Y)+YE)=BE=(B0 B2 B4 B6)
- paddw mm5,mm7 ; mm5=((B-Y)+YO)=BO=(B1 B3 B5 B7)
- packuswb mm4,mm4 ; mm4=(B0 B2 B4 B6 ** ** ** **)
- packuswb mm5,mm5 ; mm5=(B1 B3 B5 B7 ** ** ** **)
-
-%if RGB_PIXELSIZE == 3 ; ---------------
-
- ; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
- ; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
- ; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
- ; mmG=(** ** ** ** ** ** ** **), mmH=(** ** ** ** ** ** ** **)
-
- punpcklbw mmA,mmC ; mmA=(00 10 02 12 04 14 06 16)
- punpcklbw mmE,mmB ; mmE=(20 01 22 03 24 05 26 07)
- punpcklbw mmD,mmF ; mmD=(11 21 13 23 15 25 17 27)
-
- movq mmG,mmA
- movq mmH,mmA
- punpcklwd mmA,mmE ; mmA=(00 10 20 01 02 12 22 03)
- punpckhwd mmG,mmE ; mmG=(04 14 24 05 06 16 26 07)
-
- psrlq mmH,2*BYTE_BIT ; mmH=(02 12 04 14 06 16 -- --)
- psrlq mmE,2*BYTE_BIT ; mmE=(22 03 24 05 26 07 -- --)
-
- movq mmC,mmD
- movq mmB,mmD
- punpcklwd mmD,mmH ; mmD=(11 21 02 12 13 23 04 14)
- punpckhwd mmC,mmH ; mmC=(15 25 06 16 17 27 -- --)
-
- psrlq mmB,2*BYTE_BIT ; mmB=(13 23 15 25 17 27 -- --)
-
- movq mmF,mmE
- punpcklwd mmE,mmB ; mmE=(22 03 13 23 24 05 15 25)
- punpckhwd mmF,mmB ; mmF=(26 07 17 27 -- -- -- --)
-
- punpckldq mmA,mmD ; mmA=(00 10 20 01 11 21 02 12)
- punpckldq mmE,mmG ; mmE=(22 03 13 23 04 14 24 05)
- punpckldq mmC,mmF ; mmC=(15 25 06 16 26 07 17 27)
-
- dec al ; YVctr
- jz short .YVloop_break
-
- movq MMWORD [wk(6)], mmA
- movq MMWORD [wk(7)], mmE
- movq MMWORD [wk(8)], mmC
-
- jmp near .YVloop_2nd
- alignx 16,7
-
-.YVloop_break:
- movq mmH, MMWORD [wk(6)]
- movq mmB, MMWORD [wk(7)]
- movq mmD, MMWORD [wk(8)]
-
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st16
-
- movq MMWORD [esi+0*SIZEOF_MMWORD], mmH
- movq MMWORD [esi+1*SIZEOF_MMWORD], mmB
- movq MMWORD [esi+2*SIZEOF_MMWORD], mmD
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
- movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
-
- sub ecx, byte SIZEOF_MMWORD
- jz near .endcolumn
-
- add esi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr0
- add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr1
- add ebx, byte SIZEOF_MMWORD ; inptr00
- add edx, byte SIZEOF_MMWORD ; inptr01
- dec ah ; YHctr
- jnz near .YHloop_2nd
-
- push ebx ; inptr00
- push edx ; inptr01
- mov ebx, JSAMPROW [inptr1] ; ebx=inptr1
- mov edx, JSAMPROW [inptr2] ; edx=inptr2
- add ebx, byte SIZEOF_MMWORD ; inptr1
- add edx, byte SIZEOF_MMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st16:
- lea ecx, [ecx+ecx*2] ; imul ecx, RGB_PIXELSIZE
- cmp ecx, byte 2*SIZEOF_MMWORD
- jb short .column_st8
- movq MMWORD [esi+0*SIZEOF_MMWORD], mmH
- movq MMWORD [esi+1*SIZEOF_MMWORD], mmB
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
- movq mmH,mmD
- movq mmA,mmC
- sub ecx, byte 2*SIZEOF_MMWORD
- add esi, byte 2*SIZEOF_MMWORD
- add edi, byte 2*SIZEOF_MMWORD
- jmp short .column_st4
-.column_st8:
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st4
- movq MMWORD [esi+0*SIZEOF_MMWORD], mmH
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq mmH,mmB
- movq mmA,mmE
- sub ecx, byte SIZEOF_MMWORD
- add esi, byte SIZEOF_MMWORD
- add edi, byte SIZEOF_MMWORD
-.column_st4:
- movd eax,mmH
- movd edx,mmA
- cmp ecx, byte SIZEOF_DWORD
- jb short .column_st2
- mov DWORD [esi+0*SIZEOF_DWORD], eax
- mov DWORD [edi+0*SIZEOF_DWORD], edx
- psrlq mmH,DWORD_BIT
- psrlq mmA,DWORD_BIT
- movd eax,mmH
- movd edx,mmA
- sub ecx, byte SIZEOF_DWORD
- add esi, byte SIZEOF_DWORD
- add edi, byte SIZEOF_DWORD
-.column_st2:
- cmp ecx, byte SIZEOF_WORD
- jb short .column_st1
- mov WORD [esi+0*SIZEOF_WORD], ax
- mov WORD [edi+0*SIZEOF_WORD], dx
- shr eax,WORD_BIT
- shr edx,WORD_BIT
- sub ecx, byte SIZEOF_WORD
- add esi, byte SIZEOF_WORD
- add edi, byte SIZEOF_WORD
-.column_st1:
- cmp ecx, byte SIZEOF_BYTE
- jb short .endcolumn
- mov BYTE [esi+0*SIZEOF_BYTE], al
- mov BYTE [edi+0*SIZEOF_BYTE], dl
-
-%else ; RGB_PIXELSIZE == 4 ; -----------
-
-%ifdef RGBX_FILLER_0XFF
- pcmpeqb mm6,mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
- pcmpeqb mm7,mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
-%else
- pxor mm6,mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
- pxor mm7,mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
-%endif
- ; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
- ; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
- ; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
- ; mmG=(30 32 34 36 ** ** ** **), mmH=(31 33 35 37 ** ** ** **)
-
- punpcklbw mmA,mmC ; mmA=(00 10 02 12 04 14 06 16)
- punpcklbw mmE,mmG ; mmE=(20 30 22 32 24 34 26 36)
- punpcklbw mmB,mmD ; mmB=(01 11 03 13 05 15 07 17)
- punpcklbw mmF,mmH ; mmF=(21 31 23 33 25 35 27 37)
-
- movq mmC,mmA
- punpcklwd mmA,mmE ; mmA=(00 10 20 30 02 12 22 32)
- punpckhwd mmC,mmE ; mmC=(04 14 24 34 06 16 26 36)
- movq mmG,mmB
- punpcklwd mmB,mmF ; mmB=(01 11 21 31 03 13 23 33)
- punpckhwd mmG,mmF ; mmG=(05 15 25 35 07 17 27 37)
-
- movq mmD,mmA
- punpckldq mmA,mmB ; mmA=(00 10 20 30 01 11 21 31)
- punpckhdq mmD,mmB ; mmD=(02 12 22 32 03 13 23 33)
- movq mmH,mmC
- punpckldq mmC,mmG ; mmC=(04 14 24 34 05 15 25 35)
- punpckhdq mmH,mmG ; mmH=(06 16 26 36 07 17 27 37)
-
- dec al ; YVctr
- jz short .YVloop_break
-
- movq MMWORD [wk(6)], mmA
- movq MMWORD [wk(7)], mmD
- movq MMWORD [wk(8)], mmC
- movq MMWORD [wk(9)], mmH
-
- jmp near .YVloop_2nd
- alignx 16,7
-
-.YVloop_break:
- movq mmE, MMWORD [wk(6)]
- movq mmF, MMWORD [wk(7)]
- movq mmB, MMWORD [wk(8)]
- movq mmG, MMWORD [wk(9)]
-
- cmp ecx, byte SIZEOF_MMWORD
- jb short .column_st16
-
- movq MMWORD [esi+0*SIZEOF_MMWORD], mmE
- movq MMWORD [esi+1*SIZEOF_MMWORD], mmF
- movq MMWORD [esi+2*SIZEOF_MMWORD], mmB
- movq MMWORD [esi+3*SIZEOF_MMWORD], mmG
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
- movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
- movq MMWORD [edi+3*SIZEOF_MMWORD], mmH
-
- sub ecx, byte SIZEOF_MMWORD
- jz short .endcolumn
-
- add esi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr0
- add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr1
- add ebx, byte SIZEOF_MMWORD ; inptr00
- add edx, byte SIZEOF_MMWORD ; inptr01
- dec ah ; YHctr
- jnz near .YHloop_2nd
-
- push ebx ; inptr00
- push edx ; inptr01
- mov ebx, JSAMPROW [inptr1] ; ebx=inptr1
- mov edx, JSAMPROW [inptr2] ; edx=inptr2
- add ebx, byte SIZEOF_MMWORD ; inptr1
- add edx, byte SIZEOF_MMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st16:
- cmp ecx, byte SIZEOF_MMWORD/2
- jb short .column_st8
- movq MMWORD [esi+0*SIZEOF_MMWORD], mmE
- movq MMWORD [esi+1*SIZEOF_MMWORD], mmF
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
- movq mmE,mmB
- movq mmF,mmG
- movq mmA,mmC
- movq mmD,mmH
- sub ecx, byte SIZEOF_MMWORD/2
- add esi, byte 2*SIZEOF_MMWORD
- add edi, byte 2*SIZEOF_MMWORD
-.column_st8:
- cmp ecx, byte SIZEOF_MMWORD/4
- jb short .column_st4
- movq MMWORD [esi+0*SIZEOF_MMWORD], mmE
- movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
- movq mmE,mmF
- movq mmA,mmD
- sub ecx, byte SIZEOF_MMWORD/4
- add esi, byte 1*SIZEOF_MMWORD
- add edi, byte 1*SIZEOF_MMWORD
-.column_st4:
- cmp ecx, byte SIZEOF_MMWORD/8
- jb short .endcolumn
- movd DWORD [esi+0*SIZEOF_DWORD], mmE
- movd DWORD [edi+0*SIZEOF_DWORD], mmA
-
-%endif ; RGB_PIXELSIZE ; ---------------
-
-.endcolumn:
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; !USE_DEDICATED_H2V2_MERGED_UPSAMPLE_MMX
-
-%endif ; JDMERGE_MMX_SUPPORTED
-%endif ; UPSAMPLE_MERGING_SUPPORTED
-%endif ; RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
diff --git a/jdmerss2.asm b/jdmerss2.asm
deleted file mode 100644
index b6f51c8..0000000
--- a/jdmerss2.asm
+++ /dev/null
@@ -1,1272 +0,0 @@
-;
-; jdmerss2.asm - merged upsampling/color conversion (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%if RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
-%ifdef UPSAMPLE_MERGING_SUPPORTED
-%ifdef JDMERGE_SSE2_SUPPORTED
-
-; --------------------------------------------------------------------------
-
-%define SCALEBITS 16
-
-F_0_344 equ 22554 ; FIX(0.34414)
-F_0_714 equ 46802 ; FIX(0.71414)
-F_1_402 equ 91881 ; FIX(1.40200)
-F_1_772 equ 116130 ; FIX(1.77200)
-F_0_402 equ (F_1_402 - 65536) ; FIX(1.40200) - FIX(1)
-F_0_285 equ ( 65536 - F_0_714) ; FIX(1) - FIX(0.71414)
-F_0_228 equ (131072 - F_1_772) ; FIX(2) - FIX(1.77200)
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_merged_upsample_sse2)
-
-EXTN(jconst_merged_upsample_sse2):
-
-PW_F0402 times 8 dw F_0_402
-PW_MF0228 times 8 dw -F_0_228
-PW_MF0344_F0285 times 4 dw -F_0_344, F_0_285
-PW_ONE times 8 dw 1
-PD_ONEHALF times 4 dd 1 << (SCALEBITS-1)
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical.
-;
-; GLOBAL(void)
-; jpeg_h2v1_merged_upsample_sse2 (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
-; JDIMENSION in_row_group_ctr,
-; JSAMPARRAY output_buf);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
-%define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 3
-%define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_h2v1_merged_upsample_sse2)
-
-EXTN(jpeg_h2v1_merged_upsample_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov ecx, POINTER [cinfo(eax)]
- mov ecx, JDIMENSION [jdstruct_output_width(ecx)] ; col
- test ecx,ecx
- jz near .return
-
- push ecx
-
- mov edi, JSAMPIMAGE [input_buf(eax)]
- mov ecx, JDIMENSION [in_row_group_ctr(eax)]
- mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
- mov edi, JSAMPARRAY [output_buf(eax)]
- mov esi, JSAMPROW [esi+ecx*SIZEOF_JSAMPROW] ; inptr0
- mov ebx, JSAMPROW [ebx+ecx*SIZEOF_JSAMPROW] ; inptr1
- mov edx, JSAMPROW [edx+ecx*SIZEOF_JSAMPROW] ; inptr2
- mov edi, JSAMPROW [edi] ; outptr
-
- pop ecx ; col
-
- alignx 16,7
-.columnloop:
- movpic eax, POINTER [gotptr] ; load GOT address (eax)
-
- movdqa xmm6, XMMWORD [ebx] ; xmm6=Cb(0123456789ABCDEF)
- movdqa xmm7, XMMWORD [edx] ; xmm7=Cr(0123456789ABCDEF)
-
- pxor xmm1,xmm1 ; xmm1=(all 0's)
- pcmpeqw xmm3,xmm3
- psllw xmm3,7 ; xmm3={0xFF80 0xFF80 0xFF80 0xFF80 ..}
-
- movdqa xmm4,xmm6
- punpckhbw xmm6,xmm1 ; xmm6=Cb(89ABCDEF)=CbH
- punpcklbw xmm4,xmm1 ; xmm4=Cb(01234567)=CbL
- movdqa xmm0,xmm7
- punpckhbw xmm7,xmm1 ; xmm7=Cr(89ABCDEF)=CrH
- punpcklbw xmm0,xmm1 ; xmm0=Cr(01234567)=CrL
-
- paddw xmm6,xmm3
- paddw xmm4,xmm3
- paddw xmm7,xmm3
- paddw xmm0,xmm3
-
- ; (Original)
- ; R = Y + 1.40200 * Cr
- ; G = Y - 0.34414 * Cb - 0.71414 * Cr
- ; B = Y + 1.77200 * Cb
- ;
- ; (This implementation)
- ; R = Y + 0.40200 * Cr + Cr
- ; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr
- ; B = Y - 0.22800 * Cb + Cb + Cb
-
- movdqa xmm5,xmm6 ; xmm5=CbH
- movdqa xmm2,xmm4 ; xmm2=CbL
- paddw xmm6,xmm6 ; xmm6=2*CbH
- paddw xmm4,xmm4 ; xmm4=2*CbL
- movdqa xmm1,xmm7 ; xmm1=CrH
- movdqa xmm3,xmm0 ; xmm3=CrL
- paddw xmm7,xmm7 ; xmm7=2*CrH
- paddw xmm0,xmm0 ; xmm0=2*CrL
-
- pmulhw xmm6,[GOTOFF(eax,PW_MF0228)] ; xmm6=(2*CbH * -FIX(0.22800))
- pmulhw xmm4,[GOTOFF(eax,PW_MF0228)] ; xmm4=(2*CbL * -FIX(0.22800))
- pmulhw xmm7,[GOTOFF(eax,PW_F0402)] ; xmm7=(2*CrH * FIX(0.40200))
- pmulhw xmm0,[GOTOFF(eax,PW_F0402)] ; xmm0=(2*CrL * FIX(0.40200))
-
- paddw xmm6,[GOTOFF(eax,PW_ONE)]
- paddw xmm4,[GOTOFF(eax,PW_ONE)]
- psraw xmm6,1 ; xmm6=(CbH * -FIX(0.22800))
- psraw xmm4,1 ; xmm4=(CbL * -FIX(0.22800))
- paddw xmm7,[GOTOFF(eax,PW_ONE)]
- paddw xmm0,[GOTOFF(eax,PW_ONE)]
- psraw xmm7,1 ; xmm7=(CrH * FIX(0.40200))
- psraw xmm0,1 ; xmm0=(CrL * FIX(0.40200))
-
- paddw xmm6,xmm5
- paddw xmm4,xmm2
- paddw xmm6,xmm5 ; xmm6=(CbH * FIX(1.77200))=(B-Y)H
- paddw xmm4,xmm2 ; xmm4=(CbL * FIX(1.77200))=(B-Y)L
- paddw xmm7,xmm1 ; xmm7=(CrH * FIX(1.40200))=(R-Y)H
- paddw xmm0,xmm3 ; xmm0=(CrL * FIX(1.40200))=(R-Y)L
-
- movdqa XMMWORD [wk(0)], xmm6 ; wk(0)=(B-Y)H
- movdqa XMMWORD [wk(1)], xmm7 ; wk(1)=(R-Y)H
-
- movdqa xmm6,xmm5
- movdqa xmm7,xmm2
- punpcklwd xmm5,xmm1
- punpckhwd xmm6,xmm1
- pmaddwd xmm5,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd xmm6,[GOTOFF(eax,PW_MF0344_F0285)]
- punpcklwd xmm2,xmm3
- punpckhwd xmm7,xmm3
- pmaddwd xmm2,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd xmm7,[GOTOFF(eax,PW_MF0344_F0285)]
-
- paddd xmm5,[GOTOFF(eax,PD_ONEHALF)]
- paddd xmm6,[GOTOFF(eax,PD_ONEHALF)]
- psrad xmm5,SCALEBITS
- psrad xmm6,SCALEBITS
- paddd xmm2,[GOTOFF(eax,PD_ONEHALF)]
- paddd xmm7,[GOTOFF(eax,PD_ONEHALF)]
- psrad xmm2,SCALEBITS
- psrad xmm7,SCALEBITS
-
- packssdw xmm5,xmm6 ; xmm5=CbH*-FIX(0.344)+CrH*FIX(0.285)
- packssdw xmm2,xmm7 ; xmm2=CbL*-FIX(0.344)+CrL*FIX(0.285)
- psubw xmm5,xmm1 ; xmm5=CbH*-FIX(0.344)+CrH*-FIX(0.714)=(G-Y)H
- psubw xmm2,xmm3 ; xmm2=CbL*-FIX(0.344)+CrL*-FIX(0.714)=(G-Y)L
-
- movdqa XMMWORD [wk(2)], xmm5 ; wk(2)=(G-Y)H
-
- mov al,2 ; Yctr
- jmp short .Yloop_1st
- alignx 16,7
-
-.Yloop_2nd:
- movdqa xmm0, XMMWORD [wk(1)] ; xmm0=(R-Y)H
- movdqa xmm2, XMMWORD [wk(2)] ; xmm2=(G-Y)H
- movdqa xmm4, XMMWORD [wk(0)] ; xmm4=(B-Y)H
- alignx 16,7
-
-.Yloop_1st:
- movdqa xmm7, XMMWORD [esi] ; xmm7=Y(0123456789ABCDEF)
-
- pcmpeqw xmm6,xmm6
- psrlw xmm6,BYTE_BIT ; xmm6={0xFF 0x00 0xFF 0x00 ..}
- pand xmm6,xmm7 ; xmm6=Y(02468ACE)=YE
- psrlw xmm7,BYTE_BIT ; xmm7=Y(13579BDF)=YO
-
- movdqa xmm1,xmm0 ; xmm1=xmm0=(R-Y)(L/H)
- movdqa xmm3,xmm2 ; xmm3=xmm2=(G-Y)(L/H)
- movdqa xmm5,xmm4 ; xmm5=xmm4=(B-Y)(L/H)
-
- paddw xmm0,xmm6 ; xmm0=((R-Y)+YE)=RE=R(02468ACE)
- paddw xmm1,xmm7 ; xmm1=((R-Y)+YO)=RO=R(13579BDF)
- packuswb xmm0,xmm0 ; xmm0=R(02468ACE********)
- packuswb xmm1,xmm1 ; xmm1=R(13579BDF********)
-
- paddw xmm2,xmm6 ; xmm2=((G-Y)+YE)=GE=G(02468ACE)
- paddw xmm3,xmm7 ; xmm3=((G-Y)+YO)=GO=G(13579BDF)
- packuswb xmm2,xmm2 ; xmm2=G(02468ACE********)
- packuswb xmm3,xmm3 ; xmm3=G(13579BDF********)
-
- paddw xmm4,xmm6 ; xmm4=((B-Y)+YE)=BE=B(02468ACE)
- paddw xmm5,xmm7 ; xmm5=((B-Y)+YO)=BO=B(13579BDF)
- packuswb xmm4,xmm4 ; xmm4=B(02468ACE********)
- packuswb xmm5,xmm5 ; xmm5=B(13579BDF********)
-
-%if RGB_PIXELSIZE == 3 ; ---------------
-
- ; xmmA=(00 02 04 06 08 0A 0C 0E **), xmmB=(01 03 05 07 09 0B 0D 0F **)
- ; xmmC=(10 12 14 16 18 1A 1C 1E **), xmmD=(11 13 15 17 19 1B 1D 1F **)
- ; xmmE=(20 22 24 26 28 2A 2C 2E **), xmmF=(21 23 25 27 29 2B 2D 2F **)
- ; xmmG=(** ** ** ** ** ** ** ** **), xmmH=(** ** ** ** ** ** ** ** **)
-
- punpcklbw xmmA,xmmC ; xmmA=(00 10 02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E)
- punpcklbw xmmE,xmmB ; xmmE=(20 01 22 03 24 05 26 07 28 09 2A 0B 2C 0D 2E 0F)
- punpcklbw xmmD,xmmF ; xmmD=(11 21 13 23 15 25 17 27 19 29 1B 2B 1D 2D 1F 2F)
-
- movdqa xmmG,xmmA
- movdqa xmmH,xmmA
- punpcklwd xmmA,xmmE ; xmmA=(00 10 20 01 02 12 22 03 04 14 24 05 06 16 26 07)
- punpckhwd xmmG,xmmE ; xmmG=(08 18 28 09 0A 1A 2A 0B 0C 1C 2C 0D 0E 1E 2E 0F)
-
- psrldq xmmH,2 ; xmmH=(02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E -- --)
- psrldq xmmE,2 ; xmmE=(22 03 24 05 26 07 28 09 2A 0B 2C 0D 2E 0F -- --)
-
- movdqa xmmC,xmmD
- movdqa xmmB,xmmD
- punpcklwd xmmD,xmmH ; xmmD=(11 21 02 12 13 23 04 14 15 25 06 16 17 27 08 18)
- punpckhwd xmmC,xmmH ; xmmC=(19 29 0A 1A 1B 2B 0C 1C 1D 2D 0E 1E 1F 2F -- --)
-
- psrldq xmmB,2 ; xmmB=(13 23 15 25 17 27 19 29 1B 2B 1D 2D 1F 2F -- --)
-
- movdqa xmmF,xmmE
- punpcklwd xmmE,xmmB ; xmmE=(22 03 13 23 24 05 15 25 26 07 17 27 28 09 19 29)
- punpckhwd xmmF,xmmB ; xmmF=(2A 0B 1B 2B 2C 0D 1D 2D 2E 0F 1F 2F -- -- -- --)
-
- pshufd xmmH,xmmA,0x4E; xmmH=(04 14 24 05 06 16 26 07 00 10 20 01 02 12 22 03)
- movdqa xmmB,xmmE
- punpckldq xmmA,xmmD ; xmmA=(00 10 20 01 11 21 02 12 02 12 22 03 13 23 04 14)
- punpckldq xmmE,xmmH ; xmmE=(22 03 13 23 04 14 24 05 24 05 15 25 06 16 26 07)
- punpckhdq xmmD,xmmB ; xmmD=(15 25 06 16 26 07 17 27 17 27 08 18 28 09 19 29)
-
- pshufd xmmH,xmmG,0x4E; xmmH=(0C 1C 2C 0D 0E 1E 2E 0F 08 18 28 09 0A 1A 2A 0B)
- movdqa xmmB,xmmF
- punpckldq xmmG,xmmC ; xmmG=(08 18 28 09 19 29 0A 1A 0A 1A 2A 0B 1B 2B 0C 1C)
- punpckldq xmmF,xmmH ; xmmF=(2A 0B 1B 2B 0C 1C 2C 0D 2C 0D 1D 2D 0E 1E 2E 0F)
- punpckhdq xmmC,xmmB ; xmmC=(1D 2D 0E 1E 2E 0F 1F 2F 1F 2F -- -- -- -- -- --)
-
- punpcklqdq xmmA,xmmE ; xmmA=(00 10 20 01 11 21 02 12 22 03 13 23 04 14 24 05)
- punpcklqdq xmmD,xmmG ; xmmD=(15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A)
- punpcklqdq xmmF,xmmC ; xmmF=(2A 0B 1B 2B 0C 1C 2C 0D 1D 2D 0E 1E 2E 0F 1F 2F)
-
- cmp ecx, byte SIZEOF_XMMWORD
- jb short .column_st32
-
- test edi, SIZEOF_XMMWORD-1
- jnz short .out1
- ; --(aligned)-------------------
- movntdq XMMWORD [edi+0*SIZEOF_XMMWORD], xmmA
- movntdq XMMWORD [edi+1*SIZEOF_XMMWORD], xmmD
- movntdq XMMWORD [edi+2*SIZEOF_XMMWORD], xmmF
- add edi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr
- jmp short .out0
-.out1: ; --(unaligned)-----------------
- pcmpeqb xmmH,xmmH ; xmmH=(all 1's)
- maskmovdqu xmmA,xmmH ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmD,xmmH ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmF,xmmH ; movntdqu XMMWORD [edi], xmmF
- add edi, byte SIZEOF_XMMWORD ; outptr
-.out0:
- sub ecx, byte SIZEOF_XMMWORD
- jz near .endcolumn
-
- add esi, byte SIZEOF_XMMWORD ; inptr0
- dec al ; Yctr
- jnz near .Yloop_2nd
-
- add ebx, byte SIZEOF_XMMWORD ; inptr1
- add edx, byte SIZEOF_XMMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st32:
- pcmpeqb xmmH,xmmH ; xmmH=(all 1's)
- lea ecx, [ecx+ecx*2] ; imul ecx, RGB_PIXELSIZE
- cmp ecx, byte 2*SIZEOF_XMMWORD
- jb short .column_st16
- maskmovdqu xmmA,xmmH ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmD,xmmH ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr
- movdqa xmmA,xmmF
- sub ecx, byte 2*SIZEOF_XMMWORD
- jmp short .column_st15
-.column_st16:
- cmp ecx, byte SIZEOF_XMMWORD
- jb short .column_st15
- maskmovdqu xmmA,xmmH ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- movdqa xmmA,xmmD
- sub ecx, byte SIZEOF_XMMWORD
-.column_st15:
- mov eax,ecx
- xor ecx, byte 0x0F
- shl ecx, 2
- movd xmmB,ecx
- psrlq xmmH,4
- pcmpeqb xmmE,xmmE
- psrlq xmmH,xmmB
- psrlq xmmE,xmmB
- punpcklbw xmmE,xmmH
- ; ----------------
- mov ecx,edi
- and ecx, byte SIZEOF_XMMWORD-1
- jz short .adj0
- add eax,ecx
- cmp eax, byte SIZEOF_XMMWORD
- ja short .adj0
- and edi, byte (-SIZEOF_XMMWORD) ; align to 16-byte boundary
- shl ecx, 3 ; pslldq xmmA,ecx & pslldq xmmE,ecx
- movdqa xmmG,xmmA
- movdqa xmmC,xmmE
- pslldq xmmA, SIZEOF_XMMWORD/2
- pslldq xmmE, SIZEOF_XMMWORD/2
- movd xmmD,ecx
- sub ecx, byte (SIZEOF_XMMWORD/2)*BYTE_BIT
- jb short .adj1
- movd xmmF,ecx
- psllq xmmA,xmmF
- psllq xmmE,xmmF
- jmp short .adj0
-.adj1: neg ecx
- movd xmmF,ecx
- psrlq xmmA,xmmF
- psrlq xmmE,xmmF
- psllq xmmG,xmmD
- psllq xmmC,xmmD
- por xmmA,xmmG
- por xmmE,xmmC
-.adj0: ; ----------------
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
-
-%else ; RGB_PIXELSIZE == 4 ; -----------
-
-%ifdef RGBX_FILLER_0XFF
- pcmpeqb xmm6,xmm6 ; xmm6=XE=X(02468ACE********)
- pcmpeqb xmm7,xmm7 ; xmm7=XO=X(13579BDF********)
-%else
- pxor xmm6,xmm6 ; xmm6=XE=X(02468ACE********)
- pxor xmm7,xmm7 ; xmm7=XO=X(13579BDF********)
-%endif
- ; xmmA=(00 02 04 06 08 0A 0C 0E **), xmmB=(01 03 05 07 09 0B 0D 0F **)
- ; xmmC=(10 12 14 16 18 1A 1C 1E **), xmmD=(11 13 15 17 19 1B 1D 1F **)
- ; xmmE=(20 22 24 26 28 2A 2C 2E **), xmmF=(21 23 25 27 29 2B 2D 2F **)
- ; xmmG=(30 32 34 36 38 3A 3C 3E **), xmmH=(31 33 35 37 39 3B 3D 3F **)
-
- punpcklbw xmmA,xmmC ; xmmA=(00 10 02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E)
- punpcklbw xmmE,xmmG ; xmmE=(20 30 22 32 24 34 26 36 28 38 2A 3A 2C 3C 2E 3E)
- punpcklbw xmmB,xmmD ; xmmB=(01 11 03 13 05 15 07 17 09 19 0B 1B 0D 1D 0F 1F)
- punpcklbw xmmF,xmmH ; xmmF=(21 31 23 33 25 35 27 37 29 39 2B 3B 2D 3D 2F 3F)
-
- movdqa xmmC,xmmA
- punpcklwd xmmA,xmmE ; xmmA=(00 10 20 30 02 12 22 32 04 14 24 34 06 16 26 36)
- punpckhwd xmmC,xmmE ; xmmC=(08 18 28 38 0A 1A 2A 3A 0C 1C 2C 3C 0E 1E 2E 3E)
- movdqa xmmG,xmmB
- punpcklwd xmmB,xmmF ; xmmB=(01 11 21 31 03 13 23 33 05 15 25 35 07 17 27 37)
- punpckhwd xmmG,xmmF ; xmmG=(09 19 29 39 0B 1B 2B 3B 0D 1D 2D 3D 0F 1F 2F 3F)
-
- movdqa xmmD,xmmA
- punpckldq xmmA,xmmB ; xmmA=(00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33)
- punpckhdq xmmD,xmmB ; xmmD=(04 14 24 34 05 15 25 35 06 16 26 36 07 17 27 37)
- movdqa xmmH,xmmC
- punpckldq xmmC,xmmG ; xmmC=(08 18 28 38 09 19 29 39 0A 1A 2A 3A 0B 1B 2B 3B)
- punpckhdq xmmH,xmmG ; xmmH=(0C 1C 2C 3C 0D 1D 2D 3D 0E 1E 2E 3E 0F 1F 2F 3F)
-
- cmp ecx, byte SIZEOF_XMMWORD
- jb short .column_st32
-
- test edi, SIZEOF_XMMWORD-1
- jnz short .out1
- ; --(aligned)-------------------
- movntdq XMMWORD [edi+0*SIZEOF_XMMWORD], xmmA
- movntdq XMMWORD [edi+1*SIZEOF_XMMWORD], xmmD
- movntdq XMMWORD [edi+2*SIZEOF_XMMWORD], xmmC
- movntdq XMMWORD [edi+3*SIZEOF_XMMWORD], xmmH
- add edi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr
- jmp short .out0
-.out1: ; --(unaligned)-----------------
- pcmpeqb xmmE,xmmE ; xmmE=(all 1's)
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmD,xmmE ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmC,xmmE ; movntdqu XMMWORD [edi], xmmC
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmH,xmmE ; movntdqu XMMWORD [edi], xmmH
- add edi, byte SIZEOF_XMMWORD ; outptr
-.out0:
- sub ecx, byte SIZEOF_XMMWORD
- jz near .endcolumn
-
- add esi, byte SIZEOF_XMMWORD ; inptr0
- dec al ; Yctr
- jnz near .Yloop_2nd
-
- add ebx, byte SIZEOF_XMMWORD ; inptr1
- add edx, byte SIZEOF_XMMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st32:
- pcmpeqb xmmE,xmmE ; xmmE=(all 1's)
- cmp ecx, byte SIZEOF_XMMWORD/2
- jb short .column_st16
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- maskmovdqu xmmD,xmmE ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr
- movdqa xmmA,xmmC
- movdqa xmmD,xmmH
- sub ecx, byte SIZEOF_XMMWORD/2
-.column_st16:
- cmp ecx, byte SIZEOF_XMMWORD/4
- jb short .column_st15
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr
- movdqa xmmA,xmmD
- sub ecx, byte SIZEOF_XMMWORD/4
-.column_st15:
- cmp ecx, byte SIZEOF_XMMWORD/16
- jb short .endcolumn
- mov eax,ecx
- xor ecx, byte 0x03
- inc ecx
- shl ecx, 4
- movd xmmF,ecx
- psrlq xmmE,xmmF
- punpcklbw xmmE,xmmE
- ; ----------------
- mov ecx,edi
- and ecx, byte SIZEOF_XMMWORD-1
- jz short .adj0
- lea eax, [ecx+eax*4] ; RGB_PIXELSIZE
- cmp eax, byte SIZEOF_XMMWORD
- ja short .adj0
- and edi, byte (-SIZEOF_XMMWORD) ; align to 16-byte boundary
- shl ecx, 3 ; pslldq xmmA,ecx & pslldq xmmE,ecx
- movdqa xmmB,xmmA
- movdqa xmmG,xmmE
- pslldq xmmA, SIZEOF_XMMWORD/2
- pslldq xmmE, SIZEOF_XMMWORD/2
- movd xmmC,ecx
- sub ecx, byte (SIZEOF_XMMWORD/2)*BYTE_BIT
- jb short .adj1
- movd xmmH,ecx
- psllq xmmA,xmmH
- psllq xmmE,xmmH
- jmp short .adj0
-.adj1: neg ecx
- movd xmmH,ecx
- psrlq xmmA,xmmH
- psrlq xmmE,xmmH
- psllq xmmB,xmmC
- psllq xmmG,xmmC
- por xmmA,xmmB
- por xmmE,xmmG
-.adj0: ; ----------------
- maskmovdqu xmmA,xmmE ; movntdqu XMMWORD [edi], xmmA
-
-%endif ; RGB_PIXELSIZE ; ---------------
-
-.endcolumn:
- sfence ; flush the write buffer
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%ifndef USE_DEDICATED_H2V2_MERGED_UPSAMPLE_SSE2
-
-; --------------------------------------------------------------------------
-;
-; Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.
-;
-; GLOBAL(void)
-; jpeg_h2v2_merged_upsample_sse2 (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
-; JDIMENSION in_row_group_ctr,
-; JSAMPARRAY output_buf);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
-%define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-
- align 16
- global EXTN(jpeg_h2v2_merged_upsample_sse2)
-
-EXTN(jpeg_h2v2_merged_upsample_sse2):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov eax, POINTER [cinfo(ebp)]
-
- mov edi, JSAMPIMAGE [input_buf(ebp)]
- mov ecx, JDIMENSION [in_row_group_ctr(ebp)]
- mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
- mov edi, JSAMPARRAY [output_buf(ebp)]
- lea esi, [esi+ecx*SIZEOF_JSAMPROW]
-
- push edx ; inptr2
- push ebx ; inptr1
- push esi ; inptr00
- mov ebx,esp
-
- push edi ; output_buf (outptr0)
- push ecx ; in_row_group_ctr
- push ebx ; input_buf
- push eax ; cinfo
-
- call near EXTN(jpeg_h2v1_merged_upsample_sse2)
-
- add esi, byte SIZEOF_JSAMPROW ; inptr01
- add edi, byte SIZEOF_JSAMPROW ; outptr1
- mov POINTER [ebx+0*SIZEOF_POINTER], esi
- mov POINTER [ebx-1*SIZEOF_POINTER], edi
-
- call near EXTN(jpeg_h2v1_merged_upsample_sse2)
-
- add esp, byte 7*SIZEOF_DWORD
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%else ; USE_DEDICATED_H2V2_MERGED_UPSAMPLE_SSE2
-
-; --------------------------------------------------------------------------
-;
-; Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.
-;
-; GLOBAL(void)
-; jpeg_h2v2_merged_upsample_sse2 (j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
-; JDIMENSION in_row_group_ctr,
-; JSAMPARRAY output_buf);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define input_buf(b) (b)+12 ; JSAMPIMAGE input_buf
-%define in_row_group_ctr(b) (b)+16 ; JDIMENSION in_row_group_ctr
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 10
-%define inptr1 wk(0)-SIZEOF_JSAMPROW ; JSAMPROW inptr1
-%define inptr2 inptr1-SIZEOF_JSAMPROW ; JSAMPROW inptr2
-%define gotptr inptr2-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_h2v2_merged_upsample_sse2)
-
-EXTN(jpeg_h2v2_merged_upsample_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [inptr2]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov ecx, POINTER [cinfo(eax)]
- mov ecx, JDIMENSION [jdstruct_output_width(ecx)] ; col
- test ecx,ecx
- jz near .return
-
- push ecx
-
- mov edi, JSAMPIMAGE [input_buf(eax)]
- mov ecx, JDIMENSION [in_row_group_ctr(eax)]
- mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
- mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
- mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
- mov edi, JSAMPARRAY [output_buf(eax)]
- mov eax, JSAMPROW [esi+(ecx*2+0)*SIZEOF_JSAMPROW] ; inptr00
- mov esi, JSAMPROW [esi+(ecx*2+1)*SIZEOF_JSAMPROW] ; inptr01
- mov ebx, JSAMPROW [ebx+ecx*SIZEOF_JSAMPROW] ; inptr1
- mov edx, JSAMPROW [edx+ecx*SIZEOF_JSAMPROW] ; inptr2
-
- pop ecx ; col
- push eax ; inptr00
- push esi ; inptr01
-
- mov esi, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0
- mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1
- alignx 16,7
-.columnloop:
- movpic eax, POINTER [gotptr] ; load GOT address (eax)
-
- movdqa xmm6, XMMWORD [ebx] ; xmm6=Cb(0123456789ABCDEF)
- movdqa xmm7, XMMWORD [edx] ; xmm7=Cr(0123456789ABCDEF)
-
- mov JSAMPROW [inptr1], ebx ; inptr1
- mov JSAMPROW [inptr2], edx ; inptr2
- pop edx ; edx=inptr01
- pop ebx ; ebx=inptr00
-
- pxor xmm1,xmm1 ; xmm1=(all 0's)
- pcmpeqw xmm3,xmm3
- psllw xmm3,7 ; xmm3={0xFF80 0xFF80 0xFF80 0xFF80 ..}
-
- movdqa xmm4,xmm6
- punpckhbw xmm6,xmm1 ; xmm6=Cb(89ABCDEF)=CbH
- punpcklbw xmm4,xmm1 ; xmm4=Cb(01234567)=CbL
- movdqa xmm0,xmm7
- punpckhbw xmm7,xmm1 ; xmm7=Cr(89ABCDEF)=CrH
- punpcklbw xmm0,xmm1 ; xmm0=Cr(01234567)=CrL
-
- paddw xmm6,xmm3
- paddw xmm4,xmm3
- paddw xmm7,xmm3
- paddw xmm0,xmm3
-
- ; (Original)
- ; R = Y + 1.40200 * Cr
- ; G = Y - 0.34414 * Cb - 0.71414 * Cr
- ; B = Y + 1.77200 * Cb
- ;
- ; (This implementation)
- ; R = Y + 0.40200 * Cr + Cr
- ; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr
- ; B = Y - 0.22800 * Cb + Cb + Cb
-
- movdqa xmm5,xmm6 ; xmm5=CbH
- movdqa xmm2,xmm4 ; xmm2=CbL
- paddw xmm6,xmm6 ; xmm6=2*CbH
- paddw xmm4,xmm4 ; xmm4=2*CbL
- movdqa xmm1,xmm7 ; xmm1=CrH
- movdqa xmm3,xmm0 ; xmm3=CrL
- paddw xmm7,xmm7 ; xmm7=2*CrH
- paddw xmm0,xmm0 ; xmm0=2*CrL
-
- pmulhw xmm6,[GOTOFF(eax,PW_MF0228)] ; xmm6=(2*CbH * -FIX(0.22800))
- pmulhw xmm4,[GOTOFF(eax,PW_MF0228)] ; xmm4=(2*CbL * -FIX(0.22800))
- pmulhw xmm7,[GOTOFF(eax,PW_F0402)] ; xmm7=(2*CrH * FIX(0.40200))
- pmulhw xmm0,[GOTOFF(eax,PW_F0402)] ; xmm0=(2*CrL * FIX(0.40200))
-
- paddw xmm6,[GOTOFF(eax,PW_ONE)]
- paddw xmm4,[GOTOFF(eax,PW_ONE)]
- psraw xmm6,1 ; xmm6=(CbH * -FIX(0.22800))
- psraw xmm4,1 ; xmm4=(CbL * -FIX(0.22800))
- paddw xmm7,[GOTOFF(eax,PW_ONE)]
- paddw xmm0,[GOTOFF(eax,PW_ONE)]
- psraw xmm7,1 ; xmm7=(CrH * FIX(0.40200))
- psraw xmm0,1 ; xmm0=(CrL * FIX(0.40200))
-
- paddw xmm6,xmm5
- paddw xmm4,xmm2
- paddw xmm6,xmm5 ; xmm6=(CbH * FIX(1.77200))=(B-Y)H
- paddw xmm4,xmm2 ; xmm4=(CbL * FIX(1.77200))=(B-Y)L
- paddw xmm7,xmm1 ; xmm7=(CrH * FIX(1.40200))=(R-Y)H
- paddw xmm0,xmm3 ; xmm0=(CrL * FIX(1.40200))=(R-Y)L
-
- movdqa XMMWORD [wk(0)], xmm6 ; wk(0)=(B-Y)H
- movdqa XMMWORD [wk(1)], xmm7 ; wk(1)=(R-Y)H
-
- movdqa xmm6,xmm5
- movdqa xmm7,xmm2
- punpcklwd xmm5,xmm1
- punpckhwd xmm6,xmm1
- pmaddwd xmm5,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd xmm6,[GOTOFF(eax,PW_MF0344_F0285)]
- punpcklwd xmm2,xmm3
- punpckhwd xmm7,xmm3
- pmaddwd xmm2,[GOTOFF(eax,PW_MF0344_F0285)]
- pmaddwd xmm7,[GOTOFF(eax,PW_MF0344_F0285)]
-
- paddd xmm5,[GOTOFF(eax,PD_ONEHALF)]
- paddd xmm6,[GOTOFF(eax,PD_ONEHALF)]
- psrad xmm5,SCALEBITS
- psrad xmm6,SCALEBITS
- paddd xmm2,[GOTOFF(eax,PD_ONEHALF)]
- paddd xmm7,[GOTOFF(eax,PD_ONEHALF)]
- psrad xmm2,SCALEBITS
- psrad xmm7,SCALEBITS
-
- packssdw xmm5,xmm6 ; xmm5=CbH*-FIX(0.344)+CrH*FIX(0.285)
- packssdw xmm2,xmm7 ; xmm2=CbL*-FIX(0.344)+CrL*FIX(0.285)
- psubw xmm5,xmm1 ; xmm5=CbH*-FIX(0.344)+CrH*-FIX(0.714)=(G-Y)H
- psubw xmm2,xmm3 ; xmm2=CbL*-FIX(0.344)+CrL*-FIX(0.714)=(G-Y)L
-
- movdqa XMMWORD [wk(2)], xmm5 ; wk(2)=(G-Y)H
-
- mov ah,2 ; YHctr
- jmp short .YHloop_1st
- alignx 16,7
-
-.YHloop_2nd:
- movdqa xmm0, XMMWORD [wk(1)] ; xmm0=(R-Y)H
- movdqa xmm2, XMMWORD [wk(2)] ; xmm2=(G-Y)H
- movdqa xmm4, XMMWORD [wk(0)] ; xmm4=(B-Y)H
- alignx 16,7
-
-.YHloop_1st:
- movdqa XMMWORD [wk(3)], xmm0 ; wk(3)=(R-Y)(L/H)
- movdqa XMMWORD [wk(4)], xmm2 ; wk(4)=(G-Y)(L/H)
- movdqa XMMWORD [wk(5)], xmm4 ; wk(5)=(B-Y)(L/H)
-
- movdqa xmm7, XMMWORD [ebx] ; xmm7=Y(0123456789ABCDEF)
-
- mov al,2 ; YVctr
- jmp short .YVloop_1st
- alignx 16,7
-
-.YVloop_2nd:
- movdqa xmm0, XMMWORD [wk(3)] ; xmm0=(R-Y)(L/H)
- movdqa xmm2, XMMWORD [wk(4)] ; xmm2=(G-Y)(L/H)
- movdqa xmm4, XMMWORD [wk(5)] ; xmm4=(B-Y)(L/H)
-
- movdqa xmm7, XMMWORD [edx] ; xmm7=Y(0123456789ABCDEF)
- alignx 16,7
-
-.YVloop_1st:
- pcmpeqw xmm6,xmm6
- psrlw xmm6,BYTE_BIT ; xmm6={0xFF 0x00 0xFF 0x00 ..}
- pand xmm6,xmm7 ; xmm6=Y(02468ACE)=YE
- psrlw xmm7,BYTE_BIT ; xmm7=Y(13579BDF)=YO
-
- movdqa xmm1,xmm0 ; xmm1=xmm0=(R-Y)(L/H)
- movdqa xmm3,xmm2 ; xmm3=xmm2=(G-Y)(L/H)
- movdqa xmm5,xmm4 ; xmm5=xmm4=(B-Y)(L/H)
-
- paddw xmm0,xmm6 ; xmm0=((R-Y)+YE)=RE=R(02468ACE)
- paddw xmm1,xmm7 ; xmm1=((R-Y)+YO)=RO=R(13579BDF)
- packuswb xmm0,xmm0 ; xmm0=R(02468ACE********)
- packuswb xmm1,xmm1 ; xmm1=R(13579BDF********)
-
- paddw xmm2,xmm6 ; xmm2=((G-Y)+YE)=GE=G(02468ACE)
- paddw xmm3,xmm7 ; xmm3=((G-Y)+YO)=GO=G(13579BDF)
- packuswb xmm2,xmm2 ; xmm2=G(02468ACE********)
- packuswb xmm3,xmm3 ; xmm3=G(13579BDF********)
-
- paddw xmm4,xmm6 ; xmm4=((B-Y)+YE)=BE=B(02468ACE)
- paddw xmm5,xmm7 ; xmm5=((B-Y)+YO)=BO=B(13579BDF)
- packuswb xmm4,xmm4 ; xmm4=B(02468ACE********)
- packuswb xmm5,xmm5 ; xmm5=B(13579BDF********)
-
-%if RGB_PIXELSIZE == 3 ; ---------------
-
- ; xmmA=(00 02 04 06 08 0A 0C 0E **), xmmB=(01 03 05 07 09 0B 0D 0F **)
- ; xmmC=(10 12 14 16 18 1A 1C 1E **), xmmD=(11 13 15 17 19 1B 1D 1F **)
- ; xmmE=(20 22 24 26 28 2A 2C 2E **), xmmF=(21 23 25 27 29 2B 2D 2F **)
- ; xmmG=(** ** ** ** ** ** ** ** **), xmmH=(** ** ** ** ** ** ** ** **)
-
- punpcklbw xmmA,xmmC ; xmmA=(00 10 02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E)
- punpcklbw xmmE,xmmB ; xmmE=(20 01 22 03 24 05 26 07 28 09 2A 0B 2C 0D 2E 0F)
- punpcklbw xmmD,xmmF ; xmmD=(11 21 13 23 15 25 17 27 19 29 1B 2B 1D 2D 1F 2F)
-
- movdqa xmmG,xmmA
- movdqa xmmH,xmmA
- punpcklwd xmmA,xmmE ; xmmA=(00 10 20 01 02 12 22 03 04 14 24 05 06 16 26 07)
- punpckhwd xmmG,xmmE ; xmmG=(08 18 28 09 0A 1A 2A 0B 0C 1C 2C 0D 0E 1E 2E 0F)
-
- psrldq xmmH,2 ; xmmH=(02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E -- --)
- psrldq xmmE,2 ; xmmE=(22 03 24 05 26 07 28 09 2A 0B 2C 0D 2E 0F -- --)
-
- movdqa xmmC,xmmD
- movdqa xmmB,xmmD
- punpcklwd xmmD,xmmH ; xmmD=(11 21 02 12 13 23 04 14 15 25 06 16 17 27 08 18)
- punpckhwd xmmC,xmmH ; xmmC=(19 29 0A 1A 1B 2B 0C 1C 1D 2D 0E 1E 1F 2F -- --)
-
- psrldq xmmB,2 ; xmmB=(13 23 15 25 17 27 19 29 1B 2B 1D 2D 1F 2F -- --)
-
- movdqa xmmF,xmmE
- punpcklwd xmmE,xmmB ; xmmE=(22 03 13 23 24 05 15 25 26 07 17 27 28 09 19 29)
- punpckhwd xmmF,xmmB ; xmmF=(2A 0B 1B 2B 2C 0D 1D 2D 2E 0F 1F 2F -- -- -- --)
-
- pshufd xmmH,xmmA,0x4E; xmmH=(04 14 24 05 06 16 26 07 00 10 20 01 02 12 22 03)
- movdqa xmmB,xmmE
- punpckldq xmmA,xmmD ; xmmA=(00 10 20 01 11 21 02 12 02 12 22 03 13 23 04 14)
- punpckldq xmmE,xmmH ; xmmE=(22 03 13 23 04 14 24 05 24 05 15 25 06 16 26 07)
- punpckhdq xmmD,xmmB ; xmmD=(15 25 06 16 26 07 17 27 17 27 08 18 28 09 19 29)
-
- pshufd xmmH,xmmG,0x4E; xmmH=(0C 1C 2C 0D 0E 1E 2E 0F 08 18 28 09 0A 1A 2A 0B)
- movdqa xmmB,xmmF
- punpckldq xmmG,xmmC ; xmmG=(08 18 28 09 19 29 0A 1A 0A 1A 2A 0B 1B 2B 0C 1C)
- punpckldq xmmF,xmmH ; xmmF=(2A 0B 1B 2B 0C 1C 2C 0D 2C 0D 1D 2D 0E 1E 2E 0F)
- punpckhdq xmmC,xmmB ; xmmC=(1D 2D 0E 1E 2E 0F 1F 2F 1F 2F -- -- -- -- -- --)
-
- punpcklqdq xmmA,xmmE ; xmmA=(00 10 20 01 11 21 02 12 22 03 13 23 04 14 24 05)
- punpcklqdq xmmD,xmmG ; xmmD=(15 25 06 16 26 07 17 27 08 18 28 09 19 29 0A 1A)
- punpcklqdq xmmF,xmmC ; xmmF=(2A 0B 1B 2B 0C 1C 2C 0D 1D 2D 0E 1E 2E 0F 1F 2F)
-
- dec al ; YVctr
- jz short .YVloop_break
-
- movdqa XMMWORD [wk(6)], xmmA
- movdqa XMMWORD [wk(7)], xmmD
- movdqa XMMWORD [wk(8)], xmmF
-
- jmp near .YVloop_2nd
- alignx 16,7
-
-.YVloop_break:
- movdqa xmmH, XMMWORD [wk(6)]
- movdqa xmmB, XMMWORD [wk(7)]
- movdqa xmmE, XMMWORD [wk(8)]
-
- pcmpeqb xmmG,xmmG ; xmmG=(all 1's)
-
- cmp ecx, byte SIZEOF_XMMWORD
- jb near .column_st32
-
- test edi, SIZEOF_XMMWORD-1
- jnz short .out01
- ; --(aligned)-------------------
- movntdq XMMWORD [edi+0*SIZEOF_XMMWORD], xmmA
- movntdq XMMWORD [edi+1*SIZEOF_XMMWORD], xmmD
- movntdq XMMWORD [edi+2*SIZEOF_XMMWORD], xmmF
- add edi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr1
- jmp short .out00
-.out01: ; --(unaligned)-----------------
- maskmovdqu xmmA,xmmG ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr1
- maskmovdqu xmmD,xmmG ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr1
- maskmovdqu xmmF,xmmG ; movntdqu XMMWORD [edi], xmmF
- add edi, byte SIZEOF_XMMWORD ; outptr1
-.out00:
- test esi, SIZEOF_XMMWORD-1
- jnz short .out11
- ; --(aligned)-------------------
- movntdq XMMWORD [esi+0*SIZEOF_XMMWORD], xmmH
- movntdq XMMWORD [esi+1*SIZEOF_XMMWORD], xmmB
- movntdq XMMWORD [esi+2*SIZEOF_XMMWORD], xmmE
- add esi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr0
- jmp short .out10
-.out11: ; --(unaligned)-----------------
- xchg edi,esi ; edi=outptr0, esi=outptr1
- maskmovdqu xmmH,xmmG ; movntdqu XMMWORD [edi], xmmH
- add edi, byte SIZEOF_XMMWORD ; outptr0
- maskmovdqu xmmB,xmmG ; movntdqu XMMWORD [edi], xmmB
- add edi, byte SIZEOF_XMMWORD ; outptr0
- maskmovdqu xmmE,xmmG ; movntdqu XMMWORD [edi], xmmE
- add edi, byte SIZEOF_XMMWORD ; outptr0
- xchg edi,esi ; edi=outptr1, esi=outptr0
-.out10:
- sub ecx, byte SIZEOF_XMMWORD
- jz near .endcolumn
-
- add ebx, byte SIZEOF_XMMWORD ; inptr00
- add edx, byte SIZEOF_XMMWORD ; inptr01
- dec ah ; YHctr
- jnz near .YHloop_2nd
-
- push ebx ; inptr00
- push edx ; inptr01
- mov ebx, JSAMPROW [inptr1] ; ebx=inptr1
- mov edx, JSAMPROW [inptr2] ; edx=inptr2
- add ebx, byte SIZEOF_XMMWORD ; inptr1
- add edx, byte SIZEOF_XMMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st32:
- lea ecx, [ecx+ecx*2] ; imul ecx, RGB_PIXELSIZE
- cmp ecx, byte 2*SIZEOF_XMMWORD
- jb short .column_st16
- maskmovdqu xmmA,xmmG ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr1
- maskmovdqu xmmD,xmmG ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr1
- xchg edi,esi ; edi=outptr0, esi=outptr1
- maskmovdqu xmmH,xmmG ; movntdqu XMMWORD [edi], xmmH
- add edi, byte SIZEOF_XMMWORD ; outptr0
- maskmovdqu xmmB,xmmG ; movntdqu XMMWORD [edi], xmmB
- add edi, byte SIZEOF_XMMWORD ; outptr0
- xchg edi,esi ; edi=outptr1, esi=outptr0
- movdqa xmmA,xmmF
- movdqa xmmH,xmmE
- sub ecx, byte 2*SIZEOF_XMMWORD
- jmp short .column_st15
-.column_st16:
- cmp ecx, byte SIZEOF_XMMWORD
- jb short .column_st15
- maskmovdqu xmmA,xmmG ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr1
- xchg edi,esi ; edi=outptr0, esi=outptr1
- maskmovdqu xmmH,xmmG ; movntdqu XMMWORD [edi], xmmH
- add edi, byte SIZEOF_XMMWORD ; outptr0
- xchg edi,esi ; edi=outptr1, esi=outptr0
- movdqa xmmA,xmmD
- movdqa xmmH,xmmB
- sub ecx, byte SIZEOF_XMMWORD
-.column_st15:
- mov edx,ecx
- xor ecx, byte 0x0F
- shl ecx, 2
- movd xmmC,ecx
- psrlq xmmG,4
- pcmpeqb xmmD,xmmD
- psrlq xmmG,xmmC
- psrlq xmmD,xmmC
- punpcklbw xmmD,xmmG
- movdqa xmmB,xmmD
- ; ================
- mov ecx,edi
- and ecx, byte SIZEOF_XMMWORD-1
- jz short .adj0a
- lea eax, [ecx+edx]
- cmp eax, byte SIZEOF_XMMWORD
- ja short .adj0a
- and edi, byte (-SIZEOF_XMMWORD) ; align to 16-byte boundary
- shl ecx, 3 ; pslldq xmmA,ecx & pslldq xmmD,ecx
- movdqa xmmF,xmmA
- movdqa xmmE,xmmD
- pslldq xmmA, SIZEOF_XMMWORD/2
- pslldq xmmD, SIZEOF_XMMWORD/2
- movd xmmC,ecx
- sub ecx, byte (SIZEOF_XMMWORD/2)*BYTE_BIT
- jb short .adj1a
- movd xmmG,ecx
- psllq xmmA,xmmG
- psllq xmmD,xmmG
- jmp short .adj0a
-.adj1a: neg ecx
- movd xmmG,ecx
- psrlq xmmA,xmmG
- psrlq xmmD,xmmG
- psllq xmmF,xmmC
- psllq xmmE,xmmC
- por xmmA,xmmF
- por xmmD,xmmE
-.adj0a: ; ----------------
- maskmovdqu xmmA,xmmD ; movntdqu XMMWORD [edi], xmmA
- xchg edi,esi ; edi=outptr0, esi=outptr1
- ; ================
- mov ecx,edi
- and ecx, byte SIZEOF_XMMWORD-1
- jz short .adj0b
- lea eax, [ecx+edx]
- cmp eax, byte SIZEOF_XMMWORD
- ja short .adj0b
- and edi, byte (-SIZEOF_XMMWORD) ; align to 16-byte boundary
- shl ecx, 3 ; pslldq xmmH,ecx & pslldq xmmB,ecx
- movdqa xmmG,xmmH
- movdqa xmmC,xmmB
- pslldq xmmH, SIZEOF_XMMWORD/2
- pslldq xmmB, SIZEOF_XMMWORD/2
- movd xmmF,ecx
- sub ecx, byte (SIZEOF_XMMWORD/2)*BYTE_BIT
- jb short .adj1b
- movd xmmE,ecx
- psllq xmmH,xmmE
- psllq xmmB,xmmE
- jmp short .adj0b
-.adj1b: neg ecx
- movd xmmE,ecx
- psrlq xmmH,xmmE
- psrlq xmmB,xmmE
- psllq xmmG,xmmF
- psllq xmmC,xmmF
- por xmmH,xmmG
- por xmmB,xmmC
-.adj0b: ; ----------------
- maskmovdqu xmmH,xmmB ; movntdqu XMMWORD [edi], xmmH
-
-%else ; RGB_PIXELSIZE == 4 ; -----------
-
-%ifdef RGBX_FILLER_0XFF
- pcmpeqb xmm6,xmm6 ; xmm6=XE=X(02468ACE********)
- pcmpeqb xmm7,xmm7 ; xmm7=XO=X(13579BDF********)
-%else
- pxor xmm6,xmm6 ; xmm6=XE=X(02468ACE********)
- pxor xmm7,xmm7 ; xmm7=XO=X(13579BDF********)
-%endif
- ; xmmA=(00 02 04 06 08 0A 0C 0E **), xmmB=(01 03 05 07 09 0B 0D 0F **)
- ; xmmC=(10 12 14 16 18 1A 1C 1E **), xmmD=(11 13 15 17 19 1B 1D 1F **)
- ; xmmE=(20 22 24 26 28 2A 2C 2E **), xmmF=(21 23 25 27 29 2B 2D 2F **)
- ; xmmG=(30 32 34 36 38 3A 3C 3E **), xmmH=(31 33 35 37 39 3B 3D 3F **)
-
- punpcklbw xmmA,xmmC ; xmmA=(00 10 02 12 04 14 06 16 08 18 0A 1A 0C 1C 0E 1E)
- punpcklbw xmmE,xmmG ; xmmE=(20 30 22 32 24 34 26 36 28 38 2A 3A 2C 3C 2E 3E)
- punpcklbw xmmB,xmmD ; xmmB=(01 11 03 13 05 15 07 17 09 19 0B 1B 0D 1D 0F 1F)
- punpcklbw xmmF,xmmH ; xmmF=(21 31 23 33 25 35 27 37 29 39 2B 3B 2D 3D 2F 3F)
-
- movdqa xmmC,xmmA
- punpcklwd xmmA,xmmE ; xmmA=(00 10 20 30 02 12 22 32 04 14 24 34 06 16 26 36)
- punpckhwd xmmC,xmmE ; xmmC=(08 18 28 38 0A 1A 2A 3A 0C 1C 2C 3C 0E 1E 2E 3E)
- movdqa xmmG,xmmB
- punpcklwd xmmB,xmmF ; xmmB=(01 11 21 31 03 13 23 33 05 15 25 35 07 17 27 37)
- punpckhwd xmmG,xmmF ; xmmG=(09 19 29 39 0B 1B 2B 3B 0D 1D 2D 3D 0F 1F 2F 3F)
-
- movdqa xmmD,xmmA
- punpckldq xmmA,xmmB ; xmmA=(00 10 20 30 01 11 21 31 02 12 22 32 03 13 23 33)
- punpckhdq xmmD,xmmB ; xmmD=(04 14 24 34 05 15 25 35 06 16 26 36 07 17 27 37)
- movdqa xmmH,xmmC
- punpckldq xmmC,xmmG ; xmmC=(08 18 28 38 09 19 29 39 0A 1A 2A 3A 0B 1B 2B 3B)
- punpckhdq xmmH,xmmG ; xmmH=(0C 1C 2C 3C 0D 1D 2D 3D 0E 1E 2E 3E 0F 1F 2F 3F)
-
- dec al ; YVctr
- jz short .YVloop_break
-
- movdqa XMMWORD [wk(6)], xmmA
- movdqa XMMWORD [wk(7)], xmmD
- movdqa XMMWORD [wk(8)], xmmC
- movdqa XMMWORD [wk(9)], xmmH
-
- jmp near .YVloop_2nd
- alignx 16,7
-
-.YVloop_break:
- movdqa xmmE, XMMWORD [wk(6)]
- movdqa xmmF, XMMWORD [wk(7)]
- movdqa xmmB, XMMWORD [wk(8)]
-
- pcmpeqb xmmG,xmmG ; xmmG=(all 1's)
-
- cmp ecx, byte SIZEOF_XMMWORD
- jb near .column_st32
-
- test edi, SIZEOF_XMMWORD-1
- jnz short .out01
- ; --(aligned)-------------------
- movntdq XMMWORD [edi+0*SIZEOF_XMMWORD], xmmA
- movntdq XMMWORD [edi+1*SIZEOF_XMMWORD], xmmD
- movntdq XMMWORD [edi+2*SIZEOF_XMMWORD], xmmC
- movntdq XMMWORD [edi+3*SIZEOF_XMMWORD], xmmH
- add edi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr1
- jmp short .out00
-.out01: ; --(unaligned)-----------------
- maskmovdqu xmmA,xmmG ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr1
- maskmovdqu xmmD,xmmG ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr1
- maskmovdqu xmmC,xmmG ; movntdqu XMMWORD [edi], xmmC
- add edi, byte SIZEOF_XMMWORD ; outptr1
- maskmovdqu xmmH,xmmG ; movntdqu XMMWORD [edi], xmmH
- add edi, byte SIZEOF_XMMWORD ; outptr1
-.out00:
- movdqa xmmA, XMMWORD [wk(9)]
-
- test esi, SIZEOF_XMMWORD-1
- jnz short .out11
- ; --(aligned)-------------------
- movntdq XMMWORD [esi+0*SIZEOF_XMMWORD], xmmE
- movntdq XMMWORD [esi+1*SIZEOF_XMMWORD], xmmF
- movntdq XMMWORD [esi+2*SIZEOF_XMMWORD], xmmB
- movntdq XMMWORD [esi+3*SIZEOF_XMMWORD], xmmA
- add esi, byte RGB_PIXELSIZE*SIZEOF_XMMWORD ; outptr0
- jmp short .out10
-.out11: ; --(unaligned)-----------------
- xchg edi,esi ; edi=outptr0, esi=outptr1
- maskmovdqu xmmE,xmmG ; movntdqu XMMWORD [edi], xmmE
- add edi, byte SIZEOF_XMMWORD ; outptr0
- maskmovdqu xmmF,xmmG ; movntdqu XMMWORD [edi], xmmF
- add edi, byte SIZEOF_XMMWORD ; outptr0
- maskmovdqu xmmB,xmmG ; movntdqu XMMWORD [edi], xmmB
- add edi, byte SIZEOF_XMMWORD ; outptr0
- maskmovdqu xmmA,xmmG ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr0
- xchg edi,esi ; edi=outptr1, esi=outptr0
-.out10:
- sub ecx, byte SIZEOF_XMMWORD
- jz near .endcolumn
-
- add ebx, byte SIZEOF_XMMWORD ; inptr00
- add edx, byte SIZEOF_XMMWORD ; inptr01
- dec ah ; YHctr
- jnz near .YHloop_2nd
-
- push ebx ; inptr00
- push edx ; inptr01
- mov ebx, JSAMPROW [inptr1] ; ebx=inptr1
- mov edx, JSAMPROW [inptr2] ; edx=inptr2
- add ebx, byte SIZEOF_XMMWORD ; inptr1
- add edx, byte SIZEOF_XMMWORD ; inptr2
- jmp near .columnloop
- alignx 16,7
-
-.column_st32:
- cmp ecx, byte SIZEOF_XMMWORD/2
- jb short .column_st16
- maskmovdqu xmmA,xmmG ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr1
- maskmovdqu xmmD,xmmG ; movntdqu XMMWORD [edi], xmmD
- add edi, byte SIZEOF_XMMWORD ; outptr1
- xchg edi,esi ; edi=outptr0, esi=outptr1
- maskmovdqu xmmE,xmmG ; movntdqu XMMWORD [edi], xmmE
- add edi, byte SIZEOF_XMMWORD ; outptr0
- maskmovdqu xmmF,xmmG ; movntdqu XMMWORD [edi], xmmF
- add edi, byte SIZEOF_XMMWORD ; outptr0
- xchg edi,esi ; edi=outptr1, esi=outptr0
- movdqa xmmA,xmmC
- movdqa xmmD,xmmH
- movdqa xmmE,xmmB
- movdqa xmmF, XMMWORD [wk(9)]
- sub ecx, byte SIZEOF_XMMWORD/2
-.column_st16:
- cmp ecx, byte SIZEOF_XMMWORD/4
- jb short .column_st15
- maskmovdqu xmmA,xmmG ; movntdqu XMMWORD [edi], xmmA
- add edi, byte SIZEOF_XMMWORD ; outptr1
- xchg edi,esi ; edi=outptr0, esi=outptr1
- maskmovdqu xmmE,xmmG ; movntdqu XMMWORD [edi], xmmE
- add edi, byte SIZEOF_XMMWORD ; outptr0
- xchg edi,esi ; edi=outptr1, esi=outptr0
- movdqa xmmA,xmmD
- movdqa xmmE,xmmF
- sub ecx, byte SIZEOF_XMMWORD/4
-.column_st15:
- cmp ecx, byte SIZEOF_XMMWORD/16
- jb near .endcolumn
- mov edx,ecx
- xor ecx, byte 0x03
- inc ecx
- shl ecx, 4
- movd xmmC,ecx
- psrlq xmmG,xmmC
- punpcklbw xmmG,xmmG
- movdqa xmmH,xmmG
- ; ================
- mov ecx,edi
- and ecx, byte SIZEOF_XMMWORD-1
- jz short .adj0a
- lea eax, [ecx+edx*4] ; RGB_PIXELSIZE
- cmp eax, byte SIZEOF_XMMWORD
- ja short .adj0a
- and edi, byte (-SIZEOF_XMMWORD) ; align to 16-byte boundary
- shl ecx, 3 ; pslldq xmmA,ecx & pslldq xmmG,ecx
- movdqa xmmB,xmmA
- movdqa xmmD,xmmG
- pslldq xmmA, SIZEOF_XMMWORD/2
- pslldq xmmG, SIZEOF_XMMWORD/2
- movd xmmF,ecx
- sub ecx, byte (SIZEOF_XMMWORD/2)*BYTE_BIT
- jb short .adj1a
- movd xmmC,ecx
- psllq xmmA,xmmC
- psllq xmmG,xmmC
- jmp short .adj0a
-.adj1a: neg ecx
- movd xmmC,ecx
- psrlq xmmA,xmmC
- psrlq xmmG,xmmC
- psllq xmmB,xmmF
- psllq xmmD,xmmF
- por xmmA,xmmB
- por xmmG,xmmD
-.adj0a: ; ----------------
- maskmovdqu xmmA,xmmG ; movntdqu XMMWORD [edi], xmmA
- xchg edi,esi ; edi=outptr0, esi=outptr1
- ; ================
- mov ecx,edi
- and ecx, byte SIZEOF_XMMWORD-1
- jz short .adj0b
- lea eax, [ecx+edx*4] ; RGB_PIXELSIZE
- cmp eax, byte SIZEOF_XMMWORD
- ja short .adj0b
- and edi, byte (-SIZEOF_XMMWORD) ; align to 16-byte boundary
- shl ecx, 3 ; pslldq xmmE,ecx & pslldq xmmH,ecx
- movdqa xmmC,xmmE
- movdqa xmmF,xmmH
- pslldq xmmE, SIZEOF_XMMWORD/2
- pslldq xmmH, SIZEOF_XMMWORD/2
- movd xmmB,ecx
- sub ecx, byte (SIZEOF_XMMWORD/2)*BYTE_BIT
- jb short .adj1b
- movd xmmD,ecx
- psllq xmmE,xmmD
- psllq xmmH,xmmD
- jmp short .adj0b
-.adj1b: neg ecx
- movd xmmD,ecx
- psrlq xmmE,xmmD
- psrlq xmmH,xmmD
- psllq xmmC,xmmB
- psllq xmmF,xmmB
- por xmmE,xmmC
- por xmmH,xmmF
-.adj0b: ; ----------------
- maskmovdqu xmmE,xmmH ; movntdqu XMMWORD [edi], xmmE
-
-%endif ; RGB_PIXELSIZE ; ---------------
-
-.endcolumn:
- sfence ; flush the write buffer
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; !USE_DEDICATED_H2V2_MERGED_UPSAMPLE_SSE2
-
-%endif ; JDMERGE_SSE2_SUPPORTED
-%endif ; UPSAMPLE_MERGING_SUPPORTED
-%endif ; RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4
diff --git a/jdphuff.c b/jdphuff.c
index a1d92b7..2267809 100644
--- a/jdphuff.c
+++ b/jdphuff.c
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified to improve performance.
- * Last Modified : October 31, 2004
- * ---------------------------------------------------------------------
- *
* This file contains Huffman entropy decoding routines for progressive JPEG.
*
* Much of the complexity here has to do with supporting input suspension.
@@ -76,7 +69,6 @@
d_derived_tbl * derived_tbls[NUM_HUFF_TBLS];
d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */
- d_derived_tbl * dc_derived_tbls[MAX_COMPS_IN_SCAN];
} phuff_entropy_decoder;
typedef phuff_entropy_decoder * phuff_entropy_ptr;
@@ -176,7 +168,6 @@
tbl = compptr->dc_tbl_no;
jpeg_make_d_derived_tbl(cinfo, TRUE, tbl,
& entropy->derived_tbls[tbl]);
- entropy->dc_derived_tbls[ci] = entropy->derived_tbls[tbl];
}
} else {
tbl = compptr->ac_tbl_no;
@@ -203,6 +194,32 @@
/*
+ * Figure F.12: extend sign bit.
+ * On some machines, a shift and add will be faster than a table lookup.
+ */
+
+#ifdef AVOID_TABLES
+
+#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x))
+
+#else
+
+#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x))
+
+static const int extend_test[16] = /* entry n is 2**(n-1) */
+ { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080,
+ 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
+
+static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
+ { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1,
+ ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1,
+ ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1,
+ ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
+
+#endif /* AVOID_TABLES */
+
+
+/*
* Check for a restart marker & resynchronize decoder.
* Returns FALSE if must suspend.
*/
@@ -267,12 +284,16 @@
METHODDEF(boolean)
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
+{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
int Al = cinfo->Al;
- int blkn;
+ register int s, r;
+ int blkn, ci;
+ JBLOCKROW block;
BITREAD_STATE_VARS;
savable_state state;
+ d_derived_tbl * tbl;
+ jpeg_component_info * compptr;
/* Process restart marker if needed; may have to suspend */
if (cinfo->restart_interval) {
@@ -293,67 +314,21 @@
/* Outer loop handles each block in the MCU */
for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- JBLOCKROW block = MCU_data[blkn];
- int ci = cinfo->MCU_membership[blkn];
- d_derived_tbl * tbl = entropy->dc_derived_tbls[ci];
- register int s;
+ block = MCU_data[blkn];
+ ci = cinfo->MCU_membership[blkn];
+ compptr = cinfo->cur_comp_info[ci];
+ tbl = entropy->derived_tbls[compptr->dc_tbl_no];
/* Decode a single block's worth of coefficients */
/* Section F.2.2.1: decode the DC coefficient difference */
- { /* HUFFX_DECODE */
- register int nb, look, t;
- if (bits_left < HUFFX_LOOKAHEAD) {
- register const JOCTET * next_input_byte = br_state.next_input_byte;
- register size_t bytes_in_buffer = br_state.bytes_in_buffer;
- if (cinfo->unread_marker == 0) {
- while (bits_left < MIN_GET_BITS) {
- register int c;
- if (bytes_in_buffer == 0 ||
- (c = GETJOCTET(*next_input_byte)) == 0xFF) {
- goto label11; }
- bytes_in_buffer--; next_input_byte++;
- get_buffer = (get_buffer << 8) | c;
- bits_left += 8;
- }
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- } else {
- label11:
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- if (! jpeg_fill_bit_buffer(&br_state,get_buffer,bits_left, 0)) {
- return FALSE; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- if (bits_left < HUFFX_LOOKAHEAD) {
- nb = 1; goto label1;
- }
- }
- }
- look = PEEK_BITS(HUFFX_LOOKAHEAD);
- if ((nb = tbl->lookx_nbits[look]) != 0) {
- s = tbl->lookx_val[look];
- if (nb <= HUFFX_LOOKAHEAD) {
- DROP_BITS(nb);
- } else {
- DROP_BITS(HUFFX_LOOKAHEAD);
- nb -= HUFFX_LOOKAHEAD;
- CHECK_BIT_BUFFER(br_state, nb, return FALSE);
- s += GET_BITS(nb);
- }
- } else {
- nb = HUFFX_LOOKAHEAD;
- label1:
- if ((s=jpeg_huff_decode(&br_state,get_buffer,bits_left,tbl,nb))
- < 0) { return FALSE; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- if (s) {
- CHECK_BIT_BUFFER(br_state, s, return FALSE);
- t = GET_BITS(s);
- s = HUFF_EXTEND(t, s);
- }
- }
+ HUFF_DECODE(s, br_state, tbl, return FALSE, label1);
+ if (s) {
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ r = GET_BITS(s);
+ s = HUFF_EXTEND(r, s);
}
+
/* Convert DC difference to actual value, update last_dc_val */
s += state.last_dc_val[ci];
state.last_dc_val[ci] = s;
@@ -380,12 +355,15 @@
METHODDEF(boolean)
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
+{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
int Se = cinfo->Se;
int Al = cinfo->Al;
+ register int s, k, r;
unsigned int EOBRUN;
+ JBLOCKROW block;
BITREAD_STATE_VARS;
+ d_derived_tbl * tbl;
/* Process restart marker if needed; may have to suspend */
if (cinfo->restart_interval) {
@@ -406,74 +384,22 @@
/* There is always only one block per MCU */
- if (EOBRUN > 0) { /* if it's a band of zeroes... */
+ if (EOBRUN > 0) /* if it's a band of zeroes... */
EOBRUN--; /* ...process it now (we do nothing) */
- } else {
- JBLOCKROW block = MCU_data[0];
- d_derived_tbl * tbl = entropy->ac_derived_tbl;
- register int s, k, r;
-
- /* Load up working state */
+ else {
BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
+ block = MCU_data[0];
+ tbl = entropy->ac_derived_tbl;
for (k = cinfo->Ss; k <= Se; k++) {
- { /* HUFFX_DECODE */
- register int nb, look, t;
- if (bits_left < HUFFX_LOOKAHEAD) {
- register const JOCTET * next_input_byte = br_state.next_input_byte;
- register size_t bytes_in_buffer = br_state.bytes_in_buffer;
- if (cinfo->unread_marker == 0) {
- while (bits_left < MIN_GET_BITS) {
- register int c;
- if (bytes_in_buffer == 0 ||
- (c = GETJOCTET(*next_input_byte)) == 0xFF) {
- goto label21; }
- bytes_in_buffer--; next_input_byte++;
- get_buffer = (get_buffer << 8) | c;
- bits_left += 8;
- }
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- } else {
- label21:
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- if (! jpeg_fill_bit_buffer(&br_state,get_buffer,bits_left, 0)) {
- return FALSE; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- if (bits_left < HUFFX_LOOKAHEAD) {
- nb = 1; goto label2;
- }
- }
- }
- look = PEEK_BITS(HUFFX_LOOKAHEAD);
- if ((nb = tbl->lookx_nbits[look]) != 0) {
- s = tbl->lookx_val[look];
- r = tbl->lookx_sym[look] >> 4;
- if (nb <= HUFFX_LOOKAHEAD) {
- DROP_BITS(nb);
- } else {
- DROP_BITS(HUFFX_LOOKAHEAD);
- nb -= HUFFX_LOOKAHEAD;
- CHECK_BIT_BUFFER(br_state, nb, return FALSE);
- s += GET_BITS(nb);
- }
- } else {
- nb = HUFFX_LOOKAHEAD;
- label2:
- if ((s=jpeg_huff_decode(&br_state,get_buffer,bits_left,tbl,nb))
- < 0) { return FALSE; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- r = s >> 4; s &= 15;
- if (s) {
- CHECK_BIT_BUFFER(br_state, s, return FALSE);
- t = GET_BITS(s);
- s = HUFF_EXTEND(t, s);
- }
- }
- }
+ HUFF_DECODE(s, br_state, tbl, return FALSE, label2);
+ r = s >> 4;
+ s &= 15;
if (s) {
k += r;
+ CHECK_BIT_BUFFER(br_state, s, return FALSE);
+ r = GET_BITS(s);
+ s = HUFF_EXTEND(r, s);
/* Scale and output coefficient in natural (dezigzagged) order */
(*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al);
} else {
@@ -514,10 +440,11 @@
METHODDEF(boolean)
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
+{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
int blkn;
+ JBLOCKROW block;
BITREAD_STATE_VARS;
/* Process restart marker if needed; may have to suspend */
@@ -537,7 +464,7 @@
/* Outer loop handles each block in the MCU */
for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
- JBLOCKROW block = MCU_data[blkn];
+ block = MCU_data[blkn];
/* Encoded data is simply the next bit of the two's-complement DC value */
CHECK_BIT_BUFFER(br_state, 1, return FALSE);
@@ -562,17 +489,17 @@
METHODDEF(boolean)
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
-{
+{
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
int Se = cinfo->Se;
- int Al = cinfo->Al;
+ int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
+ int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
register int s, k, r;
unsigned int EOBRUN;
JBLOCKROW block;
JCOEFPTR thiscoef;
BITREAD_STATE_VARS;
d_derived_tbl * tbl;
- int pm1[2];
int num_newnz;
int newnz_pos[DCTSIZE2];
@@ -595,13 +522,6 @@
block = MCU_data[0];
tbl = entropy->ac_derived_tbl;
- /* The pm1[] array is indexed by a value from relational operator.
- * This method eliminates conditional branches depending on random data,
- * which result in lower performance on recent processors.
- */
- pm1[0] = 1 << cinfo->Al; /* +1 in the bit position being coded */
- pm1[1] = (-1) << cinfo->Al; /* -1 in the bit position being coded */
-
/* If we are forced to suspend, we must undo the assignments to any newly
* nonzero coefficients in the block, because otherwise we'd get confused
* next time about which coefficients were already nonzero.
@@ -615,63 +535,18 @@
if (EOBRUN == 0) {
for (; k <= Se; k++) {
- { /* HUFFX_DECODE */
- register int nb, look, t;
- if (bits_left < HUFFX_LOOKAHEAD) {
- register const JOCTET * next_input_byte = br_state.next_input_byte;
- register size_t bytes_in_buffer = br_state.bytes_in_buffer;
- if (cinfo->unread_marker == 0) {
- while (bits_left < MIN_GET_BITS) {
- register int c;
- if (bytes_in_buffer == 0 ||
- (c = GETJOCTET(*next_input_byte)) == 0xFF) {
- goto label31; }
- bytes_in_buffer--; next_input_byte++;
- get_buffer = (get_buffer << 8) | c;
- bits_left += 8;
- }
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- } else {
- label31:
- br_state.next_input_byte = next_input_byte;
- br_state.bytes_in_buffer = bytes_in_buffer;
- if (! jpeg_fill_bit_buffer(&br_state,get_buffer,bits_left, 0)) {
- goto undoit; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- if (bits_left < HUFFX_LOOKAHEAD) {
- nb = 1; goto label3;
- }
- }
- }
- look = PEEK_BITS(HUFFX_LOOKAHEAD);
- if ((nb = tbl->lookx_nbits[look]) != 0) {
- t = tbl->lookx_sym[look];
- s = tbl->lookx_val[look];
- r = t >> 4; t &= 15;
- if (t <= 1) {
- DROP_BITS(nb);
- } else { /* size of new coef should always be 1 */
- WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
- DROP_BITS(nb - (t - 1));
- s = (s >= 0) ? 1 : -1;
- }
- } else {
- nb = HUFFX_LOOKAHEAD;
- label3:
- if ((s=jpeg_huff_decode(&br_state,get_buffer,bits_left,tbl,nb))
- < 0) { goto undoit; }
- get_buffer = br_state.get_buffer; bits_left = br_state.bits_left;
- r = s >> 4; s &= 15;
- if (s) {
- if (s != 1) /* size of new coef should always be 1 */
- WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
- CHECK_BIT_BUFFER(br_state, 1, goto undoit);
- s = GET_BITS(1) ? 1 : -1;
- }
- }
- }
- if (s == 0) {
+ HUFF_DECODE(s, br_state, tbl, goto undoit, label3);
+ r = s >> 4;
+ s &= 15;
+ if (s) {
+ if (s != 1) /* size of new coef should always be 1 */
+ WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
+ CHECK_BIT_BUFFER(br_state, 1, goto undoit);
+ if (GET_BITS(1))
+ s = p1; /* newly nonzero coef is positive */
+ else
+ s = m1; /* newly nonzero coef is negative */
+ } else {
if (r != 15) {
EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */
if (r) {
@@ -692,8 +567,12 @@
if (*thiscoef != 0) {
CHECK_BIT_BUFFER(br_state, 1, goto undoit);
if (GET_BITS(1)) {
- if ((*thiscoef & pm1[0]) == 0) /* do nothing if already set it */
- *thiscoef += pm1[(*thiscoef < 0)];
+ if ((*thiscoef & p1) == 0) { /* do nothing if already set it */
+ if (*thiscoef >= 0)
+ *thiscoef += p1;
+ else
+ *thiscoef += m1;
+ }
}
} else {
if (--r < 0)
@@ -704,7 +583,7 @@
if (s) {
int pos = jpeg_natural_order[k];
/* Output newly nonzero coefficient */
- (*block)[pos] = (JCOEF) (s << Al);
+ (*block)[pos] = (JCOEF) s;
/* Remember its position in case we have to suspend */
newnz_pos[num_newnz++] = pos;
}
@@ -722,8 +601,12 @@
if (*thiscoef != 0) {
CHECK_BIT_BUFFER(br_state, 1, goto undoit);
if (GET_BITS(1)) {
- if ((*thiscoef & pm1[0]) == 0) /* do nothing if already set it */
- *thiscoef += pm1[(*thiscoef < 0)];
+ if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */
+ if (*thiscoef >= 0)
+ *thiscoef += p1;
+ else
+ *thiscoef += m1;
+ }
}
}
}
diff --git a/jdsammmx.asm b/jdsammmx.asm
deleted file mode 100644
index bb17d37..0000000
--- a/jdsammmx.asm
+++ /dev/null
@@ -1,893 +0,0 @@
-;
-; jdsammmx.asm - upsampling (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%ifdef JDSAMPLE_FANCY_MMX_SUPPORTED
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_fancy_upsample_mmx)
-
-EXTN(jconst_fancy_upsample_mmx):
-
-PW_ONE times 4 dw 1
-PW_TWO times 4 dw 2
-PW_THREE times 4 dw 3
-PW_SEVEN times 4 dw 7
-PW_EIGHT times 4 dw 8
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Fancy processing for the common case of 2:1 horizontal and 1:1 vertical.
-;
-; The upsampling algorithm is linear interpolation between pixel centers,
-; also known as a "triangle filter". This is a good compromise between
-; speed and visual quality. The centers of the output pixels are 1/4 and 3/4
-; of the way between input pixel centers.
-;
-; GLOBAL(void)
-; jpeg_h2v1_fancy_upsample_mmx (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
- align 16
- global EXTN(jpeg_h2v1_fancy_upsample_mmx)
-
-EXTN(jpeg_h2v1_fancy_upsample_mmx):
- push ebp
- mov ebp,esp
- pushpic ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- mov eax, POINTER [compptr(ebp)]
- mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr
- test eax,eax
- jz near .return
-
- mov ecx, POINTER [cinfo(ebp)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz near .return
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, POINTER [output_data_ptr(ebp)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push eax ; colctr
- push edi
- push esi
-
- mov esi, JSAMPROW [esi] ; inptr
- mov edi, JSAMPROW [edi] ; outptr
-
- test eax, SIZEOF_MMWORD-1
- jz short .skip
- mov dl, JSAMPLE [esi+(eax-1)*SIZEOF_JSAMPLE]
- mov JSAMPLE [esi+eax*SIZEOF_JSAMPLE], dl ; insert a dummy sample
-.skip:
- pxor mm0,mm0 ; mm0=(all 0's)
- pcmpeqb mm7,mm7
- psrlq mm7,(SIZEOF_MMWORD-1)*BYTE_BIT
- pand mm7, MMWORD [esi+0*SIZEOF_MMWORD]
-
- add eax, byte SIZEOF_MMWORD-1
- and eax, byte -SIZEOF_MMWORD
- cmp eax, byte SIZEOF_MMWORD
- ja short .columnloop
- alignx 16,7
-
-.columnloop_last:
- pcmpeqb mm6,mm6
- psllq mm6,(SIZEOF_MMWORD-1)*BYTE_BIT
- pand mm6, MMWORD [esi+0*SIZEOF_MMWORD]
- jmp short .upsample
- alignx 16,7
-
-.columnloop:
- movq mm6, MMWORD [esi+1*SIZEOF_MMWORD]
- psllq mm6,(SIZEOF_MMWORD-1)*BYTE_BIT
-
-.upsample:
- movq mm1, MMWORD [esi+0*SIZEOF_MMWORD]
- movq mm2,mm1
- movq mm3,mm1 ; mm1=( 0 1 2 3 4 5 6 7)
- psllq mm2,BYTE_BIT ; mm2=( - 0 1 2 3 4 5 6)
- psrlq mm3,BYTE_BIT ; mm3=( 1 2 3 4 5 6 7 -)
-
- por mm2,mm7 ; mm2=(-1 0 1 2 3 4 5 6)
- por mm3,mm6 ; mm3=( 1 2 3 4 5 6 7 8)
-
- movq mm7,mm1
- psrlq mm7,(SIZEOF_MMWORD-1)*BYTE_BIT ; mm7=( 7 - - - - - - -)
-
- movq mm4,mm1
- punpcklbw mm1,mm0 ; mm1=( 0 1 2 3)
- punpckhbw mm4,mm0 ; mm4=( 4 5 6 7)
- movq mm5,mm2
- punpcklbw mm2,mm0 ; mm2=(-1 0 1 2)
- punpckhbw mm5,mm0 ; mm5=( 3 4 5 6)
- movq mm6,mm3
- punpcklbw mm3,mm0 ; mm3=( 1 2 3 4)
- punpckhbw mm6,mm0 ; mm6=( 5 6 7 8)
-
- pmullw mm1,[GOTOFF(ebx,PW_THREE)]
- pmullw mm4,[GOTOFF(ebx,PW_THREE)]
- paddw mm2,[GOTOFF(ebx,PW_ONE)]
- paddw mm5,[GOTOFF(ebx,PW_ONE)]
- paddw mm3,[GOTOFF(ebx,PW_TWO)]
- paddw mm6,[GOTOFF(ebx,PW_TWO)]
-
- paddw mm2,mm1
- paddw mm5,mm4
- psrlw mm2,2 ; mm2=OutLE=( 0 2 4 6)
- psrlw mm5,2 ; mm5=OutHE=( 8 10 12 14)
- paddw mm3,mm1
- paddw mm6,mm4
- psrlw mm3,2 ; mm3=OutLO=( 1 3 5 7)
- psrlw mm6,2 ; mm6=OutHO=( 9 11 13 15)
-
- psllw mm3,BYTE_BIT
- psllw mm6,BYTE_BIT
- por mm2,mm3 ; mm2=OutL=( 0 1 2 3 4 5 6 7)
- por mm5,mm6 ; mm5=OutH=( 8 9 10 11 12 13 14 15)
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mm2
- movq MMWORD [edi+1*SIZEOF_MMWORD], mm5
-
- sub eax, byte SIZEOF_MMWORD
- add esi, byte 1*SIZEOF_MMWORD ; inptr
- add edi, byte 2*SIZEOF_MMWORD ; outptr
- cmp eax, byte SIZEOF_MMWORD
- ja near .columnloop
- test eax,eax
- jnz near .columnloop_last
-
- pop esi
- pop edi
- pop eax
-
- add esi, byte SIZEOF_JSAMPROW ; input_data
- add edi, byte SIZEOF_JSAMPROW ; output_data
- dec ecx ; rowctr
- jg near .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- poppic ebx
- pop ebp
- ret
-
-; --------------------------------------------------------------------------
-;
-; Fancy processing for the common case of 2:1 horizontal and 2:1 vertical.
-; Again a triangle filter; see comments for h2v1 case, above.
-;
-; GLOBAL(void)
-; jpeg_h2v2_fancy_upsample_mmx (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 4
-%define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_h2v2_fancy_upsample_mmx)
-
-EXTN(jpeg_h2v2_fancy_upsample_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov edx,eax ; edx = original ebp
- mov eax, POINTER [compptr(edx)]
- mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr
- test eax,eax
- jz near .return
-
- mov ecx, POINTER [cinfo(edx)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz near .return
-
- mov esi, JSAMPARRAY [input_data(edx)] ; input_data
- mov edi, POINTER [output_data_ptr(edx)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push eax ; colctr
- push ecx
- push edi
- push esi
-
- mov ecx, JSAMPROW [esi-1*SIZEOF_JSAMPROW] ; inptr1(above)
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; inptr0
- mov esi, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; inptr1(below)
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0
- mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1
-
- test eax, SIZEOF_MMWORD-1
- jz short .skip
- push edx
- mov dl, JSAMPLE [ecx+(eax-1)*SIZEOF_JSAMPLE]
- mov JSAMPLE [ecx+eax*SIZEOF_JSAMPLE], dl
- mov dl, JSAMPLE [ebx+(eax-1)*SIZEOF_JSAMPLE]
- mov JSAMPLE [ebx+eax*SIZEOF_JSAMPLE], dl
- mov dl, JSAMPLE [esi+(eax-1)*SIZEOF_JSAMPLE]
- mov JSAMPLE [esi+eax*SIZEOF_JSAMPLE], dl ; insert a dummy sample
- pop edx
-.skip:
- ; -- process the first column block
-
- movq mm0, MMWORD [ebx+0*SIZEOF_MMWORD] ; mm0=row[ 0][0]
- movq mm1, MMWORD [ecx+0*SIZEOF_MMWORD] ; mm1=row[-1][0]
- movq mm2, MMWORD [esi+0*SIZEOF_MMWORD] ; mm2=row[+1][0]
-
- pushpic ebx
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- pxor mm3,mm3 ; mm3=(all 0's)
- movq mm4,mm0
- punpcklbw mm0,mm3 ; mm0=row[ 0][0]( 0 1 2 3)
- punpckhbw mm4,mm3 ; mm4=row[ 0][0]( 4 5 6 7)
- movq mm5,mm1
- punpcklbw mm1,mm3 ; mm1=row[-1][0]( 0 1 2 3)
- punpckhbw mm5,mm3 ; mm5=row[-1][0]( 4 5 6 7)
- movq mm6,mm2
- punpcklbw mm2,mm3 ; mm2=row[+1][0]( 0 1 2 3)
- punpckhbw mm6,mm3 ; mm6=row[+1][0]( 4 5 6 7)
-
- pmullw mm0,[GOTOFF(ebx,PW_THREE)]
- pmullw mm4,[GOTOFF(ebx,PW_THREE)]
-
- pcmpeqb mm7,mm7
- psrlq mm7,(SIZEOF_MMWORD-2)*BYTE_BIT
-
- paddw mm1,mm0 ; mm1=Int0L=( 0 1 2 3)
- paddw mm5,mm4 ; mm5=Int0H=( 4 5 6 7)
- paddw mm2,mm0 ; mm2=Int1L=( 0 1 2 3)
- paddw mm6,mm4 ; mm6=Int1H=( 4 5 6 7)
-
- movq MMWORD [edx+0*SIZEOF_MMWORD], mm1 ; temporarily save
- movq MMWORD [edx+1*SIZEOF_MMWORD], mm5 ; the intermediate data
- movq MMWORD [edi+0*SIZEOF_MMWORD], mm2
- movq MMWORD [edi+1*SIZEOF_MMWORD], mm6
-
- pand mm1,mm7 ; mm1=( 0 - - -)
- pand mm2,mm7 ; mm2=( 0 - - -)
-
- movq MMWORD [wk(0)], mm1
- movq MMWORD [wk(1)], mm2
-
- poppic ebx
-
- add eax, byte SIZEOF_MMWORD-1
- and eax, byte -SIZEOF_MMWORD
- cmp eax, byte SIZEOF_MMWORD
- ja short .columnloop
- alignx 16,7
-
-.columnloop_last:
- ; -- process the last column block
-
- pushpic ebx
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- pcmpeqb mm1,mm1
- psllq mm1,(SIZEOF_MMWORD-2)*BYTE_BIT
- movq mm2,mm1
-
- pand mm1, MMWORD [edx+1*SIZEOF_MMWORD] ; mm1=( - - - 7)
- pand mm2, MMWORD [edi+1*SIZEOF_MMWORD] ; mm2=( - - - 7)
-
- movq MMWORD [wk(2)], mm1
- movq MMWORD [wk(3)], mm2
-
- jmp short .upsample
- alignx 16,7
-
-.columnloop:
- ; -- process the next column block
-
- movq mm0, MMWORD [ebx+1*SIZEOF_MMWORD] ; mm0=row[ 0][1]
- movq mm1, MMWORD [ecx+1*SIZEOF_MMWORD] ; mm1=row[-1][1]
- movq mm2, MMWORD [esi+1*SIZEOF_MMWORD] ; mm2=row[+1][1]
-
- pushpic ebx
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- pxor mm3,mm3 ; mm3=(all 0's)
- movq mm4,mm0
- punpcklbw mm0,mm3 ; mm0=row[ 0][1]( 0 1 2 3)
- punpckhbw mm4,mm3 ; mm4=row[ 0][1]( 4 5 6 7)
- movq mm5,mm1
- punpcklbw mm1,mm3 ; mm1=row[-1][1]( 0 1 2 3)
- punpckhbw mm5,mm3 ; mm5=row[-1][1]( 4 5 6 7)
- movq mm6,mm2
- punpcklbw mm2,mm3 ; mm2=row[+1][1]( 0 1 2 3)
- punpckhbw mm6,mm3 ; mm6=row[+1][1]( 4 5 6 7)
-
- pmullw mm0,[GOTOFF(ebx,PW_THREE)]
- pmullw mm4,[GOTOFF(ebx,PW_THREE)]
-
- paddw mm1,mm0 ; mm1=Int0L=( 0 1 2 3)
- paddw mm5,mm4 ; mm5=Int0H=( 4 5 6 7)
- paddw mm2,mm0 ; mm2=Int1L=( 0 1 2 3)
- paddw mm6,mm4 ; mm6=Int1H=( 4 5 6 7)
-
- movq MMWORD [edx+2*SIZEOF_MMWORD], mm1 ; temporarily save
- movq MMWORD [edx+3*SIZEOF_MMWORD], mm5 ; the intermediate data
- movq MMWORD [edi+2*SIZEOF_MMWORD], mm2
- movq MMWORD [edi+3*SIZEOF_MMWORD], mm6
-
- psllq mm1,(SIZEOF_MMWORD-2)*BYTE_BIT ; mm1=( - - - 0)
- psllq mm2,(SIZEOF_MMWORD-2)*BYTE_BIT ; mm2=( - - - 0)
-
- movq MMWORD [wk(2)], mm1
- movq MMWORD [wk(3)], mm2
-
-.upsample:
- ; -- process the upper row
-
- movq mm7, MMWORD [edx+0*SIZEOF_MMWORD] ; mm7=Int0L=( 0 1 2 3)
- movq mm3, MMWORD [edx+1*SIZEOF_MMWORD] ; mm3=Int0H=( 4 5 6 7)
-
- movq mm0,mm7
- movq mm4,mm3
- psrlq mm0,2*BYTE_BIT ; mm0=( 1 2 3 -)
- psllq mm4,(SIZEOF_MMWORD-2)*BYTE_BIT ; mm4=( - - - 4)
- movq mm5,mm7
- movq mm6,mm3
- psrlq mm5,(SIZEOF_MMWORD-2)*BYTE_BIT ; mm5=( 3 - - -)
- psllq mm6,2*BYTE_BIT ; mm6=( - 4 5 6)
-
- por mm0,mm4 ; mm0=( 1 2 3 4)
- por mm5,mm6 ; mm5=( 3 4 5 6)
-
- movq mm1,mm7
- movq mm2,mm3
- psllq mm1,2*BYTE_BIT ; mm1=( - 0 1 2)
- psrlq mm2,2*BYTE_BIT ; mm2=( 5 6 7 -)
- movq mm4,mm3
- psrlq mm4,(SIZEOF_MMWORD-2)*BYTE_BIT ; mm4=( 7 - - -)
-
- por mm1, MMWORD [wk(0)] ; mm1=(-1 0 1 2)
- por mm2, MMWORD [wk(2)] ; mm2=( 5 6 7 8)
-
- movq MMWORD [wk(0)], mm4
-
- pmullw mm7,[GOTOFF(ebx,PW_THREE)]
- pmullw mm3,[GOTOFF(ebx,PW_THREE)]
- paddw mm1,[GOTOFF(ebx,PW_EIGHT)]
- paddw mm5,[GOTOFF(ebx,PW_EIGHT)]
- paddw mm0,[GOTOFF(ebx,PW_SEVEN)]
- paddw mm2,[GOTOFF(ebx,PW_SEVEN)]
-
- paddw mm1,mm7
- paddw mm5,mm3
- psrlw mm1,4 ; mm1=Out0LE=( 0 2 4 6)
- psrlw mm5,4 ; mm5=Out0HE=( 8 10 12 14)
- paddw mm0,mm7
- paddw mm2,mm3
- psrlw mm0,4 ; mm0=Out0LO=( 1 3 5 7)
- psrlw mm2,4 ; mm2=Out0HO=( 9 11 13 15)
-
- psllw mm0,BYTE_BIT
- psllw mm2,BYTE_BIT
- por mm1,mm0 ; mm1=Out0L=( 0 1 2 3 4 5 6 7)
- por mm5,mm2 ; mm5=Out0H=( 8 9 10 11 12 13 14 15)
-
- movq MMWORD [edx+0*SIZEOF_MMWORD], mm1
- movq MMWORD [edx+1*SIZEOF_MMWORD], mm5
-
- ; -- process the lower row
-
- movq mm6, MMWORD [edi+0*SIZEOF_MMWORD] ; mm6=Int1L=( 0 1 2 3)
- movq mm4, MMWORD [edi+1*SIZEOF_MMWORD] ; mm4=Int1H=( 4 5 6 7)
-
- movq mm7,mm6
- movq mm3,mm4
- psrlq mm7,2*BYTE_BIT ; mm7=( 1 2 3 -)
- psllq mm3,(SIZEOF_MMWORD-2)*BYTE_BIT ; mm3=( - - - 4)
- movq mm0,mm6
- movq mm2,mm4
- psrlq mm0,(SIZEOF_MMWORD-2)*BYTE_BIT ; mm0=( 3 - - -)
- psllq mm2,2*BYTE_BIT ; mm2=( - 4 5 6)
-
- por mm7,mm3 ; mm7=( 1 2 3 4)
- por mm0,mm2 ; mm0=( 3 4 5 6)
-
- movq mm1,mm6
- movq mm5,mm4
- psllq mm1,2*BYTE_BIT ; mm1=( - 0 1 2)
- psrlq mm5,2*BYTE_BIT ; mm5=( 5 6 7 -)
- movq mm3,mm4
- psrlq mm3,(SIZEOF_MMWORD-2)*BYTE_BIT ; mm3=( 7 - - -)
-
- por mm1, MMWORD [wk(1)] ; mm1=(-1 0 1 2)
- por mm5, MMWORD [wk(3)] ; mm5=( 5 6 7 8)
-
- movq MMWORD [wk(1)], mm3
-
- pmullw mm6,[GOTOFF(ebx,PW_THREE)]
- pmullw mm4,[GOTOFF(ebx,PW_THREE)]
- paddw mm1,[GOTOFF(ebx,PW_EIGHT)]
- paddw mm0,[GOTOFF(ebx,PW_EIGHT)]
- paddw mm7,[GOTOFF(ebx,PW_SEVEN)]
- paddw mm5,[GOTOFF(ebx,PW_SEVEN)]
-
- paddw mm1,mm6
- paddw mm0,mm4
- psrlw mm1,4 ; mm1=Out1LE=( 0 2 4 6)
- psrlw mm0,4 ; mm0=Out1HE=( 8 10 12 14)
- paddw mm7,mm6
- paddw mm5,mm4
- psrlw mm7,4 ; mm7=Out1LO=( 1 3 5 7)
- psrlw mm5,4 ; mm5=Out1HO=( 9 11 13 15)
-
- psllw mm7,BYTE_BIT
- psllw mm5,BYTE_BIT
- por mm1,mm7 ; mm1=Out1L=( 0 1 2 3 4 5 6 7)
- por mm0,mm5 ; mm0=Out1H=( 8 9 10 11 12 13 14 15)
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mm1
- movq MMWORD [edi+1*SIZEOF_MMWORD], mm0
-
- poppic ebx
-
- sub eax, byte SIZEOF_MMWORD
- add ecx, byte 1*SIZEOF_MMWORD ; inptr1(above)
- add ebx, byte 1*SIZEOF_MMWORD ; inptr0
- add esi, byte 1*SIZEOF_MMWORD ; inptr1(below)
- add edx, byte 2*SIZEOF_MMWORD ; outptr0
- add edi, byte 2*SIZEOF_MMWORD ; outptr1
- cmp eax, byte SIZEOF_MMWORD
- ja near .columnloop
- test eax,eax
- jnz near .columnloop_last
-
- pop esi
- pop edi
- pop ecx
- pop eax
-
- add esi, byte 1*SIZEOF_JSAMPROW ; input_data
- add edi, byte 2*SIZEOF_JSAMPROW ; output_data
- sub ecx, byte 2 ; rowctr
- jg near .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%ifdef UPSAMPLE_H1V2_SUPPORTED
-
-; --------------------------------------------------------------------------
-;
-; Fancy processing for the common case of 1:1 horizontal and 2:1 vertical.
-; Again a triangle filter; see comments for h2v1 case, above.
-;
-; GLOBAL(void)
-; jpeg_h1v2_fancy_upsample_mmx (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
-%define gotptr ebp-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_h1v2_fancy_upsample_mmx)
-
-EXTN(jpeg_h1v2_fancy_upsample_mmx):
- push ebp
- mov ebp,esp
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov eax, POINTER [compptr(ebp)]
- mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr
- add eax, byte SIZEOF_MMWORD-1
- and eax, byte -SIZEOF_MMWORD
- jz near .return
-
- mov ecx, POINTER [cinfo(ebp)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz near .return
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, POINTER [output_data_ptr(ebp)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push eax ; colctr
- push ecx
- push edi
- push esi
-
- mov ecx, JSAMPROW [esi-1*SIZEOF_JSAMPROW] ; inptr1(above)
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; inptr0
- mov esi, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; inptr1(below)
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0
- mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1
-
- pxor mm0,mm0 ; mm0=(all 0's)
- alignx 16,7
-
-.columnloop:
- movq mm1, MMWORD [ebx] ; mm1=row[ 0]( 0 1 2 3 4 5 6 7)
- movq mm2, MMWORD [ecx] ; mm2=row[-1]( 0 1 2 3 4 5 6 7)
- movq mm3, MMWORD [esi] ; mm3=row[+1]( 0 1 2 3 4 5 6 7)
-
- pushpic ebx
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- movq mm4,mm1
- punpcklbw mm1,mm0 ; mm1=row[ 0]( 0 1 2 3)
- punpckhbw mm4,mm0 ; mm4=row[ 0]( 4 5 6 7)
- movq mm5,mm2
- punpcklbw mm2,mm0 ; mm2=row[-1]( 0 1 2 3)
- punpckhbw mm5,mm0 ; mm5=row[-1]( 4 5 6 7)
- movq mm6,mm3
- punpcklbw mm3,mm0 ; mm3=row[+1]( 0 1 2 3)
- punpckhbw mm6,mm0 ; mm6=row[+1]( 4 5 6 7)
-
- pmullw mm1,[GOTOFF(ebx,PW_THREE)]
- pmullw mm4,[GOTOFF(ebx,PW_THREE)]
- paddw mm2,[GOTOFF(ebx,PW_ONE)]
- paddw mm5,[GOTOFF(ebx,PW_ONE)]
- paddw mm3,[GOTOFF(ebx,PW_TWO)]
- paddw mm6,[GOTOFF(ebx,PW_TWO)]
-
- paddw mm2,mm1
- paddw mm5,mm4
- psrlw mm2,2 ; mm2=Out0L=( 0 1 2 3)
- psrlw mm5,2 ; mm5=Out0H=( 4 5 6 7)
- paddw mm3,mm1
- paddw mm6,mm4
- psrlw mm3,2 ; mm3=Out1L=( 0 1 2 3)
- psrlw mm6,2 ; mm6=Out1H=( 4 5 6 7)
-
- packuswb mm2,mm5 ; mm2=Out0=( 0 1 2 3 4 5 6 7)
- packuswb mm3,mm6 ; mm3=Out1=( 0 1 2 3 4 5 6 7)
-
- movq MMWORD [edx], mm2
- movq MMWORD [edi], mm3
-
- poppic ebx
-
- add ecx, byte 1*SIZEOF_MMWORD ; inptr1(above)
- add ebx, byte 1*SIZEOF_MMWORD ; inptr0
- add esi, byte 1*SIZEOF_MMWORD ; inptr1(below)
- add edx, byte 1*SIZEOF_MMWORD ; outptr0
- add edi, byte 1*SIZEOF_MMWORD ; outptr1
- sub eax, byte SIZEOF_MMWORD
- jnz near .columnloop
-
- pop esi
- pop edi
- pop ecx
- pop eax
-
- add esi, byte 1*SIZEOF_JSAMPROW ; input_data
- add edi, byte 2*SIZEOF_JSAMPROW ; output_data
- sub ecx, byte 2 ; rowctr
- jg near .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- poppic eax ; remove gotptr
- pop ebp
- ret
-
-%endif ; UPSAMPLE_H1V2_SUPPORTED
-%endif ; JDSAMPLE_FANCY_MMX_SUPPORTED
-
-%ifdef JDSAMPLE_SIMPLE_MMX_SUPPORTED
-
-%ifndef JDSAMPLE_FANCY_MMX_SUPPORTED
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-%endif
-;
-; Fast processing for the common case of 2:1 horizontal and 1:1 vertical.
-; It's still a box filter.
-;
-; GLOBAL(void)
-; jpeg_h2v1_upsample_mmx (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
- align 16
- global EXTN(jpeg_h2v1_upsample_mmx)
-
-EXTN(jpeg_h2v1_upsample_mmx):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, JDIMENSION [jdstruct_output_width(edx)]
- add edx, byte (2*SIZEOF_MMWORD)-1
- and edx, byte -(2*SIZEOF_MMWORD)
- jz short .return
-
- mov ecx, POINTER [cinfo(ebp)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz short .return
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, POINTER [output_data_ptr(ebp)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push edi
- push esi
-
- mov esi, JSAMPROW [esi] ; inptr
- mov edi, JSAMPROW [edi] ; outptr
- mov eax,edx ; colctr
- alignx 16,7
-.columnloop:
-
- movq mm0, MMWORD [esi+0*SIZEOF_MMWORD]
-
- movq mm1,mm0
- punpcklbw mm0,mm0
- punpckhbw mm1,mm1
-
- movq MMWORD [edi+0*SIZEOF_MMWORD], mm0
- movq MMWORD [edi+1*SIZEOF_MMWORD], mm1
-
- sub eax, byte 2*SIZEOF_MMWORD
- jz short .nextrow
-
- movq mm2, MMWORD [esi+1*SIZEOF_MMWORD]
-
- movq mm3,mm2
- punpcklbw mm2,mm2
- punpckhbw mm3,mm3
-
- movq MMWORD [edi+2*SIZEOF_MMWORD], mm2
- movq MMWORD [edi+3*SIZEOF_MMWORD], mm3
-
- sub eax, byte 2*SIZEOF_MMWORD
- jz short .nextrow
-
- add esi, byte 2*SIZEOF_MMWORD ; inptr
- add edi, byte 4*SIZEOF_MMWORD ; outptr
- jmp short .columnloop
- alignx 16,7
-
-.nextrow:
- pop esi
- pop edi
-
- add esi, byte SIZEOF_JSAMPROW ; input_data
- add edi, byte SIZEOF_JSAMPROW ; output_data
- dec ecx ; rowctr
- jg short .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
-; pop ebx ; unused
- pop ebp
- ret
-
-; --------------------------------------------------------------------------
-;
-; Fast processing for the common case of 2:1 horizontal and 2:1 vertical.
-; It's still a box filter.
-;
-; GLOBAL(void)
-; jpeg_h2v2_upsample_mmx (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
- align 16
- global EXTN(jpeg_h2v2_upsample_mmx)
-
-EXTN(jpeg_h2v2_upsample_mmx):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, JDIMENSION [jdstruct_output_width(edx)]
- add edx, byte (2*SIZEOF_MMWORD)-1
- and edx, byte -(2*SIZEOF_MMWORD)
- jz near .return
-
- mov ecx, POINTER [cinfo(ebp)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz short .return
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, POINTER [output_data_ptr(ebp)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push edi
- push esi
-
- mov esi, JSAMPROW [esi] ; inptr
- mov ebx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0
- mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1
- mov eax,edx ; colctr
- alignx 16,7
-.columnloop:
-
- movq mm0, MMWORD [esi+0*SIZEOF_MMWORD]
-
- movq mm1,mm0
- punpcklbw mm0,mm0
- punpckhbw mm1,mm1
-
- movq MMWORD [ebx+0*SIZEOF_MMWORD], mm0
- movq MMWORD [ebx+1*SIZEOF_MMWORD], mm1
- movq MMWORD [edi+0*SIZEOF_MMWORD], mm0
- movq MMWORD [edi+1*SIZEOF_MMWORD], mm1
-
- sub eax, byte 2*SIZEOF_MMWORD
- jz short .nextrow
-
- movq mm2, MMWORD [esi+1*SIZEOF_MMWORD]
-
- movq mm3,mm2
- punpcklbw mm2,mm2
- punpckhbw mm3,mm3
-
- movq MMWORD [ebx+2*SIZEOF_MMWORD], mm2
- movq MMWORD [ebx+3*SIZEOF_MMWORD], mm3
- movq MMWORD [edi+2*SIZEOF_MMWORD], mm2
- movq MMWORD [edi+3*SIZEOF_MMWORD], mm3
-
- sub eax, byte 2*SIZEOF_MMWORD
- jz short .nextrow
-
- add esi, byte 2*SIZEOF_MMWORD ; inptr
- add ebx, byte 4*SIZEOF_MMWORD ; outptr0
- add edi, byte 4*SIZEOF_MMWORD ; outptr1
- jmp short .columnloop
- alignx 16,7
-
-.nextrow:
- pop esi
- pop edi
-
- add esi, byte 1*SIZEOF_JSAMPROW ; input_data
- add edi, byte 2*SIZEOF_JSAMPROW ; output_data
- sub ecx, byte 2 ; rowctr
- jg short .rowloop
-
- emms ; empty MMX state
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%endif ; JDSAMPLE_SIMPLE_MMX_SUPPORTED
diff --git a/jdsample.c b/jdsample.c
index 37a6cee..4e0b8b4 100644
--- a/jdsample.c
+++ b/jdsample.c
@@ -2,16 +2,10 @@
* jdsample.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 5, 2006
- * ---------------------------------------------------------------------
- *
* This file contains upsampling routines.
*
* Upsampling input data is counted in "row groups". A row group
@@ -28,7 +22,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "jcolsamp.h" /* Private declarations */
+#include "jsimd.h"
/* Pointer to routine to upsample a single component */
@@ -293,37 +287,6 @@
}
-#ifdef UPSAMPLE_H1V2_SUPPORTED
-
-/*
- * Fast processing for the common case of 1:1 horizontal and 2:1 vertical.
- * It's still a box filter.
- *
- * SIMD Ext: This routine is for files that are rotated or transposed
- * by jpegtran.
- */
-
-METHODDEF(void)
-h1v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
- JSAMPARRAY output_data = *output_data_ptr;
- int inrow, outrow;
-
- inrow = outrow = 0;
- while (outrow < cinfo->max_v_samp_factor) {
- jcopy_sample_rows(input_data, inrow, output_data, outrow,
- 1, cinfo->output_width);
- jcopy_sample_rows(input_data, inrow, output_data, outrow+1,
- 1, cinfo->output_width);
- inrow++;
- outrow += 2;
- }
-}
-
-#endif /* UPSAMPLE_H1V2_SUPPORTED */
-
-
/*
* Fancy processing for the common case of 2:1 horizontal and 1:1 vertical.
*
@@ -430,52 +393,6 @@
}
-#ifdef UPSAMPLE_H1V2_SUPPORTED
-
-/*
- * Fancy processing for the common case of 1:1 horizontal and 2:1 vertical.
- * Again a triangle filter; see comments for h2v1 case, above.
- *
- * It is OK for us to reference the adjacent input rows because we demanded
- * context from the main buffer controller (see initialization code).
- *
- * SIMD Ext: This routine is for files that are rotated or transposed
- * by jpegtran.
- */
-
-METHODDEF(void)
-h1v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
- JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
-{
- JSAMPARRAY output_data = *output_data_ptr;
- register JSAMPROW inptr0, inptr1, outptr;
- register int colsum;
- register JDIMENSION colctr;
- int inrow, outrow, v;
-
- inrow = outrow = 0;
- while (outrow < cinfo->max_v_samp_factor) {
- for (v = 0; v < 2; v++) {
- /* inptr0 points to nearest input row, inptr1 points to next nearest */
- inptr0 = input_data[inrow];
- if (v == 0) /* next nearest is row above */
- inptr1 = input_data[inrow-1];
- else /* next nearest is row below */
- inptr1 = input_data[inrow+1];
- outptr = output_data[outrow++];
-
- for (colctr = compptr->downsampled_width; colctr > 0; colctr--) {
- colsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++);
- *outptr++ = (JSAMPLE) ((colsum + v + 1) >> 2);
- }
- }
- inrow++;
- }
-}
-
-#endif /* UPSAMPLE_H1V2_SUPPORTED */
-
-
/*
* Module initialization routine for upsampling.
*/
@@ -488,7 +405,6 @@
jpeg_component_info * compptr;
boolean need_buffer, do_fancy;
int h_in_group, v_in_group, h_out_group, v_out_group;
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
upsample = (my_upsample_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
@@ -534,82 +450,31 @@
v_in_group == v_out_group) {
/* Special cases for 2h1v upsampling */
if (do_fancy && compptr->downsampled_width > 2) {
-#ifdef JDSAMPLE_FANCY_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fancy_upsample_sse2))
- upsample->methods[ci] = jpeg_h2v1_fancy_upsample_sse2;
+ if (jsimd_can_h2v1_fancy_upsample())
+ upsample->methods[ci] = jsimd_h2v1_fancy_upsample;
else
-#endif
-#ifdef JDSAMPLE_FANCY_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- upsample->methods[ci] = jpeg_h2v1_fancy_upsample_mmx;
- else
-#endif
upsample->methods[ci] = h2v1_fancy_upsample;
} else {
-#ifdef JDSAMPLE_SIMPLE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2)
- upsample->methods[ci] = jpeg_h2v1_upsample_sse2;
+ if (jsimd_can_h2v1_upsample())
+ upsample->methods[ci] = jsimd_h2v1_upsample;
else
-#endif
-#ifdef JDSAMPLE_SIMPLE_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- upsample->methods[ci] = jpeg_h2v1_upsample_mmx;
- else
-#endif
upsample->methods[ci] = h2v1_upsample;
}
} else if (h_in_group * 2 == h_out_group &&
v_in_group * 2 == v_out_group) {
/* Special cases for 2h2v upsampling */
if (do_fancy && compptr->downsampled_width > 2) {
-#ifdef JDSAMPLE_FANCY_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fancy_upsample_sse2))
- upsample->methods[ci] = jpeg_h2v2_fancy_upsample_sse2;
+ if (jsimd_can_h2v2_fancy_upsample())
+ upsample->methods[ci] = jsimd_h2v2_fancy_upsample;
else
-#endif
-#ifdef JDSAMPLE_FANCY_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- upsample->methods[ci] = jpeg_h2v2_fancy_upsample_mmx;
- else
-#endif
upsample->methods[ci] = h2v2_fancy_upsample;
upsample->pub.need_context_rows = TRUE;
} else {
-#ifdef JDSAMPLE_SIMPLE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2)
- upsample->methods[ci] = jpeg_h2v2_upsample_sse2;
+ if (jsimd_can_h2v2_upsample())
+ upsample->methods[ci] = jsimd_h2v2_upsample;
else
-#endif
-#ifdef JDSAMPLE_SIMPLE_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- upsample->methods[ci] = jpeg_h2v2_upsample_mmx;
- else
-#endif
upsample->methods[ci] = h2v2_upsample;
}
-#ifdef UPSAMPLE_H1V2_SUPPORTED
- } else if (h_in_group == h_out_group &&
- v_in_group * 2 == v_out_group) {
- /* Special cases for 1h2v upsampling */
- if (do_fancy) {
-#ifdef JDSAMPLE_FANCY_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fancy_upsample_sse2))
- upsample->methods[ci] = jpeg_h1v2_fancy_upsample_sse2;
- else
-#endif
-#ifdef JDSAMPLE_FANCY_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- upsample->methods[ci] = jpeg_h1v2_fancy_upsample_mmx;
- else
-#endif
- upsample->methods[ci] = h1v2_fancy_upsample;
- upsample->pub.need_context_rows = TRUE;
- } else
- upsample->methods[ci] = h1v2_upsample;
-#endif /* UPSAMPLE_H1V2_SUPPORTED */
} else if ((h_out_group % h_in_group) == 0 &&
(v_out_group % v_in_group) == 0) {
/* Generic integral-factors upsampling method */
@@ -619,52 +484,11 @@
} else
ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);
if (need_buffer) {
- enum { SIZEOF_XMMWORD = 16 }; /* from jsimdext.inc */
upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray)
((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) jround_up(jround_up((long) cinfo->output_width,
- (long) cinfo->max_h_samp_factor),
- (long) (2 * SIZEOF_XMMWORD)),
+ (JDIMENSION) jround_up((long) cinfo->output_width,
+ (long) cinfo->max_h_samp_factor),
(JDIMENSION) cinfo->max_v_samp_factor);
}
}
}
-
-
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-
-GLOBAL(unsigned int)
-jpeg_simd_upsampler (j_decompress_ptr cinfo, int do_fancy)
-{
- unsigned int simd = jpeg_simd_support((j_common_ptr) cinfo);
-
-#ifdef UPSAMPLE_MERGING_SUPPORTED
- if (!do_fancy)
- return jpeg_simd_merged_upsampler(cinfo);
-#endif
-
- if (do_fancy) {
-#ifdef JDSAMPLE_FANCY_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2 &&
- IS_CONST_ALIGNED_16(jconst_fancy_upsample_sse2))
- return JSIMD_SSE2;
-#endif
-#ifdef JDSAMPLE_FANCY_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
- } else {
-#ifdef JDSAMPLE_SIMPLE_SSE2_SUPPORTED
- if (simd & JSIMD_SSE2)
- return JSIMD_SSE2;
-#endif
-#ifdef JDSAMPLE_SIMPLE_MMX_SUPPORTED
- if (simd & JSIMD_MMX)
- return JSIMD_MMX;
-#endif
- }
-
- return JSIMD_NONE;
-}
-
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
diff --git a/jdsamss2.asm b/jdsamss2.asm
deleted file mode 100644
index 46fcf51..0000000
--- a/jdsamss2.asm
+++ /dev/null
@@ -1,883 +0,0 @@
-;
-; jdsamss2.asm - upsampling (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jcolsamp.inc"
-
-%ifdef JDSAMPLE_FANCY_SSE2_SUPPORTED
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_fancy_upsample_sse2)
-
-EXTN(jconst_fancy_upsample_sse2):
-
-PW_ONE times 8 dw 1
-PW_TWO times 8 dw 2
-PW_THREE times 8 dw 3
-PW_SEVEN times 8 dw 7
-PW_EIGHT times 8 dw 8
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Fancy processing for the common case of 2:1 horizontal and 1:1 vertical.
-;
-; The upsampling algorithm is linear interpolation between pixel centers,
-; also known as a "triangle filter". This is a good compromise between
-; speed and visual quality. The centers of the output pixels are 1/4 and 3/4
-; of the way between input pixel centers.
-;
-; GLOBAL(void)
-; jpeg_h2v1_fancy_upsample_sse2 (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
- align 16
- global EXTN(jpeg_h2v1_fancy_upsample_sse2)
-
-EXTN(jpeg_h2v1_fancy_upsample_sse2):
- push ebp
- mov ebp,esp
- pushpic ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- mov eax, POINTER [compptr(ebp)]
- mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr
- test eax,eax
- jz near .return
-
- mov ecx, POINTER [cinfo(ebp)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz near .return
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, POINTER [output_data_ptr(ebp)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push eax ; colctr
- push edi
- push esi
-
- mov esi, JSAMPROW [esi] ; inptr
- mov edi, JSAMPROW [edi] ; outptr
-
- test eax, SIZEOF_XMMWORD-1
- jz short .skip
- mov dl, JSAMPLE [esi+(eax-1)*SIZEOF_JSAMPLE]
- mov JSAMPLE [esi+eax*SIZEOF_JSAMPLE], dl ; insert a dummy sample
-.skip:
- pxor xmm0,xmm0 ; xmm0=(all 0's)
- pcmpeqb xmm7,xmm7
- psrldq xmm7,(SIZEOF_XMMWORD-1)
- pand xmm7, XMMWORD [esi+0*SIZEOF_XMMWORD]
-
- add eax, byte SIZEOF_XMMWORD-1
- and eax, byte -SIZEOF_XMMWORD
- cmp eax, byte SIZEOF_XMMWORD
- ja short .columnloop
- alignx 16,7
-
-.columnloop_last:
- pcmpeqb xmm6,xmm6
- pslldq xmm6,(SIZEOF_XMMWORD-1)
- pand xmm6, XMMWORD [esi+0*SIZEOF_XMMWORD]
- jmp short .upsample
- alignx 16,7
-
-.columnloop:
- movdqa xmm6, XMMWORD [esi+1*SIZEOF_XMMWORD]
- pslldq xmm6,(SIZEOF_XMMWORD-1)
-
-.upsample:
- movdqa xmm1, XMMWORD [esi+0*SIZEOF_XMMWORD]
- movdqa xmm2,xmm1
- movdqa xmm3,xmm1 ; xmm1=( 0 1 2 ... 13 14 15)
- pslldq xmm2,1 ; xmm2=(-- 0 1 ... 12 13 14)
- psrldq xmm3,1 ; xmm3=( 1 2 3 ... 14 15 --)
-
- por xmm2,xmm7 ; xmm2=(-1 0 1 ... 12 13 14)
- por xmm3,xmm6 ; xmm3=( 1 2 3 ... 14 15 16)
-
- movdqa xmm7,xmm1
- psrldq xmm7,(SIZEOF_XMMWORD-1) ; xmm7=(15 -- -- ... -- -- --)
-
- movdqa xmm4,xmm1
- punpcklbw xmm1,xmm0 ; xmm1=( 0 1 2 3 4 5 6 7)
- punpckhbw xmm4,xmm0 ; xmm4=( 8 9 10 11 12 13 14 15)
- movdqa xmm5,xmm2
- punpcklbw xmm2,xmm0 ; xmm2=(-1 0 1 2 3 4 5 6)
- punpckhbw xmm5,xmm0 ; xmm5=( 7 8 9 10 11 12 13 14)
- movdqa xmm6,xmm3
- punpcklbw xmm3,xmm0 ; xmm3=( 1 2 3 4 5 6 7 8)
- punpckhbw xmm6,xmm0 ; xmm6=( 9 10 11 12 13 14 15 16)
-
- pmullw xmm1,[GOTOFF(ebx,PW_THREE)]
- pmullw xmm4,[GOTOFF(ebx,PW_THREE)]
- paddw xmm2,[GOTOFF(ebx,PW_ONE)]
- paddw xmm5,[GOTOFF(ebx,PW_ONE)]
- paddw xmm3,[GOTOFF(ebx,PW_TWO)]
- paddw xmm6,[GOTOFF(ebx,PW_TWO)]
-
- paddw xmm2,xmm1
- paddw xmm5,xmm4
- psrlw xmm2,2 ; xmm2=OutLE=( 0 2 4 6 8 10 12 14)
- psrlw xmm5,2 ; xmm5=OutHE=(16 18 20 22 24 26 28 30)
- paddw xmm3,xmm1
- paddw xmm6,xmm4
- psrlw xmm3,2 ; xmm3=OutLO=( 1 3 5 7 9 11 13 15)
- psrlw xmm6,2 ; xmm6=OutHO=(17 19 21 23 25 27 29 31)
-
- psllw xmm3,BYTE_BIT
- psllw xmm6,BYTE_BIT
- por xmm2,xmm3 ; xmm2=OutL=( 0 1 2 ... 13 14 15)
- por xmm5,xmm6 ; xmm5=OutH=(16 17 18 ... 29 30 31)
-
- movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm2
- movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm5
-
- sub eax, byte SIZEOF_XMMWORD
- add esi, byte 1*SIZEOF_XMMWORD ; inptr
- add edi, byte 2*SIZEOF_XMMWORD ; outptr
- cmp eax, byte SIZEOF_XMMWORD
- ja near .columnloop
- test eax,eax
- jnz near .columnloop_last
-
- pop esi
- pop edi
- pop eax
-
- add esi, byte SIZEOF_JSAMPROW ; input_data
- add edi, byte SIZEOF_JSAMPROW ; output_data
- dec ecx ; rowctr
- jg near .rowloop
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- poppic ebx
- pop ebp
- ret
-
-; --------------------------------------------------------------------------
-;
-; Fancy processing for the common case of 2:1 horizontal and 2:1 vertical.
-; Again a triangle filter; see comments for h2v1 case, above.
-;
-; GLOBAL(void)
-; jpeg_h2v2_fancy_upsample_sse2 (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 4
-%define gotptr wk(0)-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_h2v2_fancy_upsample_sse2)
-
-EXTN(jpeg_h2v2_fancy_upsample_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov edx,eax ; edx = original ebp
- mov eax, POINTER [compptr(edx)]
- mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr
- test eax,eax
- jz near .return
-
- mov ecx, POINTER [cinfo(edx)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz near .return
-
- mov esi, JSAMPARRAY [input_data(edx)] ; input_data
- mov edi, POINTER [output_data_ptr(edx)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push eax ; colctr
- push ecx
- push edi
- push esi
-
- mov ecx, JSAMPROW [esi-1*SIZEOF_JSAMPROW] ; inptr1(above)
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; inptr0
- mov esi, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; inptr1(below)
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0
- mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1
-
- test eax, SIZEOF_XMMWORD-1
- jz short .skip
- push edx
- mov dl, JSAMPLE [ecx+(eax-1)*SIZEOF_JSAMPLE]
- mov JSAMPLE [ecx+eax*SIZEOF_JSAMPLE], dl
- mov dl, JSAMPLE [ebx+(eax-1)*SIZEOF_JSAMPLE]
- mov JSAMPLE [ebx+eax*SIZEOF_JSAMPLE], dl
- mov dl, JSAMPLE [esi+(eax-1)*SIZEOF_JSAMPLE]
- mov JSAMPLE [esi+eax*SIZEOF_JSAMPLE], dl ; insert a dummy sample
- pop edx
-.skip:
- ; -- process the first column block
-
- movdqa xmm0, XMMWORD [ebx+0*SIZEOF_XMMWORD] ; xmm0=row[ 0][0]
- movdqa xmm1, XMMWORD [ecx+0*SIZEOF_XMMWORD] ; xmm1=row[-1][0]
- movdqa xmm2, XMMWORD [esi+0*SIZEOF_XMMWORD] ; xmm2=row[+1][0]
-
- pushpic ebx
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- pxor xmm3,xmm3 ; xmm3=(all 0's)
- movdqa xmm4,xmm0
- punpcklbw xmm0,xmm3 ; xmm0=row[ 0]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm4,xmm3 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15)
- movdqa xmm5,xmm1
- punpcklbw xmm1,xmm3 ; xmm1=row[-1]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm5,xmm3 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15)
- movdqa xmm6,xmm2
- punpcklbw xmm2,xmm3 ; xmm2=row[+1]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm6,xmm3 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15)
-
- pmullw xmm0,[GOTOFF(ebx,PW_THREE)]
- pmullw xmm4,[GOTOFF(ebx,PW_THREE)]
-
- pcmpeqb xmm7,xmm7
- psrldq xmm7,(SIZEOF_XMMWORD-2)
-
- paddw xmm1,xmm0 ; xmm1=Int0L=( 0 1 2 3 4 5 6 7)
- paddw xmm5,xmm4 ; xmm5=Int0H=( 8 9 10 11 12 13 14 15)
- paddw xmm2,xmm0 ; xmm2=Int1L=( 0 1 2 3 4 5 6 7)
- paddw xmm6,xmm4 ; xmm6=Int1H=( 8 9 10 11 12 13 14 15)
-
- movdqa XMMWORD [edx+0*SIZEOF_XMMWORD], xmm1 ; temporarily save
- movdqa XMMWORD [edx+1*SIZEOF_XMMWORD], xmm5 ; the intermediate data
- movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm2
- movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm6
-
- pand xmm1,xmm7 ; xmm1=( 0 -- -- -- -- -- -- --)
- pand xmm2,xmm7 ; xmm2=( 0 -- -- -- -- -- -- --)
-
- movdqa XMMWORD [wk(0)], xmm1
- movdqa XMMWORD [wk(1)], xmm2
-
- poppic ebx
-
- add eax, byte SIZEOF_XMMWORD-1
- and eax, byte -SIZEOF_XMMWORD
- cmp eax, byte SIZEOF_XMMWORD
- ja short .columnloop
- alignx 16,7
-
-.columnloop_last:
- ; -- process the last column block
-
- pushpic ebx
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- pcmpeqb xmm1,xmm1
- pslldq xmm1,(SIZEOF_XMMWORD-2)
- movdqa xmm2,xmm1
-
- pand xmm1, XMMWORD [edx+1*SIZEOF_XMMWORD]
- pand xmm2, XMMWORD [edi+1*SIZEOF_XMMWORD]
-
- movdqa XMMWORD [wk(2)], xmm1 ; xmm1=(-- -- -- -- -- -- -- 15)
- movdqa XMMWORD [wk(3)], xmm2 ; xmm2=(-- -- -- -- -- -- -- 15)
-
- jmp near .upsample
- alignx 16,7
-
-.columnloop:
- ; -- process the next column block
-
- movdqa xmm0, XMMWORD [ebx+1*SIZEOF_XMMWORD] ; xmm0=row[ 0][1]
- movdqa xmm1, XMMWORD [ecx+1*SIZEOF_XMMWORD] ; xmm1=row[-1][1]
- movdqa xmm2, XMMWORD [esi+1*SIZEOF_XMMWORD] ; xmm2=row[+1][1]
-
- pushpic ebx
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- pxor xmm3,xmm3 ; xmm3=(all 0's)
- movdqa xmm4,xmm0
- punpcklbw xmm0,xmm3 ; xmm0=row[ 0]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm4,xmm3 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15)
- movdqa xmm5,xmm1
- punpcklbw xmm1,xmm3 ; xmm1=row[-1]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm5,xmm3 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15)
- movdqa xmm6,xmm2
- punpcklbw xmm2,xmm3 ; xmm2=row[+1]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm6,xmm3 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15)
-
- pmullw xmm0,[GOTOFF(ebx,PW_THREE)]
- pmullw xmm4,[GOTOFF(ebx,PW_THREE)]
-
- paddw xmm1,xmm0 ; xmm1=Int0L=( 0 1 2 3 4 5 6 7)
- paddw xmm5,xmm4 ; xmm5=Int0H=( 8 9 10 11 12 13 14 15)
- paddw xmm2,xmm0 ; xmm2=Int1L=( 0 1 2 3 4 5 6 7)
- paddw xmm6,xmm4 ; xmm6=Int1H=( 8 9 10 11 12 13 14 15)
-
- movdqa XMMWORD [edx+2*SIZEOF_XMMWORD], xmm1 ; temporarily save
- movdqa XMMWORD [edx+3*SIZEOF_XMMWORD], xmm5 ; the intermediate data
- movdqa XMMWORD [edi+2*SIZEOF_XMMWORD], xmm2
- movdqa XMMWORD [edi+3*SIZEOF_XMMWORD], xmm6
-
- pslldq xmm1,(SIZEOF_XMMWORD-2) ; xmm1=(-- -- -- -- -- -- -- 0)
- pslldq xmm2,(SIZEOF_XMMWORD-2) ; xmm2=(-- -- -- -- -- -- -- 0)
-
- movdqa XMMWORD [wk(2)], xmm1
- movdqa XMMWORD [wk(3)], xmm2
-
-.upsample:
- ; -- process the upper row
-
- movdqa xmm7, XMMWORD [edx+0*SIZEOF_XMMWORD]
- movdqa xmm3, XMMWORD [edx+1*SIZEOF_XMMWORD]
-
- movdqa xmm0,xmm7 ; xmm7=Int0L=( 0 1 2 3 4 5 6 7)
- movdqa xmm4,xmm3 ; xmm3=Int0H=( 8 9 10 11 12 13 14 15)
- psrldq xmm0,2 ; xmm0=( 1 2 3 4 5 6 7 --)
- pslldq xmm4,(SIZEOF_XMMWORD-2) ; xmm4=(-- -- -- -- -- -- -- 8)
- movdqa xmm5,xmm7
- movdqa xmm6,xmm3
- psrldq xmm5,(SIZEOF_XMMWORD-2) ; xmm5=( 7 -- -- -- -- -- -- --)
- pslldq xmm6,2 ; xmm6=(-- 8 9 10 11 12 13 14)
-
- por xmm0,xmm4 ; xmm0=( 1 2 3 4 5 6 7 8)
- por xmm5,xmm6 ; xmm5=( 7 8 9 10 11 12 13 14)
-
- movdqa xmm1,xmm7
- movdqa xmm2,xmm3
- pslldq xmm1,2 ; xmm1=(-- 0 1 2 3 4 5 6)
- psrldq xmm2,2 ; xmm2=( 9 10 11 12 13 14 15 --)
- movdqa xmm4,xmm3
- psrldq xmm4,(SIZEOF_XMMWORD-2) ; xmm4=(15 -- -- -- -- -- -- --)
-
- por xmm1, XMMWORD [wk(0)] ; xmm1=(-1 0 1 2 3 4 5 6)
- por xmm2, XMMWORD [wk(2)] ; xmm2=( 9 10 11 12 13 14 15 16)
-
- movdqa XMMWORD [wk(0)], xmm4
-
- pmullw xmm7,[GOTOFF(ebx,PW_THREE)]
- pmullw xmm3,[GOTOFF(ebx,PW_THREE)]
- paddw xmm1,[GOTOFF(ebx,PW_EIGHT)]
- paddw xmm5,[GOTOFF(ebx,PW_EIGHT)]
- paddw xmm0,[GOTOFF(ebx,PW_SEVEN)]
- paddw xmm2,[GOTOFF(ebx,PW_SEVEN)]
-
- paddw xmm1,xmm7
- paddw xmm5,xmm3
- psrlw xmm1,4 ; xmm1=Out0LE=( 0 2 4 6 8 10 12 14)
- psrlw xmm5,4 ; xmm5=Out0HE=(16 18 20 22 24 26 28 30)
- paddw xmm0,xmm7
- paddw xmm2,xmm3
- psrlw xmm0,4 ; xmm0=Out0LO=( 1 3 5 7 9 11 13 15)
- psrlw xmm2,4 ; xmm2=Out0HO=(17 19 21 23 25 27 29 31)
-
- psllw xmm0,BYTE_BIT
- psllw xmm2,BYTE_BIT
- por xmm1,xmm0 ; xmm1=Out0L=( 0 1 2 ... 13 14 15)
- por xmm5,xmm2 ; xmm5=Out0H=(16 17 18 ... 29 30 31)
-
- movdqa XMMWORD [edx+0*SIZEOF_XMMWORD], xmm1
- movdqa XMMWORD [edx+1*SIZEOF_XMMWORD], xmm5
-
- ; -- process the lower row
-
- movdqa xmm6, XMMWORD [edi+0*SIZEOF_XMMWORD]
- movdqa xmm4, XMMWORD [edi+1*SIZEOF_XMMWORD]
-
- movdqa xmm7,xmm6 ; xmm6=Int1L=( 0 1 2 3 4 5 6 7)
- movdqa xmm3,xmm4 ; xmm4=Int1H=( 8 9 10 11 12 13 14 15)
- psrldq xmm7,2 ; xmm7=( 1 2 3 4 5 6 7 --)
- pslldq xmm3,(SIZEOF_XMMWORD-2) ; xmm3=(-- -- -- -- -- -- -- 8)
- movdqa xmm0,xmm6
- movdqa xmm2,xmm4
- psrldq xmm0,(SIZEOF_XMMWORD-2) ; xmm0=( 7 -- -- -- -- -- -- --)
- pslldq xmm2,2 ; xmm2=(-- 8 9 10 11 12 13 14)
-
- por xmm7,xmm3 ; xmm7=( 1 2 3 4 5 6 7 8)
- por xmm0,xmm2 ; xmm0=( 7 8 9 10 11 12 13 14)
-
- movdqa xmm1,xmm6
- movdqa xmm5,xmm4
- pslldq xmm1,2 ; xmm1=(-- 0 1 2 3 4 5 6)
- psrldq xmm5,2 ; xmm5=( 9 10 11 12 13 14 15 --)
- movdqa xmm3,xmm4
- psrldq xmm3,(SIZEOF_XMMWORD-2) ; xmm3=(15 -- -- -- -- -- -- --)
-
- por xmm1, XMMWORD [wk(1)] ; xmm1=(-1 0 1 2 3 4 5 6)
- por xmm5, XMMWORD [wk(3)] ; xmm5=( 9 10 11 12 13 14 15 16)
-
- movdqa XMMWORD [wk(1)], xmm3
-
- pmullw xmm6,[GOTOFF(ebx,PW_THREE)]
- pmullw xmm4,[GOTOFF(ebx,PW_THREE)]
- paddw xmm1,[GOTOFF(ebx,PW_EIGHT)]
- paddw xmm0,[GOTOFF(ebx,PW_EIGHT)]
- paddw xmm7,[GOTOFF(ebx,PW_SEVEN)]
- paddw xmm5,[GOTOFF(ebx,PW_SEVEN)]
-
- paddw xmm1,xmm6
- paddw xmm0,xmm4
- psrlw xmm1,4 ; xmm1=Out1LE=( 0 2 4 6 8 10 12 14)
- psrlw xmm0,4 ; xmm0=Out1HE=(16 18 20 22 24 26 28 30)
- paddw xmm7,xmm6
- paddw xmm5,xmm4
- psrlw xmm7,4 ; xmm7=Out1LO=( 1 3 5 7 9 11 13 15)
- psrlw xmm5,4 ; xmm5=Out1HO=(17 19 21 23 25 27 29 31)
-
- psllw xmm7,BYTE_BIT
- psllw xmm5,BYTE_BIT
- por xmm1,xmm7 ; xmm1=Out1L=( 0 1 2 ... 13 14 15)
- por xmm0,xmm5 ; xmm0=Out1H=(16 17 18 ... 29 30 31)
-
- movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm1
- movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm0
-
- poppic ebx
-
- sub eax, byte SIZEOF_XMMWORD
- add ecx, byte 1*SIZEOF_XMMWORD ; inptr1(above)
- add ebx, byte 1*SIZEOF_XMMWORD ; inptr0
- add esi, byte 1*SIZEOF_XMMWORD ; inptr1(below)
- add edx, byte 2*SIZEOF_XMMWORD ; outptr0
- add edi, byte 2*SIZEOF_XMMWORD ; outptr1
- cmp eax, byte SIZEOF_XMMWORD
- ja near .columnloop
- test eax,eax
- jnz near .columnloop_last
-
- pop esi
- pop edi
- pop ecx
- pop eax
-
- add esi, byte 1*SIZEOF_JSAMPROW ; input_data
- add edi, byte 2*SIZEOF_JSAMPROW ; output_data
- sub ecx, byte 2 ; rowctr
- jg near .rowloop
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%ifdef UPSAMPLE_H1V2_SUPPORTED
-
-; --------------------------------------------------------------------------
-;
-; Fancy processing for the common case of 1:1 horizontal and 2:1 vertical.
-; Again a triangle filter; see comments for h2v1 case, above.
-;
-; GLOBAL(void)
-; jpeg_h1v2_fancy_upsample_sse2 (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
-%define gotptr ebp-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_h1v2_fancy_upsample_sse2)
-
-EXTN(jpeg_h1v2_fancy_upsample_sse2):
- push ebp
- mov ebp,esp
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- mov eax, POINTER [compptr(ebp)]
- mov eax, JDIMENSION [jcompinfo_downsampled_width(eax)] ; colctr
- add eax, byte SIZEOF_XMMWORD-1
- and eax, byte -SIZEOF_XMMWORD
- jz near .return
-
- mov ecx, POINTER [cinfo(ebp)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz near .return
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, POINTER [output_data_ptr(ebp)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push eax ; colctr
- push ecx
- push edi
- push esi
-
- mov ecx, JSAMPROW [esi-1*SIZEOF_JSAMPROW] ; inptr1(above)
- mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; inptr0
- mov esi, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; inptr1(below)
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0
- mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1
-
- pxor xmm0,xmm0 ; xmm0=(all 0's)
- alignx 16,7
-
-.columnloop:
- movdqa xmm1, XMMWORD [ebx] ; xmm1=row[ 0]( 0 1 2 ... 13 14 15)
- movdqa xmm2, XMMWORD [ecx] ; xmm2=row[-1]( 0 1 2 ... 13 14 15)
- movdqa xmm3, XMMWORD [esi] ; xmm3=row[+1]( 0 1 2 ... 13 14 15)
-
- pushpic ebx
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- movdqa xmm4,xmm1
- punpcklbw xmm1,xmm0 ; xmm1=row[ 0]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm4,xmm0 ; xmm4=row[ 0]( 8 9 10 11 12 13 14 15)
- movdqa xmm5,xmm2
- punpcklbw xmm2,xmm0 ; xmm2=row[-1]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm5,xmm0 ; xmm5=row[-1]( 8 9 10 11 12 13 14 15)
- movdqa xmm6,xmm3
- punpcklbw xmm3,xmm0 ; xmm3=row[+1]( 0 1 2 3 4 5 6 7)
- punpckhbw xmm6,xmm0 ; xmm6=row[+1]( 8 9 10 11 12 13 14 15)
-
- pmullw xmm1,[GOTOFF(ebx,PW_THREE)]
- pmullw xmm4,[GOTOFF(ebx,PW_THREE)]
- paddw xmm2,[GOTOFF(ebx,PW_ONE)]
- paddw xmm5,[GOTOFF(ebx,PW_ONE)]
- paddw xmm3,[GOTOFF(ebx,PW_TWO)]
- paddw xmm6,[GOTOFF(ebx,PW_TWO)]
-
- paddw xmm2,xmm1
- paddw xmm5,xmm4
- psrlw xmm2,2 ; xmm2=Out0L=( 0 1 2 3 4 5 6 7)
- psrlw xmm5,2 ; xmm5=Out0H=( 8 9 10 11 12 13 14 15)
- paddw xmm3,xmm1
- paddw xmm6,xmm4
- psrlw xmm3,2 ; xmm3=Out1L=( 0 1 2 3 4 5 6 7)
- psrlw xmm6,2 ; xmm6=Out1H=( 8 9 10 11 12 13 14 15)
-
- packuswb xmm2,xmm5 ; xmm2=Out0=( 0 1 2 ... 13 14 15)
- packuswb xmm3,xmm6 ; xmm3=Out1=( 0 1 2 ... 13 14 15)
-
- movdqa XMMWORD [edx], xmm2
- movdqa XMMWORD [edi], xmm3
-
- poppic ebx
-
- add ecx, byte 1*SIZEOF_XMMWORD ; inptr1(above)
- add ebx, byte 1*SIZEOF_XMMWORD ; inptr0
- add esi, byte 1*SIZEOF_XMMWORD ; inptr1(below)
- add edx, byte 1*SIZEOF_XMMWORD ; outptr0
- add edi, byte 1*SIZEOF_XMMWORD ; outptr1
- sub eax, byte SIZEOF_XMMWORD
- jnz near .columnloop
-
- pop esi
- pop edi
- pop ecx
- pop eax
-
- add esi, byte 1*SIZEOF_JSAMPROW ; input_data
- add edi, byte 2*SIZEOF_JSAMPROW ; output_data
- sub ecx, byte 2 ; rowctr
- jg near .rowloop
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- poppic eax ; remove gotptr
- pop ebp
- ret
-
-%endif ; UPSAMPLE_H1V2_SUPPORTED
-%endif ; JDSAMPLE_FANCY_SSE2_SUPPORTED
-
-%ifdef JDSAMPLE_SIMPLE_SSE2_SUPPORTED
-
-%ifndef JDSAMPLE_FANCY_SSE2_SUPPORTED
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-%endif
-;
-; Fast processing for the common case of 2:1 horizontal and 1:1 vertical.
-; It's still a box filter.
-;
-; GLOBAL(void)
-; jpeg_h2v1_upsample_sse2 (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
- align 16
- global EXTN(jpeg_h2v1_upsample_sse2)
-
-EXTN(jpeg_h2v1_upsample_sse2):
- push ebp
- mov ebp,esp
-; push ebx ; unused
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, JDIMENSION [jdstruct_output_width(edx)]
- add edx, byte (2*SIZEOF_XMMWORD)-1
- and edx, byte -(2*SIZEOF_XMMWORD)
- jz short .return
-
- mov ecx, POINTER [cinfo(ebp)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz short .return
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, POINTER [output_data_ptr(ebp)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push edi
- push esi
-
- mov esi, JSAMPROW [esi] ; inptr
- mov edi, JSAMPROW [edi] ; outptr
- mov eax,edx ; colctr
- alignx 16,7
-.columnloop:
-
- movdqa xmm0, XMMWORD [esi+0*SIZEOF_XMMWORD]
-
- movdqa xmm1,xmm0
- punpcklbw xmm0,xmm0
- punpckhbw xmm1,xmm1
-
- movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm0
- movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm1
-
- sub eax, byte 2*SIZEOF_XMMWORD
- jz short .nextrow
-
- movdqa xmm2, XMMWORD [esi+1*SIZEOF_XMMWORD]
-
- movdqa xmm3,xmm2
- punpcklbw xmm2,xmm2
- punpckhbw xmm3,xmm3
-
- movdqa XMMWORD [edi+2*SIZEOF_XMMWORD], xmm2
- movdqa XMMWORD [edi+3*SIZEOF_XMMWORD], xmm3
-
- sub eax, byte 2*SIZEOF_XMMWORD
- jz short .nextrow
-
- add esi, byte 2*SIZEOF_XMMWORD ; inptr
- add edi, byte 4*SIZEOF_XMMWORD ; outptr
- jmp short .columnloop
- alignx 16,7
-
-.nextrow:
- pop esi
- pop edi
-
- add esi, byte SIZEOF_JSAMPROW ; input_data
- add edi, byte SIZEOF_JSAMPROW ; output_data
- dec ecx ; rowctr
- jg short .rowloop
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
-; pop ebx ; unused
- pop ebp
- ret
-
-; --------------------------------------------------------------------------
-;
-; Fast processing for the common case of 2:1 horizontal and 2:1 vertical.
-; It's still a box filter.
-;
-; GLOBAL(void)
-; jpeg_h2v2_upsample_sse2 (j_decompress_ptr cinfo,
-; jpeg_component_info * compptr,
-; JSAMPARRAY input_data,
-; JSAMPARRAY * output_data_ptr);
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define input_data(b) (b)+16 ; JSAMPARRAY input_data
-%define output_data_ptr(b) (b)+20 ; JSAMPARRAY * output_data_ptr
-
- align 16
- global EXTN(jpeg_h2v2_upsample_sse2)
-
-EXTN(jpeg_h2v2_upsample_sse2):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, JDIMENSION [jdstruct_output_width(edx)]
- add edx, byte (2*SIZEOF_XMMWORD)-1
- and edx, byte -(2*SIZEOF_XMMWORD)
- jz near .return
-
- mov ecx, POINTER [cinfo(ebp)]
- mov ecx, INT [jdstruct_max_v_samp_factor(ecx)] ; rowctr
- test ecx,ecx
- jz near .return
-
- mov esi, JSAMPARRAY [input_data(ebp)] ; input_data
- mov edi, POINTER [output_data_ptr(ebp)]
- mov edi, JSAMPARRAY [edi] ; output_data
- alignx 16,7
-.rowloop:
- push edi
- push esi
-
- mov esi, JSAMPROW [esi] ; inptr
- mov ebx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] ; outptr0
- mov edi, JSAMPROW [edi+1*SIZEOF_JSAMPROW] ; outptr1
- mov eax,edx ; colctr
- alignx 16,7
-.columnloop:
-
- movdqa xmm0, XMMWORD [esi+0*SIZEOF_XMMWORD]
-
- movdqa xmm1,xmm0
- punpcklbw xmm0,xmm0
- punpckhbw xmm1,xmm1
-
- movdqa XMMWORD [ebx+0*SIZEOF_XMMWORD], xmm0
- movdqa XMMWORD [ebx+1*SIZEOF_XMMWORD], xmm1
- movdqa XMMWORD [edi+0*SIZEOF_XMMWORD], xmm0
- movdqa XMMWORD [edi+1*SIZEOF_XMMWORD], xmm1
-
- sub eax, byte 2*SIZEOF_XMMWORD
- jz short .nextrow
-
- movdqa xmm2, XMMWORD [esi+1*SIZEOF_XMMWORD]
-
- movdqa xmm3,xmm2
- punpcklbw xmm2,xmm2
- punpckhbw xmm3,xmm3
-
- movdqa XMMWORD [ebx+2*SIZEOF_XMMWORD], xmm2
- movdqa XMMWORD [ebx+3*SIZEOF_XMMWORD], xmm3
- movdqa XMMWORD [edi+2*SIZEOF_XMMWORD], xmm2
- movdqa XMMWORD [edi+3*SIZEOF_XMMWORD], xmm3
-
- sub eax, byte 2*SIZEOF_XMMWORD
- jz short .nextrow
-
- add esi, byte 2*SIZEOF_XMMWORD ; inptr
- add ebx, byte 4*SIZEOF_XMMWORD ; outptr0
- add edi, byte 4*SIZEOF_XMMWORD ; outptr1
- jmp short .columnloop
- alignx 16,7
-
-.nextrow:
- pop esi
- pop edi
-
- add esi, byte 1*SIZEOF_JSAMPROW ; input_data
- add edi, byte 2*SIZEOF_JSAMPROW ; output_data
- sub ecx, byte 2 ; rowctr
- jg short .rowloop
-
-.return:
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%endif ; JDSAMPLE_SIMPLE_SSE2_SUPPORTED
diff --git a/jf3dnflt.asm b/jf3dnflt.asm
deleted file mode 100644
index 7117dd4..0000000
--- a/jf3dnflt.asm
+++ /dev/null
@@ -1,327 +0,0 @@
-;
-; jf3dnflt.asm - floating-point FDCT (3DNow!)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a floating-point implementation of the forward DCT
-; (Discrete Cosine Transform). The following code is based directly on
-; the IJG's original jfdctflt.c; see the jfdctflt.c for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-%ifdef JFDCT_FLT_3DNOW_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_fdct_float_3dnow)
-
-EXTN(jconst_fdct_float_3dnow):
-
-PD_0_382 times 2 dd 0.382683432365089771728460
-PD_0_707 times 2 dd 0.707106781186547524400844
-PD_0_541 times 2 dd 0.541196100146196984399723
-PD_1_306 times 2 dd 1.306562964876376527856643
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_float_3dnow (FAST_FLOAT * data)
-;
-
-%define data(b) (b)+8 ; FAST_FLOAT * data
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 2
-
- align 16
- global EXTN(jpeg_fdct_float_3dnow)
-
-EXTN(jpeg_fdct_float_3dnow):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
-; push esi ; unused
-; push edi ; unused
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process rows.
-
- mov edx, POINTER [data(eax)] ; (FAST_FLOAT *)
- mov ecx, DCTSIZE/2
- alignx 16,7
-.rowloop:
-
- movq mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)]
- movq mm1, MMWORD [MMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)]
- movq mm2, MMWORD [MMBLOCK(0,3,edx,SIZEOF_FAST_FLOAT)]
- movq mm3, MMWORD [MMBLOCK(1,3,edx,SIZEOF_FAST_FLOAT)]
-
- ; mm0=(00 01), mm1=(10 11), mm2=(06 07), mm3=(16 17)
-
- movq mm4,mm0 ; transpose coefficients
- punpckldq mm0,mm1 ; mm0=(00 10)=data0
- punpckhdq mm4,mm1 ; mm4=(01 11)=data1
- movq mm5,mm2 ; transpose coefficients
- punpckldq mm2,mm3 ; mm2=(06 16)=data6
- punpckhdq mm5,mm3 ; mm5=(07 17)=data7
-
- movq mm6,mm4
- movq mm7,mm0
- pfsub mm4,mm2 ; mm4=data1-data6=tmp6
- pfsub mm0,mm5 ; mm0=data0-data7=tmp7
- pfadd mm6,mm2 ; mm6=data1+data6=tmp1
- pfadd mm7,mm5 ; mm7=data0+data7=tmp0
-
- movq mm1, MMWORD [MMBLOCK(0,1,edx,SIZEOF_FAST_FLOAT)]
- movq mm3, MMWORD [MMBLOCK(1,1,edx,SIZEOF_FAST_FLOAT)]
- movq mm2, MMWORD [MMBLOCK(0,2,edx,SIZEOF_FAST_FLOAT)]
- movq mm5, MMWORD [MMBLOCK(1,2,edx,SIZEOF_FAST_FLOAT)]
-
- ; mm1=(02 03), mm3=(12 13), mm2=(04 05), mm5=(14 15)
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=tmp6
- movq MMWORD [wk(1)], mm0 ; wk(1)=tmp7
-
- movq mm4,mm1 ; transpose coefficients
- punpckldq mm1,mm3 ; mm1=(02 12)=data2
- punpckhdq mm4,mm3 ; mm4=(03 13)=data3
- movq mm0,mm2 ; transpose coefficients
- punpckldq mm2,mm5 ; mm2=(04 14)=data4
- punpckhdq mm0,mm5 ; mm0=(05 15)=data5
-
- movq mm3,mm4
- movq mm5,mm1
- pfadd mm4,mm2 ; mm4=data3+data4=tmp3
- pfadd mm1,mm0 ; mm1=data2+data5=tmp2
- pfsub mm3,mm2 ; mm3=data3-data4=tmp4
- pfsub mm5,mm0 ; mm5=data2-data5=tmp5
-
- ; -- Even part
-
- movq mm2,mm7
- movq mm0,mm6
- pfsub mm7,mm4 ; mm7=tmp13
- pfsub mm6,mm1 ; mm6=tmp12
- pfadd mm2,mm4 ; mm2=tmp10
- pfadd mm0,mm1 ; mm0=tmp11
-
- pfadd mm6,mm7
- pfmul mm6,[GOTOFF(ebx,PD_0_707)] ; mm6=z1
-
- movq mm4,mm2
- movq mm1,mm7
- pfsub mm2,mm0 ; mm2=data4
- pfsub mm7,mm6 ; mm7=data6
- pfadd mm4,mm0 ; mm4=data0
- pfadd mm1,mm6 ; mm1=data2
-
- movq MMWORD [MMBLOCK(0,2,edx,SIZEOF_FAST_FLOAT)], mm2
- movq MMWORD [MMBLOCK(0,3,edx,SIZEOF_FAST_FLOAT)], mm7
- movq MMWORD [MMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)], mm4
- movq MMWORD [MMBLOCK(0,1,edx,SIZEOF_FAST_FLOAT)], mm1
-
- ; -- Odd part
-
- movq mm0, MMWORD [wk(0)] ; mm0=tmp6
- movq mm6, MMWORD [wk(1)] ; mm6=tmp7
-
- pfadd mm3,mm5 ; mm3=tmp10
- pfadd mm5,mm0 ; mm5=tmp11
- pfadd mm0,mm6 ; mm0=tmp12, mm6=tmp7
-
- pfmul mm5,[GOTOFF(ebx,PD_0_707)] ; mm5=z3
-
- movq mm2,mm3 ; mm2=tmp10
- pfsub mm3,mm0
- pfmul mm3,[GOTOFF(ebx,PD_0_382)] ; mm3=z5
- pfmul mm2,[GOTOFF(ebx,PD_0_541)] ; mm2=MULTIPLY(tmp10,FIX_0_54119610)
- pfmul mm0,[GOTOFF(ebx,PD_1_306)] ; mm0=MULTIPLY(tmp12,FIX_1_30656296)
- pfadd mm2,mm3 ; mm2=z2
- pfadd mm0,mm3 ; mm0=z4
-
- movq mm7,mm6
- pfsub mm6,mm5 ; mm6=z13
- pfadd mm7,mm5 ; mm7=z11
-
- movq mm4,mm6
- movq mm1,mm7
- pfsub mm6,mm2 ; mm6=data3
- pfsub mm7,mm0 ; mm7=data7
- pfadd mm4,mm2 ; mm4=data5
- pfadd mm1,mm0 ; mm1=data1
-
- movq MMWORD [MMBLOCK(1,1,edx,SIZEOF_FAST_FLOAT)], mm6
- movq MMWORD [MMBLOCK(1,3,edx,SIZEOF_FAST_FLOAT)], mm7
- movq MMWORD [MMBLOCK(1,2,edx,SIZEOF_FAST_FLOAT)], mm4
- movq MMWORD [MMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)], mm1
-
- add edx, byte 2*DCTSIZE*SIZEOF_FAST_FLOAT
- dec ecx
- jnz near .rowloop
-
- ; ---- Pass 2: process columns.
-
- mov edx, POINTER [data(eax)] ; (FAST_FLOAT *)
- mov ecx, DCTSIZE/2
- alignx 16,7
-.columnloop:
-
- movq mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)]
- movq mm1, MMWORD [MMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)]
- movq mm2, MMWORD [MMBLOCK(6,0,edx,SIZEOF_FAST_FLOAT)]
- movq mm3, MMWORD [MMBLOCK(7,0,edx,SIZEOF_FAST_FLOAT)]
-
- ; mm0=(00 10), mm1=(01 11), mm2=(60 70), mm3=(61 71)
-
- movq mm4,mm0 ; transpose coefficients
- punpckldq mm0,mm1 ; mm0=(00 01)=data0
- punpckhdq mm4,mm1 ; mm4=(10 11)=data1
- movq mm5,mm2 ; transpose coefficients
- punpckldq mm2,mm3 ; mm2=(60 61)=data6
- punpckhdq mm5,mm3 ; mm5=(70 71)=data7
-
- movq mm6,mm4
- movq mm7,mm0
- pfsub mm4,mm2 ; mm4=data1-data6=tmp6
- pfsub mm0,mm5 ; mm0=data0-data7=tmp7
- pfadd mm6,mm2 ; mm6=data1+data6=tmp1
- pfadd mm7,mm5 ; mm7=data0+data7=tmp0
-
- movq mm1, MMWORD [MMBLOCK(2,0,edx,SIZEOF_FAST_FLOAT)]
- movq mm3, MMWORD [MMBLOCK(3,0,edx,SIZEOF_FAST_FLOAT)]
- movq mm2, MMWORD [MMBLOCK(4,0,edx,SIZEOF_FAST_FLOAT)]
- movq mm5, MMWORD [MMBLOCK(5,0,edx,SIZEOF_FAST_FLOAT)]
-
- ; mm1=(20 30), mm3=(21 31), mm2=(40 50), mm5=(41 51)
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=tmp6
- movq MMWORD [wk(1)], mm0 ; wk(1)=tmp7
-
- movq mm4,mm1 ; transpose coefficients
- punpckldq mm1,mm3 ; mm1=(20 21)=data2
- punpckhdq mm4,mm3 ; mm4=(30 31)=data3
- movq mm0,mm2 ; transpose coefficients
- punpckldq mm2,mm5 ; mm2=(40 41)=data4
- punpckhdq mm0,mm5 ; mm0=(50 51)=data5
-
- movq mm3,mm4
- movq mm5,mm1
- pfadd mm4,mm2 ; mm4=data3+data4=tmp3
- pfadd mm1,mm0 ; mm1=data2+data5=tmp2
- pfsub mm3,mm2 ; mm3=data3-data4=tmp4
- pfsub mm5,mm0 ; mm5=data2-data5=tmp5
-
- ; -- Even part
-
- movq mm2,mm7
- movq mm0,mm6
- pfsub mm7,mm4 ; mm7=tmp13
- pfsub mm6,mm1 ; mm6=tmp12
- pfadd mm2,mm4 ; mm2=tmp10
- pfadd mm0,mm1 ; mm0=tmp11
-
- pfadd mm6,mm7
- pfmul mm6,[GOTOFF(ebx,PD_0_707)] ; mm6=z1
-
- movq mm4,mm2
- movq mm1,mm7
- pfsub mm2,mm0 ; mm2=data4
- pfsub mm7,mm6 ; mm7=data6
- pfadd mm4,mm0 ; mm4=data0
- pfadd mm1,mm6 ; mm1=data2
-
- movq MMWORD [MMBLOCK(4,0,edx,SIZEOF_FAST_FLOAT)], mm2
- movq MMWORD [MMBLOCK(6,0,edx,SIZEOF_FAST_FLOAT)], mm7
- movq MMWORD [MMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)], mm4
- movq MMWORD [MMBLOCK(2,0,edx,SIZEOF_FAST_FLOAT)], mm1
-
- ; -- Odd part
-
- movq mm0, MMWORD [wk(0)] ; mm0=tmp6
- movq mm6, MMWORD [wk(1)] ; mm6=tmp7
-
- pfadd mm3,mm5 ; mm3=tmp10
- pfadd mm5,mm0 ; mm5=tmp11
- pfadd mm0,mm6 ; mm0=tmp12, mm6=tmp7
-
- pfmul mm5,[GOTOFF(ebx,PD_0_707)] ; mm5=z3
-
- movq mm2,mm3 ; mm2=tmp10
- pfsub mm3,mm0
- pfmul mm3,[GOTOFF(ebx,PD_0_382)] ; mm3=z5
- pfmul mm2,[GOTOFF(ebx,PD_0_541)] ; mm2=MULTIPLY(tmp10,FIX_0_54119610)
- pfmul mm0,[GOTOFF(ebx,PD_1_306)] ; mm0=MULTIPLY(tmp12,FIX_1_30656296)
- pfadd mm2,mm3 ; mm2=z2
- pfadd mm0,mm3 ; mm0=z4
-
- movq mm7,mm6
- pfsub mm6,mm5 ; mm6=z13
- pfadd mm7,mm5 ; mm7=z11
-
- movq mm4,mm6
- movq mm1,mm7
- pfsub mm6,mm2 ; mm6=data3
- pfsub mm7,mm0 ; mm7=data7
- pfadd mm4,mm2 ; mm4=data5
- pfadd mm1,mm0 ; mm1=data1
-
- movq MMWORD [MMBLOCK(3,0,edx,SIZEOF_FAST_FLOAT)], mm6
- movq MMWORD [MMBLOCK(7,0,edx,SIZEOF_FAST_FLOAT)], mm7
- movq MMWORD [MMBLOCK(5,0,edx,SIZEOF_FAST_FLOAT)], mm4
- movq MMWORD [MMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)], mm1
-
- add edx, byte 2*SIZEOF_FAST_FLOAT
- dec ecx
- jnz near .columnloop
-
- femms ; empty MMX/3DNow! state
-
-; pop edi ; unused
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JFDCT_FLT_3DNOW_MMX_SUPPORTED
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/jfdctflt.asm b/jfdctflt.asm
deleted file mode 100644
index 178e1f9..0000000
--- a/jfdctflt.asm
+++ /dev/null
@@ -1,288 +0,0 @@
-;
-; jfdctflt.asm - floating-point FDCT (non-SIMD)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a floating-point implementation of the forward DCT
-; (Discrete Cosine Transform). The following code is based directly on
-; the IJG's original jfdctflt.c; see the jfdctflt.c for more details.
-;
-; Last Modified : October 17, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
-%define ROTATOR_TYPE FP32 ; float
-
- alignz 16
- global EXTN(jconst_fdct_float)
-
-EXTN(jconst_fdct_float):
-
-F_0_382 dd 0.382683432365089771728460 ; cos(PI*3/8)
-F_0_707 dd 0.707106781186547524400844 ; cos(PI*1/4)
-F_0_541 dd 0.541196100146196984399723 ; cos(PI*1/8)-cos(PI*3/8)
-F_1_306 dd 1.306562964876376527856643 ; cos(PI*1/8)+cos(PI*3/8)
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_float (FAST_FLOAT * data)
-;
-
-%define data(b) (b)+8 ; FAST_FLOAT * data
-
- align 16
- global EXTN(jpeg_fdct_float)
-
-EXTN(jpeg_fdct_float):
- push ebp
- mov ebp,esp
- pushpic ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
-; push esi ; unused
-; push edi ; unused
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process rows.
-
- mov edx, POINTER [data(ebp)] ; (FAST_FLOAT *)
- mov ecx, DCTSIZE
- alignx 16,7
-.rowloop:
- fld FAST_FLOAT [ROW(1,edx,SIZEOF_FAST_FLOAT)]
- fadd FAST_FLOAT [ROW(6,edx,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [ROW(0,edx,SIZEOF_FAST_FLOAT)]
- fadd FAST_FLOAT [ROW(7,edx,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [ROW(3,edx,SIZEOF_FAST_FLOAT)]
- fadd FAST_FLOAT [ROW(4,edx,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [ROW(2,edx,SIZEOF_FAST_FLOAT)]
- fadd FAST_FLOAT [ROW(5,edx,SIZEOF_FAST_FLOAT)]
-
- ; -- Even part
-
- fld st2 ; st2 = st2 + st1, st1 = st2 - st1
- fsub st0,st2
- fxch st0,st2
- faddp st3,st0
- fld st3 ; st3 = st3 + st0, st0 = st3 - st0
- fsub st0,st1
- fxch st0,st1
- faddp st4,st0
-
- fadd st0,st1
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_0_707)]
-
- fld st2 ; st3 = st2 + st3, st2 = st2 - st3
- fsub st0,st4
- fxch st0,st3
- faddp st4,st0
- fld st1 ; st0 = st1 + st0, st1 = st1 - st0
- fsub st0,st1
- fxch st0,st2
- faddp st1,st0
-
- fld FAST_FLOAT [ROW(0,edx,SIZEOF_FAST_FLOAT)]
- fsub FAST_FLOAT [ROW(7,edx,SIZEOF_FAST_FLOAT)]
- fxch st0,st4
- fld FAST_FLOAT [ROW(3,edx,SIZEOF_FAST_FLOAT)]
- fsub FAST_FLOAT [ROW(4,edx,SIZEOF_FAST_FLOAT)]
- fxch st0,st4
- fld FAST_FLOAT [ROW(1,edx,SIZEOF_FAST_FLOAT)]
- fsub FAST_FLOAT [ROW(6,edx,SIZEOF_FAST_FLOAT)]
- fxch st0,st4
- fld FAST_FLOAT [ROW(2,edx,SIZEOF_FAST_FLOAT)]
- fsub FAST_FLOAT [ROW(5,edx,SIZEOF_FAST_FLOAT)]
- fxch st0,st4
-
- fstp FAST_FLOAT [ROW(2,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [ROW(6,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [ROW(4,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [ROW(0,edx,SIZEOF_FAST_FLOAT)]
-
- ; -- Odd part
-
- fadd st2,st0
- fadd st0,st1
- fxch st0,st3
- fadd st1,st0
- fxch st0,st3
-
- fld st2
- fxch st0,st1
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_0_707)]
- fxch st0,st1
- fsub st0,st2
- fxch st0,st3
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_0_541)]
- fxch st0,st3
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_0_382)]
- fxch st0,st2
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_306)]
- fxch st0,st2
- fadd st3,st0
- faddp st2,st0
-
- fld st3 ; st3 = st3 + st0, st0 = st3 - st0
- fsub st0,st1
- fxch st0,st1
- faddp st4,st0
-
- fld st2 ; st0 = st0 + st2, st2 = st0 - st2
- fsubr st0,st1
- fxch st0,st3
- faddp st1,st0
- fld st1 ; st3 = st3 + st1, st1 = st3 - st1
- fsubr st0,st4
- fxch st0,st2
- faddp st4,st0
-
- fstp FAST_FLOAT [ROW(5,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [ROW(7,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [ROW(3,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [ROW(1,edx,SIZEOF_FAST_FLOAT)]
-
- add edx, byte DCTSIZE*SIZEOF_FAST_FLOAT
- dec ecx ; advance pointer to next row
- jnz near .rowloop
-
- ; ---- Pass 2: process columns.
-
- mov edx, POINTER [data(ebp)] ; (FAST_FLOAT *)
- mov ecx, DCTSIZE
- alignx 16,7
-.columnloop:
- fld FAST_FLOAT [COL(1,edx,SIZEOF_FAST_FLOAT)]
- fadd FAST_FLOAT [COL(6,edx,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [COL(0,edx,SIZEOF_FAST_FLOAT)]
- fadd FAST_FLOAT [COL(7,edx,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [COL(3,edx,SIZEOF_FAST_FLOAT)]
- fadd FAST_FLOAT [COL(4,edx,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [COL(2,edx,SIZEOF_FAST_FLOAT)]
- fadd FAST_FLOAT [COL(5,edx,SIZEOF_FAST_FLOAT)]
-
- ; -- Even part
-
- fld st2 ; st2 = st2 + st1, st1 = st2 - st1
- fsub st0,st2
- fxch st0,st2
- faddp st3,st0
- fld st3 ; st3 = st3 + st0, st0 = st3 - st0
- fsub st0,st1
- fxch st0,st1
- faddp st4,st0
-
- fadd st0,st1
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_0_707)]
-
- fld st2 ; st3 = st2 + st3, st2 = st2 - st3
- fsub st0,st4
- fxch st0,st3
- faddp st4,st0
- fld st1 ; st0 = st1 + st0, st1 = st1 - st0
- fsub st0,st1
- fxch st0,st2
- faddp st1,st0
-
- fld FAST_FLOAT [COL(0,edx,SIZEOF_FAST_FLOAT)]
- fsub FAST_FLOAT [COL(7,edx,SIZEOF_FAST_FLOAT)]
- fxch st0,st4
- fld FAST_FLOAT [COL(3,edx,SIZEOF_FAST_FLOAT)]
- fsub FAST_FLOAT [COL(4,edx,SIZEOF_FAST_FLOAT)]
- fxch st0,st4
- fld FAST_FLOAT [COL(1,edx,SIZEOF_FAST_FLOAT)]
- fsub FAST_FLOAT [COL(6,edx,SIZEOF_FAST_FLOAT)]
- fxch st0,st4
- fld FAST_FLOAT [COL(2,edx,SIZEOF_FAST_FLOAT)]
- fsub FAST_FLOAT [COL(5,edx,SIZEOF_FAST_FLOAT)]
- fxch st0,st4
-
- fstp FAST_FLOAT [COL(2,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(6,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(4,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(0,edx,SIZEOF_FAST_FLOAT)]
-
- ; -- Odd part
-
- fadd st2,st0
- fadd st0,st1
- fxch st0,st3
- fadd st1,st0
- fxch st0,st3
-
- fld st2
- fxch st0,st1
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_0_707)]
- fxch st0,st1
- fsub st0,st2
- fxch st0,st3
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_0_541)]
- fxch st0,st3
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_0_382)]
- fxch st0,st2
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_306)]
- fxch st0,st2
- fadd st3,st0
- faddp st2,st0
-
- fld st3 ; st3 = st3 + st0, st0 = st3 - st0
- fsub st0,st1
- fxch st0,st1
- faddp st4,st0
-
- fld st2 ; st0 = st0 + st2, st2 = st0 - st2
- fsubr st0,st1
- fxch st0,st3
- faddp st1,st0
- fld st1 ; st3 = st3 + st1, st1 = st3 - st1
- fsubr st0,st4
- fxch st0,st2
- faddp st4,st0
-
- fstp FAST_FLOAT [COL(5,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(7,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(3,edx,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(1,edx,SIZEOF_FAST_FLOAT)]
-
- add edx, byte SIZEOF_FAST_FLOAT ; advance pointer to next column
- dec ecx
- jnz near .columnloop
-
-; pop edi ; unused
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- poppic ebx
- pop ebp
- ret
-
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/unused/jfdctflt.c b/jfdctflt.c
similarity index 100%
rename from unused/jfdctflt.c
rename to jfdctflt.c
diff --git a/jfdctfst.asm b/jfdctfst.asm
deleted file mode 100644
index c73c920..0000000
--- a/jfdctfst.asm
+++ /dev/null
@@ -1,303 +0,0 @@
-;
-; jfdctfst.asm - fast integer FDCT (non-SIMD)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a fast, not so accurate integer implementation of
-; the forward DCT (Discrete Cosine Transform). The following code is based
-; directly on the IJG's original jfdctfst.c; see the jfdctfst.c for
-; more details.
-;
-; Last Modified : October 17, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_IFAST_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-; We can gain a little more speed, with a further compromise in accuracy,
-; by omitting the addition in a descaling shift. This yields an
-; incorrectly rounded result half the time...
-;
-%macro descale 2
-%ifdef USE_ACCURATE_ROUNDING
-%if (%2)<=7
- add %1, byte (1<<((%2)-1)) ; add reg32,imm8
-%else
- add %1, (1<<((%2)-1)) ; add reg32,imm32
-%endif
-%endif
- sar %1,%2
-%endmacro
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 8
-
-%if CONST_BITS == 8
-F_0_382 equ 98 ; FIX(0.382683433)
-F_0_541 equ 139 ; FIX(0.541196100)
-F_0_707 equ 181 ; FIX(0.707106781)
-F_1_306 equ 334 ; FIX(1.306562965)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_382 equ DESCALE( 410903207,30-CONST_BITS) ; FIX(0.382683433)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_707 equ DESCALE( 759250124,30-CONST_BITS) ; FIX(0.707106781)
-F_1_306 equ DESCALE(1402911301,30-CONST_BITS) ; FIX(1.306562965)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_ifast (DCTELEM * data)
-;
-
-%define data(b) (b)+8 ; DCTELEM * data
-
- align 16
- global EXTN(jpeg_fdct_ifast)
-
-EXTN(jpeg_fdct_ifast):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- ; ---- Pass 1: process rows.
-
- mov ecx, DCTSIZE
- mov edx, POINTER [data(ebp)] ; (DCTELEM *)
- alignx 16,7
-.rowloop:
- push ecx ; ctr
- push edx ; dataptr
-
- movsx eax, DCTELEM [ROW(0,edx,SIZEOF_DCTELEM)]
- movsx edi, DCTELEM [ROW(7,edx,SIZEOF_DCTELEM)]
- lea esi,[eax+edi] ; esi=tmp0
- sub eax,edi ; eax=tmp7
- push eax
-
- movsx ebx, DCTELEM [ROW(1,edx,SIZEOF_DCTELEM)]
- movsx ecx, DCTELEM [ROW(6,edx,SIZEOF_DCTELEM)]
- lea edi,[ebx+ecx] ; edi=tmp1
- sub ebx,ecx ; ebx=tmp6
- push ebx
-
- movsx eax, DCTELEM [ROW(2,edx,SIZEOF_DCTELEM)]
- movsx ecx, DCTELEM [ROW(5,edx,SIZEOF_DCTELEM)]
- lea ebx,[eax+ecx] ; ebx=tmp2
- sub eax,ecx ; eax=tmp5
- push eax
-
- movsx ecx, DCTELEM [ROW(3,edx,SIZEOF_DCTELEM)]
- movsx eax, DCTELEM [ROW(4,edx,SIZEOF_DCTELEM)]
- lea edx,[ecx+eax] ; edx=tmp3
- sub ecx,eax ; ecx=tmp4
- push ecx
-
- ; -- Even part
-
- lea eax,[esi+edx] ; eax=tmp10
- lea ecx,[edi+ebx] ; ecx=tmp11
- sub esi,edx ; esi=tmp13
- sub edi,ebx ; edi=tmp12
-
- mov edx, POINTER [esp+16] ; dataptr
-
- add edi,esi
- imul edi,(F_0_707) ; edi=z1
- descale edi,CONST_BITS
-
- lea ebx,[eax+ecx] ; ebx=data0
- sub eax,ecx ; eax=data4
- mov DCTELEM [ROW(0,edx,SIZEOF_DCTELEM)], bx
- mov DCTELEM [ROW(4,edx,SIZEOF_DCTELEM)], ax
-
- lea ecx,[esi+edi] ; ecx=data2
- sub esi,edi ; esi=data6
- mov DCTELEM [ROW(2,edx,SIZEOF_DCTELEM)], cx
- mov DCTELEM [ROW(6,edx,SIZEOF_DCTELEM)], si
-
- ; -- Odd part
-
- pop eax ; eax=tmp4
- pop edx ; edx=tmp5
- pop ebx ; ebx=tmp6
- pop edi ; edi=tmp7
-
- add eax,edx ; eax=tmp10
- add edx,ebx ; edx=tmp11
- add ebx,edi ; ebx=tmp12, edi=tmp7
-
- imul edx,(F_0_707) ; edx=z3
- descale edx,CONST_BITS
- lea esi,[edi+edx] ; esi=z11
- sub edi,edx ; edi=z13
-
- mov ecx,eax ; ecx=tmp10
- sub eax,ebx
- imul eax,(F_0_382) ; eax=z5
- imul ecx,(F_0_541) ; ecx=MULTIPLY(tmp10,FIX_0_541196100)
- imul ebx,(F_1_306) ; ebx=MULTIPLY(tmp12,FIX_1_306562965)
- descale eax,CONST_BITS
- descale ecx,CONST_BITS
- descale ebx,CONST_BITS
- add ecx,eax ; ecx=z2
- add ebx,eax ; ebx=z4
-
- pop edx ; dataptr
-
- lea eax,[edi+ecx] ; eax=data5
- sub edi,ecx ; edi=data3
- mov DCTELEM [ROW(5,edx,SIZEOF_DCTELEM)], ax
- mov DCTELEM [ROW(3,edx,SIZEOF_DCTELEM)], di
-
- lea ecx,[esi+ebx] ; ecx=data1
- sub esi,ebx ; esi=data7
- mov DCTELEM [ROW(1,edx,SIZEOF_DCTELEM)], cx
- mov DCTELEM [ROW(7,edx,SIZEOF_DCTELEM)], si
-
- pop ecx ; ctr
-
- add edx, byte DCTSIZE*SIZEOF_DCTELEM
- dec ecx ; advance pointer to next row
- jnz near .rowloop
-
- ; ---- Pass 2: process columns.
-
- mov ecx, DCTSIZE
- mov edx, POINTER [data(ebp)] ; (DCTELEM *)
- alignx 16,7
-.columnloop:
- push ecx ; ctr
- push edx ; dataptr
-
- movsx eax, DCTELEM [COL(0,edx,SIZEOF_DCTELEM)]
- movsx edi, DCTELEM [COL(7,edx,SIZEOF_DCTELEM)]
- lea esi,[eax+edi] ; esi=tmp0
- sub eax,edi ; eax=tmp7
- push eax
-
- movsx ebx, DCTELEM [COL(1,edx,SIZEOF_DCTELEM)]
- movsx ecx, DCTELEM [COL(6,edx,SIZEOF_DCTELEM)]
- lea edi,[ebx+ecx] ; edi=tmp1
- sub ebx,ecx ; ebx=tmp6
- push ebx
-
- movsx eax, DCTELEM [COL(2,edx,SIZEOF_DCTELEM)]
- movsx ecx, DCTELEM [COL(5,edx,SIZEOF_DCTELEM)]
- lea ebx,[eax+ecx] ; ebx=tmp2
- sub eax,ecx ; eax=tmp5
- push eax
-
- movsx ecx, DCTELEM [COL(3,edx,SIZEOF_DCTELEM)]
- movsx eax, DCTELEM [COL(4,edx,SIZEOF_DCTELEM)]
- lea edx,[ecx+eax] ; edx=tmp3
- sub ecx,eax ; ecx=tmp4
- push ecx
-
- ; -- Even part
-
- lea eax,[esi+edx] ; eax=tmp10
- lea ecx,[edi+ebx] ; ecx=tmp11
- sub esi,edx ; esi=tmp13
- sub edi,ebx ; edi=tmp12
-
- mov edx, POINTER [esp+16] ; dataptr
-
- add edi,esi
- imul edi,(F_0_707) ; edi=z1
- descale edi,CONST_BITS
-
- lea ebx,[eax+ecx] ; ebx=data0
- sub eax,ecx ; eax=data4
- mov DCTELEM [COL(0,edx,SIZEOF_DCTELEM)], bx
- mov DCTELEM [COL(4,edx,SIZEOF_DCTELEM)], ax
-
- lea ecx,[esi+edi] ; ecx=data2
- sub esi,edi ; esi=data6
- mov DCTELEM [COL(2,edx,SIZEOF_DCTELEM)], cx
- mov DCTELEM [COL(6,edx,SIZEOF_DCTELEM)], si
-
- ; -- Odd part
-
- pop eax ; eax=tmp4
- pop edx ; edx=tmp5
- pop ebx ; ebx=tmp6
- pop edi ; edi=tmp7
-
- add eax,edx ; eax=tmp10
- add edx,ebx ; edx=tmp11
- add ebx,edi ; ebx=tmp12, edi=tmp7
-
- imul edx,(F_0_707) ; edx=z3
- descale edx,CONST_BITS
- lea esi,[edi+edx] ; esi=z11
- sub edi,edx ; edi=z13
-
- mov ecx,eax ; ecx=tmp10
- sub eax,ebx
- imul eax,(F_0_382) ; eax=z5
- imul ecx,(F_0_541) ; ecx=MULTIPLY(tmp10,FIX_0_541196100)
- imul ebx,(F_1_306) ; ebx=MULTIPLY(tmp12,FIX_1_306562965)
- descale eax,CONST_BITS
- descale ecx,CONST_BITS
- descale ebx,CONST_BITS
- add ecx,eax ; ecx=z2
- add ebx,eax ; ebx=z4
-
- pop edx ; dataptr
-
- lea eax,[edi+ecx] ; eax=data5
- sub edi,ecx ; edi=data3
- mov DCTELEM [COL(5,edx,SIZEOF_DCTELEM)], ax
- mov DCTELEM [COL(3,edx,SIZEOF_DCTELEM)], di
-
- lea ecx,[esi+ebx] ; ecx=data1
- sub esi,ebx ; esi=data7
- mov DCTELEM [COL(1,edx,SIZEOF_DCTELEM)], cx
- mov DCTELEM [COL(7,edx,SIZEOF_DCTELEM)], si
-
- pop ecx ; ctr
-
- add edx, byte SIZEOF_DCTELEM ; advance pointer to next column
- dec ecx
- jnz near .columnloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%endif ; DCT_IFAST_SUPPORTED
diff --git a/unused/jfdctfst.c b/jfdctfst.c
similarity index 100%
rename from unused/jfdctfst.c
rename to jfdctfst.c
diff --git a/jfdctint.asm b/jfdctint.asm
deleted file mode 100644
index 0f29725..0000000
--- a/jfdctint.asm
+++ /dev/null
@@ -1,342 +0,0 @@
-;
-; jfdctint.asm - accurate integer FDCT (non-SIMD)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a slow-but-accurate integer implementation of the
-; forward DCT (Discrete Cosine Transform). The following code is based
-; directly on the IJG's original jfdctint.c; see the jfdctint.c for
-; more details.
-;
-; Last Modified : October 17, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_ISLOW_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-; Descale and correctly round a DWORD value that's scaled by N bits.
-;
-%macro descale 2
-%if (%2)<=7
- add %1, byte (1<<((%2)-1)) ; add reg32,imm8
-%else
- add %1, (1<<((%2)-1)) ; add reg32,imm32
-%endif
- sar %1,%2
-%endmacro
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%if CONST_BITS == 13
-F_0_298 equ 2446 ; FIX(0.298631336)
-F_0_390 equ 3196 ; FIX(0.390180644)
-F_0_541 equ 4433 ; FIX(0.541196100)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_175 equ 9633 ; FIX(1.175875602)
-F_1_501 equ 12299 ; FIX(1.501321110)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_1_961 equ 16069 ; FIX(1.961570560)
-F_2_053 equ 16819 ; FIX(2.053119869)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_072 equ 25172 ; FIX(3.072711026)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_298 equ DESCALE( 320652955,30-CONST_BITS) ; FIX(0.298631336)
-F_0_390 equ DESCALE( 418953276,30-CONST_BITS) ; FIX(0.390180644)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_175 equ DESCALE(1262586813,30-CONST_BITS) ; FIX(1.175875602)
-F_1_501 equ DESCALE(1612031267,30-CONST_BITS) ; FIX(1.501321110)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_1_961 equ DESCALE(2106220350,30-CONST_BITS) ; FIX(1.961570560)
-F_2_053 equ DESCALE(2204520673,30-CONST_BITS) ; FIX(2.053119869)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_072 equ DESCALE(3299298341,30-CONST_BITS) ; FIX(3.072711026)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_islow (DCTELEM * data)
-;
-
-%define data(b) (b)+8 ; DCTELEM * data
-
- align 16
- global EXTN(jpeg_fdct_islow)
-
-EXTN(jpeg_fdct_islow):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- ; ---- Pass 1: process rows.
-
- mov edx, POINTER [data(ebp)] ; (DCTELEM *)
- mov ecx, DCTSIZE
- alignx 16,7
-.rowloop:
- movsx eax, DCTELEM [ROW(0,edx,SIZEOF_DCTELEM)]
- movsx edi, DCTELEM [ROW(7,edx,SIZEOF_DCTELEM)]
- lea esi,[eax+edi] ; esi=tmp0
- sub eax,edi ; eax=tmp7
- push ecx ; ctr
- push eax
-
- movsx ebx, DCTELEM [ROW(1,edx,SIZEOF_DCTELEM)]
- movsx ecx, DCTELEM [ROW(6,edx,SIZEOF_DCTELEM)]
- lea edi,[ebx+ecx] ; edi=tmp1
- sub ebx,ecx ; ebx=tmp6
- push ebx
-
- movsx eax, DCTELEM [ROW(2,edx,SIZEOF_DCTELEM)]
- movsx ecx, DCTELEM [ROW(5,edx,SIZEOF_DCTELEM)]
- lea ebx,[eax+ecx] ; ebx=tmp2
- sub eax,ecx ; eax=tmp5
- push edx ; dataptr
- push eax
-
- movsx ecx, DCTELEM [ROW(3,edx,SIZEOF_DCTELEM)]
- movsx eax, DCTELEM [ROW(4,edx,SIZEOF_DCTELEM)]
- lea edx,[ecx+eax] ; edx=tmp3
- sub ecx,eax ; ecx=tmp4
- push ecx
-
- ; -- Even part
-
- lea eax,[esi+edx] ; eax=tmp10
- lea ecx,[edi+ebx] ; ecx=tmp11
- sub esi,edx ; esi=tmp13
- sub edi,ebx ; edi=tmp12
-
- lea ebx,[eax+ecx] ; ebx=data0
- sub eax,ecx ; eax=data4
- mov edx, POINTER [esp+8] ; dataptr
- sal ebx, PASS1_BITS
- sal eax, PASS1_BITS
- mov DCTELEM [ROW(0,edx,SIZEOF_DCTELEM)], bx
- mov DCTELEM [ROW(4,edx,SIZEOF_DCTELEM)], ax
-
- lea ecx,[edi+esi]
- imul ecx,(F_0_541) ; ecx=z1
- imul esi,(F_0_765) ; esi=MULTIPLY(tmp13,FIX_0_765366865)
- imul edi,(-F_1_847) ; edi=MULTIPLY(tmp12,-FIX_1_847759065)
- add esi,ecx ; esi=data2
- add edi,ecx ; edi=data6
- descale esi,(CONST_BITS-PASS1_BITS)
- descale edi,(CONST_BITS-PASS1_BITS)
- mov DCTELEM [ROW(2,edx,SIZEOF_DCTELEM)], si
- mov DCTELEM [ROW(6,edx,SIZEOF_DCTELEM)], di
-
- ; -- Odd part
-
- mov eax, INT32 [esp] ; eax=tmp4
- mov ebx, INT32 [esp+4] ; ebx=tmp5
- mov ecx, INT32 [esp+12] ; ecx=tmp6
- mov esi, INT32 [esp+16] ; esi=tmp7
-
- lea edx,[eax+ecx] ; edx=z3
- lea edi,[ebx+esi] ; edi=z4
- add eax,esi ; eax=z1
- add ebx,ecx ; ebx=z2
-
- lea esi,[edx+edi]
- imul esi,(F_1_175) ; esi=z5
-
- imul edx,(-F_1_961) ; edx=z3(=MULTIPLY(z3,-FIX_1_961570560))
- imul edi,(-F_0_390) ; edi=z4(=MULTIPLY(z4,-FIX_0_390180644))
- imul eax,(-F_0_899) ; eax=z1(=MULTIPLY(z1,-FIX_0_899976223))
- imul ebx,(-F_2_562) ; ebx=z2(=MULTIPLY(z2,-FIX_2_562915447))
-
- add edx,esi ; edx=z3(=z3+z5)
- add edi,esi ; edi=z4(=z4+z5)
-
- lea ecx,[eax+edx] ; ecx=z1+z3
- lea esi,[ebx+edi] ; esi=z2+z4
- add eax,edi ; eax=z1+z4
- add ebx,edx ; ebx=z2+z3
-
- pop edx ; edx=tmp4
- pop edi ; edi=tmp5
- imul edx,(F_0_298) ; edx=tmp4(=MULTIPLY(tmp4,FIX_0_298631336))
- imul edi,(F_2_053) ; edi=tmp5(=MULTIPLY(tmp5,FIX_2_053119869))
- add ecx,edx ; ecx=data7(=tmp4+z1+z3)
- add esi,edi ; esi=data5(=tmp5+z2+z4)
- pop edx ; dataptr
- descale ecx,(CONST_BITS-PASS1_BITS)
- descale esi,(CONST_BITS-PASS1_BITS)
- mov DCTELEM [ROW(7,edx,SIZEOF_DCTELEM)], cx
- mov DCTELEM [ROW(5,edx,SIZEOF_DCTELEM)], si
-
- pop edi ; edi=tmp6
- pop ecx ; ecx=tmp7
- imul edi,(F_3_072) ; edi=tmp6(=MULTIPLY(tmp6,FIX_3_072711026))
- imul ecx,(F_1_501) ; ecx=tmp7(=MULTIPLY(tmp7,FIX_1_501321110))
- add ebx,edi ; ebx=data3(=tmp6+z2+z3)
- add eax,ecx ; eax=data1(=tmp7+z1+z4)
- pop ecx ; ctr
- descale ebx,(CONST_BITS-PASS1_BITS)
- descale eax,(CONST_BITS-PASS1_BITS)
- mov DCTELEM [ROW(3,edx,SIZEOF_DCTELEM)], bx
- mov DCTELEM [ROW(1,edx,SIZEOF_DCTELEM)], ax
-
- add edx, byte DCTSIZE*SIZEOF_DCTELEM
- dec ecx ; advance pointer to next row
- jnz near .rowloop
-
- ; ---- Pass 2: process columns.
-
- mov edx, POINTER [data(ebp)] ; (DCTELEM *)
- mov ecx, DCTSIZE
- alignx 16,7
-.columnloop:
- movsx eax, DCTELEM [COL(0,edx,SIZEOF_DCTELEM)]
- movsx edi, DCTELEM [COL(7,edx,SIZEOF_DCTELEM)]
- lea esi,[eax+edi] ; esi=tmp0
- sub eax,edi ; eax=tmp7
- push ecx ; ctr
- push eax
-
- movsx ebx, DCTELEM [COL(1,edx,SIZEOF_DCTELEM)]
- movsx ecx, DCTELEM [COL(6,edx,SIZEOF_DCTELEM)]
- lea edi,[ebx+ecx] ; edi=tmp1
- sub ebx,ecx ; ebx=tmp6
- push ebx
-
- movsx eax, DCTELEM [COL(2,edx,SIZEOF_DCTELEM)]
- movsx ecx, DCTELEM [COL(5,edx,SIZEOF_DCTELEM)]
- lea ebx,[eax+ecx] ; ebx=tmp2
- sub eax,ecx ; eax=tmp5
- push edx ; dataptr
- push eax
-
- movsx ecx, DCTELEM [COL(3,edx,SIZEOF_DCTELEM)]
- movsx eax, DCTELEM [COL(4,edx,SIZEOF_DCTELEM)]
- lea edx,[ecx+eax] ; edx=tmp3
- sub ecx,eax ; ecx=tmp4
- push ecx
-
- ; -- Even part
-
- lea eax,[esi+edx] ; eax=tmp10
- lea ecx,[edi+ebx] ; ecx=tmp11
- sub esi,edx ; esi=tmp13
- sub edi,ebx ; edi=tmp12
-
- lea ebx,[eax+ecx] ; ebx=data0
- sub eax,ecx ; eax=data4
- mov edx, POINTER [esp+8] ; dataptr
- descale ebx, PASS1_BITS
- descale eax, PASS1_BITS
- mov DCTELEM [COL(0,edx,SIZEOF_DCTELEM)], bx
- mov DCTELEM [COL(4,edx,SIZEOF_DCTELEM)], ax
-
- lea ecx,[edi+esi]
- imul ecx,(F_0_541) ; ecx=z1
- imul esi,(F_0_765) ; esi=MULTIPLY(tmp13,FIX_0_765366865)
- imul edi,(-F_1_847) ; edi=MULTIPLY(tmp12,-FIX_1_847759065)
- add esi,ecx ; esi=data2
- add edi,ecx ; edi=data6
- descale esi,(CONST_BITS+PASS1_BITS)
- descale edi,(CONST_BITS+PASS1_BITS)
- mov DCTELEM [COL(2,edx,SIZEOF_DCTELEM)], si
- mov DCTELEM [COL(6,edx,SIZEOF_DCTELEM)], di
-
- ; -- Odd part
-
- mov eax, INT32 [esp] ; eax=tmp4
- mov ebx, INT32 [esp+4] ; ebx=tmp5
- mov ecx, INT32 [esp+12] ; ecx=tmp6
- mov esi, INT32 [esp+16] ; esi=tmp7
-
- lea edx,[eax+ecx] ; edx=z3
- lea edi,[ebx+esi] ; edi=z4
- add eax,esi ; eax=z1
- add ebx,ecx ; ebx=z2
-
- lea esi,[edx+edi]
- imul esi,(F_1_175) ; esi=z5
-
- imul edx,(-F_1_961) ; edx=z3(=MULTIPLY(z3,-FIX_1_961570560))
- imul edi,(-F_0_390) ; edi=z4(=MULTIPLY(z4,-FIX_0_390180644))
- imul eax,(-F_0_899) ; eax=z1(=MULTIPLY(z1,-FIX_0_899976223))
- imul ebx,(-F_2_562) ; ebx=z2(=MULTIPLY(z2,-FIX_2_562915447))
-
- add edx,esi ; edx=z3(=z3+z5)
- add edi,esi ; edi=z4(=z4+z5)
-
- lea ecx,[eax+edx] ; ecx=z1+z3
- lea esi,[ebx+edi] ; esi=z2+z4
- add eax,edi ; eax=z1+z4
- add ebx,edx ; ebx=z2+z3
-
- pop edx ; edx=tmp4
- pop edi ; edi=tmp5
- imul edx,(F_0_298) ; edx=tmp4(=MULTIPLY(tmp4,FIX_0_298631336))
- imul edi,(F_2_053) ; edi=tmp5(=MULTIPLY(tmp5,FIX_2_053119869))
- add ecx,edx ; ecx=data7(=tmp4+z1+z3)
- add esi,edi ; esi=data5(=tmp5+z2+z4)
- pop edx ; dataptr
- descale ecx,(CONST_BITS+PASS1_BITS)
- descale esi,(CONST_BITS+PASS1_BITS)
- mov DCTELEM [COL(7,edx,SIZEOF_DCTELEM)], cx
- mov DCTELEM [COL(5,edx,SIZEOF_DCTELEM)], si
-
- pop edi ; edi=tmp6
- pop ecx ; ecx=tmp7
- imul edi,(F_3_072) ; edi=tmp6(=MULTIPLY(tmp6,FIX_3_072711026))
- imul ecx,(F_1_501) ; ecx=tmp7(=MULTIPLY(tmp7,FIX_1_501321110))
- add ebx,edi ; ebx=data3(=tmp6+z2+z3)
- add eax,ecx ; eax=data1(=tmp7+z1+z4)
- pop ecx ; ctr
- descale ebx,(CONST_BITS+PASS1_BITS)
- descale eax,(CONST_BITS+PASS1_BITS)
- mov DCTELEM [COL(3,edx,SIZEOF_DCTELEM)], bx
- mov DCTELEM [COL(1,edx,SIZEOF_DCTELEM)], ax
-
- add edx, byte SIZEOF_DCTELEM ; advance pointer to next column
- dec ecx
- jnz near .columnloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%endif ; DCT_ISLOW_SUPPORTED
diff --git a/unused/jfdctint.c b/jfdctint.c
similarity index 100%
rename from unused/jfdctint.c
rename to jfdctint.c
diff --git a/jfmmxfst.asm b/jfmmxfst.asm
deleted file mode 100644
index 2f8d53f..0000000
--- a/jfmmxfst.asm
+++ /dev/null
@@ -1,404 +0,0 @@
-;
-; jfmmxfst.asm - fast integer FDCT (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a fast, not so accurate integer implementation of
-; the forward DCT (Discrete Cosine Transform). The following code is
-; based directly on the IJG's original jfdctfst.c; see the jfdctfst.c
-; for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_IFAST_SUPPORTED
-%ifdef JFDCT_INT_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 8 ; 14 is also OK.
-
-%if CONST_BITS == 8
-F_0_382 equ 98 ; FIX(0.382683433)
-F_0_541 equ 139 ; FIX(0.541196100)
-F_0_707 equ 181 ; FIX(0.707106781)
-F_1_306 equ 334 ; FIX(1.306562965)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_382 equ DESCALE( 410903207,30-CONST_BITS) ; FIX(0.382683433)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_707 equ DESCALE( 759250124,30-CONST_BITS) ; FIX(0.707106781)
-F_1_306 equ DESCALE(1402911301,30-CONST_BITS) ; FIX(1.306562965)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
-; PRE_MULTIPLY_SCALE_BITS <= 2 (to avoid overflow)
-; CONST_BITS + CONST_SHIFT + PRE_MULTIPLY_SCALE_BITS == 16 (for pmulhw)
-
-%define PRE_MULTIPLY_SCALE_BITS 2
-%define CONST_SHIFT (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
-
- alignz 16
- global EXTN(jconst_fdct_ifast_mmx)
-
-EXTN(jconst_fdct_ifast_mmx):
-
-PW_F0707 times 4 dw F_0_707 << CONST_SHIFT
-PW_F0382 times 4 dw F_0_382 << CONST_SHIFT
-PW_F0541 times 4 dw F_0_541 << CONST_SHIFT
-PW_F1306 times 4 dw F_1_306 << CONST_SHIFT
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_ifast_mmx (DCTELEM * data)
-;
-
-%define data(b) (b)+8 ; DCTELEM * data
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 2
-
- align 16
- global EXTN(jpeg_fdct_ifast_mmx)
-
-EXTN(jpeg_fdct_ifast_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
-; push esi ; unused
-; push edi ; unused
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process rows.
-
- mov edx, POINTER [data(eax)] ; (DCTELEM *)
- mov ecx, DCTSIZE/4
- alignx 16,7
-.rowloop:
-
- movq mm0, MMWORD [MMBLOCK(2,0,edx,SIZEOF_DCTELEM)]
- movq mm1, MMWORD [MMBLOCK(3,0,edx,SIZEOF_DCTELEM)]
- movq mm2, MMWORD [MMBLOCK(2,1,edx,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(3,1,edx,SIZEOF_DCTELEM)]
-
- ; mm0=(20 21 22 23), mm2=(24 25 26 27)
- ; mm1=(30 31 32 33), mm3=(34 35 36 37)
-
- movq mm4,mm0 ; transpose coefficients(phase 1)
- punpcklwd mm0,mm1 ; mm0=(20 30 21 31)
- punpckhwd mm4,mm1 ; mm4=(22 32 23 33)
- movq mm5,mm2 ; transpose coefficients(phase 1)
- punpcklwd mm2,mm3 ; mm2=(24 34 25 35)
- punpckhwd mm5,mm3 ; mm5=(26 36 27 37)
-
- movq mm6, MMWORD [MMBLOCK(0,0,edx,SIZEOF_DCTELEM)]
- movq mm7, MMWORD [MMBLOCK(1,0,edx,SIZEOF_DCTELEM)]
- movq mm1, MMWORD [MMBLOCK(0,1,edx,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(1,1,edx,SIZEOF_DCTELEM)]
-
- ; mm6=(00 01 02 03), mm1=(04 05 06 07)
- ; mm7=(10 11 12 13), mm3=(14 15 16 17)
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=(22 32 23 33)
- movq MMWORD [wk(1)], mm2 ; wk(1)=(24 34 25 35)
-
- movq mm4,mm6 ; transpose coefficients(phase 1)
- punpcklwd mm6,mm7 ; mm6=(00 10 01 11)
- punpckhwd mm4,mm7 ; mm4=(02 12 03 13)
- movq mm2,mm1 ; transpose coefficients(phase 1)
- punpcklwd mm1,mm3 ; mm1=(04 14 05 15)
- punpckhwd mm2,mm3 ; mm2=(06 16 07 17)
-
- movq mm7,mm6 ; transpose coefficients(phase 2)
- punpckldq mm6,mm0 ; mm6=(00 10 20 30)=data0
- punpckhdq mm7,mm0 ; mm7=(01 11 21 31)=data1
- movq mm3,mm2 ; transpose coefficients(phase 2)
- punpckldq mm2,mm5 ; mm2=(06 16 26 36)=data6
- punpckhdq mm3,mm5 ; mm3=(07 17 27 37)=data7
-
- movq mm0,mm7
- movq mm5,mm6
- psubw mm7,mm2 ; mm7=data1-data6=tmp6
- psubw mm6,mm3 ; mm6=data0-data7=tmp7
- paddw mm0,mm2 ; mm0=data1+data6=tmp1
- paddw mm5,mm3 ; mm5=data0+data7=tmp0
-
- movq mm2, MMWORD [wk(0)] ; mm2=(22 32 23 33)
- movq mm3, MMWORD [wk(1)] ; mm3=(24 34 25 35)
- movq MMWORD [wk(0)], mm7 ; wk(0)=tmp6
- movq MMWORD [wk(1)], mm6 ; wk(1)=tmp7
-
- movq mm7,mm4 ; transpose coefficients(phase 2)
- punpckldq mm4,mm2 ; mm4=(02 12 22 32)=data2
- punpckhdq mm7,mm2 ; mm7=(03 13 23 33)=data3
- movq mm6,mm1 ; transpose coefficients(phase 2)
- punpckldq mm1,mm3 ; mm1=(04 14 24 34)=data4
- punpckhdq mm6,mm3 ; mm6=(05 15 25 35)=data5
-
- movq mm2,mm7
- movq mm3,mm4
- paddw mm7,mm1 ; mm7=data3+data4=tmp3
- paddw mm4,mm6 ; mm4=data2+data5=tmp2
- psubw mm2,mm1 ; mm2=data3-data4=tmp4
- psubw mm3,mm6 ; mm3=data2-data5=tmp5
-
- ; -- Even part
-
- movq mm1,mm5
- movq mm6,mm0
- psubw mm5,mm7 ; mm5=tmp13
- psubw mm0,mm4 ; mm0=tmp12
- paddw mm1,mm7 ; mm1=tmp10
- paddw mm6,mm4 ; mm6=tmp11
-
- paddw mm0,mm5
- psllw mm0,PRE_MULTIPLY_SCALE_BITS
- pmulhw mm0,[GOTOFF(ebx,PW_F0707)] ; mm0=z1
-
- movq mm7,mm1
- movq mm4,mm5
- psubw mm1,mm6 ; mm1=data4
- psubw mm5,mm0 ; mm5=data6
- paddw mm7,mm6 ; mm7=data0
- paddw mm4,mm0 ; mm4=data2
-
- movq MMWORD [MMBLOCK(0,1,edx,SIZEOF_DCTELEM)], mm1
- movq MMWORD [MMBLOCK(2,1,edx,SIZEOF_DCTELEM)], mm5
- movq MMWORD [MMBLOCK(0,0,edx,SIZEOF_DCTELEM)], mm7
- movq MMWORD [MMBLOCK(2,0,edx,SIZEOF_DCTELEM)], mm4
-
- ; -- Odd part
-
- movq mm6, MMWORD [wk(0)] ; mm6=tmp6
- movq mm0, MMWORD [wk(1)] ; mm0=tmp7
-
- paddw mm2,mm3 ; mm2=tmp10
- paddw mm3,mm6 ; mm3=tmp11
- paddw mm6,mm0 ; mm6=tmp12, mm0=tmp7
-
- psllw mm2,PRE_MULTIPLY_SCALE_BITS
- psllw mm6,PRE_MULTIPLY_SCALE_BITS
-
- psllw mm3,PRE_MULTIPLY_SCALE_BITS
- pmulhw mm3,[GOTOFF(ebx,PW_F0707)] ; mm3=z3
-
- movq mm1,mm2 ; mm1=tmp10
- psubw mm2,mm6
- pmulhw mm2,[GOTOFF(ebx,PW_F0382)] ; mm2=z5
- pmulhw mm1,[GOTOFF(ebx,PW_F0541)] ; mm1=MULTIPLY(tmp10,FIX_0_54119610)
- pmulhw mm6,[GOTOFF(ebx,PW_F1306)] ; mm6=MULTIPLY(tmp12,FIX_1_30656296)
- paddw mm1,mm2 ; mm1=z2
- paddw mm6,mm2 ; mm6=z4
-
- movq mm5,mm0
- psubw mm0,mm3 ; mm0=z13
- paddw mm5,mm3 ; mm5=z11
-
- movq mm7,mm0
- movq mm4,mm5
- psubw mm0,mm1 ; mm0=data3
- psubw mm5,mm6 ; mm5=data7
- paddw mm7,mm1 ; mm7=data5
- paddw mm4,mm6 ; mm4=data1
-
- movq MMWORD [MMBLOCK(3,0,edx,SIZEOF_DCTELEM)], mm0
- movq MMWORD [MMBLOCK(3,1,edx,SIZEOF_DCTELEM)], mm5
- movq MMWORD [MMBLOCK(1,1,edx,SIZEOF_DCTELEM)], mm7
- movq MMWORD [MMBLOCK(1,0,edx,SIZEOF_DCTELEM)], mm4
-
- add edx, byte 4*DCTSIZE*SIZEOF_DCTELEM
- dec ecx
- jnz near .rowloop
-
- ; ---- Pass 2: process columns.
-
- mov edx, POINTER [data(eax)] ; (DCTELEM *)
- mov ecx, DCTSIZE/4
- alignx 16,7
-.columnloop:
-
- movq mm0, MMWORD [MMBLOCK(2,0,edx,SIZEOF_DCTELEM)]
- movq mm1, MMWORD [MMBLOCK(3,0,edx,SIZEOF_DCTELEM)]
- movq mm2, MMWORD [MMBLOCK(6,0,edx,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(7,0,edx,SIZEOF_DCTELEM)]
-
- ; mm0=(02 12 22 32), mm2=(42 52 62 72)
- ; mm1=(03 13 23 33), mm3=(43 53 63 73)
-
- movq mm4,mm0 ; transpose coefficients(phase 1)
- punpcklwd mm0,mm1 ; mm0=(02 03 12 13)
- punpckhwd mm4,mm1 ; mm4=(22 23 32 33)
- movq mm5,mm2 ; transpose coefficients(phase 1)
- punpcklwd mm2,mm3 ; mm2=(42 43 52 53)
- punpckhwd mm5,mm3 ; mm5=(62 63 72 73)
-
- movq mm6, MMWORD [MMBLOCK(0,0,edx,SIZEOF_DCTELEM)]
- movq mm7, MMWORD [MMBLOCK(1,0,edx,SIZEOF_DCTELEM)]
- movq mm1, MMWORD [MMBLOCK(4,0,edx,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(5,0,edx,SIZEOF_DCTELEM)]
-
- ; mm6=(00 10 20 30), mm1=(40 50 60 70)
- ; mm7=(01 11 21 31), mm3=(41 51 61 71)
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=(22 23 32 33)
- movq MMWORD [wk(1)], mm2 ; wk(1)=(42 43 52 53)
-
- movq mm4,mm6 ; transpose coefficients(phase 1)
- punpcklwd mm6,mm7 ; mm6=(00 01 10 11)
- punpckhwd mm4,mm7 ; mm4=(20 21 30 31)
- movq mm2,mm1 ; transpose coefficients(phase 1)
- punpcklwd mm1,mm3 ; mm1=(40 41 50 51)
- punpckhwd mm2,mm3 ; mm2=(60 61 70 71)
-
- movq mm7,mm6 ; transpose coefficients(phase 2)
- punpckldq mm6,mm0 ; mm6=(00 01 02 03)=data0
- punpckhdq mm7,mm0 ; mm7=(10 11 12 13)=data1
- movq mm3,mm2 ; transpose coefficients(phase 2)
- punpckldq mm2,mm5 ; mm2=(60 61 62 63)=data6
- punpckhdq mm3,mm5 ; mm3=(70 71 72 73)=data7
-
- movq mm0,mm7
- movq mm5,mm6
- psubw mm7,mm2 ; mm7=data1-data6=tmp6
- psubw mm6,mm3 ; mm6=data0-data7=tmp7
- paddw mm0,mm2 ; mm0=data1+data6=tmp1
- paddw mm5,mm3 ; mm5=data0+data7=tmp0
-
- movq mm2, MMWORD [wk(0)] ; mm2=(22 23 32 33)
- movq mm3, MMWORD [wk(1)] ; mm3=(42 43 52 53)
- movq MMWORD [wk(0)], mm7 ; wk(0)=tmp6
- movq MMWORD [wk(1)], mm6 ; wk(1)=tmp7
-
- movq mm7,mm4 ; transpose coefficients(phase 2)
- punpckldq mm4,mm2 ; mm4=(20 21 22 23)=data2
- punpckhdq mm7,mm2 ; mm7=(30 31 32 33)=data3
- movq mm6,mm1 ; transpose coefficients(phase 2)
- punpckldq mm1,mm3 ; mm1=(40 41 42 43)=data4
- punpckhdq mm6,mm3 ; mm6=(50 51 52 53)=data5
-
- movq mm2,mm7
- movq mm3,mm4
- paddw mm7,mm1 ; mm7=data3+data4=tmp3
- paddw mm4,mm6 ; mm4=data2+data5=tmp2
- psubw mm2,mm1 ; mm2=data3-data4=tmp4
- psubw mm3,mm6 ; mm3=data2-data5=tmp5
-
- ; -- Even part
-
- movq mm1,mm5
- movq mm6,mm0
- psubw mm5,mm7 ; mm5=tmp13
- psubw mm0,mm4 ; mm0=tmp12
- paddw mm1,mm7 ; mm1=tmp10
- paddw mm6,mm4 ; mm6=tmp11
-
- paddw mm0,mm5
- psllw mm0,PRE_MULTIPLY_SCALE_BITS
- pmulhw mm0,[GOTOFF(ebx,PW_F0707)] ; mm0=z1
-
- movq mm7,mm1
- movq mm4,mm5
- psubw mm1,mm6 ; mm1=data4
- psubw mm5,mm0 ; mm5=data6
- paddw mm7,mm6 ; mm7=data0
- paddw mm4,mm0 ; mm4=data2
-
- movq MMWORD [MMBLOCK(4,0,edx,SIZEOF_DCTELEM)], mm1
- movq MMWORD [MMBLOCK(6,0,edx,SIZEOF_DCTELEM)], mm5
- movq MMWORD [MMBLOCK(0,0,edx,SIZEOF_DCTELEM)], mm7
- movq MMWORD [MMBLOCK(2,0,edx,SIZEOF_DCTELEM)], mm4
-
- ; -- Odd part
-
- movq mm6, MMWORD [wk(0)] ; mm6=tmp6
- movq mm0, MMWORD [wk(1)] ; mm0=tmp7
-
- paddw mm2,mm3 ; mm2=tmp10
- paddw mm3,mm6 ; mm3=tmp11
- paddw mm6,mm0 ; mm6=tmp12, mm0=tmp7
-
- psllw mm2,PRE_MULTIPLY_SCALE_BITS
- psllw mm6,PRE_MULTIPLY_SCALE_BITS
-
- psllw mm3,PRE_MULTIPLY_SCALE_BITS
- pmulhw mm3,[GOTOFF(ebx,PW_F0707)] ; mm3=z3
-
- movq mm1,mm2 ; mm1=tmp10
- psubw mm2,mm6
- pmulhw mm2,[GOTOFF(ebx,PW_F0382)] ; mm2=z5
- pmulhw mm1,[GOTOFF(ebx,PW_F0541)] ; mm1=MULTIPLY(tmp10,FIX_0_54119610)
- pmulhw mm6,[GOTOFF(ebx,PW_F1306)] ; mm6=MULTIPLY(tmp12,FIX_1_30656296)
- paddw mm1,mm2 ; mm1=z2
- paddw mm6,mm2 ; mm6=z4
-
- movq mm5,mm0
- psubw mm0,mm3 ; mm0=z13
- paddw mm5,mm3 ; mm5=z11
-
- movq mm7,mm0
- movq mm4,mm5
- psubw mm0,mm1 ; mm0=data3
- psubw mm5,mm6 ; mm5=data7
- paddw mm7,mm1 ; mm7=data5
- paddw mm4,mm6 ; mm4=data1
-
- movq MMWORD [MMBLOCK(3,0,edx,SIZEOF_DCTELEM)], mm0
- movq MMWORD [MMBLOCK(7,0,edx,SIZEOF_DCTELEM)], mm5
- movq MMWORD [MMBLOCK(5,0,edx,SIZEOF_DCTELEM)], mm7
- movq MMWORD [MMBLOCK(1,0,edx,SIZEOF_DCTELEM)], mm4
-
- add edx, byte 4*SIZEOF_DCTELEM
- dec ecx
- jnz near .columnloop
-
- emms ; empty MMX state
-
-; pop edi ; unused
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JFDCT_INT_MMX_SUPPORTED
-%endif ; DCT_IFAST_SUPPORTED
diff --git a/jfmmxint.asm b/jfmmxint.asm
deleted file mode 100644
index afe47fd..0000000
--- a/jfmmxint.asm
+++ /dev/null
@@ -1,629 +0,0 @@
-;
-; jfmmxint.asm - accurate integer FDCT (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a slow-but-accurate integer implementation of the
-; forward DCT (Discrete Cosine Transform). The following code is based
-; directly on the IJG's original jfdctint.c; see the jfdctint.c for
-; more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_ISLOW_SUPPORTED
-%ifdef JFDCT_INT_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%define DESCALE_P1 (CONST_BITS-PASS1_BITS)
-%define DESCALE_P2 (CONST_BITS+PASS1_BITS)
-
-%if CONST_BITS == 13
-F_0_298 equ 2446 ; FIX(0.298631336)
-F_0_390 equ 3196 ; FIX(0.390180644)
-F_0_541 equ 4433 ; FIX(0.541196100)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_175 equ 9633 ; FIX(1.175875602)
-F_1_501 equ 12299 ; FIX(1.501321110)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_1_961 equ 16069 ; FIX(1.961570560)
-F_2_053 equ 16819 ; FIX(2.053119869)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_072 equ 25172 ; FIX(3.072711026)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_298 equ DESCALE( 320652955,30-CONST_BITS) ; FIX(0.298631336)
-F_0_390 equ DESCALE( 418953276,30-CONST_BITS) ; FIX(0.390180644)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_175 equ DESCALE(1262586813,30-CONST_BITS) ; FIX(1.175875602)
-F_1_501 equ DESCALE(1612031267,30-CONST_BITS) ; FIX(1.501321110)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_1_961 equ DESCALE(2106220350,30-CONST_BITS) ; FIX(1.961570560)
-F_2_053 equ DESCALE(2204520673,30-CONST_BITS) ; FIX(2.053119869)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_072 equ DESCALE(3299298341,30-CONST_BITS) ; FIX(3.072711026)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_fdct_islow_mmx)
-
-EXTN(jconst_fdct_islow_mmx):
-
-PW_F130_F054 times 2 dw (F_0_541+F_0_765), F_0_541
-PW_F054_MF130 times 2 dw F_0_541, (F_0_541-F_1_847)
-PW_MF078_F117 times 2 dw (F_1_175-F_1_961), F_1_175
-PW_F117_F078 times 2 dw F_1_175, (F_1_175-F_0_390)
-PW_MF060_MF089 times 2 dw (F_0_298-F_0_899),-F_0_899
-PW_MF089_F060 times 2 dw -F_0_899, (F_1_501-F_0_899)
-PW_MF050_MF256 times 2 dw (F_2_053-F_2_562),-F_2_562
-PW_MF256_F050 times 2 dw -F_2_562, (F_3_072-F_2_562)
-PD_DESCALE_P1 times 2 dd 1 << (DESCALE_P1-1)
-PD_DESCALE_P2 times 2 dd 1 << (DESCALE_P2-1)
-PW_DESCALE_P2X times 4 dw 1 << (PASS1_BITS-1)
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_islow_mmx (DCTELEM * data)
-;
-
-%define data(b) (b)+8 ; DCTELEM * data
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 2
-
- align 16
- global EXTN(jpeg_fdct_islow_mmx)
-
-EXTN(jpeg_fdct_islow_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
-; push esi ; unused
-; push edi ; unused
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process rows.
-
- mov edx, POINTER [data(eax)] ; (DCTELEM *)
- mov ecx, DCTSIZE/4
- alignx 16,7
-.rowloop:
-
- movq mm0, MMWORD [MMBLOCK(2,0,edx,SIZEOF_DCTELEM)]
- movq mm1, MMWORD [MMBLOCK(3,0,edx,SIZEOF_DCTELEM)]
- movq mm2, MMWORD [MMBLOCK(2,1,edx,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(3,1,edx,SIZEOF_DCTELEM)]
-
- ; mm0=(20 21 22 23), mm2=(24 25 26 27)
- ; mm1=(30 31 32 33), mm3=(34 35 36 37)
-
- movq mm4,mm0 ; transpose coefficients(phase 1)
- punpcklwd mm0,mm1 ; mm0=(20 30 21 31)
- punpckhwd mm4,mm1 ; mm4=(22 32 23 33)
- movq mm5,mm2 ; transpose coefficients(phase 1)
- punpcklwd mm2,mm3 ; mm2=(24 34 25 35)
- punpckhwd mm5,mm3 ; mm5=(26 36 27 37)
-
- movq mm6, MMWORD [MMBLOCK(0,0,edx,SIZEOF_DCTELEM)]
- movq mm7, MMWORD [MMBLOCK(1,0,edx,SIZEOF_DCTELEM)]
- movq mm1, MMWORD [MMBLOCK(0,1,edx,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(1,1,edx,SIZEOF_DCTELEM)]
-
- ; mm6=(00 01 02 03), mm1=(04 05 06 07)
- ; mm7=(10 11 12 13), mm3=(14 15 16 17)
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=(22 32 23 33)
- movq MMWORD [wk(1)], mm2 ; wk(1)=(24 34 25 35)
-
- movq mm4,mm6 ; transpose coefficients(phase 1)
- punpcklwd mm6,mm7 ; mm6=(00 10 01 11)
- punpckhwd mm4,mm7 ; mm4=(02 12 03 13)
- movq mm2,mm1 ; transpose coefficients(phase 1)
- punpcklwd mm1,mm3 ; mm1=(04 14 05 15)
- punpckhwd mm2,mm3 ; mm2=(06 16 07 17)
-
- movq mm7,mm6 ; transpose coefficients(phase 2)
- punpckldq mm6,mm0 ; mm6=(00 10 20 30)=data0
- punpckhdq mm7,mm0 ; mm7=(01 11 21 31)=data1
- movq mm3,mm2 ; transpose coefficients(phase 2)
- punpckldq mm2,mm5 ; mm2=(06 16 26 36)=data6
- punpckhdq mm3,mm5 ; mm3=(07 17 27 37)=data7
-
- movq mm0,mm7
- movq mm5,mm6
- psubw mm7,mm2 ; mm7=data1-data6=tmp6
- psubw mm6,mm3 ; mm6=data0-data7=tmp7
- paddw mm0,mm2 ; mm0=data1+data6=tmp1
- paddw mm5,mm3 ; mm5=data0+data7=tmp0
-
- movq mm2, MMWORD [wk(0)] ; mm2=(22 32 23 33)
- movq mm3, MMWORD [wk(1)] ; mm3=(24 34 25 35)
- movq MMWORD [wk(0)], mm7 ; wk(0)=tmp6
- movq MMWORD [wk(1)], mm6 ; wk(1)=tmp7
-
- movq mm7,mm4 ; transpose coefficients(phase 2)
- punpckldq mm4,mm2 ; mm4=(02 12 22 32)=data2
- punpckhdq mm7,mm2 ; mm7=(03 13 23 33)=data3
- movq mm6,mm1 ; transpose coefficients(phase 2)
- punpckldq mm1,mm3 ; mm1=(04 14 24 34)=data4
- punpckhdq mm6,mm3 ; mm6=(05 15 25 35)=data5
-
- movq mm2,mm7
- movq mm3,mm4
- paddw mm7,mm1 ; mm7=data3+data4=tmp3
- paddw mm4,mm6 ; mm4=data2+data5=tmp2
- psubw mm2,mm1 ; mm2=data3-data4=tmp4
- psubw mm3,mm6 ; mm3=data2-data5=tmp5
-
- ; -- Even part
-
- movq mm1,mm5
- movq mm6,mm0
- paddw mm5,mm7 ; mm5=tmp10
- paddw mm0,mm4 ; mm0=tmp11
- psubw mm1,mm7 ; mm1=tmp13
- psubw mm6,mm4 ; mm6=tmp12
-
- movq mm7,mm5
- paddw mm5,mm0 ; mm5=tmp10+tmp11
- psubw mm7,mm0 ; mm7=tmp10-tmp11
-
- psllw mm5,PASS1_BITS ; mm5=data0
- psllw mm7,PASS1_BITS ; mm7=data4
-
- movq MMWORD [MMBLOCK(0,0,edx,SIZEOF_DCTELEM)], mm5
- movq MMWORD [MMBLOCK(0,1,edx,SIZEOF_DCTELEM)], mm7
-
- ; (Original)
- ; z1 = (tmp12 + tmp13) * 0.541196100;
- ; data2 = z1 + tmp13 * 0.765366865;
- ; data6 = z1 + tmp12 * -1.847759065;
- ;
- ; (This implementation)
- ; data2 = tmp13 * (0.541196100 + 0.765366865) + tmp12 * 0.541196100;
- ; data6 = tmp13 * 0.541196100 + tmp12 * (0.541196100 - 1.847759065);
-
- movq mm4,mm1 ; mm1=tmp13
- movq mm0,mm1
- punpcklwd mm4,mm6 ; mm6=tmp12
- punpckhwd mm0,mm6
- movq mm1,mm4
- movq mm6,mm0
- pmaddwd mm4,[GOTOFF(ebx,PW_F130_F054)] ; mm4=data2L
- pmaddwd mm0,[GOTOFF(ebx,PW_F130_F054)] ; mm0=data2H
- pmaddwd mm1,[GOTOFF(ebx,PW_F054_MF130)] ; mm1=data6L
- pmaddwd mm6,[GOTOFF(ebx,PW_F054_MF130)] ; mm6=data6H
-
- paddd mm4,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd mm0,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad mm4,DESCALE_P1
- psrad mm0,DESCALE_P1
- paddd mm1,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd mm6,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad mm1,DESCALE_P1
- psrad mm6,DESCALE_P1
-
- packssdw mm4,mm0 ; mm4=data2
- packssdw mm1,mm6 ; mm1=data6
-
- movq MMWORD [MMBLOCK(2,0,edx,SIZEOF_DCTELEM)], mm4
- movq MMWORD [MMBLOCK(2,1,edx,SIZEOF_DCTELEM)], mm1
-
- ; -- Odd part
-
- movq mm5, MMWORD [wk(0)] ; mm5=tmp6
- movq mm7, MMWORD [wk(1)] ; mm7=tmp7
-
- movq mm0,mm2 ; mm2=tmp4
- movq mm6,mm3 ; mm3=tmp5
- paddw mm0,mm5 ; mm0=z3
- paddw mm6,mm7 ; mm6=z4
-
- ; (Original)
- ; z5 = (z3 + z4) * 1.175875602;
- ; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
- ; z3 += z5; z4 += z5;
- ;
- ; (This implementation)
- ; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
- ; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
-
- movq mm4,mm0
- movq mm1,mm0
- punpcklwd mm4,mm6
- punpckhwd mm1,mm6
- movq mm0,mm4
- movq mm6,mm1
- pmaddwd mm4,[GOTOFF(ebx,PW_MF078_F117)] ; mm4=z3L
- pmaddwd mm1,[GOTOFF(ebx,PW_MF078_F117)] ; mm1=z3H
- pmaddwd mm0,[GOTOFF(ebx,PW_F117_F078)] ; mm0=z4L
- pmaddwd mm6,[GOTOFF(ebx,PW_F117_F078)] ; mm6=z4H
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=z3L
- movq MMWORD [wk(1)], mm1 ; wk(1)=z3H
-
- ; (Original)
- ; z1 = tmp4 + tmp7; z2 = tmp5 + tmp6;
- ; tmp4 = tmp4 * 0.298631336; tmp5 = tmp5 * 2.053119869;
- ; tmp6 = tmp6 * 3.072711026; tmp7 = tmp7 * 1.501321110;
- ; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
- ; data7 = tmp4 + z1 + z3; data5 = tmp5 + z2 + z4;
- ; data3 = tmp6 + z2 + z3; data1 = tmp7 + z1 + z4;
- ;
- ; (This implementation)
- ; tmp4 = tmp4 * (0.298631336 - 0.899976223) + tmp7 * -0.899976223;
- ; tmp5 = tmp5 * (2.053119869 - 2.562915447) + tmp6 * -2.562915447;
- ; tmp6 = tmp5 * -2.562915447 + tmp6 * (3.072711026 - 2.562915447);
- ; tmp7 = tmp4 * -0.899976223 + tmp7 * (1.501321110 - 0.899976223);
- ; data7 = tmp4 + z3; data5 = tmp5 + z4;
- ; data3 = tmp6 + z3; data1 = tmp7 + z4;
-
- movq mm4,mm2
- movq mm1,mm2
- punpcklwd mm4,mm7
- punpckhwd mm1,mm7
- movq mm2,mm4
- movq mm7,mm1
- pmaddwd mm4,[GOTOFF(ebx,PW_MF060_MF089)] ; mm4=tmp4L
- pmaddwd mm1,[GOTOFF(ebx,PW_MF060_MF089)] ; mm1=tmp4H
- pmaddwd mm2,[GOTOFF(ebx,PW_MF089_F060)] ; mm2=tmp7L
- pmaddwd mm7,[GOTOFF(ebx,PW_MF089_F060)] ; mm7=tmp7H
-
- paddd mm4, MMWORD [wk(0)] ; mm4=data7L
- paddd mm1, MMWORD [wk(1)] ; mm1=data7H
- paddd mm2,mm0 ; mm2=data1L
- paddd mm7,mm6 ; mm7=data1H
-
- paddd mm4,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd mm1,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad mm4,DESCALE_P1
- psrad mm1,DESCALE_P1
- paddd mm2,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd mm7,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad mm2,DESCALE_P1
- psrad mm7,DESCALE_P1
-
- packssdw mm4,mm1 ; mm4=data7
- packssdw mm2,mm7 ; mm2=data1
-
- movq MMWORD [MMBLOCK(3,1,edx,SIZEOF_DCTELEM)], mm4
- movq MMWORD [MMBLOCK(1,0,edx,SIZEOF_DCTELEM)], mm2
-
- movq mm1,mm3
- movq mm7,mm3
- punpcklwd mm1,mm5
- punpckhwd mm7,mm5
- movq mm3,mm1
- movq mm5,mm7
- pmaddwd mm1,[GOTOFF(ebx,PW_MF050_MF256)] ; mm1=tmp5L
- pmaddwd mm7,[GOTOFF(ebx,PW_MF050_MF256)] ; mm7=tmp5H
- pmaddwd mm3,[GOTOFF(ebx,PW_MF256_F050)] ; mm3=tmp6L
- pmaddwd mm5,[GOTOFF(ebx,PW_MF256_F050)] ; mm5=tmp6H
-
- paddd mm1,mm0 ; mm1=data5L
- paddd mm7,mm6 ; mm7=data5H
- paddd mm3, MMWORD [wk(0)] ; mm3=data3L
- paddd mm5, MMWORD [wk(1)] ; mm5=data3H
-
- paddd mm1,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd mm7,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad mm1,DESCALE_P1
- psrad mm7,DESCALE_P1
- paddd mm3,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd mm5,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad mm3,DESCALE_P1
- psrad mm5,DESCALE_P1
-
- packssdw mm1,mm7 ; mm1=data5
- packssdw mm3,mm5 ; mm3=data3
-
- movq MMWORD [MMBLOCK(1,1,edx,SIZEOF_DCTELEM)], mm1
- movq MMWORD [MMBLOCK(3,0,edx,SIZEOF_DCTELEM)], mm3
-
- add edx, byte 4*DCTSIZE*SIZEOF_DCTELEM
- dec ecx
- jnz near .rowloop
-
- ; ---- Pass 2: process columns.
-
- mov edx, POINTER [data(eax)] ; (DCTELEM *)
- mov ecx, DCTSIZE/4
- alignx 16,7
-.columnloop:
-
- movq mm0, MMWORD [MMBLOCK(2,0,edx,SIZEOF_DCTELEM)]
- movq mm1, MMWORD [MMBLOCK(3,0,edx,SIZEOF_DCTELEM)]
- movq mm2, MMWORD [MMBLOCK(6,0,edx,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(7,0,edx,SIZEOF_DCTELEM)]
-
- ; mm0=(02 12 22 32), mm2=(42 52 62 72)
- ; mm1=(03 13 23 33), mm3=(43 53 63 73)
-
- movq mm4,mm0 ; transpose coefficients(phase 1)
- punpcklwd mm0,mm1 ; mm0=(02 03 12 13)
- punpckhwd mm4,mm1 ; mm4=(22 23 32 33)
- movq mm5,mm2 ; transpose coefficients(phase 1)
- punpcklwd mm2,mm3 ; mm2=(42 43 52 53)
- punpckhwd mm5,mm3 ; mm5=(62 63 72 73)
-
- movq mm6, MMWORD [MMBLOCK(0,0,edx,SIZEOF_DCTELEM)]
- movq mm7, MMWORD [MMBLOCK(1,0,edx,SIZEOF_DCTELEM)]
- movq mm1, MMWORD [MMBLOCK(4,0,edx,SIZEOF_DCTELEM)]
- movq mm3, MMWORD [MMBLOCK(5,0,edx,SIZEOF_DCTELEM)]
-
- ; mm6=(00 10 20 30), mm1=(40 50 60 70)
- ; mm7=(01 11 21 31), mm3=(41 51 61 71)
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=(22 23 32 33)
- movq MMWORD [wk(1)], mm2 ; wk(1)=(42 43 52 53)
-
- movq mm4,mm6 ; transpose coefficients(phase 1)
- punpcklwd mm6,mm7 ; mm6=(00 01 10 11)
- punpckhwd mm4,mm7 ; mm4=(20 21 30 31)
- movq mm2,mm1 ; transpose coefficients(phase 1)
- punpcklwd mm1,mm3 ; mm1=(40 41 50 51)
- punpckhwd mm2,mm3 ; mm2=(60 61 70 71)
-
- movq mm7,mm6 ; transpose coefficients(phase 2)
- punpckldq mm6,mm0 ; mm6=(00 01 02 03)=data0
- punpckhdq mm7,mm0 ; mm7=(10 11 12 13)=data1
- movq mm3,mm2 ; transpose coefficients(phase 2)
- punpckldq mm2,mm5 ; mm2=(60 61 62 63)=data6
- punpckhdq mm3,mm5 ; mm3=(70 71 72 73)=data7
-
- movq mm0,mm7
- movq mm5,mm6
- psubw mm7,mm2 ; mm7=data1-data6=tmp6
- psubw mm6,mm3 ; mm6=data0-data7=tmp7
- paddw mm0,mm2 ; mm0=data1+data6=tmp1
- paddw mm5,mm3 ; mm5=data0+data7=tmp0
-
- movq mm2, MMWORD [wk(0)] ; mm2=(22 23 32 33)
- movq mm3, MMWORD [wk(1)] ; mm3=(42 43 52 53)
- movq MMWORD [wk(0)], mm7 ; wk(0)=tmp6
- movq MMWORD [wk(1)], mm6 ; wk(1)=tmp7
-
- movq mm7,mm4 ; transpose coefficients(phase 2)
- punpckldq mm4,mm2 ; mm4=(20 21 22 23)=data2
- punpckhdq mm7,mm2 ; mm7=(30 31 32 33)=data3
- movq mm6,mm1 ; transpose coefficients(phase 2)
- punpckldq mm1,mm3 ; mm1=(40 41 42 43)=data4
- punpckhdq mm6,mm3 ; mm6=(50 51 52 53)=data5
-
- movq mm2,mm7
- movq mm3,mm4
- paddw mm7,mm1 ; mm7=data3+data4=tmp3
- paddw mm4,mm6 ; mm4=data2+data5=tmp2
- psubw mm2,mm1 ; mm2=data3-data4=tmp4
- psubw mm3,mm6 ; mm3=data2-data5=tmp5
-
- ; -- Even part
-
- movq mm1,mm5
- movq mm6,mm0
- paddw mm5,mm7 ; mm5=tmp10
- paddw mm0,mm4 ; mm0=tmp11
- psubw mm1,mm7 ; mm1=tmp13
- psubw mm6,mm4 ; mm6=tmp12
-
- movq mm7,mm5
- paddw mm5,mm0 ; mm5=tmp10+tmp11
- psubw mm7,mm0 ; mm7=tmp10-tmp11
-
- paddw mm5,[GOTOFF(ebx,PW_DESCALE_P2X)]
- paddw mm7,[GOTOFF(ebx,PW_DESCALE_P2X)]
- psraw mm5,PASS1_BITS ; mm5=data0
- psraw mm7,PASS1_BITS ; mm7=data4
-
- movq MMWORD [MMBLOCK(0,0,edx,SIZEOF_DCTELEM)], mm5
- movq MMWORD [MMBLOCK(4,0,edx,SIZEOF_DCTELEM)], mm7
-
- ; (Original)
- ; z1 = (tmp12 + tmp13) * 0.541196100;
- ; data2 = z1 + tmp13 * 0.765366865;
- ; data6 = z1 + tmp12 * -1.847759065;
- ;
- ; (This implementation)
- ; data2 = tmp13 * (0.541196100 + 0.765366865) + tmp12 * 0.541196100;
- ; data6 = tmp13 * 0.541196100 + tmp12 * (0.541196100 - 1.847759065);
-
- movq mm4,mm1 ; mm1=tmp13
- movq mm0,mm1
- punpcklwd mm4,mm6 ; mm6=tmp12
- punpckhwd mm0,mm6
- movq mm1,mm4
- movq mm6,mm0
- pmaddwd mm4,[GOTOFF(ebx,PW_F130_F054)] ; mm4=data2L
- pmaddwd mm0,[GOTOFF(ebx,PW_F130_F054)] ; mm0=data2H
- pmaddwd mm1,[GOTOFF(ebx,PW_F054_MF130)] ; mm1=data6L
- pmaddwd mm6,[GOTOFF(ebx,PW_F054_MF130)] ; mm6=data6H
-
- paddd mm4,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd mm0,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad mm4,DESCALE_P2
- psrad mm0,DESCALE_P2
- paddd mm1,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd mm6,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad mm1,DESCALE_P2
- psrad mm6,DESCALE_P2
-
- packssdw mm4,mm0 ; mm4=data2
- packssdw mm1,mm6 ; mm1=data6
-
- movq MMWORD [MMBLOCK(2,0,edx,SIZEOF_DCTELEM)], mm4
- movq MMWORD [MMBLOCK(6,0,edx,SIZEOF_DCTELEM)], mm1
-
- ; -- Odd part
-
- movq mm5, MMWORD [wk(0)] ; mm5=tmp6
- movq mm7, MMWORD [wk(1)] ; mm7=tmp7
-
- movq mm0,mm2 ; mm2=tmp4
- movq mm6,mm3 ; mm3=tmp5
- paddw mm0,mm5 ; mm0=z3
- paddw mm6,mm7 ; mm6=z4
-
- ; (Original)
- ; z5 = (z3 + z4) * 1.175875602;
- ; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
- ; z3 += z5; z4 += z5;
- ;
- ; (This implementation)
- ; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
- ; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
-
- movq mm4,mm0
- movq mm1,mm0
- punpcklwd mm4,mm6
- punpckhwd mm1,mm6
- movq mm0,mm4
- movq mm6,mm1
- pmaddwd mm4,[GOTOFF(ebx,PW_MF078_F117)] ; mm4=z3L
- pmaddwd mm1,[GOTOFF(ebx,PW_MF078_F117)] ; mm1=z3H
- pmaddwd mm0,[GOTOFF(ebx,PW_F117_F078)] ; mm0=z4L
- pmaddwd mm6,[GOTOFF(ebx,PW_F117_F078)] ; mm6=z4H
-
- movq MMWORD [wk(0)], mm4 ; wk(0)=z3L
- movq MMWORD [wk(1)], mm1 ; wk(1)=z3H
-
- ; (Original)
- ; z1 = tmp4 + tmp7; z2 = tmp5 + tmp6;
- ; tmp4 = tmp4 * 0.298631336; tmp5 = tmp5 * 2.053119869;
- ; tmp6 = tmp6 * 3.072711026; tmp7 = tmp7 * 1.501321110;
- ; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
- ; data7 = tmp4 + z1 + z3; data5 = tmp5 + z2 + z4;
- ; data3 = tmp6 + z2 + z3; data1 = tmp7 + z1 + z4;
- ;
- ; (This implementation)
- ; tmp4 = tmp4 * (0.298631336 - 0.899976223) + tmp7 * -0.899976223;
- ; tmp5 = tmp5 * (2.053119869 - 2.562915447) + tmp6 * -2.562915447;
- ; tmp6 = tmp5 * -2.562915447 + tmp6 * (3.072711026 - 2.562915447);
- ; tmp7 = tmp4 * -0.899976223 + tmp7 * (1.501321110 - 0.899976223);
- ; data7 = tmp4 + z3; data5 = tmp5 + z4;
- ; data3 = tmp6 + z3; data1 = tmp7 + z4;
-
- movq mm4,mm2
- movq mm1,mm2
- punpcklwd mm4,mm7
- punpckhwd mm1,mm7
- movq mm2,mm4
- movq mm7,mm1
- pmaddwd mm4,[GOTOFF(ebx,PW_MF060_MF089)] ; mm4=tmp4L
- pmaddwd mm1,[GOTOFF(ebx,PW_MF060_MF089)] ; mm1=tmp4H
- pmaddwd mm2,[GOTOFF(ebx,PW_MF089_F060)] ; mm2=tmp7L
- pmaddwd mm7,[GOTOFF(ebx,PW_MF089_F060)] ; mm7=tmp7H
-
- paddd mm4, MMWORD [wk(0)] ; mm4=data7L
- paddd mm1, MMWORD [wk(1)] ; mm1=data7H
- paddd mm2,mm0 ; mm2=data1L
- paddd mm7,mm6 ; mm7=data1H
-
- paddd mm4,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd mm1,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad mm4,DESCALE_P2
- psrad mm1,DESCALE_P2
- paddd mm2,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd mm7,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad mm2,DESCALE_P2
- psrad mm7,DESCALE_P2
-
- packssdw mm4,mm1 ; mm4=data7
- packssdw mm2,mm7 ; mm2=data1
-
- movq MMWORD [MMBLOCK(7,0,edx,SIZEOF_DCTELEM)], mm4
- movq MMWORD [MMBLOCK(1,0,edx,SIZEOF_DCTELEM)], mm2
-
- movq mm1,mm3
- movq mm7,mm3
- punpcklwd mm1,mm5
- punpckhwd mm7,mm5
- movq mm3,mm1
- movq mm5,mm7
- pmaddwd mm1,[GOTOFF(ebx,PW_MF050_MF256)] ; mm1=tmp5L
- pmaddwd mm7,[GOTOFF(ebx,PW_MF050_MF256)] ; mm7=tmp5H
- pmaddwd mm3,[GOTOFF(ebx,PW_MF256_F050)] ; mm3=tmp6L
- pmaddwd mm5,[GOTOFF(ebx,PW_MF256_F050)] ; mm5=tmp6H
-
- paddd mm1,mm0 ; mm1=data5L
- paddd mm7,mm6 ; mm7=data5H
- paddd mm3, MMWORD [wk(0)] ; mm3=data3L
- paddd mm5, MMWORD [wk(1)] ; mm5=data3H
-
- paddd mm1,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd mm7,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad mm1,DESCALE_P2
- psrad mm7,DESCALE_P2
- paddd mm3,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd mm5,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad mm3,DESCALE_P2
- psrad mm5,DESCALE_P2
-
- packssdw mm1,mm7 ; mm1=data5
- packssdw mm3,mm5 ; mm3=data3
-
- movq MMWORD [MMBLOCK(5,0,edx,SIZEOF_DCTELEM)], mm1
- movq MMWORD [MMBLOCK(3,0,edx,SIZEOF_DCTELEM)], mm3
-
- add edx, byte 4*SIZEOF_DCTELEM
- dec ecx
- jnz near .columnloop
-
- emms ; empty MMX state
-
-; pop edi ; unused
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JFDCT_INT_MMX_SUPPORTED
-%endif ; DCT_ISLOW_SUPPORTED
diff --git a/jfss2fst.asm b/jfss2fst.asm
deleted file mode 100644
index 567bcef..0000000
--- a/jfss2fst.asm
+++ /dev/null
@@ -1,411 +0,0 @@
-;
-; jfss2fst.asm - fast integer FDCT (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a fast, not so accurate integer implementation of
-; the forward DCT (Discrete Cosine Transform). The following code is
-; based directly on the IJG's original jfdctfst.c; see the jfdctfst.c
-; for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_IFAST_SUPPORTED
-%ifdef JFDCT_INT_SSE2_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 8 ; 14 is also OK.
-
-%if CONST_BITS == 8
-F_0_382 equ 98 ; FIX(0.382683433)
-F_0_541 equ 139 ; FIX(0.541196100)
-F_0_707 equ 181 ; FIX(0.707106781)
-F_1_306 equ 334 ; FIX(1.306562965)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_382 equ DESCALE( 410903207,30-CONST_BITS) ; FIX(0.382683433)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_707 equ DESCALE( 759250124,30-CONST_BITS) ; FIX(0.707106781)
-F_1_306 equ DESCALE(1402911301,30-CONST_BITS) ; FIX(1.306562965)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
-; PRE_MULTIPLY_SCALE_BITS <= 2 (to avoid overflow)
-; CONST_BITS + CONST_SHIFT + PRE_MULTIPLY_SCALE_BITS == 16 (for pmulhw)
-
-%define PRE_MULTIPLY_SCALE_BITS 2
-%define CONST_SHIFT (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
-
- alignz 16
- global EXTN(jconst_fdct_ifast_sse2)
-
-EXTN(jconst_fdct_ifast_sse2):
-
-PW_F0707 times 8 dw F_0_707 << CONST_SHIFT
-PW_F0382 times 8 dw F_0_382 << CONST_SHIFT
-PW_F0541 times 8 dw F_0_541 << CONST_SHIFT
-PW_F1306 times 8 dw F_1_306 << CONST_SHIFT
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_ifast_sse2 (DCTELEM * data)
-;
-
-%define data(b) (b)+8 ; DCTELEM * data
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 2
-
- align 16
- global EXTN(jpeg_fdct_ifast_sse2)
-
-EXTN(jpeg_fdct_ifast_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; unused
-; push edx ; need not be preserved
-; push esi ; unused
-; push edi ; unused
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process rows.
-
- mov edx, POINTER [data(eax)] ; (DCTELEM *)
-
- movdqa xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm1, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm2, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm3, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_DCTELEM)]
-
- ; xmm0=(00 01 02 03 04 05 06 07), xmm2=(20 21 22 23 24 25 26 27)
- ; xmm1=(10 11 12 13 14 15 16 17), xmm3=(30 31 32 33 34 35 36 37)
-
- movdqa xmm4,xmm0 ; transpose coefficients(phase 1)
- punpcklwd xmm0,xmm1 ; xmm0=(00 10 01 11 02 12 03 13)
- punpckhwd xmm4,xmm1 ; xmm4=(04 14 05 15 06 16 07 17)
- movdqa xmm5,xmm2 ; transpose coefficients(phase 1)
- punpcklwd xmm2,xmm3 ; xmm2=(20 30 21 31 22 32 23 33)
- punpckhwd xmm5,xmm3 ; xmm5=(24 34 25 35 26 36 27 37)
-
- movdqa xmm6, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm7, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm1, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm3, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_DCTELEM)]
-
- ; xmm6=( 4 12 20 28 36 44 52 60), xmm1=( 6 14 22 30 38 46 54 62)
- ; xmm7=( 5 13 21 29 37 45 53 61), xmm3=( 7 15 23 31 39 47 55 63)
-
- movdqa XMMWORD [wk(0)], xmm2 ; wk(0)=(20 30 21 31 22 32 23 33)
- movdqa XMMWORD [wk(1)], xmm5 ; wk(1)=(24 34 25 35 26 36 27 37)
-
- movdqa xmm2,xmm6 ; transpose coefficients(phase 1)
- punpcklwd xmm6,xmm7 ; xmm6=(40 50 41 51 42 52 43 53)
- punpckhwd xmm2,xmm7 ; xmm2=(44 54 45 55 46 56 47 57)
- movdqa xmm5,xmm1 ; transpose coefficients(phase 1)
- punpcklwd xmm1,xmm3 ; xmm1=(60 70 61 71 62 72 63 73)
- punpckhwd xmm5,xmm3 ; xmm5=(64 74 65 75 66 76 67 77)
-
- movdqa xmm7,xmm6 ; transpose coefficients(phase 2)
- punpckldq xmm6,xmm1 ; xmm6=(40 50 60 70 41 51 61 71)
- punpckhdq xmm7,xmm1 ; xmm7=(42 52 62 72 43 53 63 73)
- movdqa xmm3,xmm2 ; transpose coefficients(phase 2)
- punpckldq xmm2,xmm5 ; xmm2=(44 54 64 74 45 55 65 75)
- punpckhdq xmm3,xmm5 ; xmm3=(46 56 66 76 47 57 67 77)
-
- movdqa xmm1, XMMWORD [wk(0)] ; xmm1=(20 30 21 31 22 32 23 33)
- movdqa xmm5, XMMWORD [wk(1)] ; xmm5=(24 34 25 35 26 36 27 37)
- movdqa XMMWORD [wk(0)], xmm7 ; wk(0)=(42 52 62 72 43 53 63 73)
- movdqa XMMWORD [wk(1)], xmm2 ; wk(1)=(44 54 64 74 45 55 65 75)
-
- movdqa xmm7,xmm0 ; transpose coefficients(phase 2)
- punpckldq xmm0,xmm1 ; xmm0=(00 10 20 30 01 11 21 31)
- punpckhdq xmm7,xmm1 ; xmm7=(02 12 22 32 03 13 23 33)
- movdqa xmm2,xmm4 ; transpose coefficients(phase 2)
- punpckldq xmm4,xmm5 ; xmm4=(04 14 24 34 05 15 25 35)
- punpckhdq xmm2,xmm5 ; xmm2=(06 16 26 36 07 17 27 37)
-
- movdqa xmm1,xmm0 ; transpose coefficients(phase 3)
- punpcklqdq xmm0,xmm6 ; xmm0=(00 10 20 30 40 50 60 70)=data0
- punpckhqdq xmm1,xmm6 ; xmm1=(01 11 21 31 41 51 61 71)=data1
- movdqa xmm5,xmm2 ; transpose coefficients(phase 3)
- punpcklqdq xmm2,xmm3 ; xmm2=(06 16 26 36 46 56 66 76)=data6
- punpckhqdq xmm5,xmm3 ; xmm5=(07 17 27 37 47 57 67 77)=data7
-
- movdqa xmm6,xmm1
- movdqa xmm3,xmm0
- psubw xmm1,xmm2 ; xmm1=data1-data6=tmp6
- psubw xmm0,xmm5 ; xmm0=data0-data7=tmp7
- paddw xmm6,xmm2 ; xmm6=data1+data6=tmp1
- paddw xmm3,xmm5 ; xmm3=data0+data7=tmp0
-
- movdqa xmm2, XMMWORD [wk(0)] ; xmm2=(42 52 62 72 43 53 63 73)
- movdqa xmm5, XMMWORD [wk(1)] ; xmm5=(44 54 64 74 45 55 65 75)
- movdqa XMMWORD [wk(0)], xmm1 ; wk(0)=tmp6
- movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=tmp7
-
- movdqa xmm1,xmm7 ; transpose coefficients(phase 3)
- punpcklqdq xmm7,xmm2 ; xmm7=(02 12 22 32 42 52 62 72)=data2
- punpckhqdq xmm1,xmm2 ; xmm1=(03 13 23 33 43 53 63 73)=data3
- movdqa xmm0,xmm4 ; transpose coefficients(phase 3)
- punpcklqdq xmm4,xmm5 ; xmm4=(04 14 24 34 44 54 64 74)=data4
- punpckhqdq xmm0,xmm5 ; xmm0=(05 15 25 35 45 55 65 75)=data5
-
- movdqa xmm2,xmm1
- movdqa xmm5,xmm7
- paddw xmm1,xmm4 ; xmm1=data3+data4=tmp3
- paddw xmm7,xmm0 ; xmm7=data2+data5=tmp2
- psubw xmm2,xmm4 ; xmm2=data3-data4=tmp4
- psubw xmm5,xmm0 ; xmm5=data2-data5=tmp5
-
- ; -- Even part
-
- movdqa xmm4,xmm3
- movdqa xmm0,xmm6
- psubw xmm3,xmm1 ; xmm3=tmp13
- psubw xmm6,xmm7 ; xmm6=tmp12
- paddw xmm4,xmm1 ; xmm4=tmp10
- paddw xmm0,xmm7 ; xmm0=tmp11
-
- paddw xmm6,xmm3
- psllw xmm6,PRE_MULTIPLY_SCALE_BITS
- pmulhw xmm6,[GOTOFF(ebx,PW_F0707)] ; xmm6=z1
-
- movdqa xmm1,xmm4
- movdqa xmm7,xmm3
- psubw xmm4,xmm0 ; xmm4=data4
- psubw xmm3,xmm6 ; xmm3=data6
- paddw xmm1,xmm0 ; xmm1=data0
- paddw xmm7,xmm6 ; xmm7=data2
-
- movdqa xmm0, XMMWORD [wk(0)] ; xmm0=tmp6
- movdqa xmm6, XMMWORD [wk(1)] ; xmm6=tmp7
- movdqa XMMWORD [wk(0)], xmm4 ; wk(0)=data4
- movdqa XMMWORD [wk(1)], xmm3 ; wk(1)=data6
-
- ; -- Odd part
-
- paddw xmm2,xmm5 ; xmm2=tmp10
- paddw xmm5,xmm0 ; xmm5=tmp11
- paddw xmm0,xmm6 ; xmm0=tmp12, xmm6=tmp7
-
- psllw xmm2,PRE_MULTIPLY_SCALE_BITS
- psllw xmm0,PRE_MULTIPLY_SCALE_BITS
-
- psllw xmm5,PRE_MULTIPLY_SCALE_BITS
- pmulhw xmm5,[GOTOFF(ebx,PW_F0707)] ; xmm5=z3
-
- movdqa xmm4,xmm2 ; xmm4=tmp10
- psubw xmm2,xmm0
- pmulhw xmm2,[GOTOFF(ebx,PW_F0382)] ; xmm2=z5
- pmulhw xmm4,[GOTOFF(ebx,PW_F0541)] ; xmm4=MULTIPLY(tmp10,FIX_0_541196)
- pmulhw xmm0,[GOTOFF(ebx,PW_F1306)] ; xmm0=MULTIPLY(tmp12,FIX_1_306562)
- paddw xmm4,xmm2 ; xmm4=z2
- paddw xmm0,xmm2 ; xmm0=z4
-
- movdqa xmm3,xmm6
- psubw xmm6,xmm5 ; xmm6=z13
- paddw xmm3,xmm5 ; xmm3=z11
-
- movdqa xmm2,xmm6
- movdqa xmm5,xmm3
- psubw xmm6,xmm4 ; xmm6=data3
- psubw xmm3,xmm0 ; xmm3=data7
- paddw xmm2,xmm4 ; xmm2=data5
- paddw xmm5,xmm0 ; xmm5=data1
-
- ; ---- Pass 2: process columns.
-
-; mov edx, POINTER [data(eax)] ; (DCTELEM *)
-
- ; xmm1=(00 10 20 30 40 50 60 70), xmm7=(02 12 22 32 42 52 62 72)
- ; xmm5=(01 11 21 31 41 51 61 71), xmm6=(03 13 23 33 43 53 63 73)
-
- movdqa xmm4,xmm1 ; transpose coefficients(phase 1)
- punpcklwd xmm1,xmm5 ; xmm1=(00 01 10 11 20 21 30 31)
- punpckhwd xmm4,xmm5 ; xmm4=(40 41 50 51 60 61 70 71)
- movdqa xmm0,xmm7 ; transpose coefficients(phase 1)
- punpcklwd xmm7,xmm6 ; xmm7=(02 03 12 13 22 23 32 33)
- punpckhwd xmm0,xmm6 ; xmm0=(42 43 52 53 62 63 72 73)
-
- movdqa xmm5, XMMWORD [wk(0)] ; xmm5=col4
- movdqa xmm6, XMMWORD [wk(1)] ; xmm6=col6
-
- ; xmm5=(04 14 24 34 44 54 64 74), xmm6=(06 16 26 36 46 56 66 76)
- ; xmm2=(05 15 25 35 45 55 65 75), xmm3=(07 17 27 37 47 57 67 77)
-
- movdqa XMMWORD [wk(0)], xmm7 ; wk(0)=(02 03 12 13 22 23 32 33)
- movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=(42 43 52 53 62 63 72 73)
-
- movdqa xmm7,xmm5 ; transpose coefficients(phase 1)
- punpcklwd xmm5,xmm2 ; xmm5=(04 05 14 15 24 25 34 35)
- punpckhwd xmm7,xmm2 ; xmm7=(44 45 54 55 64 65 74 75)
- movdqa xmm0,xmm6 ; transpose coefficients(phase 1)
- punpcklwd xmm6,xmm3 ; xmm6=(06 07 16 17 26 27 36 37)
- punpckhwd xmm0,xmm3 ; xmm0=(46 47 56 57 66 67 76 77)
-
- movdqa xmm2,xmm5 ; transpose coefficients(phase 2)
- punpckldq xmm5,xmm6 ; xmm5=(04 05 06 07 14 15 16 17)
- punpckhdq xmm2,xmm6 ; xmm2=(24 25 26 27 34 35 36 37)
- movdqa xmm3,xmm7 ; transpose coefficients(phase 2)
- punpckldq xmm7,xmm0 ; xmm7=(44 45 46 47 54 55 56 57)
- punpckhdq xmm3,xmm0 ; xmm3=(64 65 66 67 74 75 76 77)
-
- movdqa xmm6, XMMWORD [wk(0)] ; xmm6=(02 03 12 13 22 23 32 33)
- movdqa xmm0, XMMWORD [wk(1)] ; xmm0=(42 43 52 53 62 63 72 73)
- movdqa XMMWORD [wk(0)], xmm2 ; wk(0)=(24 25 26 27 34 35 36 37)
- movdqa XMMWORD [wk(1)], xmm7 ; wk(1)=(44 45 46 47 54 55 56 57)
-
- movdqa xmm2,xmm1 ; transpose coefficients(phase 2)
- punpckldq xmm1,xmm6 ; xmm1=(00 01 02 03 10 11 12 13)
- punpckhdq xmm2,xmm6 ; xmm2=(20 21 22 23 30 31 32 33)
- movdqa xmm7,xmm4 ; transpose coefficients(phase 2)
- punpckldq xmm4,xmm0 ; xmm4=(40 41 42 43 50 51 52 53)
- punpckhdq xmm7,xmm0 ; xmm7=(60 61 62 63 70 71 72 73)
-
- movdqa xmm6,xmm1 ; transpose coefficients(phase 3)
- punpcklqdq xmm1,xmm5 ; xmm1=(00 01 02 03 04 05 06 07)=data0
- punpckhqdq xmm6,xmm5 ; xmm6=(10 11 12 13 14 15 16 17)=data1
- movdqa xmm0,xmm7 ; transpose coefficients(phase 3)
- punpcklqdq xmm7,xmm3 ; xmm7=(60 61 62 63 64 65 66 67)=data6
- punpckhqdq xmm0,xmm3 ; xmm0=(70 71 72 73 74 75 76 77)=data7
-
- movdqa xmm5,xmm6
- movdqa xmm3,xmm1
- psubw xmm6,xmm7 ; xmm6=data1-data6=tmp6
- psubw xmm1,xmm0 ; xmm1=data0-data7=tmp7
- paddw xmm5,xmm7 ; xmm5=data1+data6=tmp1
- paddw xmm3,xmm0 ; xmm3=data0+data7=tmp0
-
- movdqa xmm7, XMMWORD [wk(0)] ; xmm7=(24 25 26 27 34 35 36 37)
- movdqa xmm0, XMMWORD [wk(1)] ; xmm0=(44 45 46 47 54 55 56 57)
- movdqa XMMWORD [wk(0)], xmm6 ; wk(0)=tmp6
- movdqa XMMWORD [wk(1)], xmm1 ; wk(1)=tmp7
-
- movdqa xmm6,xmm2 ; transpose coefficients(phase 3)
- punpcklqdq xmm2,xmm7 ; xmm2=(20 21 22 23 24 25 26 27)=data2
- punpckhqdq xmm6,xmm7 ; xmm6=(30 31 32 33 34 35 36 37)=data3
- movdqa xmm1,xmm4 ; transpose coefficients(phase 3)
- punpcklqdq xmm4,xmm0 ; xmm4=(40 41 42 43 44 45 46 47)=data4
- punpckhqdq xmm1,xmm0 ; xmm1=(50 51 52 53 54 55 56 57)=data5
-
- movdqa xmm7,xmm6
- movdqa xmm0,xmm2
- paddw xmm6,xmm4 ; xmm6=data3+data4=tmp3
- paddw xmm2,xmm1 ; xmm2=data2+data5=tmp2
- psubw xmm7,xmm4 ; xmm7=data3-data4=tmp4
- psubw xmm0,xmm1 ; xmm0=data2-data5=tmp5
-
- ; -- Even part
-
- movdqa xmm4,xmm3
- movdqa xmm1,xmm5
- psubw xmm3,xmm6 ; xmm3=tmp13
- psubw xmm5,xmm2 ; xmm5=tmp12
- paddw xmm4,xmm6 ; xmm4=tmp10
- paddw xmm1,xmm2 ; xmm1=tmp11
-
- paddw xmm5,xmm3
- psllw xmm5,PRE_MULTIPLY_SCALE_BITS
- pmulhw xmm5,[GOTOFF(ebx,PW_F0707)] ; xmm5=z1
-
- movdqa xmm6,xmm4
- movdqa xmm2,xmm3
- psubw xmm4,xmm1 ; xmm4=data4
- psubw xmm3,xmm5 ; xmm3=data6
- paddw xmm6,xmm1 ; xmm6=data0
- paddw xmm2,xmm5 ; xmm2=data2
-
- movdqa XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_DCTELEM)], xmm4
- movdqa XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_DCTELEM)], xmm3
- movdqa XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_DCTELEM)], xmm6
- movdqa XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_DCTELEM)], xmm2
-
- ; -- Odd part
-
- movdqa xmm1, XMMWORD [wk(0)] ; xmm1=tmp6
- movdqa xmm5, XMMWORD [wk(1)] ; xmm5=tmp7
-
- paddw xmm7,xmm0 ; xmm7=tmp10
- paddw xmm0,xmm1 ; xmm0=tmp11
- paddw xmm1,xmm5 ; xmm1=tmp12, xmm5=tmp7
-
- psllw xmm7,PRE_MULTIPLY_SCALE_BITS
- psllw xmm1,PRE_MULTIPLY_SCALE_BITS
-
- psllw xmm0,PRE_MULTIPLY_SCALE_BITS
- pmulhw xmm0,[GOTOFF(ebx,PW_F0707)] ; xmm0=z3
-
- movdqa xmm4,xmm7 ; xmm4=tmp10
- psubw xmm7,xmm1
- pmulhw xmm7,[GOTOFF(ebx,PW_F0382)] ; xmm7=z5
- pmulhw xmm4,[GOTOFF(ebx,PW_F0541)] ; xmm4=MULTIPLY(tmp10,FIX_0_541196)
- pmulhw xmm1,[GOTOFF(ebx,PW_F1306)] ; xmm1=MULTIPLY(tmp12,FIX_1_306562)
- paddw xmm4,xmm7 ; xmm4=z2
- paddw xmm1,xmm7 ; xmm1=z4
-
- movdqa xmm3,xmm5
- psubw xmm5,xmm0 ; xmm5=z13
- paddw xmm3,xmm0 ; xmm3=z11
-
- movdqa xmm6,xmm5
- movdqa xmm2,xmm3
- psubw xmm5,xmm4 ; xmm5=data3
- psubw xmm3,xmm1 ; xmm3=data7
- paddw xmm6,xmm4 ; xmm6=data5
- paddw xmm2,xmm1 ; xmm2=data1
-
- movdqa XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_DCTELEM)], xmm5
- movdqa XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_DCTELEM)], xmm3
- movdqa XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_DCTELEM)], xmm6
- movdqa XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_DCTELEM)], xmm2
-
-; pop edi ; unused
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; unused
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JFDCT_INT_SSE2_SUPPORTED
-%endif ; DCT_IFAST_SUPPORTED
diff --git a/jfss2int.asm b/jfss2int.asm
deleted file mode 100644
index 106b42c..0000000
--- a/jfss2int.asm
+++ /dev/null
@@ -1,641 +0,0 @@
-;
-; jfss2int.asm - accurate integer FDCT (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a slow-but-accurate integer implementation of the
-; forward DCT (Discrete Cosine Transform). The following code is based
-; directly on the IJG's original jfdctint.c; see the jfdctint.c for
-; more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_ISLOW_SUPPORTED
-%ifdef JFDCT_INT_SSE2_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%define DESCALE_P1 (CONST_BITS-PASS1_BITS)
-%define DESCALE_P2 (CONST_BITS+PASS1_BITS)
-
-%if CONST_BITS == 13
-F_0_298 equ 2446 ; FIX(0.298631336)
-F_0_390 equ 3196 ; FIX(0.390180644)
-F_0_541 equ 4433 ; FIX(0.541196100)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_175 equ 9633 ; FIX(1.175875602)
-F_1_501 equ 12299 ; FIX(1.501321110)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_1_961 equ 16069 ; FIX(1.961570560)
-F_2_053 equ 16819 ; FIX(2.053119869)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_072 equ 25172 ; FIX(3.072711026)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_298 equ DESCALE( 320652955,30-CONST_BITS) ; FIX(0.298631336)
-F_0_390 equ DESCALE( 418953276,30-CONST_BITS) ; FIX(0.390180644)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_175 equ DESCALE(1262586813,30-CONST_BITS) ; FIX(1.175875602)
-F_1_501 equ DESCALE(1612031267,30-CONST_BITS) ; FIX(1.501321110)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_1_961 equ DESCALE(2106220350,30-CONST_BITS) ; FIX(1.961570560)
-F_2_053 equ DESCALE(2204520673,30-CONST_BITS) ; FIX(2.053119869)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_072 equ DESCALE(3299298341,30-CONST_BITS) ; FIX(3.072711026)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_fdct_islow_sse2)
-
-EXTN(jconst_fdct_islow_sse2):
-
-PW_F130_F054 times 4 dw (F_0_541+F_0_765), F_0_541
-PW_F054_MF130 times 4 dw F_0_541, (F_0_541-F_1_847)
-PW_MF078_F117 times 4 dw (F_1_175-F_1_961), F_1_175
-PW_F117_F078 times 4 dw F_1_175, (F_1_175-F_0_390)
-PW_MF060_MF089 times 4 dw (F_0_298-F_0_899),-F_0_899
-PW_MF089_F060 times 4 dw -F_0_899, (F_1_501-F_0_899)
-PW_MF050_MF256 times 4 dw (F_2_053-F_2_562),-F_2_562
-PW_MF256_F050 times 4 dw -F_2_562, (F_3_072-F_2_562)
-PD_DESCALE_P1 times 4 dd 1 << (DESCALE_P1-1)
-PD_DESCALE_P2 times 4 dd 1 << (DESCALE_P2-1)
-PW_DESCALE_P2X times 8 dw 1 << (PASS1_BITS-1)
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_islow_sse2 (DCTELEM * data)
-;
-
-%define data(b) (b)+8 ; DCTELEM * data
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 6
-
- align 16
- global EXTN(jpeg_fdct_islow_sse2)
-
-EXTN(jpeg_fdct_islow_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; unused
-; push edx ; need not be preserved
-; push esi ; unused
-; push edi ; unused
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process rows.
-
- mov edx, POINTER [data(eax)] ; (DCTELEM *)
-
- movdqa xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm1, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm2, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm3, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_DCTELEM)]
-
- ; xmm0=(00 01 02 03 04 05 06 07), xmm2=(20 21 22 23 24 25 26 27)
- ; xmm1=(10 11 12 13 14 15 16 17), xmm3=(30 31 32 33 34 35 36 37)
-
- movdqa xmm4,xmm0 ; transpose coefficients(phase 1)
- punpcklwd xmm0,xmm1 ; xmm0=(00 10 01 11 02 12 03 13)
- punpckhwd xmm4,xmm1 ; xmm4=(04 14 05 15 06 16 07 17)
- movdqa xmm5,xmm2 ; transpose coefficients(phase 1)
- punpcklwd xmm2,xmm3 ; xmm2=(20 30 21 31 22 32 23 33)
- punpckhwd xmm5,xmm3 ; xmm5=(24 34 25 35 26 36 27 37)
-
- movdqa xmm6, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm7, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm1, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_DCTELEM)]
- movdqa xmm3, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_DCTELEM)]
-
- ; xmm6=( 4 12 20 28 36 44 52 60), xmm1=( 6 14 22 30 38 46 54 62)
- ; xmm7=( 5 13 21 29 37 45 53 61), xmm3=( 7 15 23 31 39 47 55 63)
-
- movdqa XMMWORD [wk(0)], xmm2 ; wk(0)=(20 30 21 31 22 32 23 33)
- movdqa XMMWORD [wk(1)], xmm5 ; wk(1)=(24 34 25 35 26 36 27 37)
-
- movdqa xmm2,xmm6 ; transpose coefficients(phase 1)
- punpcklwd xmm6,xmm7 ; xmm6=(40 50 41 51 42 52 43 53)
- punpckhwd xmm2,xmm7 ; xmm2=(44 54 45 55 46 56 47 57)
- movdqa xmm5,xmm1 ; transpose coefficients(phase 1)
- punpcklwd xmm1,xmm3 ; xmm1=(60 70 61 71 62 72 63 73)
- punpckhwd xmm5,xmm3 ; xmm5=(64 74 65 75 66 76 67 77)
-
- movdqa xmm7,xmm6 ; transpose coefficients(phase 2)
- punpckldq xmm6,xmm1 ; xmm6=(40 50 60 70 41 51 61 71)
- punpckhdq xmm7,xmm1 ; xmm7=(42 52 62 72 43 53 63 73)
- movdqa xmm3,xmm2 ; transpose coefficients(phase 2)
- punpckldq xmm2,xmm5 ; xmm2=(44 54 64 74 45 55 65 75)
- punpckhdq xmm3,xmm5 ; xmm3=(46 56 66 76 47 57 67 77)
-
- movdqa xmm1, XMMWORD [wk(0)] ; xmm1=(20 30 21 31 22 32 23 33)
- movdqa xmm5, XMMWORD [wk(1)] ; xmm5=(24 34 25 35 26 36 27 37)
- movdqa XMMWORD [wk(2)], xmm7 ; wk(2)=(42 52 62 72 43 53 63 73)
- movdqa XMMWORD [wk(3)], xmm2 ; wk(3)=(44 54 64 74 45 55 65 75)
-
- movdqa xmm7,xmm0 ; transpose coefficients(phase 2)
- punpckldq xmm0,xmm1 ; xmm0=(00 10 20 30 01 11 21 31)
- punpckhdq xmm7,xmm1 ; xmm7=(02 12 22 32 03 13 23 33)
- movdqa xmm2,xmm4 ; transpose coefficients(phase 2)
- punpckldq xmm4,xmm5 ; xmm4=(04 14 24 34 05 15 25 35)
- punpckhdq xmm2,xmm5 ; xmm2=(06 16 26 36 07 17 27 37)
-
- movdqa xmm1,xmm0 ; transpose coefficients(phase 3)
- punpcklqdq xmm0,xmm6 ; xmm0=(00 10 20 30 40 50 60 70)=data0
- punpckhqdq xmm1,xmm6 ; xmm1=(01 11 21 31 41 51 61 71)=data1
- movdqa xmm5,xmm2 ; transpose coefficients(phase 3)
- punpcklqdq xmm2,xmm3 ; xmm2=(06 16 26 36 46 56 66 76)=data6
- punpckhqdq xmm5,xmm3 ; xmm5=(07 17 27 37 47 57 67 77)=data7
-
- movdqa xmm6,xmm1
- movdqa xmm3,xmm0
- psubw xmm1,xmm2 ; xmm1=data1-data6=tmp6
- psubw xmm0,xmm5 ; xmm0=data0-data7=tmp7
- paddw xmm6,xmm2 ; xmm6=data1+data6=tmp1
- paddw xmm3,xmm5 ; xmm3=data0+data7=tmp0
-
- movdqa xmm2, XMMWORD [wk(2)] ; xmm2=(42 52 62 72 43 53 63 73)
- movdqa xmm5, XMMWORD [wk(3)] ; xmm5=(44 54 64 74 45 55 65 75)
- movdqa XMMWORD [wk(0)], xmm1 ; wk(0)=tmp6
- movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=tmp7
-
- movdqa xmm1,xmm7 ; transpose coefficients(phase 3)
- punpcklqdq xmm7,xmm2 ; xmm7=(02 12 22 32 42 52 62 72)=data2
- punpckhqdq xmm1,xmm2 ; xmm1=(03 13 23 33 43 53 63 73)=data3
- movdqa xmm0,xmm4 ; transpose coefficients(phase 3)
- punpcklqdq xmm4,xmm5 ; xmm4=(04 14 24 34 44 54 64 74)=data4
- punpckhqdq xmm0,xmm5 ; xmm0=(05 15 25 35 45 55 65 75)=data5
-
- movdqa xmm2,xmm1
- movdqa xmm5,xmm7
- paddw xmm1,xmm4 ; xmm1=data3+data4=tmp3
- paddw xmm7,xmm0 ; xmm7=data2+data5=tmp2
- psubw xmm2,xmm4 ; xmm2=data3-data4=tmp4
- psubw xmm5,xmm0 ; xmm5=data2-data5=tmp5
-
- ; -- Even part
-
- movdqa xmm4,xmm3
- movdqa xmm0,xmm6
- paddw xmm3,xmm1 ; xmm3=tmp10
- paddw xmm6,xmm7 ; xmm6=tmp11
- psubw xmm4,xmm1 ; xmm4=tmp13
- psubw xmm0,xmm7 ; xmm0=tmp12
-
- movdqa xmm1,xmm3
- paddw xmm3,xmm6 ; xmm3=tmp10+tmp11
- psubw xmm1,xmm6 ; xmm1=tmp10-tmp11
-
- psllw xmm3,PASS1_BITS ; xmm3=data0
- psllw xmm1,PASS1_BITS ; xmm1=data4
-
- movdqa XMMWORD [wk(2)], xmm3 ; wk(2)=data0
- movdqa XMMWORD [wk(3)], xmm1 ; wk(3)=data4
-
- ; (Original)
- ; z1 = (tmp12 + tmp13) * 0.541196100;
- ; data2 = z1 + tmp13 * 0.765366865;
- ; data6 = z1 + tmp12 * -1.847759065;
- ;
- ; (This implementation)
- ; data2 = tmp13 * (0.541196100 + 0.765366865) + tmp12 * 0.541196100;
- ; data6 = tmp13 * 0.541196100 + tmp12 * (0.541196100 - 1.847759065);
-
- movdqa xmm7,xmm4 ; xmm4=tmp13
- movdqa xmm6,xmm4
- punpcklwd xmm7,xmm0 ; xmm0=tmp12
- punpckhwd xmm6,xmm0
- movdqa xmm4,xmm7
- movdqa xmm0,xmm6
- pmaddwd xmm7,[GOTOFF(ebx,PW_F130_F054)] ; xmm7=data2L
- pmaddwd xmm6,[GOTOFF(ebx,PW_F130_F054)] ; xmm6=data2H
- pmaddwd xmm4,[GOTOFF(ebx,PW_F054_MF130)] ; xmm4=data6L
- pmaddwd xmm0,[GOTOFF(ebx,PW_F054_MF130)] ; xmm0=data6H
-
- paddd xmm7,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd xmm6,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad xmm7,DESCALE_P1
- psrad xmm6,DESCALE_P1
- paddd xmm4,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd xmm0,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad xmm4,DESCALE_P1
- psrad xmm0,DESCALE_P1
-
- packssdw xmm7,xmm6 ; xmm7=data2
- packssdw xmm4,xmm0 ; xmm4=data6
-
- movdqa XMMWORD [wk(4)], xmm7 ; wk(4)=data2
- movdqa XMMWORD [wk(5)], xmm4 ; wk(5)=data6
-
- ; -- Odd part
-
- movdqa xmm3, XMMWORD [wk(0)] ; xmm3=tmp6
- movdqa xmm1, XMMWORD [wk(1)] ; xmm1=tmp7
-
- movdqa xmm6,xmm2 ; xmm2=tmp4
- movdqa xmm0,xmm5 ; xmm5=tmp5
- paddw xmm6,xmm3 ; xmm6=z3
- paddw xmm0,xmm1 ; xmm0=z4
-
- ; (Original)
- ; z5 = (z3 + z4) * 1.175875602;
- ; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
- ; z3 += z5; z4 += z5;
- ;
- ; (This implementation)
- ; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
- ; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
-
- movdqa xmm7,xmm6
- movdqa xmm4,xmm6
- punpcklwd xmm7,xmm0
- punpckhwd xmm4,xmm0
- movdqa xmm6,xmm7
- movdqa xmm0,xmm4
- pmaddwd xmm7,[GOTOFF(ebx,PW_MF078_F117)] ; xmm7=z3L
- pmaddwd xmm4,[GOTOFF(ebx,PW_MF078_F117)] ; xmm4=z3H
- pmaddwd xmm6,[GOTOFF(ebx,PW_F117_F078)] ; xmm6=z4L
- pmaddwd xmm0,[GOTOFF(ebx,PW_F117_F078)] ; xmm0=z4H
-
- movdqa XMMWORD [wk(0)], xmm7 ; wk(0)=z3L
- movdqa XMMWORD [wk(1)], xmm4 ; wk(1)=z3H
-
- ; (Original)
- ; z1 = tmp4 + tmp7; z2 = tmp5 + tmp6;
- ; tmp4 = tmp4 * 0.298631336; tmp5 = tmp5 * 2.053119869;
- ; tmp6 = tmp6 * 3.072711026; tmp7 = tmp7 * 1.501321110;
- ; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
- ; data7 = tmp4 + z1 + z3; data5 = tmp5 + z2 + z4;
- ; data3 = tmp6 + z2 + z3; data1 = tmp7 + z1 + z4;
- ;
- ; (This implementation)
- ; tmp4 = tmp4 * (0.298631336 - 0.899976223) + tmp7 * -0.899976223;
- ; tmp5 = tmp5 * (2.053119869 - 2.562915447) + tmp6 * -2.562915447;
- ; tmp6 = tmp5 * -2.562915447 + tmp6 * (3.072711026 - 2.562915447);
- ; tmp7 = tmp4 * -0.899976223 + tmp7 * (1.501321110 - 0.899976223);
- ; data7 = tmp4 + z3; data5 = tmp5 + z4;
- ; data3 = tmp6 + z3; data1 = tmp7 + z4;
-
- movdqa xmm7,xmm2
- movdqa xmm4,xmm2
- punpcklwd xmm7,xmm1
- punpckhwd xmm4,xmm1
- movdqa xmm2,xmm7
- movdqa xmm1,xmm4
- pmaddwd xmm7,[GOTOFF(ebx,PW_MF060_MF089)] ; xmm7=tmp4L
- pmaddwd xmm4,[GOTOFF(ebx,PW_MF060_MF089)] ; xmm4=tmp4H
- pmaddwd xmm2,[GOTOFF(ebx,PW_MF089_F060)] ; xmm2=tmp7L
- pmaddwd xmm1,[GOTOFF(ebx,PW_MF089_F060)] ; xmm1=tmp7H
-
- paddd xmm7, XMMWORD [wk(0)] ; xmm7=data7L
- paddd xmm4, XMMWORD [wk(1)] ; xmm4=data7H
- paddd xmm2,xmm6 ; xmm2=data1L
- paddd xmm1,xmm0 ; xmm1=data1H
-
- paddd xmm7,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd xmm4,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad xmm7,DESCALE_P1
- psrad xmm4,DESCALE_P1
- paddd xmm2,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd xmm1,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad xmm2,DESCALE_P1
- psrad xmm1,DESCALE_P1
-
- packssdw xmm7,xmm4 ; xmm7=data7
- packssdw xmm2,xmm1 ; xmm2=data1
-
- movdqa xmm4,xmm5
- movdqa xmm1,xmm5
- punpcklwd xmm4,xmm3
- punpckhwd xmm1,xmm3
- movdqa xmm5,xmm4
- movdqa xmm3,xmm1
- pmaddwd xmm4,[GOTOFF(ebx,PW_MF050_MF256)] ; xmm4=tmp5L
- pmaddwd xmm1,[GOTOFF(ebx,PW_MF050_MF256)] ; xmm1=tmp5H
- pmaddwd xmm5,[GOTOFF(ebx,PW_MF256_F050)] ; xmm5=tmp6L
- pmaddwd xmm3,[GOTOFF(ebx,PW_MF256_F050)] ; xmm3=tmp6H
-
- paddd xmm4,xmm6 ; xmm4=data5L
- paddd xmm1,xmm0 ; xmm1=data5H
- paddd xmm5, XMMWORD [wk(0)] ; xmm5=data3L
- paddd xmm3, XMMWORD [wk(1)] ; xmm3=data3H
-
- paddd xmm4,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd xmm1,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad xmm4,DESCALE_P1
- psrad xmm1,DESCALE_P1
- paddd xmm5,[GOTOFF(ebx,PD_DESCALE_P1)]
- paddd xmm3,[GOTOFF(ebx,PD_DESCALE_P1)]
- psrad xmm5,DESCALE_P1
- psrad xmm3,DESCALE_P1
-
- packssdw xmm4,xmm1 ; xmm4=data5
- packssdw xmm5,xmm3 ; xmm5=data3
-
- ; ---- Pass 2: process columns.
-
-; mov edx, POINTER [data(eax)] ; (DCTELEM *)
-
- movdqa xmm6, XMMWORD [wk(2)] ; xmm6=col0
- movdqa xmm0, XMMWORD [wk(4)] ; xmm0=col2
-
- ; xmm6=(00 10 20 30 40 50 60 70), xmm0=(02 12 22 32 42 52 62 72)
- ; xmm2=(01 11 21 31 41 51 61 71), xmm5=(03 13 23 33 43 53 63 73)
-
- movdqa xmm1,xmm6 ; transpose coefficients(phase 1)
- punpcklwd xmm6,xmm2 ; xmm6=(00 01 10 11 20 21 30 31)
- punpckhwd xmm1,xmm2 ; xmm1=(40 41 50 51 60 61 70 71)
- movdqa xmm3,xmm0 ; transpose coefficients(phase 1)
- punpcklwd xmm0,xmm5 ; xmm0=(02 03 12 13 22 23 32 33)
- punpckhwd xmm3,xmm5 ; xmm3=(42 43 52 53 62 63 72 73)
-
- movdqa xmm2, XMMWORD [wk(3)] ; xmm2=col4
- movdqa xmm5, XMMWORD [wk(5)] ; xmm5=col6
-
- ; xmm2=(04 14 24 34 44 54 64 74), xmm5=(06 16 26 36 46 56 66 76)
- ; xmm4=(05 15 25 35 45 55 65 75), xmm7=(07 17 27 37 47 57 67 77)
-
- movdqa XMMWORD [wk(0)], xmm0 ; wk(0)=(02 03 12 13 22 23 32 33)
- movdqa XMMWORD [wk(1)], xmm3 ; wk(1)=(42 43 52 53 62 63 72 73)
-
- movdqa xmm0,xmm2 ; transpose coefficients(phase 1)
- punpcklwd xmm2,xmm4 ; xmm2=(04 05 14 15 24 25 34 35)
- punpckhwd xmm0,xmm4 ; xmm0=(44 45 54 55 64 65 74 75)
- movdqa xmm3,xmm5 ; transpose coefficients(phase 1)
- punpcklwd xmm5,xmm7 ; xmm5=(06 07 16 17 26 27 36 37)
- punpckhwd xmm3,xmm7 ; xmm3=(46 47 56 57 66 67 76 77)
-
- movdqa xmm4,xmm2 ; transpose coefficients(phase 2)
- punpckldq xmm2,xmm5 ; xmm2=(04 05 06 07 14 15 16 17)
- punpckhdq xmm4,xmm5 ; xmm4=(24 25 26 27 34 35 36 37)
- movdqa xmm7,xmm0 ; transpose coefficients(phase 2)
- punpckldq xmm0,xmm3 ; xmm0=(44 45 46 47 54 55 56 57)
- punpckhdq xmm7,xmm3 ; xmm7=(64 65 66 67 74 75 76 77)
-
- movdqa xmm5, XMMWORD [wk(0)] ; xmm5=(02 03 12 13 22 23 32 33)
- movdqa xmm3, XMMWORD [wk(1)] ; xmm3=(42 43 52 53 62 63 72 73)
- movdqa XMMWORD [wk(2)], xmm4 ; wk(2)=(24 25 26 27 34 35 36 37)
- movdqa XMMWORD [wk(3)], xmm0 ; wk(3)=(44 45 46 47 54 55 56 57)
-
- movdqa xmm4,xmm6 ; transpose coefficients(phase 2)
- punpckldq xmm6,xmm5 ; xmm6=(00 01 02 03 10 11 12 13)
- punpckhdq xmm4,xmm5 ; xmm4=(20 21 22 23 30 31 32 33)
- movdqa xmm0,xmm1 ; transpose coefficients(phase 2)
- punpckldq xmm1,xmm3 ; xmm1=(40 41 42 43 50 51 52 53)
- punpckhdq xmm0,xmm3 ; xmm0=(60 61 62 63 70 71 72 73)
-
- movdqa xmm5,xmm6 ; transpose coefficients(phase 3)
- punpcklqdq xmm6,xmm2 ; xmm6=(00 01 02 03 04 05 06 07)=data0
- punpckhqdq xmm5,xmm2 ; xmm5=(10 11 12 13 14 15 16 17)=data1
- movdqa xmm3,xmm0 ; transpose coefficients(phase 3)
- punpcklqdq xmm0,xmm7 ; xmm0=(60 61 62 63 64 65 66 67)=data6
- punpckhqdq xmm3,xmm7 ; xmm3=(70 71 72 73 74 75 76 77)=data7
-
- movdqa xmm2,xmm5
- movdqa xmm7,xmm6
- psubw xmm5,xmm0 ; xmm5=data1-data6=tmp6
- psubw xmm6,xmm3 ; xmm6=data0-data7=tmp7
- paddw xmm2,xmm0 ; xmm2=data1+data6=tmp1
- paddw xmm7,xmm3 ; xmm7=data0+data7=tmp0
-
- movdqa xmm0, XMMWORD [wk(2)] ; xmm0=(24 25 26 27 34 35 36 37)
- movdqa xmm3, XMMWORD [wk(3)] ; xmm3=(44 45 46 47 54 55 56 57)
- movdqa XMMWORD [wk(0)], xmm5 ; wk(0)=tmp6
- movdqa XMMWORD [wk(1)], xmm6 ; wk(1)=tmp7
-
- movdqa xmm5,xmm4 ; transpose coefficients(phase 3)
- punpcklqdq xmm4,xmm0 ; xmm4=(20 21 22 23 24 25 26 27)=data2
- punpckhqdq xmm5,xmm0 ; xmm5=(30 31 32 33 34 35 36 37)=data3
- movdqa xmm6,xmm1 ; transpose coefficients(phase 3)
- punpcklqdq xmm1,xmm3 ; xmm1=(40 41 42 43 44 45 46 47)=data4
- punpckhqdq xmm6,xmm3 ; xmm6=(50 51 52 53 54 55 56 57)=data5
-
- movdqa xmm0,xmm5
- movdqa xmm3,xmm4
- paddw xmm5,xmm1 ; xmm5=data3+data4=tmp3
- paddw xmm4,xmm6 ; xmm4=data2+data5=tmp2
- psubw xmm0,xmm1 ; xmm0=data3-data4=tmp4
- psubw xmm3,xmm6 ; xmm3=data2-data5=tmp5
-
- ; -- Even part
-
- movdqa xmm1,xmm7
- movdqa xmm6,xmm2
- paddw xmm7,xmm5 ; xmm7=tmp10
- paddw xmm2,xmm4 ; xmm2=tmp11
- psubw xmm1,xmm5 ; xmm1=tmp13
- psubw xmm6,xmm4 ; xmm6=tmp12
-
- movdqa xmm5,xmm7
- paddw xmm7,xmm2 ; xmm7=tmp10+tmp11
- psubw xmm5,xmm2 ; xmm5=tmp10-tmp11
-
- paddw xmm7,[GOTOFF(ebx,PW_DESCALE_P2X)]
- paddw xmm5,[GOTOFF(ebx,PW_DESCALE_P2X)]
- psraw xmm7,PASS1_BITS ; xmm7=data0
- psraw xmm5,PASS1_BITS ; xmm5=data4
-
- movdqa XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_DCTELEM)], xmm7
- movdqa XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_DCTELEM)], xmm5
-
- ; (Original)
- ; z1 = (tmp12 + tmp13) * 0.541196100;
- ; data2 = z1 + tmp13 * 0.765366865;
- ; data6 = z1 + tmp12 * -1.847759065;
- ;
- ; (This implementation)
- ; data2 = tmp13 * (0.541196100 + 0.765366865) + tmp12 * 0.541196100;
- ; data6 = tmp13 * 0.541196100 + tmp12 * (0.541196100 - 1.847759065);
-
- movdqa xmm4,xmm1 ; xmm1=tmp13
- movdqa xmm2,xmm1
- punpcklwd xmm4,xmm6 ; xmm6=tmp12
- punpckhwd xmm2,xmm6
- movdqa xmm1,xmm4
- movdqa xmm6,xmm2
- pmaddwd xmm4,[GOTOFF(ebx,PW_F130_F054)] ; xmm4=data2L
- pmaddwd xmm2,[GOTOFF(ebx,PW_F130_F054)] ; xmm2=data2H
- pmaddwd xmm1,[GOTOFF(ebx,PW_F054_MF130)] ; xmm1=data6L
- pmaddwd xmm6,[GOTOFF(ebx,PW_F054_MF130)] ; xmm6=data6H
-
- paddd xmm4,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd xmm2,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad xmm4,DESCALE_P2
- psrad xmm2,DESCALE_P2
- paddd xmm1,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd xmm6,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad xmm1,DESCALE_P2
- psrad xmm6,DESCALE_P2
-
- packssdw xmm4,xmm2 ; xmm4=data2
- packssdw xmm1,xmm6 ; xmm1=data6
-
- movdqa XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_DCTELEM)], xmm4
- movdqa XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_DCTELEM)], xmm1
-
- ; -- Odd part
-
- movdqa xmm7, XMMWORD [wk(0)] ; xmm7=tmp6
- movdqa xmm5, XMMWORD [wk(1)] ; xmm5=tmp7
-
- movdqa xmm2,xmm0 ; xmm0=tmp4
- movdqa xmm6,xmm3 ; xmm3=tmp5
- paddw xmm2,xmm7 ; xmm2=z3
- paddw xmm6,xmm5 ; xmm6=z4
-
- ; (Original)
- ; z5 = (z3 + z4) * 1.175875602;
- ; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
- ; z3 += z5; z4 += z5;
- ;
- ; (This implementation)
- ; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
- ; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
-
- movdqa xmm4,xmm2
- movdqa xmm1,xmm2
- punpcklwd xmm4,xmm6
- punpckhwd xmm1,xmm6
- movdqa xmm2,xmm4
- movdqa xmm6,xmm1
- pmaddwd xmm4,[GOTOFF(ebx,PW_MF078_F117)] ; xmm4=z3L
- pmaddwd xmm1,[GOTOFF(ebx,PW_MF078_F117)] ; xmm1=z3H
- pmaddwd xmm2,[GOTOFF(ebx,PW_F117_F078)] ; xmm2=z4L
- pmaddwd xmm6,[GOTOFF(ebx,PW_F117_F078)] ; xmm6=z4H
-
- movdqa XMMWORD [wk(0)], xmm4 ; wk(0)=z3L
- movdqa XMMWORD [wk(1)], xmm1 ; wk(1)=z3H
-
- ; (Original)
- ; z1 = tmp4 + tmp7; z2 = tmp5 + tmp6;
- ; tmp4 = tmp4 * 0.298631336; tmp5 = tmp5 * 2.053119869;
- ; tmp6 = tmp6 * 3.072711026; tmp7 = tmp7 * 1.501321110;
- ; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
- ; data7 = tmp4 + z1 + z3; data5 = tmp5 + z2 + z4;
- ; data3 = tmp6 + z2 + z3; data1 = tmp7 + z1 + z4;
- ;
- ; (This implementation)
- ; tmp4 = tmp4 * (0.298631336 - 0.899976223) + tmp7 * -0.899976223;
- ; tmp5 = tmp5 * (2.053119869 - 2.562915447) + tmp6 * -2.562915447;
- ; tmp6 = tmp5 * -2.562915447 + tmp6 * (3.072711026 - 2.562915447);
- ; tmp7 = tmp4 * -0.899976223 + tmp7 * (1.501321110 - 0.899976223);
- ; data7 = tmp4 + z3; data5 = tmp5 + z4;
- ; data3 = tmp6 + z3; data1 = tmp7 + z4;
-
- movdqa xmm4,xmm0
- movdqa xmm1,xmm0
- punpcklwd xmm4,xmm5
- punpckhwd xmm1,xmm5
- movdqa xmm0,xmm4
- movdqa xmm5,xmm1
- pmaddwd xmm4,[GOTOFF(ebx,PW_MF060_MF089)] ; xmm4=tmp4L
- pmaddwd xmm1,[GOTOFF(ebx,PW_MF060_MF089)] ; xmm1=tmp4H
- pmaddwd xmm0,[GOTOFF(ebx,PW_MF089_F060)] ; xmm0=tmp7L
- pmaddwd xmm5,[GOTOFF(ebx,PW_MF089_F060)] ; xmm5=tmp7H
-
- paddd xmm4, XMMWORD [wk(0)] ; xmm4=data7L
- paddd xmm1, XMMWORD [wk(1)] ; xmm1=data7H
- paddd xmm0,xmm2 ; xmm0=data1L
- paddd xmm5,xmm6 ; xmm5=data1H
-
- paddd xmm4,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd xmm1,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad xmm4,DESCALE_P2
- psrad xmm1,DESCALE_P2
- paddd xmm0,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd xmm5,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad xmm0,DESCALE_P2
- psrad xmm5,DESCALE_P2
-
- packssdw xmm4,xmm1 ; xmm4=data7
- packssdw xmm0,xmm5 ; xmm0=data1
-
- movdqa XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_DCTELEM)], xmm4
- movdqa XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_DCTELEM)], xmm0
-
- movdqa xmm1,xmm3
- movdqa xmm5,xmm3
- punpcklwd xmm1,xmm7
- punpckhwd xmm5,xmm7
- movdqa xmm3,xmm1
- movdqa xmm7,xmm5
- pmaddwd xmm1,[GOTOFF(ebx,PW_MF050_MF256)] ; xmm1=tmp5L
- pmaddwd xmm5,[GOTOFF(ebx,PW_MF050_MF256)] ; xmm5=tmp5H
- pmaddwd xmm3,[GOTOFF(ebx,PW_MF256_F050)] ; xmm3=tmp6L
- pmaddwd xmm7,[GOTOFF(ebx,PW_MF256_F050)] ; xmm7=tmp6H
-
- paddd xmm1,xmm2 ; xmm1=data5L
- paddd xmm5,xmm6 ; xmm5=data5H
- paddd xmm3, XMMWORD [wk(0)] ; xmm3=data3L
- paddd xmm7, XMMWORD [wk(1)] ; xmm7=data3H
-
- paddd xmm1,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd xmm5,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad xmm1,DESCALE_P2
- psrad xmm5,DESCALE_P2
- paddd xmm3,[GOTOFF(ebx,PD_DESCALE_P2)]
- paddd xmm7,[GOTOFF(ebx,PD_DESCALE_P2)]
- psrad xmm3,DESCALE_P2
- psrad xmm7,DESCALE_P2
-
- packssdw xmm1,xmm5 ; xmm1=data5
- packssdw xmm3,xmm7 ; xmm3=data3
-
- movdqa XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_DCTELEM)], xmm1
- movdqa XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_DCTELEM)], xmm3
-
-; pop edi ; unused
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; unused
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JFDCT_INT_SSE2_SUPPORTED
-%endif ; DCT_ISLOW_SUPPORTED
diff --git a/jfsseflt.asm b/jfsseflt.asm
deleted file mode 100644
index 98b0973..0000000
--- a/jfsseflt.asm
+++ /dev/null
@@ -1,383 +0,0 @@
-;
-; jfsseflt.asm - floating-point FDCT (SSE)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a floating-point implementation of the forward DCT
-; (Discrete Cosine Transform). The following code is based directly on
-; the IJG's original jfdctflt.c; see the jfdctflt.c for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-%ifdef JFDCT_FLT_SSE_MMX_SUPPORTED
-%define JFDCT_FLT_SSE_SUPPORTED
-%endif
-%ifdef JFDCT_FLT_SSE_SSE2_SUPPORTED
-%define JFDCT_FLT_SSE_SUPPORTED
-%endif
-%ifdef JFDCT_FLT_SSE_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%macro unpcklps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(0 1 4 5)
- shufps %1,%2,0x44
-%endmacro
-
-%macro unpckhps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(2 3 6 7)
- shufps %1,%2,0xEE
-%endmacro
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_fdct_float_sse)
-
-EXTN(jconst_fdct_float_sse):
-
-PD_0_382 times 4 dd 0.382683432365089771728460
-PD_0_707 times 4 dd 0.707106781186547524400844
-PD_0_541 times 4 dd 0.541196100146196984399723
-PD_1_306 times 4 dd 1.306562964876376527856643
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform the forward DCT on one block of samples.
-;
-; GLOBAL(void)
-; jpeg_fdct_float_sse (FAST_FLOAT * data)
-;
-
-%define data(b) (b)+8 ; FAST_FLOAT * data
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 2
-
- align 16
- global EXTN(jpeg_fdct_float_sse)
-
-EXTN(jpeg_fdct_float_sse):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
-; push esi ; unused
-; push edi ; unused
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process rows.
-
- mov edx, POINTER [data(eax)] ; (FAST_FLOAT *)
- mov ecx, DCTSIZE/4
- alignx 16,7
-.rowloop:
-
- movaps xmm0, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm2, XMMWORD [XMMBLOCK(2,1,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(3,1,edx,SIZEOF_FAST_FLOAT)]
-
- ; xmm0=(20 21 22 23), xmm2=(24 25 26 27)
- ; xmm1=(30 31 32 33), xmm3=(34 35 36 37)
-
- movaps xmm4,xmm0 ; transpose coefficients(phase 1)
- unpcklps xmm0,xmm1 ; xmm0=(20 30 21 31)
- unpckhps xmm4,xmm1 ; xmm4=(22 32 23 33)
- movaps xmm5,xmm2 ; transpose coefficients(phase 1)
- unpcklps xmm2,xmm3 ; xmm2=(24 34 25 35)
- unpckhps xmm5,xmm3 ; xmm5=(26 36 27 37)
-
- movaps xmm6, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm7, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(0,1,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(1,1,edx,SIZEOF_FAST_FLOAT)]
-
- ; xmm6=(00 01 02 03), xmm1=(04 05 06 07)
- ; xmm7=(10 11 12 13), xmm3=(14 15 16 17)
-
- movaps XMMWORD [wk(0)], xmm4 ; wk(0)=(22 32 23 33)
- movaps XMMWORD [wk(1)], xmm2 ; wk(1)=(24 34 25 35)
-
- movaps xmm4,xmm6 ; transpose coefficients(phase 1)
- unpcklps xmm6,xmm7 ; xmm6=(00 10 01 11)
- unpckhps xmm4,xmm7 ; xmm4=(02 12 03 13)
- movaps xmm2,xmm1 ; transpose coefficients(phase 1)
- unpcklps xmm1,xmm3 ; xmm1=(04 14 05 15)
- unpckhps xmm2,xmm3 ; xmm2=(06 16 07 17)
-
- movaps xmm7,xmm6 ; transpose coefficients(phase 2)
- unpcklps2 xmm6,xmm0 ; xmm6=(00 10 20 30)=data0
- unpckhps2 xmm7,xmm0 ; xmm7=(01 11 21 31)=data1
- movaps xmm3,xmm2 ; transpose coefficients(phase 2)
- unpcklps2 xmm2,xmm5 ; xmm2=(06 16 26 36)=data6
- unpckhps2 xmm3,xmm5 ; xmm3=(07 17 27 37)=data7
-
- movaps xmm0,xmm7
- movaps xmm5,xmm6
- subps xmm7,xmm2 ; xmm7=data1-data6=tmp6
- subps xmm6,xmm3 ; xmm6=data0-data7=tmp7
- addps xmm0,xmm2 ; xmm0=data1+data6=tmp1
- addps xmm5,xmm3 ; xmm5=data0+data7=tmp0
-
- movaps xmm2, XMMWORD [wk(0)] ; xmm2=(22 32 23 33)
- movaps xmm3, XMMWORD [wk(1)] ; xmm3=(24 34 25 35)
- movaps XMMWORD [wk(0)], xmm7 ; wk(0)=tmp6
- movaps XMMWORD [wk(1)], xmm6 ; wk(1)=tmp7
-
- movaps xmm7,xmm4 ; transpose coefficients(phase 2)
- unpcklps2 xmm4,xmm2 ; xmm4=(02 12 22 32)=data2
- unpckhps2 xmm7,xmm2 ; xmm7=(03 13 23 33)=data3
- movaps xmm6,xmm1 ; transpose coefficients(phase 2)
- unpcklps2 xmm1,xmm3 ; xmm1=(04 14 24 34)=data4
- unpckhps2 xmm6,xmm3 ; xmm6=(05 15 25 35)=data5
-
- movaps xmm2,xmm7
- movaps xmm3,xmm4
- addps xmm7,xmm1 ; xmm7=data3+data4=tmp3
- addps xmm4,xmm6 ; xmm4=data2+data5=tmp2
- subps xmm2,xmm1 ; xmm2=data3-data4=tmp4
- subps xmm3,xmm6 ; xmm3=data2-data5=tmp5
-
- ; -- Even part
-
- movaps xmm1,xmm5
- movaps xmm6,xmm0
- subps xmm5,xmm7 ; xmm5=tmp13
- subps xmm0,xmm4 ; xmm0=tmp12
- addps xmm1,xmm7 ; xmm1=tmp10
- addps xmm6,xmm4 ; xmm6=tmp11
-
- addps xmm0,xmm5
- mulps xmm0,[GOTOFF(ebx,PD_0_707)] ; xmm0=z1
-
- movaps xmm7,xmm1
- movaps xmm4,xmm5
- subps xmm1,xmm6 ; xmm1=data4
- subps xmm5,xmm0 ; xmm5=data6
- addps xmm7,xmm6 ; xmm7=data0
- addps xmm4,xmm0 ; xmm4=data2
-
- movaps XMMWORD [XMMBLOCK(0,1,edx,SIZEOF_FAST_FLOAT)], xmm1
- movaps XMMWORD [XMMBLOCK(2,1,edx,SIZEOF_FAST_FLOAT)], xmm5
- movaps XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)], xmm7
- movaps XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_FAST_FLOAT)], xmm4
-
- ; -- Odd part
-
- movaps xmm6, XMMWORD [wk(0)] ; xmm6=tmp6
- movaps xmm0, XMMWORD [wk(1)] ; xmm0=tmp7
-
- addps xmm2,xmm3 ; xmm2=tmp10
- addps xmm3,xmm6 ; xmm3=tmp11
- addps xmm6,xmm0 ; xmm6=tmp12, xmm0=tmp7
-
- mulps xmm3,[GOTOFF(ebx,PD_0_707)] ; xmm3=z3
-
- movaps xmm1,xmm2 ; xmm1=tmp10
- subps xmm2,xmm6
- mulps xmm2,[GOTOFF(ebx,PD_0_382)] ; xmm2=z5
- mulps xmm1,[GOTOFF(ebx,PD_0_541)] ; xmm1=MULTIPLY(tmp10,FIX_0_541196)
- mulps xmm6,[GOTOFF(ebx,PD_1_306)] ; xmm6=MULTIPLY(tmp12,FIX_1_306562)
- addps xmm1,xmm2 ; xmm1=z2
- addps xmm6,xmm2 ; xmm6=z4
-
- movaps xmm5,xmm0
- subps xmm0,xmm3 ; xmm0=z13
- addps xmm5,xmm3 ; xmm5=z11
-
- movaps xmm7,xmm0
- movaps xmm4,xmm5
- subps xmm0,xmm1 ; xmm0=data3
- subps xmm5,xmm6 ; xmm5=data7
- addps xmm7,xmm1 ; xmm7=data5
- addps xmm4,xmm6 ; xmm4=data1
-
- movaps XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_FAST_FLOAT)], xmm0
- movaps XMMWORD [XMMBLOCK(3,1,edx,SIZEOF_FAST_FLOAT)], xmm5
- movaps XMMWORD [XMMBLOCK(1,1,edx,SIZEOF_FAST_FLOAT)], xmm7
- movaps XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)], xmm4
-
- add edx, 4*DCTSIZE*SIZEOF_FAST_FLOAT
- dec ecx
- jnz near .rowloop
-
- ; ---- Pass 2: process columns.
-
- mov edx, POINTER [data(eax)] ; (FAST_FLOAT *)
- mov ecx, DCTSIZE/4
- alignx 16,7
-.columnloop:
-
- movaps xmm0, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm2, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_FAST_FLOAT)]
-
- ; xmm0=(02 12 22 32), xmm2=(42 52 62 72)
- ; xmm1=(03 13 23 33), xmm3=(43 53 63 73)
-
- movaps xmm4,xmm0 ; transpose coefficients(phase 1)
- unpcklps xmm0,xmm1 ; xmm0=(02 03 12 13)
- unpckhps xmm4,xmm1 ; xmm4=(22 23 32 33)
- movaps xmm5,xmm2 ; transpose coefficients(phase 1)
- unpcklps xmm2,xmm3 ; xmm2=(42 43 52 53)
- unpckhps xmm5,xmm3 ; xmm5=(62 63 72 73)
-
- movaps xmm6, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm7, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_FAST_FLOAT)]
-
- ; xmm6=(00 10 20 30), xmm1=(40 50 60 70)
- ; xmm7=(01 11 21 31), xmm3=(41 51 61 71)
-
- movaps XMMWORD [wk(0)], xmm4 ; wk(0)=(22 23 32 33)
- movaps XMMWORD [wk(1)], xmm2 ; wk(1)=(42 43 52 53)
-
- movaps xmm4,xmm6 ; transpose coefficients(phase 1)
- unpcklps xmm6,xmm7 ; xmm6=(00 01 10 11)
- unpckhps xmm4,xmm7 ; xmm4=(20 21 30 31)
- movaps xmm2,xmm1 ; transpose coefficients(phase 1)
- unpcklps xmm1,xmm3 ; xmm1=(40 41 50 51)
- unpckhps xmm2,xmm3 ; xmm2=(60 61 70 71)
-
- movaps xmm7,xmm6 ; transpose coefficients(phase 2)
- unpcklps2 xmm6,xmm0 ; xmm6=(00 01 02 03)=data0
- unpckhps2 xmm7,xmm0 ; xmm7=(10 11 12 13)=data1
- movaps xmm3,xmm2 ; transpose coefficients(phase 2)
- unpcklps2 xmm2,xmm5 ; xmm2=(60 61 62 63)=data6
- unpckhps2 xmm3,xmm5 ; xmm3=(70 71 72 73)=data7
-
- movaps xmm0,xmm7
- movaps xmm5,xmm6
- subps xmm7,xmm2 ; xmm7=data1-data6=tmp6
- subps xmm6,xmm3 ; xmm6=data0-data7=tmp7
- addps xmm0,xmm2 ; xmm0=data1+data6=tmp1
- addps xmm5,xmm3 ; xmm5=data0+data7=tmp0
-
- movaps xmm2, XMMWORD [wk(0)] ; xmm2=(22 23 32 33)
- movaps xmm3, XMMWORD [wk(1)] ; xmm3=(42 43 52 53)
- movaps XMMWORD [wk(0)], xmm7 ; wk(0)=tmp6
- movaps XMMWORD [wk(1)], xmm6 ; wk(1)=tmp7
-
- movaps xmm7,xmm4 ; transpose coefficients(phase 2)
- unpcklps2 xmm4,xmm2 ; xmm4=(20 21 22 23)=data2
- unpckhps2 xmm7,xmm2 ; xmm7=(30 31 32 33)=data3
- movaps xmm6,xmm1 ; transpose coefficients(phase 2)
- unpcklps2 xmm1,xmm3 ; xmm1=(40 41 42 43)=data4
- unpckhps2 xmm6,xmm3 ; xmm6=(50 51 52 53)=data5
-
- movaps xmm2,xmm7
- movaps xmm3,xmm4
- addps xmm7,xmm1 ; xmm7=data3+data4=tmp3
- addps xmm4,xmm6 ; xmm4=data2+data5=tmp2
- subps xmm2,xmm1 ; xmm2=data3-data4=tmp4
- subps xmm3,xmm6 ; xmm3=data2-data5=tmp5
-
- ; -- Even part
-
- movaps xmm1,xmm5
- movaps xmm6,xmm0
- subps xmm5,xmm7 ; xmm5=tmp13
- subps xmm0,xmm4 ; xmm0=tmp12
- addps xmm1,xmm7 ; xmm1=tmp10
- addps xmm6,xmm4 ; xmm6=tmp11
-
- addps xmm0,xmm5
- mulps xmm0,[GOTOFF(ebx,PD_0_707)] ; xmm0=z1
-
- movaps xmm7,xmm1
- movaps xmm4,xmm5
- subps xmm1,xmm6 ; xmm1=data4
- subps xmm5,xmm0 ; xmm5=data6
- addps xmm7,xmm6 ; xmm7=data0
- addps xmm4,xmm0 ; xmm4=data2
-
- movaps XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_FAST_FLOAT)], xmm1
- movaps XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_FAST_FLOAT)], xmm5
- movaps XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FAST_FLOAT)], xmm7
- movaps XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_FAST_FLOAT)], xmm4
-
- ; -- Odd part
-
- movaps xmm6, XMMWORD [wk(0)] ; xmm6=tmp6
- movaps xmm0, XMMWORD [wk(1)] ; xmm0=tmp7
-
- addps xmm2,xmm3 ; xmm2=tmp10
- addps xmm3,xmm6 ; xmm3=tmp11
- addps xmm6,xmm0 ; xmm6=tmp12, xmm0=tmp7
-
- mulps xmm3,[GOTOFF(ebx,PD_0_707)] ; xmm3=z3
-
- movaps xmm1,xmm2 ; xmm1=tmp10
- subps xmm2,xmm6
- mulps xmm2,[GOTOFF(ebx,PD_0_382)] ; xmm2=z5
- mulps xmm1,[GOTOFF(ebx,PD_0_541)] ; xmm1=MULTIPLY(tmp10,FIX_0_541196)
- mulps xmm6,[GOTOFF(ebx,PD_1_306)] ; xmm6=MULTIPLY(tmp12,FIX_1_306562)
- addps xmm1,xmm2 ; xmm1=z2
- addps xmm6,xmm2 ; xmm6=z4
-
- movaps xmm5,xmm0
- subps xmm0,xmm3 ; xmm0=z13
- addps xmm5,xmm3 ; xmm5=z11
-
- movaps xmm7,xmm0
- movaps xmm4,xmm5
- subps xmm0,xmm1 ; xmm0=data3
- subps xmm5,xmm6 ; xmm5=data7
- addps xmm7,xmm1 ; xmm7=data5
- addps xmm4,xmm6 ; xmm4=data1
-
- movaps XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_FAST_FLOAT)], xmm0
- movaps XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_FAST_FLOAT)], xmm5
- movaps XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_FAST_FLOAT)], xmm7
- movaps XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FAST_FLOAT)], xmm4
-
- add edx, byte 4*SIZEOF_FAST_FLOAT
- dec ecx
- jnz near .columnloop
-
-; pop edi ; unused
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JFDCT_FLT_SSE_SUPPORTED
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/ji3dnflt.asm b/ji3dnflt.asm
deleted file mode 100644
index 9c31e99..0000000
--- a/ji3dnflt.asm
+++ /dev/null
@@ -1,462 +0,0 @@
-;
-; ji3dnflt.asm - floating-point IDCT (3DNow! & MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a floating-point implementation of the inverse DCT
-; (Discrete Cosine Transform). The following code is based directly on
-; the IJG's original jidctflt.c; see the jidctflt.c for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-%ifdef JIDCT_FLT_3DNOW_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_idct_float_3dnow)
-
-EXTN(jconst_idct_float_3dnow):
-
-PD_1_414 times 2 dd 1.414213562373095048801689
-PD_1_847 times 2 dd 1.847759065022573512256366
-PD_1_082 times 2 dd 1.082392200292393968799446
-PD_2_613 times 2 dd 2.613125929752753055713286
-PD_RNDINT_MAGIC times 2 dd 100663296.0 ; (float)(0x00C00000 << 3)
-PB_CENTERJSAMP times 8 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_float_3dnow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 2
-%define workspace wk(0)-DCTSIZE2*SIZEOF_FAST_FLOAT
- ; FAST_FLOAT workspace[DCTSIZE2]
-
- align 16
- global EXTN(jpeg_idct_float_3dnow)
-
-EXTN(jpeg_idct_float_3dnow):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input, store into work array.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
- lea edi, [workspace] ; FAST_FLOAT * wsptr
- mov ecx, DCTSIZE/2 ; ctr
- alignx 16,7
-.columnloop:
-%ifndef NO_ZERO_COLUMN_TEST_FLOAT_3DNOW
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- pushpic ebx ; save GOT address
- mov ebx, DWORD [DWBLOCK(3,0,esi,SIZEOF_JCOEF)]
- mov eax, DWORD [DWBLOCK(4,0,esi,SIZEOF_JCOEF)]
- or ebx, DWORD [DWBLOCK(5,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(6,0,esi,SIZEOF_JCOEF)]
- or ebx, DWORD [DWBLOCK(7,0,esi,SIZEOF_JCOEF)]
- or eax,ebx
- poppic ebx ; restore GOT address
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movd mm0, DWORD [DWBLOCK(0,0,esi,SIZEOF_JCOEF)]
-
- punpcklwd mm0,mm0
- psrad mm0,(DWORD_BIT-WORD_BIT)
- pi2fd mm0,mm0
-
- pfmul mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movq mm1,mm0
- punpckldq mm0,mm0
- punpckhdq mm1,mm1
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], mm0
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], mm0
- movq MMWORD [MMBLOCK(0,2,edi,SIZEOF_FAST_FLOAT)], mm0
- movq MMWORD [MMBLOCK(0,3,edi,SIZEOF_FAST_FLOAT)], mm0
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], mm1
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], mm1
- movq MMWORD [MMBLOCK(1,2,edi,SIZEOF_FAST_FLOAT)], mm1
- movq MMWORD [MMBLOCK(1,3,edi,SIZEOF_FAST_FLOAT)], mm1
- jmp near .nextcolumn
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Even part
-
- movd mm0, DWORD [DWBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movd mm1, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movd mm2, DWORD [DWBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movd mm3, DWORD [DWBLOCK(6,0,esi,SIZEOF_JCOEF)]
-
- punpcklwd mm0,mm0
- punpcklwd mm1,mm1
- psrad mm0,(DWORD_BIT-WORD_BIT)
- psrad mm1,(DWORD_BIT-WORD_BIT)
- pi2fd mm0,mm0
- pi2fd mm1,mm1
-
- pfmul mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- pfmul mm1, MMWORD [MMBLOCK(2,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- punpcklwd mm2,mm2
- punpcklwd mm3,mm3
- psrad mm2,(DWORD_BIT-WORD_BIT)
- psrad mm3,(DWORD_BIT-WORD_BIT)
- pi2fd mm2,mm2
- pi2fd mm3,mm3
-
- pfmul mm2, MMWORD [MMBLOCK(4,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- pfmul mm3, MMWORD [MMBLOCK(6,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movq mm4,mm0
- movq mm5,mm1
- pfsub mm0,mm2 ; mm0=tmp11
- pfsub mm1,mm3
- pfadd mm4,mm2 ; mm4=tmp10
- pfadd mm5,mm3 ; mm5=tmp13
-
- pfmul mm1,[GOTOFF(ebx,PD_1_414)]
- pfsub mm1,mm5 ; mm1=tmp12
-
- movq mm6,mm4
- movq mm7,mm0
- pfsub mm4,mm5 ; mm4=tmp3
- pfsub mm0,mm1 ; mm0=tmp2
- pfadd mm6,mm5 ; mm6=tmp0
- pfadd mm7,mm1 ; mm7=tmp1
-
- movq MMWORD [wk(1)], mm4 ; tmp3
- movq MMWORD [wk(0)], mm0 ; tmp2
-
- ; -- Odd part
-
- movd mm2, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movd mm3, DWORD [DWBLOCK(3,0,esi,SIZEOF_JCOEF)]
- movd mm5, DWORD [DWBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movd mm1, DWORD [DWBLOCK(7,0,esi,SIZEOF_JCOEF)]
-
- punpcklwd mm2,mm2
- punpcklwd mm3,mm3
- psrad mm2,(DWORD_BIT-WORD_BIT)
- psrad mm3,(DWORD_BIT-WORD_BIT)
- pi2fd mm2,mm2
- pi2fd mm3,mm3
-
- pfmul mm2, MMWORD [MMBLOCK(1,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- pfmul mm3, MMWORD [MMBLOCK(3,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- punpcklwd mm5,mm5
- punpcklwd mm1,mm1
- psrad mm5,(DWORD_BIT-WORD_BIT)
- psrad mm1,(DWORD_BIT-WORD_BIT)
- pi2fd mm5,mm5
- pi2fd mm1,mm1
-
- pfmul mm5, MMWORD [MMBLOCK(5,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- pfmul mm1, MMWORD [MMBLOCK(7,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movq mm4,mm2
- movq mm0,mm5
- pfadd mm2,mm1 ; mm2=z11
- pfadd mm5,mm3 ; mm5=z13
- pfsub mm4,mm1 ; mm4=z12
- pfsub mm0,mm3 ; mm0=z10
-
- movq mm1,mm2
- pfsub mm2,mm5
- pfadd mm1,mm5 ; mm1=tmp7
-
- pfmul mm2,[GOTOFF(ebx,PD_1_414)] ; mm2=tmp11
-
- movq mm3,mm0
- pfadd mm0,mm4
- pfmul mm0,[GOTOFF(ebx,PD_1_847)] ; mm0=z5
- pfmul mm3,[GOTOFF(ebx,PD_2_613)] ; mm3=(z10 * 2.613125930)
- pfmul mm4,[GOTOFF(ebx,PD_1_082)] ; mm4=(z12 * 1.082392200)
- pfsubr mm3,mm0 ; mm3=tmp12
- pfsub mm4,mm0 ; mm4=tmp10
-
- ; -- Final output stage
-
- pfsub mm3,mm1 ; mm3=tmp6
- movq mm5,mm6
- movq mm0,mm7
- pfadd mm6,mm1 ; mm6=data0=(00 01)
- pfadd mm7,mm3 ; mm7=data1=(10 11)
- pfsub mm5,mm1 ; mm5=data7=(70 71)
- pfsub mm0,mm3 ; mm0=data6=(60 61)
- pfsub mm2,mm3 ; mm2=tmp5
-
- movq mm1,mm6 ; transpose coefficients
- punpckldq mm6,mm7 ; mm6=(00 10)
- punpckhdq mm1,mm7 ; mm1=(01 11)
- movq mm3,mm0 ; transpose coefficients
- punpckldq mm0,mm5 ; mm0=(60 70)
- punpckhdq mm3,mm5 ; mm3=(61 71)
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], mm6
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], mm1
- movq MMWORD [MMBLOCK(0,3,edi,SIZEOF_FAST_FLOAT)], mm0
- movq MMWORD [MMBLOCK(1,3,edi,SIZEOF_FAST_FLOAT)], mm3
-
- movq mm7, MMWORD [wk(0)] ; mm7=tmp2
- movq mm5, MMWORD [wk(1)] ; mm5=tmp3
-
- pfadd mm4,mm2 ; mm4=tmp4
- movq mm6,mm7
- movq mm1,mm5
- pfadd mm7,mm2 ; mm7=data2=(20 21)
- pfadd mm5,mm4 ; mm5=data4=(40 41)
- pfsub mm6,mm2 ; mm6=data5=(50 51)
- pfsub mm1,mm4 ; mm1=data3=(30 31)
-
- movq mm0,mm7 ; transpose coefficients
- punpckldq mm7,mm1 ; mm7=(20 30)
- punpckhdq mm0,mm1 ; mm0=(21 31)
- movq mm3,mm5 ; transpose coefficients
- punpckldq mm5,mm6 ; mm5=(40 50)
- punpckhdq mm3,mm6 ; mm3=(41 51)
-
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], mm7
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], mm0
- movq MMWORD [MMBLOCK(0,2,edi,SIZEOF_FAST_FLOAT)], mm5
- movq MMWORD [MMBLOCK(1,2,edi,SIZEOF_FAST_FLOAT)], mm3
-
-.nextcolumn:
- add esi, byte 2*SIZEOF_JCOEF ; coef_block
- add edx, byte 2*SIZEOF_FLOAT_MULT_TYPE ; quantptr
- add edi, byte 2*DCTSIZE*SIZEOF_FAST_FLOAT ; wsptr
- dec ecx ; ctr
- jnz near .columnloop
-
- ; -- Prefetch the next coefficient block
-
- prefetch [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 0*32]
- prefetch [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 1*32]
- prefetch [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 2*32]
- prefetch [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 3*32]
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, [original_ebp]
- lea esi, [workspace] ; FAST_FLOAT * wsptr
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
- mov ecx, DCTSIZE/2 ; ctr
- alignx 16,7
-.rowloop:
-
- ; -- Even part
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_FAST_FLOAT)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_FAST_FLOAT)]
- movq mm2, MMWORD [MMBLOCK(4,0,esi,SIZEOF_FAST_FLOAT)]
- movq mm3, MMWORD [MMBLOCK(6,0,esi,SIZEOF_FAST_FLOAT)]
-
- movq mm4,mm0
- movq mm5,mm1
- pfsub mm0,mm2 ; mm0=tmp11
- pfsub mm1,mm3
- pfadd mm4,mm2 ; mm4=tmp10
- pfadd mm5,mm3 ; mm5=tmp13
-
- pfmul mm1,[GOTOFF(ebx,PD_1_414)]
- pfsub mm1,mm5 ; mm1=tmp12
-
- movq mm6,mm4
- movq mm7,mm0
- pfsub mm4,mm5 ; mm4=tmp3
- pfsub mm0,mm1 ; mm0=tmp2
- pfadd mm6,mm5 ; mm6=tmp0
- pfadd mm7,mm1 ; mm7=tmp1
-
- movq MMWORD [wk(1)], mm4 ; tmp3
- movq MMWORD [wk(0)], mm0 ; tmp2
-
- ; -- Odd part
-
- movq mm2, MMWORD [MMBLOCK(1,0,esi,SIZEOF_FAST_FLOAT)]
- movq mm3, MMWORD [MMBLOCK(3,0,esi,SIZEOF_FAST_FLOAT)]
- movq mm5, MMWORD [MMBLOCK(5,0,esi,SIZEOF_FAST_FLOAT)]
- movq mm1, MMWORD [MMBLOCK(7,0,esi,SIZEOF_FAST_FLOAT)]
-
- movq mm4,mm2
- movq mm0,mm5
- pfadd mm2,mm1 ; mm2=z11
- pfadd mm5,mm3 ; mm5=z13
- pfsub mm4,mm1 ; mm4=z12
- pfsub mm0,mm3 ; mm0=z10
-
- movq mm1,mm2
- pfsub mm2,mm5
- pfadd mm1,mm5 ; mm1=tmp7
-
- pfmul mm2,[GOTOFF(ebx,PD_1_414)] ; mm2=tmp11
-
- movq mm3,mm0
- pfadd mm0,mm4
- pfmul mm0,[GOTOFF(ebx,PD_1_847)] ; mm0=z5
- pfmul mm3,[GOTOFF(ebx,PD_2_613)] ; mm3=(z10 * 2.613125930)
- pfmul mm4,[GOTOFF(ebx,PD_1_082)] ; mm4=(z12 * 1.082392200)
- pfsubr mm3,mm0 ; mm3=tmp12
- pfsub mm4,mm0 ; mm4=tmp10
-
- ; -- Final output stage
-
- pfsub mm3,mm1 ; mm3=tmp6
- movq mm5,mm6
- movq mm0,mm7
- pfadd mm6,mm1 ; mm6=data0=(00 10)
- pfadd mm7,mm3 ; mm7=data1=(01 11)
- pfsub mm5,mm1 ; mm5=data7=(07 17)
- pfsub mm0,mm3 ; mm0=data6=(06 16)
- pfsub mm2,mm3 ; mm2=tmp5
-
- movq mm1,[GOTOFF(ebx,PD_RNDINT_MAGIC)] ; mm1=[PD_RNDINT_MAGIC]
- pcmpeqd mm3,mm3
- psrld mm3,WORD_BIT ; mm3={0xFFFF 0x0000 0xFFFF 0x0000}
-
- pfadd mm6,mm1 ; mm6=roundint(data0/8)=(00 ** 10 **)
- pfadd mm7,mm1 ; mm7=roundint(data1/8)=(01 ** 11 **)
- pfadd mm0,mm1 ; mm0=roundint(data6/8)=(06 ** 16 **)
- pfadd mm5,mm1 ; mm5=roundint(data7/8)=(07 ** 17 **)
-
- pand mm6,mm3 ; mm6=(00 -- 10 --)
- pslld mm7,WORD_BIT ; mm7=(-- 01 -- 11)
- pand mm0,mm3 ; mm0=(06 -- 16 --)
- pslld mm5,WORD_BIT ; mm5=(-- 07 -- 17)
- por mm6,mm7 ; mm6=(00 01 10 11)
- por mm0,mm5 ; mm0=(06 07 16 17)
-
- movq mm1, MMWORD [wk(0)] ; mm1=tmp2
- movq mm3, MMWORD [wk(1)] ; mm3=tmp3
-
- pfadd mm4,mm2 ; mm4=tmp4
- movq mm7,mm1
- movq mm5,mm3
- pfadd mm1,mm2 ; mm1=data2=(02 12)
- pfadd mm3,mm4 ; mm3=data4=(04 14)
- pfsub mm7,mm2 ; mm7=data5=(05 15)
- pfsub mm5,mm4 ; mm5=data3=(03 13)
-
- movq mm2,[GOTOFF(ebx,PD_RNDINT_MAGIC)] ; mm2=[PD_RNDINT_MAGIC]
- pcmpeqd mm4,mm4
- psrld mm4,WORD_BIT ; mm4={0xFFFF 0x0000 0xFFFF 0x0000}
-
- pfadd mm3,mm2 ; mm3=roundint(data4/8)=(04 ** 14 **)
- pfadd mm7,mm2 ; mm7=roundint(data5/8)=(05 ** 15 **)
- pfadd mm1,mm2 ; mm1=roundint(data2/8)=(02 ** 12 **)
- pfadd mm5,mm2 ; mm5=roundint(data3/8)=(03 ** 13 **)
-
- pand mm3,mm4 ; mm3=(04 -- 14 --)
- pslld mm7,WORD_BIT ; mm7=(-- 05 -- 15)
- pand mm1,mm4 ; mm1=(02 -- 12 --)
- pslld mm5,WORD_BIT ; mm5=(-- 03 -- 13)
- por mm3,mm7 ; mm3=(04 05 14 15)
- por mm1,mm5 ; mm1=(02 03 12 13)
-
- movq mm2,[GOTOFF(ebx,PB_CENTERJSAMP)] ; mm2=[PB_CENTERJSAMP]
-
- packsswb mm6,mm3 ; mm6=(00 01 10 11 04 05 14 15)
- packsswb mm1,mm0 ; mm1=(02 03 12 13 06 07 16 17)
- paddb mm6,mm2
- paddb mm1,mm2
-
- movq mm4,mm6 ; transpose coefficients(phase 2)
- punpcklwd mm6,mm1 ; mm6=(00 01 02 03 10 11 12 13)
- punpckhwd mm4,mm1 ; mm4=(04 05 06 07 14 15 16 17)
-
- movq mm7,mm6 ; transpose coefficients(phase 3)
- punpckldq mm6,mm4 ; mm6=(00 01 02 03 04 05 06 07)
- punpckhdq mm7,mm4 ; mm7=(10 11 12 13 14 15 16 17)
-
- pushpic ebx ; save GOT address
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm6
- movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm7
-
- poppic ebx ; restore GOT address
-
- add esi, byte 2*SIZEOF_FAST_FLOAT ; wsptr
- add edi, byte 2*SIZEOF_JSAMPROW
- dec ecx ; ctr
- jnz near .rowloop
-
- femms ; empty MMX/3DNow! state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JIDCT_FLT_3DNOW_MMX_SUPPORTED
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/jidctflt.asm b/jidctflt.asm
deleted file mode 100644
index 126dc7b..0000000
--- a/jidctflt.asm
+++ /dev/null
@@ -1,473 +0,0 @@
-;
-; jidctflt.asm - floating-point IDCT (non-SIMD)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a floating-point implementation of the inverse DCT
-; (Discrete Cosine Transform). The following code is based directly on
-; the IJG's original jidctflt.c; see the jidctflt.c for more details.
-;
-; Last Modified : October 17, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
-%define ROTATOR_TYPE FP32 ; float
-
- alignz 16
- global EXTN(jconst_idct_float)
-
-EXTN(jconst_idct_float):
-
-F_1_414 dd 1.414213562373095048801689 ; 2*cos(PI*1/4)
-F_1_847 dd 1.847759065022573512256366 ; 2*cos(PI*1/8)
-F_1_082 dd 1.082392200292393968799446 ; 2*(cos(PI*1/8)-cos(PI*3/8))
-F_2_613 dd 2.613125929752753055713286 ; 2*(cos(PI*1/8)+cos(PI*3/8))
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define tmp ebp-SIZEOF_FP64 ; double tmp
-%define workspace tmp-DCTSIZE2*SIZEOF_FAST_FLOAT
- ; FAST_FLOAT workspace[DCTSIZE2]
-%define rndint_magic workspace-SIZEOF_FP32
- ; float rndint_magic = 100663296.0F
-%define gotptr rndint_magic-SIZEOF_POINTER ; void * gotptr
-
- align 16
- global EXTN(jpeg_idct_float)
-
-EXTN(jpeg_idct_float):
- push ebp
- mov ebp,esp
- lea esp, [workspace]
- push FP32 0x4CC00000 ; (float)(0x00C00000 << 3)
- pushpic eax ; make a room for GOT address
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
- movpic POINTER [gotptr], ebx ; save GOT address
-
- ; ---- Pass 1: process columns from input, store into work array.
-
- mov edx, POINTER [compptr(ebp)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(ebp)] ; inptr
- lea edi, [workspace] ; FAST_FLOAT * wsptr
- mov ecx, DCTSIZE ; ctr
- alignx 16,7
-.columnloop:
- mov ax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(2,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- mov bx, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- mov ax, JCOEF [COL(4,esi,SIZEOF_JCOEF)]
- or bx, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(6,esi,SIZEOF_JCOEF)]
- or bx, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- or ax,bx
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- fild JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- fmul FLOAT_MULT_TYPE [COL(0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- fst FAST_FLOAT [COL(0,edi,SIZEOF_FAST_FLOAT)]
- fst FAST_FLOAT [COL(1,edi,SIZEOF_FAST_FLOAT)]
- fst FAST_FLOAT [COL(2,edi,SIZEOF_FAST_FLOAT)]
- fst FAST_FLOAT [COL(3,edi,SIZEOF_FAST_FLOAT)]
- fst FAST_FLOAT [COL(4,edi,SIZEOF_FAST_FLOAT)]
- fst FAST_FLOAT [COL(5,edi,SIZEOF_FAST_FLOAT)]
- fst FAST_FLOAT [COL(6,edi,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(7,edi,SIZEOF_FAST_FLOAT)]
- jmp near .nextcolumn
- alignx 16,7
-
-.columnDCT:
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- ; -- Even part
-
- fild JCOEF [COL(2,esi,SIZEOF_JCOEF)]
- fild JCOEF [COL(6,esi,SIZEOF_JCOEF)]
- fild JCOEF [COL(4,esi,SIZEOF_JCOEF)]
- fild JCOEF [COL(0,esi,SIZEOF_JCOEF)]
-
- fxch st0,st3
-
- fmul FLOAT_MULT_TYPE [COL(2,edx,SIZEOF_FLOAT_MULT_TYPE)]
- fxch st0,st2
- fmul FLOAT_MULT_TYPE [COL(6,edx,SIZEOF_FLOAT_MULT_TYPE)]
- fxch st0,st1
- fmul FLOAT_MULT_TYPE [COL(4,edx,SIZEOF_FLOAT_MULT_TYPE)]
- fxch st0,st3
- fmul FLOAT_MULT_TYPE [COL(0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- fxch st0,st1
-
- fld st2 ; st2 = st2 + st0, st0 = st2 - st0
- fsub st0,st1
- fxch st0,st1
- faddp st3,st0
-
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_414)]
-
- fld st3 ; st1 = st1 + st3, st3 = st1 - st3
- fsubr st0,st2
- fxch st0,st4
- faddp st2,st0
-
- fsub st0,st2
-
- fld st1 ; st2 = st1 + st2, st1 = st1 - st2
- fsub st0,st3
- fxch st0,st2
- faddp st3,st0
- fld st3 ; st0 = st3 + st0, st3 = st3 - st0
- fsub st0,st1
- fxch st0,st4
- faddp st1,st0
-
- ; -- Odd part
-
- fild JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- fild JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- fild JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- fild JCOEF [COL(5,esi,SIZEOF_JCOEF)]
-
- fxch st0,st3
-
- fmul FLOAT_MULT_TYPE [COL(1,edx,SIZEOF_FLOAT_MULT_TYPE)]
- fxch st0,st2
- fmul FLOAT_MULT_TYPE [COL(7,edx,SIZEOF_FLOAT_MULT_TYPE)]
- fxch st0,st1
- fmul FLOAT_MULT_TYPE [COL(3,edx,SIZEOF_FLOAT_MULT_TYPE)]
- fxch st0,st6
- fxch st3,st0
- fmul FLOAT_MULT_TYPE [COL(5,edx,SIZEOF_FLOAT_MULT_TYPE)]
- fxch st0,st5
- fstp FP64 [tmp]
-
- fld st1 ; st1 = st1 + st0, st0 = st1 - st0
- fsub st0,st1
- fxch st0,st1
- faddp st2,st0
- fld st5 ; st4 = st4 + st5, st5 = st4 - st5
- fsubr st0,st5
- fxch st0,st6
- faddp st5,st0
-
- fld st1 ; st1 = st1 + st4, st4 = st1 - st4
- fsub st0,st5
- fxch st0,st5
- faddp st2,st0
-
- fld st5
- fadd st0,st1
- fxch st0,st5
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_414)]
- fxch st0,st5
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_847)]
- fxch st0,st6
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_2_613)]
- fxch st0,st1
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_082)]
- fxch st0,st6
- fsubr st1,st0
- fsubp st6,st0
-
- ; -- Final output stage
-
- fsub st0,st1
- fld st2 ; st1 = st2 + st1, st2 = st2 - st1
- fsub st0,st2
- fxch st0,st3
- faddp st2,st0
- fsub st4,st0
- fld st3 ; st0 = st3 + st0, st3 = st3 - st0
- fsub st0,st1
- fxch st0,st4
- faddp st1,st0
-
- fxch st0,st2
-
- fstp FAST_FLOAT [COL(7,edi,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(0,edi,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(1,edi,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(6,edi,SIZEOF_FAST_FLOAT)]
-
- fadd st1,st0
- fld FP64 [tmp]
- fld st1 ; st3 = st3 + st1, st1 = st3 - st1
- fsubr st0,st4
- fxch st0,st2
- faddp st4,st0
- fld st0 ; st0 = st0 + st2, st2 = st0 - st2
- fsub st0,st3
- fxch st0,st3
- faddp st1,st0
-
- fxch st0,st3
-
- fstp FAST_FLOAT [COL(2,edi,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(5,edi,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(3,edi,SIZEOF_FAST_FLOAT)]
- fstp FAST_FLOAT [COL(4,edi,SIZEOF_FAST_FLOAT)]
-
-.nextcolumn:
- add esi, byte SIZEOF_JCOEF ; advance pointers to next column
- add edx, byte SIZEOF_FLOAT_MULT_TYPE
- add edi, byte SIZEOF_FAST_FLOAT
- dec ecx
- jnz near .columnloop
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov edx, POINTER [cinfo(ebp)]
- mov edx, POINTER [jdstruct_sample_range_limit(edx)]
- sub edx, byte -CENTERJSAMPLE*SIZEOF_JSAMPLE ; JSAMPLE * range_limit
-
- lea esi, [workspace] ; FAST_FLOAT * wsptr
- mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *)
- mov ecx, DCTSIZE ; ctr
- alignx 16,7
-.rowloop:
- push edi
- mov edi, JSAMPROW [edi] ; (JSAMPLE *)
- add edi, JDIMENSION [output_col(ebp)] ; edi=outptr
-
-%ifndef NO_ZERO_ROW_TEST_FLOAT
- mov eax, FAST_FLOAT [ROW(1,esi,SIZEOF_FAST_FLOAT)]
- add eax,eax ; shl eax,1 (shift out the sign bit)
- jnz short .rowDCT
-
- mov eax, FAST_FLOAT [ROW(2,esi,SIZEOF_FAST_FLOAT)]
- mov ebx, FAST_FLOAT [ROW(3,esi,SIZEOF_FAST_FLOAT)]
- or eax, FAST_FLOAT [ROW(4,esi,SIZEOF_FAST_FLOAT)]
- or ebx, FAST_FLOAT [ROW(5,esi,SIZEOF_FAST_FLOAT)]
- or eax, FAST_FLOAT [ROW(6,esi,SIZEOF_FAST_FLOAT)]
- or ebx, FAST_FLOAT [ROW(7,esi,SIZEOF_FAST_FLOAT)]
- or eax,ebx
- add eax,eax ; shl eax,1 (shift out the sign bit)
- jnz short .rowDCT
-
- ; -- AC terms all zero
-
- push eax
-
- fld FAST_FLOAT [ROW(0,esi,SIZEOF_FAST_FLOAT)]
- fadd FP32 [rndint_magic]
- fstp FP32 [esp]
-
- pop eax
- and eax,RANGE_MASK
- mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE]
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+4*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+5*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+6*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+7*SIZEOF_JSAMPLE], al
- jmp near .nextrow
- alignx 16,7
-%endif
-.rowDCT:
- movpic ebx, POINTER [gotptr] ; load GOT address
-
- ; -- Even part
-
- fld FAST_FLOAT [ROW(4,esi,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [ROW(2,esi,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [ROW(0,esi,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [ROW(6,esi,SIZEOF_FAST_FLOAT)]
-
- fld st2 ; st2 = st2 + st0, st0 = st2 - st0
- fsub st0,st1
- fxch st0,st1
- faddp st3,st0
-
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_414)]
-
- fld st3 ; st1 = st1 + st3, st3 = st1 - st3
- fsubr st0,st2
- fxch st0,st4
- faddp st2,st0
-
- fsub st0,st2
-
- fld st1 ; st2 = st1 + st2, st1 = st1 - st2
- fsub st0,st3
- fxch st0,st2
- faddp st3,st0
- fld st3 ; st0 = st3 + st0, st3 = st3 - st0
- fsub st0,st1
- fxch st0,st4
- faddp st1,st0
-
- ; -- Odd part
-
- fld FAST_FLOAT [ROW(3,esi,SIZEOF_FAST_FLOAT)]
- fxch st0,st3
- fld FAST_FLOAT [ROW(1,esi,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [ROW(7,esi,SIZEOF_FAST_FLOAT)]
- fld FAST_FLOAT [ROW(5,esi,SIZEOF_FAST_FLOAT)]
- fxch st0,st5
- fstp FP64 [tmp]
-
- fld st1 ; st1 = st1 + st0, st0 = st1 - st0
- fsub st0,st1
- fxch st0,st1
- faddp st2,st0
- fld st5 ; st4 = st4 + st5, st5 = st4 - st5
- fsubr st0,st5
- fxch st0,st6
- faddp st5,st0
-
- fld st1 ; st1 = st1 + st4, st4 = st1 - st4
- fsub st0,st5
- fxch st0,st5
- faddp st2,st0
-
- fld st5
- fadd st0,st1
- fxch st0,st5
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_414)]
- fxch st0,st5
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_847)]
- fxch st0,st6
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_2_613)]
- fxch st0,st1
- fmul ROTATOR_TYPE [GOTOFF(ebx,F_1_082)]
- fxch st0,st6
- fsubr st1,st0
- fsubp st6,st0
-
- ; -- Final output stage
-
- sub esp, byte DCTSIZE*SIZEOF_FP32
-
- fsub st0,st1
- fld st2 ; st1 = st2 + st1, st2 = st2 - st1
- fsub st0,st2
- fxch st0,st3
- faddp st2,st0
- fsub st4,st0
- fld st3 ; st0 = st3 + st0, st3 = st3 - st0
- fsub st0,st1
- fxch st0,st4
- faddp st1,st0
-
- fld FP32 [rndint_magic]
-
- fadd st4,st0
- fadd st1,st0
- fadd st2,st0
- fadd st3,st0
-
- fxch st0,st4
-
- fstp FP32 [esp+6*SIZEOF_FP32]
- fstp FP32 [esp+1*SIZEOF_FP32]
- fstp FP32 [esp+0*SIZEOF_FP32]
- fstp FP32 [esp+7*SIZEOF_FP32]
-
- fxch st0,st1
-
- fadd st2,st0
- fld FP64 [tmp]
- fld st1 ; st4 = st4 + st1, st1 = st4 - st1
- fsubr st0,st5
- fxch st0,st2
- faddp st5,st0
- fld st0 ; st0 = st0 + st3, st3 = st0 - st3
- fsub st0,st4
- fxch st0,st4
- faddp st1,st0
-
- fxch st0,st2
-
- fadd st1,st0
- fadd st2,st0
- fadd st3,st0
- faddp st4,st0
-
- fstp FP32 [esp+5*SIZEOF_FP32]
- fstp FP32 [esp+4*SIZEOF_FP32]
- fstp FP32 [esp+3*SIZEOF_FP32]
- fstp FP32 [esp+2*SIZEOF_FP32]
-
-%assign i 0 ; i=0;
-%rep 4 ; -- repeat 4 times ---
- pop eax
- pop ebx
- and eax,RANGE_MASK
- and ebx,RANGE_MASK
- mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE]
- mov bl, JSAMPLE [edx+ebx*SIZEOF_JSAMPLE]
- mov JSAMPLE [edi+(i+0)*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+(i+1)*SIZEOF_JSAMPLE], bl
-%assign i i+2 ; i+=2;
-%endrep ; -- repeat end ---
-
-.nextrow:
- pop edi
- add esi, byte DCTSIZE*SIZEOF_FAST_FLOAT
- add edi, byte SIZEOF_JSAMPROW ; advance pointer to next row
- dec ecx
- jnz near .rowloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp
- pop ebp
- ret
-
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/unused/jidctflt.c b/jidctflt.c
similarity index 100%
rename from unused/jidctflt.c
rename to jidctflt.c
diff --git a/jidctfst.asm b/jidctfst.asm
deleted file mode 100644
index 8022ac6..0000000
--- a/jidctfst.asm
+++ /dev/null
@@ -1,464 +0,0 @@
-;
-; jidctfst.asm - fast integer IDCT (non-SIMD)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a fast, not so accurate integer implementation of
-; the inverse DCT (Discrete Cosine Transform). The following code is
-; based directly on the IJG's original jidctfst.c; see the jidctfst.c
-; for more details.
-;
-; Last Modified : October 17, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_IFAST_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-; We can gain a little more speed, with a further compromise in accuracy,
-; by omitting the addition in a descaling shift. This yields an
-; incorrectly rounded result half the time...
-;
-%macro descale 2
-%ifdef USE_ACCURATE_ROUNDING
-%if (%2)<=7
- add %1, byte (1<<((%2)-1)) ; add reg32,imm8
-%else
- add %1, (1<<((%2)-1)) ; add reg32,imm32
-%endif
-%endif
- sar %1,%2
-%endmacro
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 8
-%define PASS1_BITS 2
-
-%if IFAST_SCALE_BITS != PASS1_BITS
-%error "'IFAST_SCALE_BITS' must be equal to 'PASS1_BITS'."
-%endif
-
-%if CONST_BITS == 8
-F_1_082 equ 277 ; FIX(1.082392200)
-F_1_414 equ 362 ; FIX(1.414213562)
-F_1_847 equ 473 ; FIX(1.847759065)
-F_2_613 equ 669 ; FIX(2.613125930)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_1_082 equ DESCALE(1162209775,30-CONST_BITS) ; FIX(1.082392200)
-F_1_414 equ DESCALE(1518500249,30-CONST_BITS) ; FIX(1.414213562)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_2_613 equ DESCALE(2805822602,30-CONST_BITS) ; FIX(2.613125930)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define range_limit ebp-SIZEOF_POINTER ; JSAMPLE * range_limit
-%define ptr range_limit-SIZEOF_POINTER ; void * ptr
-%define workspace ptr-DCTSIZE2*SIZEOF_INT
- ; int workspace[DCTSIZE2]
-
- align 16
- global EXTN(jpeg_idct_ifast)
-
-EXTN(jpeg_idct_ifast):
- push ebp
- mov ebp,esp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- ; ---- Pass 1: process columns from input, store into work array.
-
- mov edx, POINTER [compptr(ebp)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(ebp)] ; inptr
- lea edi, [workspace] ; int * wsptr
- mov ecx, DCTSIZE ; ctr
- alignx 16,7
-.columnloop:
- mov ax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(2,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- mov bx, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- mov ax, JCOEF [COL(4,esi,SIZEOF_JCOEF)]
- or bx, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(6,esi,SIZEOF_JCOEF)]
- or bx, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- or ax,bx
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- mov ax, JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- imul ax, IFAST_MULT_TYPE [COL(0,edx,SIZEOF_IFAST_MULT_TYPE)]
- cwde
-
- mov INT [COL(0,edi,SIZEOF_INT)], eax
- mov INT [COL(1,edi,SIZEOF_INT)], eax
- mov INT [COL(2,edi,SIZEOF_INT)], eax
- mov INT [COL(3,edi,SIZEOF_INT)], eax
- mov INT [COL(4,edi,SIZEOF_INT)], eax
- mov INT [COL(5,edi,SIZEOF_INT)], eax
- mov INT [COL(6,edi,SIZEOF_INT)], eax
- mov INT [COL(7,edi,SIZEOF_INT)], eax
- jmp near .nextcolumn
- alignx 16,7
-
-.columnDCT:
- push ecx ; ctr
- push esi ; coef_block
- push edx ; quantptr
-
- mov POINTER [ptr], edi ; wsptr
-
- ; -- Even part
-
- movsx eax, JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- movsx ecx, JCOEF [COL(4,esi,SIZEOF_JCOEF)]
- imul ax, IFAST_MULT_TYPE [COL(0,edx,SIZEOF_IFAST_MULT_TYPE)]
- imul cx, IFAST_MULT_TYPE [COL(4,edx,SIZEOF_IFAST_MULT_TYPE)]
- movsx ebx, JCOEF [COL(2,esi,SIZEOF_JCOEF)]
- movsx edi, JCOEF [COL(6,esi,SIZEOF_JCOEF)]
- imul bx, IFAST_MULT_TYPE [COL(2,edx,SIZEOF_IFAST_MULT_TYPE)]
- imul di, IFAST_MULT_TYPE [COL(6,edx,SIZEOF_IFAST_MULT_TYPE)]
-
- lea edx,[eax+ecx] ; edx=tmp10
- sub eax,ecx ; eax=tmp11
-
- lea ecx,[ebx+edi] ; ecx=tmp13
- sub ebx,edi
- imul ebx,(F_1_414)
- descale ebx,CONST_BITS
- sub ebx,ecx ; ebx=tmp12
-
- lea edi,[edx+ecx] ; edi=tmp0
- sub edx,ecx ; edx=tmp3
- lea ecx,[eax+ebx] ; ecx=tmp1
- sub eax,ebx ; eax=tmp2
-
- push edx ; tmp3
- push eax ; tmp2
- push ecx ; tmp1
- push edi ; tmp0
-
- ; -- Odd part
-
- mov edx, POINTER [esp+16] ; quantptr
-
- movsx eax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- movsx ebx, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- imul ax, IFAST_MULT_TYPE [COL(1,edx,SIZEOF_IFAST_MULT_TYPE)]
- imul bx, IFAST_MULT_TYPE [COL(7,edx,SIZEOF_IFAST_MULT_TYPE)]
- movsx edi, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- movsx ecx, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- imul di, IFAST_MULT_TYPE [COL(5,edx,SIZEOF_IFAST_MULT_TYPE)]
- imul cx, IFAST_MULT_TYPE [COL(3,edx,SIZEOF_IFAST_MULT_TYPE)]
-
- lea esi,[eax+ebx] ; esi=z11
- sub eax,ebx ; eax=z12
- lea edx,[edi+ecx] ; edx=z13
- sub edi,ecx ; edi=z10
-
- lea ebx,[esi+edx] ; ebx=tmp7
- sub esi,edx
- imul esi,(F_1_414) ; esi=tmp11
- descale esi,CONST_BITS
-
- lea ecx,[edi+eax]
- imul ecx,(F_1_847) ; ecx=z5
- imul edi,(-F_2_613) ; edi=MULTIPLY(z10,-FIX_2_613125930)
- imul eax,(F_1_082) ; eax=MULTIPLY(z12,FIX_1_082392200)
- descale ecx,CONST_BITS
- descale edi,CONST_BITS
- descale eax,CONST_BITS
- add edi,ecx ; edi=tmp12
- sub eax,ecx ; eax=tmp10
-
- ; -- Final output stage
-
- sub edi,ebx ; edi=tmp6
- pop edx ; edx=tmp0
- sub esi,edi ; esi=tmp5
- pop ecx ; ecx=tmp1
- add eax,esi ; eax=tmp4
- push esi ; tmp5
- push eax ; tmp4
-
- lea eax,[edx+ebx] ; eax=data0(=tmp0+tmp7)
- sub edx,ebx ; edx=data7(=tmp0-tmp7)
- lea ebx,[ecx+edi] ; ebx=data1(=tmp1+tmp6)
- sub ecx,edi ; ecx=data6(=tmp1-tmp6)
-
- mov edi, POINTER [ptr] ; edi=wsptr
-
- mov INT [COL(0,edi,SIZEOF_INT)], eax
- mov INT [COL(7,edi,SIZEOF_INT)], edx
- mov INT [COL(1,edi,SIZEOF_INT)], ebx
- mov INT [COL(6,edi,SIZEOF_INT)], ecx
-
- pop esi ; esi=tmp4
- pop eax ; eax=tmp5
- pop edx ; edx=tmp2
- pop ecx ; ecx=tmp3
-
- lea ebx,[edx+eax] ; ebx=data2(=tmp2+tmp5)
- sub edx,eax ; edx=data5(=tmp2-tmp5)
- lea eax,[ecx+esi] ; eax=data4(=tmp3+tmp4)
- sub ecx,esi ; ecx=data3(=tmp3-tmp4)
-
- mov INT [COL(2,edi,SIZEOF_INT)], ebx
- mov INT [COL(5,edi,SIZEOF_INT)], edx
- mov INT [COL(4,edi,SIZEOF_INT)], eax
- mov INT [COL(3,edi,SIZEOF_INT)], ecx
-
- pop edx ; quantptr
- pop esi ; coef_block
- pop ecx ; ctr
-
-.nextcolumn:
- add esi, byte SIZEOF_JCOEF ; advance pointers to next column
- add edx, byte SIZEOF_IFAST_MULT_TYPE
- add edi, byte SIZEOF_INT
- dec ecx
- jnz near .columnloop
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, POINTER [cinfo(ebp)]
- mov eax, POINTER [jdstruct_sample_range_limit(eax)]
- sub eax, byte -CENTERJSAMPLE*SIZEOF_JSAMPLE ; JSAMPLE * range_limit
- mov POINTER [range_limit], eax
-
- lea esi, [workspace] ; int * wsptr
- mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *)
- mov ecx, DCTSIZE ; ctr
- alignx 16,7
-.rowloop:
- push edi
- mov edi, JSAMPROW [edi] ; (JSAMPLE *)
- add edi, JDIMENSION [output_col(ebp)] ; edi=outptr
-
-%ifndef NO_ZERO_ROW_TEST
- mov eax, INT [ROW(1,esi,SIZEOF_INT)]
- or eax, INT [ROW(2,esi,SIZEOF_INT)]
- jnz short .rowDCT
-
- mov ebx, INT [ROW(3,esi,SIZEOF_INT)]
- mov eax, INT [ROW(4,esi,SIZEOF_INT)]
- or ebx, INT [ROW(5,esi,SIZEOF_INT)]
- or eax, INT [ROW(6,esi,SIZEOF_INT)]
- or ebx, INT [ROW(7,esi,SIZEOF_INT)]
- or eax,ebx
- jnz short .rowDCT
-
- ; -- AC terms all zero
-
- mov eax, INT [ROW(0,esi,SIZEOF_INT)]
-
- mov edx, POINTER [range_limit] ; (JSAMPLE *)
-
- descale eax,(PASS1_BITS+3)
- and eax,RANGE_MASK
- mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE]
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+4*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+5*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+6*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+7*SIZEOF_JSAMPLE], al
- jmp near .nextrow
- alignx 16,7
-%endif
-.rowDCT:
- push esi ; wsptr
- push ecx ; ctr
-
- mov POINTER [ptr], edi ; outptr
-
- ; -- Even part
-
- mov eax, INT [ROW(0,esi,SIZEOF_INT)]
- mov ebx, INT [ROW(2,esi,SIZEOF_INT)]
- mov ecx, INT [ROW(4,esi,SIZEOF_INT)]
- mov edi, INT [ROW(6,esi,SIZEOF_INT)]
-
- lea edx,[eax+ecx] ; edx=tmp10
- sub eax,ecx ; eax=tmp11
-
- lea ecx,[ebx+edi] ; ecx=tmp13
- sub ebx,edi
- imul ebx,(F_1_414)
- descale ebx,CONST_BITS
- sub ebx,ecx ; ebx=tmp12
-
- lea edi,[edx+ecx] ; edi=tmp0
- sub edx,ecx ; edx=tmp3
- lea ecx,[eax+ebx] ; ecx=tmp1
- sub eax,ebx ; eax=tmp2
-
- push edx ; tmp3
- push eax ; tmp2
- push ecx ; tmp1
- push edi ; tmp0
-
- ; -- Odd part
-
- mov eax, INT [ROW(1,esi,SIZEOF_INT)]
- mov ecx, INT [ROW(3,esi,SIZEOF_INT)]
- mov edi, INT [ROW(5,esi,SIZEOF_INT)]
- mov ebx, INT [ROW(7,esi,SIZEOF_INT)]
-
- lea esi,[eax+ebx] ; esi=z11
- sub eax,ebx ; eax=z12
- lea edx,[edi+ecx] ; edx=z13
- sub edi,ecx ; edi=z10
-
- lea ebx,[esi+edx] ; ebx=tmp7
- sub esi,edx
- imul esi,(F_1_414) ; esi=tmp11
- descale esi,CONST_BITS
-
- lea ecx,[edi+eax]
- imul ecx,(F_1_847) ; ecx=z5
- imul edi,(-F_2_613) ; edi=MULTIPLY(z10,-FIX_2_613125930)
- imul eax,(F_1_082) ; eax=MULTIPLY(z12,FIX_1_082392200)
- descale ecx,CONST_BITS
- descale edi,CONST_BITS
- descale eax,CONST_BITS
- add edi,ecx ; edi=tmp12
- sub eax,ecx ; eax=tmp10
-
- ; -- Final output stage
-
- sub edi,ebx ; edi=tmp6
- pop edx ; edx=tmp0
- sub esi,edi ; esi=tmp5
- pop ecx ; ecx=tmp1
- add eax,esi ; eax=tmp4
- push esi ; tmp5
- push eax ; tmp4
-
- lea eax,[edx+ebx] ; eax=data0(=tmp0+tmp7)
- sub edx,ebx ; edx=data7(=tmp0-tmp7)
- lea ebx,[ecx+edi] ; ebx=data1(=tmp1+tmp6)
- sub ecx,edi ; ecx=data6(=tmp1-tmp6)
-
- mov esi, POINTER [range_limit] ; (JSAMPLE *)
-
- descale eax,(PASS1_BITS+3)
- descale edx,(PASS1_BITS+3)
- descale ebx,(PASS1_BITS+3)
- descale ecx,(PASS1_BITS+3)
-
- mov edi, POINTER [ptr] ; edi=outptr
-
- and eax,RANGE_MASK
- and edx,RANGE_MASK
- and ebx,RANGE_MASK
- and ecx,RANGE_MASK
-
- mov al, JSAMPLE [esi+eax*SIZEOF_JSAMPLE]
- mov dl, JSAMPLE [esi+edx*SIZEOF_JSAMPLE]
- mov bl, JSAMPLE [esi+ebx*SIZEOF_JSAMPLE]
- mov cl, JSAMPLE [esi+ecx*SIZEOF_JSAMPLE]
-
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+7*SIZEOF_JSAMPLE], dl
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], bl
- mov JSAMPLE [edi+6*SIZEOF_JSAMPLE], cl
-
- pop esi ; esi=tmp4
- pop eax ; eax=tmp5
- pop edx ; edx=tmp2
- pop ecx ; ecx=tmp3
-
- lea ebx,[edx+eax] ; ebx=data2(=tmp2+tmp5)
- sub edx,eax ; edx=data5(=tmp2-tmp5)
- lea eax,[ecx+esi] ; eax=data4(=tmp3+tmp4)
- sub ecx,esi ; ecx=data3(=tmp3-tmp4)
-
- mov esi, POINTER [range_limit] ; (JSAMPLE *)
-
- descale ebx,(PASS1_BITS+3)
- descale edx,(PASS1_BITS+3)
- descale eax,(PASS1_BITS+3)
- descale ecx,(PASS1_BITS+3)
-
- and ebx,RANGE_MASK
- and edx,RANGE_MASK
- and eax,RANGE_MASK
- and ecx,RANGE_MASK
-
- mov bl, JSAMPLE [esi+ebx*SIZEOF_JSAMPLE]
- mov dl, JSAMPLE [esi+edx*SIZEOF_JSAMPLE]
- mov al, JSAMPLE [esi+eax*SIZEOF_JSAMPLE]
- mov cl, JSAMPLE [esi+ecx*SIZEOF_JSAMPLE]
-
- mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], bl
- mov JSAMPLE [edi+5*SIZEOF_JSAMPLE], dl
- mov JSAMPLE [edi+4*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], cl
-
- pop ecx ; ctr
- pop esi ; wsptr
-
-.nextrow:
- pop edi
- add esi, byte DCTSIZE*SIZEOF_INT ; advance pointer to next row
- add edi, byte SIZEOF_JSAMPROW
- dec ecx
- jnz near .rowloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp
- pop ebp
- ret
-
-%endif ; DCT_IFAST_SUPPORTED
diff --git a/unused/jidctfst.c b/jidctfst.c
similarity index 100%
rename from unused/jidctfst.c
rename to jidctfst.c
diff --git a/jidctint.asm b/jidctint.asm
deleted file mode 100644
index eb81919..0000000
--- a/jidctint.asm
+++ /dev/null
@@ -1,524 +0,0 @@
-;
-; jidctint.asm - accurate integer IDCT (non-SIMD)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a slow-but-accurate integer implementation of the
-; inverse DCT (Discrete Cosine Transform). The following code is based
-; directly on the IJG's original jidctint.c; see the jidctint.c for
-; more details.
-;
-; Last Modified : October 17, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_ISLOW_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-; Descale and correctly round a DWORD value that's scaled by N bits.
-;
-%macro descale 2
-%if (%2)<=7
- add %1, byte (1<<((%2)-1)) ; add reg32,imm8
-%else
- add %1, (1<<((%2)-1)) ; add reg32,imm32
-%endif
- sar %1,%2
-%endmacro
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%if CONST_BITS == 13
-F_0_298 equ 2446 ; FIX(0.298631336)
-F_0_390 equ 3196 ; FIX(0.390180644)
-F_0_541 equ 4433 ; FIX(0.541196100)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_175 equ 9633 ; FIX(1.175875602)
-F_1_501 equ 12299 ; FIX(1.501321110)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_1_961 equ 16069 ; FIX(1.961570560)
-F_2_053 equ 16819 ; FIX(2.053119869)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_072 equ 25172 ; FIX(3.072711026)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_298 equ DESCALE( 320652955,30-CONST_BITS) ; FIX(0.298631336)
-F_0_390 equ DESCALE( 418953276,30-CONST_BITS) ; FIX(0.390180644)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_175 equ DESCALE(1262586813,30-CONST_BITS) ; FIX(1.175875602)
-F_1_501 equ DESCALE(1612031267,30-CONST_BITS) ; FIX(1.501321110)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_1_961 equ DESCALE(2106220350,30-CONST_BITS) ; FIX(1.961570560)
-F_2_053 equ DESCALE(2204520673,30-CONST_BITS) ; FIX(2.053119869)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_072 equ DESCALE(3299298341,30-CONST_BITS) ; FIX(3.072711026)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define range_limit ebp-SIZEOF_POINTER ; JSAMPLE * range_limit
-%define ptr range_limit-SIZEOF_POINTER ; void * ptr
-%define workspace ptr-DCTSIZE2*SIZEOF_INT
- ; int workspace[DCTSIZE2]
-
- align 16
- global EXTN(jpeg_idct_islow)
-
-EXTN(jpeg_idct_islow):
- push ebp
- mov ebp,esp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- ; ---- Pass 1: process columns from input, store into work array.
-
- mov edx, POINTER [compptr(ebp)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(ebp)] ; inptr
- lea edi, [workspace] ; int * wsptr
- mov ecx, DCTSIZE ; ctr
- alignx 16,7
-.columnloop:
- mov ax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(2,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- mov bx, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- mov ax, JCOEF [COL(4,esi,SIZEOF_JCOEF)]
- or bx, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(6,esi,SIZEOF_JCOEF)]
- or bx, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- or ax,bx
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- mov ax, JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- cwde
-
- sal eax,PASS1_BITS
-
- mov INT [COL(0,edi,SIZEOF_INT)], eax
- mov INT [COL(1,edi,SIZEOF_INT)], eax
- mov INT [COL(2,edi,SIZEOF_INT)], eax
- mov INT [COL(3,edi,SIZEOF_INT)], eax
- mov INT [COL(4,edi,SIZEOF_INT)], eax
- mov INT [COL(5,edi,SIZEOF_INT)], eax
- mov INT [COL(6,edi,SIZEOF_INT)], eax
- mov INT [COL(7,edi,SIZEOF_INT)], eax
- jmp near .nextcolumn
- alignx 16,7
-
-.columnDCT:
- push ecx ; ctr
- push esi ; coef_block
- push edx ; quantptr
-
- mov POINTER [ptr], edi ; wsptr
-
- ; -- Even part
-
- movsx eax, JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- movsx ecx, JCOEF [COL(4,esi,SIZEOF_JCOEF)]
- imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul cx, ISLOW_MULT_TYPE [COL(4,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movsx ebx, JCOEF [COL(2,esi,SIZEOF_JCOEF)]
- movsx edi, JCOEF [COL(6,esi,SIZEOF_JCOEF)]
- imul bx, ISLOW_MULT_TYPE [COL(2,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul di, ISLOW_MULT_TYPE [COL(6,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- lea edx,[eax+ecx]
- sub eax,ecx
- sal edx,CONST_BITS ; edx=tmp0
- sal eax,CONST_BITS ; eax=tmp1
-
- lea ecx,[ebx+edi]
- imul ecx,(F_0_541) ; ecx=z1
- imul ebx,(F_0_765) ; ebx=MULTIPLY(z2,FIX_0_765366865)
- imul edi,(-F_1_847) ; edi=MULTIPLY(z3,-FIX_1_847759065)
- add ebx,ecx ; ebx=tmp3
- add edi,ecx ; edi=tmp2
-
- lea ecx,[edx+ebx] ; ecx=tmp10
- sub edx,ebx ; edx=tmp13
- lea ebx,[eax+edi] ; ebx=tmp11
- sub eax,edi ; eax=tmp12
-
- push edx ; tmp13
- push eax ; tmp12
- push ebx ; tmp11
- push ecx ; tmp10
-
- ; -- Odd part
-
- mov edx, POINTER [esp+16] ; quantptr
-
- movsx eax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- movsx edi, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- imul ax, ISLOW_MULT_TYPE [COL(1,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul di, ISLOW_MULT_TYPE [COL(3,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movsx ecx, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- movsx ebx, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- imul cx, ISLOW_MULT_TYPE [COL(5,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul bx, ISLOW_MULT_TYPE [COL(7,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- push eax ; eax=tmp3
- push edi ; edi=tmp2
- push ecx ; ecx=tmp1
- push ebx ; ebx=tmp0
-
- lea esi,[ebx+edi] ; esi=z3
- lea edx,[ecx+eax] ; edx=z4
- add ebx,eax ; ebx=z1
- add ecx,edi ; ecx=z2
-
- lea eax,[esi+edx]
- imul eax,(F_1_175) ; eax=z5
-
- imul esi,(-F_1_961) ; esi=z3(=MULTIPLY(z3,-FIX_1_961570560))
- imul edx,(-F_0_390) ; edx=z4(=MULTIPLY(z4,-FIX_0_390180644))
- imul ebx,(-F_0_899) ; ebx=z1(=MULTIPLY(z1,-FIX_0_899976223))
- imul ecx,(-F_2_562) ; ecx=z2(=MULTIPLY(z2,-FIX_2_562915447))
-
- add esi,eax ; esi=z3(=z3+z5)
- add edx,eax ; edx=z4(=z4+z5)
-
- lea edi,[esi+ebx] ; edi=z1+z3
- lea eax,[edx+ecx] ; eax=z2+z4
- add esi,ecx ; esi=z2+z3
- add edx,ebx ; edx=z1+z4
-
- pop ecx ; ecx=tmp0
- pop ebx ; ebx=tmp1
- imul ecx,(F_0_298) ; ecx=tmp0(=MULTIPLY(tmp0,FIX_0_298631336))
- imul ebx,(F_2_053) ; ebx=tmp1(=MULTIPLY(tmp1,FIX_2_053119869))
- add edi,ecx ; edi=tmp0(=tmp0+z1+z3)
- add eax,ebx ; eax=tmp1(=tmp1+z2+z4)
-
- pop ecx ; ecx=tmp2
- pop ebx ; ebx=tmp3
- imul ecx,(F_3_072) ; ecx=tmp2(=MULTIPLY(tmp2,FIX_3_072711026))
- imul ebx,(F_1_501) ; ebx=tmp3(=MULTIPLY(tmp3,FIX_1_501321110))
- add esi,ecx ; esi=tmp2(=tmp2+z2+z3)
- add edx,ebx ; edx=tmp3(=tmp3+z1+z4)
-
- ; -- Final output stage
-
- pop ecx ; ecx=tmp10
- pop ebx ; ebx=tmp11
- push eax ; tmp1
- push edi ; tmp0
-
- lea eax,[ecx+edx] ; eax=data0(=tmp10+tmp3)
- sub ecx,edx ; ecx=data7(=tmp10-tmp3)
- lea edx,[ebx+esi] ; edx=data1(=tmp11+tmp2)
- sub ebx,esi ; ebx=data6(=tmp11-tmp2)
-
- mov edi, POINTER [ptr] ; edi=wsptr
-
- descale eax,(CONST_BITS-PASS1_BITS)
- descale ecx,(CONST_BITS-PASS1_BITS)
- descale edx,(CONST_BITS-PASS1_BITS)
- descale ebx,(CONST_BITS-PASS1_BITS)
-
- mov INT [COL(0,edi,SIZEOF_INT)], eax
- mov INT [COL(7,edi,SIZEOF_INT)], ecx
- mov INT [COL(1,edi,SIZEOF_INT)], edx
- mov INT [COL(6,edi,SIZEOF_INT)], ebx
-
- pop esi ; esi=tmp0
- pop eax ; eax=tmp1
- pop ecx ; ecx=tmp12
- pop edx ; edx=tmp13
-
- lea ebx,[ecx+eax] ; ebx=data2(=tmp12+tmp1)
- sub ecx,eax ; ecx=data5(=tmp12-tmp1)
- lea eax,[edx+esi] ; eax=data3(=tmp13+tmp0)
- sub edx,esi ; edx=data4(=tmp13-tmp0)
-
- descale ebx,(CONST_BITS-PASS1_BITS)
- descale ecx,(CONST_BITS-PASS1_BITS)
- descale eax,(CONST_BITS-PASS1_BITS)
- descale edx,(CONST_BITS-PASS1_BITS)
-
- mov INT [COL(2,edi,SIZEOF_INT)], ebx
- mov INT [COL(5,edi,SIZEOF_INT)], ecx
- mov INT [COL(3,edi,SIZEOF_INT)], eax
- mov INT [COL(4,edi,SIZEOF_INT)], edx
-
- pop edx ; quantptr
- pop esi ; coef_block
- pop ecx ; ctr
-
-.nextcolumn:
- add esi, byte SIZEOF_JCOEF ; advance pointers to next column
- add edx, byte SIZEOF_ISLOW_MULT_TYPE
- add edi, byte SIZEOF_INT
- dec ecx
- jnz near .columnloop
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, POINTER [cinfo(ebp)]
- mov eax, POINTER [jdstruct_sample_range_limit(eax)]
- sub eax, byte -CENTERJSAMPLE*SIZEOF_JSAMPLE ; JSAMPLE * range_limit
- mov POINTER [range_limit], eax
-
- lea esi, [workspace] ; int * wsptr
- mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *)
- mov ecx, DCTSIZE ; ctr
- alignx 16,7
-.rowloop:
- push edi
- mov edi, JSAMPROW [edi] ; (JSAMPLE *)
- add edi, JDIMENSION [output_col(ebp)] ; edi=outptr
-
-%ifndef NO_ZERO_ROW_TEST
- mov eax, INT [ROW(1,esi,SIZEOF_INT)]
- or eax, INT [ROW(2,esi,SIZEOF_INT)]
- jnz short .rowDCT
-
- mov ebx, INT [ROW(3,esi,SIZEOF_INT)]
- mov eax, INT [ROW(4,esi,SIZEOF_INT)]
- or ebx, INT [ROW(5,esi,SIZEOF_INT)]
- or eax, INT [ROW(6,esi,SIZEOF_INT)]
- or ebx, INT [ROW(7,esi,SIZEOF_INT)]
- or eax,ebx
- jnz short .rowDCT
-
- ; -- AC terms all zero
-
- mov eax, INT [ROW(0,esi,SIZEOF_INT)]
-
- mov edx, POINTER [range_limit] ; (JSAMPLE *)
-
- descale eax,(PASS1_BITS+3)
- and eax,RANGE_MASK
- mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE]
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+4*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+5*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+6*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+7*SIZEOF_JSAMPLE], al
- jmp near .nextrow
- alignx 16,7
-%endif
-.rowDCT:
- push esi ; wsptr
- push ecx ; ctr
-
- mov POINTER [ptr], edi ; outptr
-
- ; -- Even part
-
- mov eax, INT [ROW(0,esi,SIZEOF_INT)]
- mov ebx, INT [ROW(2,esi,SIZEOF_INT)]
- mov ecx, INT [ROW(4,esi,SIZEOF_INT)]
- mov edi, INT [ROW(6,esi,SIZEOF_INT)]
-
- lea edx,[eax+ecx]
- sub eax,ecx
- sal edx,CONST_BITS ; edx=tmp0
- sal eax,CONST_BITS ; eax=tmp1
-
- lea ecx,[ebx+edi]
- imul ecx,(F_0_541) ; ecx=z1
- imul ebx,(F_0_765) ; ebx=MULTIPLY(z2,FIX_0_765366865)
- imul edi,(-F_1_847) ; edi=MULTIPLY(z3,-FIX_1_847759065)
- add ebx,ecx ; ebx=tmp3
- add edi,ecx ; edi=tmp2
-
- lea ecx,[edx+ebx] ; ecx=tmp10
- sub edx,ebx ; edx=tmp13
- lea ebx,[eax+edi] ; ebx=tmp11
- sub eax,edi ; eax=tmp12
-
- push edx ; tmp13
- push eax ; tmp12
- push ebx ; tmp11
- push ecx ; tmp10
-
- ; -- Odd part
-
- mov eax, INT [ROW(1,esi,SIZEOF_INT)]
- mov edi, INT [ROW(3,esi,SIZEOF_INT)]
- mov ecx, INT [ROW(5,esi,SIZEOF_INT)]
- mov ebx, INT [ROW(7,esi,SIZEOF_INT)]
-
- push eax ; eax=tmp3
- push edi ; edi=tmp2
- push ecx ; ecx=tmp1
- push ebx ; ebx=tmp0
-
- lea esi,[ebx+edi] ; esi=z3
- lea edx,[ecx+eax] ; edx=z4
- add ebx,eax ; ebx=z1
- add ecx,edi ; ecx=z2
-
- lea eax,[esi+edx]
- imul eax,(F_1_175) ; eax=z5
-
- imul esi,(-F_1_961) ; esi=z3(=MULTIPLY(z3,-FIX_1_961570560))
- imul edx,(-F_0_390) ; edx=z4(=MULTIPLY(z4,-FIX_0_390180644))
- imul ebx,(-F_0_899) ; ebx=z1(=MULTIPLY(z1,-FIX_0_899976223))
- imul ecx,(-F_2_562) ; ecx=z2(=MULTIPLY(z2,-FIX_2_562915447))
-
- add esi,eax ; esi=z3(=z3+z5)
- add edx,eax ; edx=z4(=z4+z5)
-
- lea edi,[esi+ebx] ; edi=z1+z3
- lea eax,[edx+ecx] ; eax=z2+z4
- add esi,ecx ; esi=z2+z3
- add edx,ebx ; edx=z1+z4
-
- pop ecx ; ecx=tmp0
- pop ebx ; ebx=tmp1
- imul ecx,(F_0_298) ; ecx=tmp0(=MULTIPLY(tmp0,FIX_0_298631336))
- imul ebx,(F_2_053) ; ebx=tmp1(=MULTIPLY(tmp1,FIX_2_053119869))
- add edi,ecx ; edi=tmp0(=tmp0+z1+z3)
- add eax,ebx ; eax=tmp1(=tmp1+z2+z4)
-
- pop ecx ; ecx=tmp2
- pop ebx ; ebx=tmp3
- imul ecx,(F_3_072) ; ecx=tmp2(=MULTIPLY(tmp2,FIX_3_072711026))
- imul ebx,(F_1_501) ; ebx=tmp3(=MULTIPLY(tmp3,FIX_1_501321110))
- add esi,ecx ; esi=tmp2(=tmp2+z2+z3)
- add edx,ebx ; edx=tmp3(=tmp3+z1+z4)
-
- ; -- Final output stage
-
- pop ecx ; ecx=tmp10
- pop ebx ; ebx=tmp11
- push eax ; tmp1
- push edi ; tmp0
-
- lea eax,[ecx+edx] ; eax=data0(=tmp10+tmp3)
- sub ecx,edx ; ecx=data7(=tmp10-tmp3)
- lea edx,[ebx+esi] ; edx=data1(=tmp11+tmp2)
- sub ebx,esi ; ebx=data6(=tmp11-tmp2)
-
- mov esi, POINTER [range_limit] ; (JSAMPLE *)
-
- descale eax,(CONST_BITS+PASS1_BITS+3)
- descale ecx,(CONST_BITS+PASS1_BITS+3)
- descale edx,(CONST_BITS+PASS1_BITS+3)
- descale ebx,(CONST_BITS+PASS1_BITS+3)
-
- mov edi, POINTER [ptr] ; edi=outptr
-
- and eax,RANGE_MASK
- and ecx,RANGE_MASK
- and edx,RANGE_MASK
- and ebx,RANGE_MASK
-
- mov al, JSAMPLE [esi+eax*SIZEOF_JSAMPLE]
- mov cl, JSAMPLE [esi+ecx*SIZEOF_JSAMPLE]
- mov dl, JSAMPLE [esi+edx*SIZEOF_JSAMPLE]
- mov bl, JSAMPLE [esi+ebx*SIZEOF_JSAMPLE]
-
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+7*SIZEOF_JSAMPLE], cl
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], dl
- mov JSAMPLE [edi+6*SIZEOF_JSAMPLE], bl
-
- pop esi ; esi=tmp0
- pop eax ; eax=tmp1
- pop ecx ; ecx=tmp12
- pop edx ; edx=tmp13
-
- lea ebx,[ecx+eax] ; ebx=data2(=tmp12+tmp1)
- sub ecx,eax ; ecx=data5(=tmp12-tmp1)
- lea eax,[edx+esi] ; eax=data3(=tmp13+tmp0)
- sub edx,esi ; edx=data4(=tmp13-tmp0)
-
- mov esi, POINTER [range_limit] ; (JSAMPLE *)
-
- descale ebx,(CONST_BITS+PASS1_BITS+3)
- descale ecx,(CONST_BITS+PASS1_BITS+3)
- descale eax,(CONST_BITS+PASS1_BITS+3)
- descale edx,(CONST_BITS+PASS1_BITS+3)
-
- and ebx,RANGE_MASK
- and ecx,RANGE_MASK
- and eax,RANGE_MASK
- and edx,RANGE_MASK
-
- mov bl, JSAMPLE [esi+ebx*SIZEOF_JSAMPLE]
- mov cl, JSAMPLE [esi+ecx*SIZEOF_JSAMPLE]
- mov al, JSAMPLE [esi+eax*SIZEOF_JSAMPLE]
- mov dl, JSAMPLE [esi+edx*SIZEOF_JSAMPLE]
-
- mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], bl
- mov JSAMPLE [edi+5*SIZEOF_JSAMPLE], cl
- mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+4*SIZEOF_JSAMPLE], dl
-
- pop ecx ; ctr
- pop esi ; wsptr
-
-.nextrow:
- pop edi
- add esi, byte DCTSIZE*SIZEOF_INT ; advance pointer to next row
- add edi, byte SIZEOF_JSAMPROW
- dec ecx
- jnz near .rowloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp
- pop ebp
- ret
-
-%endif ; DCT_ISLOW_SUPPORTED
diff --git a/unused/jidctint.c b/jidctint.c
similarity index 100%
rename from unused/jidctint.c
rename to jidctint.c
diff --git a/jidctred.asm b/jidctred.asm
deleted file mode 100644
index 4463bfb..0000000
--- a/jidctred.asm
+++ /dev/null
@@ -1,688 +0,0 @@
-;
-; jidctred.asm - reduced-size IDCT (non-SIMD)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains inverse-DCT routines that produce reduced-size output:
-; either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block.
-; The following code is based directly on the IJG's original jidctred.c;
-; see the jidctred.c for more details.
-;
-; Last Modified : October 17, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef IDCT_SCALING_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-; Descale and correctly round a DWORD value that's scaled by N bits.
-;
-%macro descale 2
-%if (%2)<=7
- add %1, byte (1<<((%2)-1)) ; add reg32,imm8
-%else
- add %1, (1<<((%2)-1)) ; add reg32,imm32
-%endif
- sar %1,%2
-%endmacro
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%if CONST_BITS == 13
-F_0_211 equ 1730 ; FIX(0.211164243)
-F_0_509 equ 4176 ; FIX(0.509795579)
-F_0_601 equ 4926 ; FIX(0.601344887)
-F_0_720 equ 5906 ; FIX(0.720959822)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_850 equ 6967 ; FIX(0.850430095)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_061 equ 8697 ; FIX(1.061594337)
-F_1_272 equ 10426 ; FIX(1.272758580)
-F_1_451 equ 11893 ; FIX(1.451774981)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_2_172 equ 17799 ; FIX(2.172734803)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_624 equ 29692 ; FIX(3.624509785)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_211 equ DESCALE( 226735879,30-CONST_BITS) ; FIX(0.211164243)
-F_0_509 equ DESCALE( 547388834,30-CONST_BITS) ; FIX(0.509795579)
-F_0_601 equ DESCALE( 645689155,30-CONST_BITS) ; FIX(0.601344887)
-F_0_720 equ DESCALE( 774124714,30-CONST_BITS) ; FIX(0.720959822)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_850 equ DESCALE( 913142361,30-CONST_BITS) ; FIX(0.850430095)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_061 equ DESCALE(1139878239,30-CONST_BITS) ; FIX(1.061594337)
-F_1_272 equ DESCALE(1366614119,30-CONST_BITS) ; FIX(1.272758580)
-F_1_451 equ DESCALE(1558831516,30-CONST_BITS) ; FIX(1.451774981)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_2_172 equ DESCALE(2332956230,30-CONST_BITS) ; FIX(2.172734803)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_624 equ DESCALE(3891787747,30-CONST_BITS) ; FIX(3.624509785)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients,
-; producing a reduced-size 4x4 output block.
-;
-; GLOBAL(void)
-; jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define range_limit ebp-SIZEOF_POINTER ; JSAMPLE * range_limit
-%define workspace range_limit-(DCTSIZE*4)*SIZEOF_INT
- ; int workspace[DCTSIZE*4]
-
- align 16
- global EXTN(jpeg_idct_4x4)
-
-EXTN(jpeg_idct_4x4):
- push ebp
- mov ebp,esp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- ; ---- Pass 1: process columns from input, store into work array.
-
- mov edx, POINTER [compptr(ebp)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(ebp)] ; inptr
- lea edi, [workspace] ; int * wsptr
- mov ecx, DCTSIZE ; ctr
- alignx 16,7
-.columnloop:
- ; Don't bother to process column 4, because second pass won't use it
- cmp ecx, byte DCTSIZE-4
- je near .nextcolumn
-
- mov ax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(2,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- mov ax, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- mov bx, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(6,esi,SIZEOF_JCOEF)]
- or bx, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- or ax,bx
- jnz short .columnDCT
-
- ; -- AC terms all zero; we need not examine term 4 for 4x4 output
-
- mov ax, JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- cwde
-
- sal eax, PASS1_BITS
-
- mov INT [COL(0,edi,SIZEOF_INT)], eax
- mov INT [COL(1,edi,SIZEOF_INT)], eax
- mov INT [COL(2,edi,SIZEOF_INT)], eax
- mov INT [COL(3,edi,SIZEOF_INT)], eax
- jmp near .nextcolumn
- alignx 16,7
-
-.columnDCT:
- push ecx ; ctr
- push esi ; coef_block
- push edx ; quantptr
- push edi ; wsptr
-
- ; -- Even part
-
- movsx ebx, JCOEF [COL(2,esi,SIZEOF_JCOEF)]
- movsx ecx, JCOEF [COL(6,esi,SIZEOF_JCOEF)]
- movsx eax, JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- imul bx, ISLOW_MULT_TYPE [COL(2,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul cx, ISLOW_MULT_TYPE [COL(6,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- imul ebx,(F_1_847) ; ebx=MULTIPLY(z2,FIX_1_847759065)
- imul ecx,(-F_0_765) ; ecx=MULTIPLY(z3,-FIX_0_765366865)
- sal eax,(CONST_BITS+1) ; eax=tmp0
- add ecx,ebx ; ecx=tmp2
-
- lea edi,[eax+ecx] ; edi=tmp10
- sub eax,ecx ; eax=tmp12
-
- push eax ; tmp12
- push edi ; tmp10
-
- ; -- Odd part
-
- movsx edi, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- movsx ecx, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- imul di, ISLOW_MULT_TYPE [COL(7,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul cx, ISLOW_MULT_TYPE [COL(5,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movsx ebx, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- movsx eax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- imul bx, ISLOW_MULT_TYPE [COL(3,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul ax, ISLOW_MULT_TYPE [COL(1,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- mov esi,edi ; esi=edi=z1
- mov edx,ecx ; edx=ecx=z2
- imul edi,(-F_0_211) ; edi=MULTIPLY(z1,-FIX_0_211164243)
- imul ecx,(F_1_451) ; ecx=MULTIPLY(z2,FIX_1_451774981)
- imul esi,(-F_0_509) ; esi=MULTIPLY(z1,-FIX_0_509795579)
- imul edx,(-F_0_601) ; edx=MULTIPLY(z2,-FIX_0_601344887)
-
- add edi,ecx ; edi=(tmp0)
- add esi,edx ; esi=(tmp2)
-
- mov ecx,ebx ; ecx=ebx=z3
- mov edx,eax ; edx=eax=z4
- imul ebx,(-F_2_172) ; ebx=MULTIPLY(z3,-FIX_2_172734803)
- imul eax,(F_1_061) ; eax=MULTIPLY(z4,FIX_1_061594337)
- imul ecx,(F_0_899) ; ecx=MULTIPLY(z3,FIX_0_899976223)
- imul edx,(F_2_562) ; edx=MULTIPLY(z4,FIX_2_562915447)
-
- add edi,ebx
- add esi,ecx
- add edi,eax ; edi=tmp0
- add esi,edx ; esi=tmp2
-
- ; -- Final output stage
-
- pop ebx ; ebx=tmp10
- pop ecx ; ecx=tmp12
-
- lea eax,[ebx+esi] ; eax=data0(=tmp10+tmp2)
- sub ebx,esi ; ebx=data3(=tmp10-tmp2)
- lea edx,[ecx+edi] ; edx=data1(=tmp12+tmp0)
- sub ecx,edi ; ecx=data2(=tmp12-tmp0)
-
- pop edi ; wsptr
-
- descale eax,(CONST_BITS-PASS1_BITS+1)
- descale ebx,(CONST_BITS-PASS1_BITS+1)
- descale edx,(CONST_BITS-PASS1_BITS+1)
- descale ecx,(CONST_BITS-PASS1_BITS+1)
-
- mov INT [COL(0,edi,SIZEOF_INT)], eax
- mov INT [COL(3,edi,SIZEOF_INT)], ebx
- mov INT [COL(1,edi,SIZEOF_INT)], edx
- mov INT [COL(2,edi,SIZEOF_INT)], ecx
-
- pop edx ; quantptr
- pop esi ; coef_block
- pop ecx ; ctr
-
-.nextcolumn:
- add esi, byte SIZEOF_JCOEF ; advance pointers to next column
- add edx, byte SIZEOF_ISLOW_MULT_TYPE
- add edi, byte SIZEOF_INT
- dec ecx
- jnz near .columnloop
-
- ; ---- Pass 2: process 4 rows from work array, store into output array.
-
- mov eax, POINTER [cinfo(ebp)]
- mov eax, POINTER [jdstruct_sample_range_limit(eax)]
- sub eax, byte -CENTERJSAMPLE*SIZEOF_JSAMPLE ; JSAMPLE * range_limit
- mov POINTER [range_limit], eax
-
- lea esi, [workspace] ; int * wsptr
- mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *)
- mov ecx, DCTSIZE/2 ; ctr
- alignx 16,7
-.rowloop:
- push edi
- mov edi, JSAMPROW [edi] ; (JSAMPLE *)
- add edi, JDIMENSION [output_col(ebp)] ; edi=outptr
-
-%ifndef NO_ZERO_ROW_TEST
- mov eax, INT [ROW(1,esi,SIZEOF_INT)]
- or eax, INT [ROW(2,esi,SIZEOF_INT)]
- jnz short .rowDCT
-
- mov eax, INT [ROW(3,esi,SIZEOF_INT)]
- mov ebx, INT [ROW(5,esi,SIZEOF_INT)]
- or eax, INT [ROW(6,esi,SIZEOF_INT)]
- or ebx, INT [ROW(7,esi,SIZEOF_INT)]
- or eax,ebx
- jnz short .rowDCT
-
- ; -- AC terms all zero
-
- mov eax, INT [ROW(0,esi,SIZEOF_INT)]
-
- mov edx, POINTER [range_limit] ; (JSAMPLE *)
-
- descale eax,(PASS1_BITS+3)
- and eax,RANGE_MASK
- mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE]
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], al
- jmp near .nextrow
- alignx 16,7
-%endif
-.rowDCT:
- push esi ; wsptr
- push ecx ; ctr
- push edi ; outptr
-
- ; -- Even part
-
- mov eax, INT [ROW(0,esi,SIZEOF_INT)]
- mov ebx, INT [ROW(2,esi,SIZEOF_INT)]
- mov ecx, INT [ROW(6,esi,SIZEOF_INT)]
-
- imul ebx,(F_1_847) ; ebx=MULTIPLY(z2,FIX_1_847759065)
- imul ecx,(-F_0_765) ; ecx=MULTIPLY(z3,-FIX_0_765366865)
- sal eax,(CONST_BITS+1) ; eax=tmp0
- add ecx,ebx ; ecx=tmp2
-
- lea edi,[eax+ecx] ; edi=tmp10
- sub eax,ecx ; eax=tmp12
-
- push eax ; tmp12
- push edi ; tmp10
-
- ; -- Odd part
-
- mov eax, INT [ROW(1,esi,SIZEOF_INT)]
- mov ebx, INT [ROW(3,esi,SIZEOF_INT)]
- mov ecx, INT [ROW(5,esi,SIZEOF_INT)]
- mov edi, INT [ROW(7,esi,SIZEOF_INT)]
-
- mov esi,edi ; esi=edi=z1
- mov edx,ecx ; edx=ecx=z2
- imul edi,(-F_0_211) ; edi=MULTIPLY(z1,-FIX_0_211164243)
- imul ecx,(F_1_451) ; ecx=MULTIPLY(z2,FIX_1_451774981)
- imul esi,(-F_0_509) ; esi=MULTIPLY(z1,-FIX_0_509795579)
- imul edx,(-F_0_601) ; edx=MULTIPLY(z2,-FIX_0_601344887)
-
- add edi,ecx ; edi=(tmp0)
- add esi,edx ; esi=(tmp2)
-
- mov ecx,ebx ; ecx=ebx=z3
- mov edx,eax ; edx=eax=z4
- imul ebx,(-F_2_172) ; ebx=MULTIPLY(z3,-FIX_2_172734803)
- imul eax,(F_1_061) ; eax=MULTIPLY(z4,FIX_1_061594337)
- imul ecx,(F_0_899) ; ecx=MULTIPLY(z3,FIX_0_899976223)
- imul edx,(F_2_562) ; edx=MULTIPLY(z4,FIX_2_562915447)
-
- add edi,ebx
- add esi,ecx
- add edi,eax ; edi=tmp0
- add esi,edx ; esi=tmp2
-
- ; -- Final output stage
-
- pop ebx ; ebx=tmp10
- pop ecx ; ecx=tmp12
-
- lea eax,[ebx+esi] ; eax=data0(=tmp10+tmp2)
- sub ebx,esi ; ebx=data3(=tmp10-tmp2)
- lea edx,[ecx+edi] ; edx=data1(=tmp12+tmp0)
- sub ecx,edi ; ecx=data2(=tmp12-tmp0)
-
- mov esi, POINTER [range_limit] ; (JSAMPLE *)
-
- descale eax,(CONST_BITS+PASS1_BITS+3+1)
- descale ebx,(CONST_BITS+PASS1_BITS+3+1)
- descale edx,(CONST_BITS+PASS1_BITS+3+1)
- descale ecx,(CONST_BITS+PASS1_BITS+3+1)
-
- pop edi ; outptr
-
- and eax,RANGE_MASK
- and ebx,RANGE_MASK
- and edx,RANGE_MASK
- and ecx,RANGE_MASK
-
- mov al, JSAMPLE [esi+eax*SIZEOF_JSAMPLE]
- mov bl, JSAMPLE [esi+ebx*SIZEOF_JSAMPLE]
- mov dl, JSAMPLE [esi+edx*SIZEOF_JSAMPLE]
- mov cl, JSAMPLE [esi+ecx*SIZEOF_JSAMPLE]
-
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+3*SIZEOF_JSAMPLE], bl
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], dl
- mov JSAMPLE [edi+2*SIZEOF_JSAMPLE], cl
-
- pop ecx ; ctr
- pop esi ; wsptr
-
-.nextrow:
- pop edi
- add esi, byte DCTSIZE*SIZEOF_INT ; advance pointer to next row
- add edi, byte SIZEOF_JSAMPROW
- dec ecx
- jnz near .rowloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp
- pop ebp
- ret
-
-
-; --------------------------------------------------------------------------
-;
-; Perform dequantization and inverse DCT on one block of coefficients,
-; producing a reduced-size 2x2 output block.
-;
-; GLOBAL(void)
-; jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define range_limit ebp-SIZEOF_POINTER ; JSAMPLE * range_limit
-%define workspace range_limit-(DCTSIZE*2)*SIZEOF_INT
- ; int workspace[DCTSIZE*2]
-
- align 16
- global EXTN(jpeg_idct_2x2)
-
-EXTN(jpeg_idct_2x2):
- push ebp
- mov ebp,esp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- ; ---- Pass 1: process columns from input, store into work array.
-
- mov edx, POINTER [compptr(ebp)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(ebp)] ; inptr
- lea edi, [workspace] ; int * wsptr
- mov ecx, DCTSIZE ; ctr
- alignx 16,7
-.columnloop:
- ; Don't bother to process columns 2,4,6
- test ecx, 0x09
- jz near .nextcolumn
-
- mov ax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- mov ax, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- or ax, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- ; -- AC terms all zero; we need not examine terms 2,4,6 for 2x2 output
-
- mov ax, JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- cwde
-
- sal eax, PASS1_BITS
-
- mov INT [COL(0,edi,SIZEOF_INT)], eax
- mov INT [COL(1,edi,SIZEOF_INT)], eax
- jmp short .nextcolumn
- alignx 16,7
-
-.columnDCT:
- push ecx ; ctr
- push edi ; wsptr
-
- ; -- Odd part
-
- movsx eax, JCOEF [COL(1,esi,SIZEOF_JCOEF)]
- movsx ebx, JCOEF [COL(3,esi,SIZEOF_JCOEF)]
- imul ax, ISLOW_MULT_TYPE [COL(1,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul bx, ISLOW_MULT_TYPE [COL(3,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movsx ecx, JCOEF [COL(5,esi,SIZEOF_JCOEF)]
- movsx edi, JCOEF [COL(7,esi,SIZEOF_JCOEF)]
- imul cx, ISLOW_MULT_TYPE [COL(5,edx,SIZEOF_ISLOW_MULT_TYPE)]
- imul di, ISLOW_MULT_TYPE [COL(7,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- imul eax,(F_3_624) ; eax=MULTIPLY(data1,FIX_3_624509785)
- imul ebx,(-F_1_272) ; ebx=MULTIPLY(data3,-FIX_1_272758580)
- imul ecx,(F_0_850) ; ecx=MULTIPLY(data5,FIX_0_850430095)
- imul edi,(-F_0_720) ; edi=MULTIPLY(data7,-FIX_0_720959822)
-
- add eax,ebx
- add ecx,edi
- add ecx,eax ; ecx=tmp0
-
- ; -- Even part
-
- mov ax, JCOEF [COL(0,esi,SIZEOF_JCOEF)]
- imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- cwde
-
- sal eax,(CONST_BITS+2) ; eax=tmp10
-
- ; -- Final output stage
-
- pop edi ; wsptr
-
- lea ebx,[eax+ecx] ; ebx=data0(=tmp10+tmp0)
- sub eax,ecx ; eax=data1(=tmp10-tmp0)
-
- pop ecx ; ctr
-
- descale ebx,(CONST_BITS-PASS1_BITS+2)
- descale eax,(CONST_BITS-PASS1_BITS+2)
-
- mov INT [COL(0,edi,SIZEOF_INT)], ebx
- mov INT [COL(1,edi,SIZEOF_INT)], eax
-
-.nextcolumn:
- add esi, byte SIZEOF_JCOEF ; advance pointers to next column
- add edx, byte SIZEOF_ISLOW_MULT_TYPE
- add edi, byte SIZEOF_INT
- dec ecx
- jnz near .columnloop
-
- ; ---- Pass 2: process 2 rows from work array, store into output array.
-
- mov eax, POINTER [cinfo(ebp)]
- mov eax, POINTER [jdstruct_sample_range_limit(eax)]
- sub eax, byte -CENTERJSAMPLE*SIZEOF_JSAMPLE ; JSAMPLE * range_limit
- mov POINTER [range_limit], eax
-
- lea esi, [workspace] ; int * wsptr
- mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *)
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.rowloop:
- push edi
- mov edi, JSAMPROW [edi] ; (JSAMPLE *)
- add edi, JDIMENSION [output_col(ebp)] ; edi=outptr
-
-%ifndef NO_ZERO_ROW_TEST
- mov eax, INT [ROW(1,esi,SIZEOF_INT)]
- or eax, INT [ROW(3,esi,SIZEOF_INT)]
- jnz short .rowDCT
-
- mov eax, INT [ROW(5,esi,SIZEOF_INT)]
- or eax, INT [ROW(7,esi,SIZEOF_INT)]
- jnz short .rowDCT
-
- ; -- AC terms all zero
-
- mov eax, INT [ROW(0,esi,SIZEOF_INT)]
-
- mov edx, POINTER [range_limit] ; (JSAMPLE *)
-
- descale eax,(PASS1_BITS+3)
- and eax,RANGE_MASK
- mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE]
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], al
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al
- jmp short .nextrow
- alignx 16,7
-%endif
-.rowDCT:
- push ecx ; ctr
-
- ; -- Odd part
-
- mov eax, INT [ROW(1,esi,SIZEOF_INT)]
- mov ebx, INT [ROW(3,esi,SIZEOF_INT)]
- mov ecx, INT [ROW(5,esi,SIZEOF_INT)]
- mov edx, INT [ROW(7,esi,SIZEOF_INT)]
-
- imul eax,(F_3_624) ; eax=MULTIPLY(data1,FIX_3_624509785)
- imul ebx,(-F_1_272) ; ebx=MULTIPLY(data3,-FIX_1_272758580)
- imul ecx,(F_0_850) ; ecx=MULTIPLY(data5,FIX_0_850430095)
- imul edx,(-F_0_720) ; edx=MULTIPLY(data7,-FIX_0_720959822)
-
- add eax,ebx
- add ecx,edx
- add ecx,eax ; ecx=tmp0
-
- ; -- Even part
-
- mov eax, INT [ROW(0,esi,SIZEOF_INT)]
-
- sal eax,(CONST_BITS+2) ; eax=tmp10
-
- ; -- Final output stage
-
- mov edx, POINTER [range_limit] ; (JSAMPLE *)
-
- lea ebx,[eax+ecx] ; ebx=data0(=tmp10+tmp0)
- sub eax,ecx ; eax=data1(=tmp10-tmp0)
-
- pop ecx ; ctr
-
- descale ebx,(CONST_BITS+PASS1_BITS+3+2)
- descale eax,(CONST_BITS+PASS1_BITS+3+2)
-
- and ebx,RANGE_MASK
- and eax,RANGE_MASK
- mov bl, JSAMPLE [edx+ebx*SIZEOF_JSAMPLE]
- mov al, JSAMPLE [edx+eax*SIZEOF_JSAMPLE]
- mov JSAMPLE [edi+0*SIZEOF_JSAMPLE], bl
- mov JSAMPLE [edi+1*SIZEOF_JSAMPLE], al
-
-.nextrow:
- pop edi
- add esi, byte DCTSIZE*SIZEOF_INT ; advance pointer to next row
- add edi, byte SIZEOF_JSAMPROW
- dec ecx
- jnz near .rowloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp
- pop ebp
- ret
-
-
-; --------------------------------------------------------------------------
-;
-; Perform dequantization and inverse DCT on one block of coefficients,
-; producing a reduced-size 1x1 output block.
-;
-; GLOBAL(void)
-; jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define ebp esp-4 ; use esp instead of ebp
-
- align 16
- global EXTN(jpeg_idct_1x1)
-
-EXTN(jpeg_idct_1x1):
-; push ebp
-; mov ebp,esp
-; push ebx ; unused
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
-; push esi ; unused
-; push edi ; unused
-
- ; We hardly need an inverse DCT routine for this: just take the
- ; average pixel value, which is one-eighth of the DC coefficient.
-
- mov edx, POINTER [compptr(ebp)]
- mov ecx, JCOEFPTR [coef_block(ebp)] ; inptr
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
-
- mov ax, JCOEF [COL(0,ecx,SIZEOF_JCOEF)]
- imul ax, ISLOW_MULT_TYPE [COL(0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- mov ecx, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *)
- mov edx, JDIMENSION [output_col(ebp)]
- mov ecx, JSAMPROW [ecx] ; (JSAMPLE *)
-
- add ax, (1 << (3-1)) + (CENTERJSAMPLE << 3)
- sar ax,3 ; descale
-
- test ah,ah ; unsigned saturation
- jz short .output
- not ax
- sar ax,15
- alignx 16,3
-.output:
- mov JSAMPLE [ecx+edx*SIZEOF_JSAMPLE], al
-
-; pop edi ; unused
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
-; pop ebx ; unused
-; pop ebp
- ret
-
-%endif ; IDCT_SCALING_SUPPORTED
diff --git a/unused/jidctred.c b/jidctred.c
similarity index 100%
rename from unused/jidctred.c
rename to jidctred.c
diff --git a/jimmxfst.asm b/jimmxfst.asm
deleted file mode 100644
index de0def6..0000000
--- a/jimmxfst.asm
+++ /dev/null
@@ -1,510 +0,0 @@
-;
-; jimmxfst.asm - fast integer IDCT (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a fast, not so accurate integer implementation of
-; the inverse DCT (Discrete Cosine Transform). The following code is
-; based directly on the IJG's original jidctfst.c; see the jidctfst.c
-; for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_IFAST_SUPPORTED
-%ifdef JIDCT_INT_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 8 ; 14 is also OK.
-%define PASS1_BITS 2
-
-%if IFAST_SCALE_BITS != PASS1_BITS
-%error "'IFAST_SCALE_BITS' must be equal to 'PASS1_BITS'."
-%endif
-
-%if CONST_BITS == 8
-F_1_082 equ 277 ; FIX(1.082392200)
-F_1_414 equ 362 ; FIX(1.414213562)
-F_1_847 equ 473 ; FIX(1.847759065)
-F_2_613 equ 669 ; FIX(2.613125930)
-F_1_613 equ (F_2_613 - 256) ; FIX(2.613125930) - FIX(1)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_1_082 equ DESCALE(1162209775,30-CONST_BITS) ; FIX(1.082392200)
-F_1_414 equ DESCALE(1518500249,30-CONST_BITS) ; FIX(1.414213562)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_2_613 equ DESCALE(2805822602,30-CONST_BITS) ; FIX(2.613125930)
-F_1_613 equ (F_2_613 - (1 << CONST_BITS)) ; FIX(2.613125930) - FIX(1)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
-; PRE_MULTIPLY_SCALE_BITS <= 2 (to avoid overflow)
-; CONST_BITS + CONST_SHIFT + PRE_MULTIPLY_SCALE_BITS == 16 (for pmulhw)
-
-%define PRE_MULTIPLY_SCALE_BITS 2
-%define CONST_SHIFT (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
-
- alignz 16
- global EXTN(jconst_idct_ifast_mmx)
-
-EXTN(jconst_idct_ifast_mmx):
-
-PW_F1414 times 4 dw F_1_414 << CONST_SHIFT
-PW_F1847 times 4 dw F_1_847 << CONST_SHIFT
-PW_MF1613 times 4 dw -F_1_613 << CONST_SHIFT
-PW_F1082 times 4 dw F_1_082 << CONST_SHIFT
-PB_CENTERJSAMP times 8 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_ifast_mmx (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 2
-%define workspace wk(0)-DCTSIZE2*SIZEOF_JCOEF
- ; JCOEF workspace[DCTSIZE2]
-
- align 16
- global EXTN(jpeg_idct_ifast_mmx)
-
-EXTN(jpeg_idct_ifast_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input, store into work array.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
- lea edi, [workspace] ; JCOEF * wsptr
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.columnloop:
-%ifndef NO_ZERO_COLUMN_TEST_IFAST_MMX
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- movq mm0, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- por mm1, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- por mm1, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- por mm1,mm0
- packsswb mm1,mm1
- movd eax,mm1
- test eax,eax
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- pmullw mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_IFAST_MULT_TYPE)]
-
- movq mm2,mm0 ; mm0=in0=(00 01 02 03)
- punpcklwd mm0,mm0 ; mm0=(00 00 01 01)
- punpckhwd mm2,mm2 ; mm2=(02 02 03 03)
-
- movq mm1,mm0
- punpckldq mm0,mm0 ; mm0=(00 00 00 00)
- punpckhdq mm1,mm1 ; mm1=(01 01 01 01)
- movq mm3,mm2
- punpckldq mm2,mm2 ; mm2=(02 02 02 02)
- punpckhdq mm3,mm3 ; mm3=(03 03 03 03)
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(2,0,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(2,1,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(3,0,edi,SIZEOF_JCOEF)], mm3
- movq MMWORD [MMBLOCK(3,1,edi,SIZEOF_JCOEF)], mm3
- jmp near .nextcolumn
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Even part
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- pmullw mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- pmullw mm1, MMWORD [MMBLOCK(2,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- movq mm2, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- pmullw mm2, MMWORD [MMBLOCK(4,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- pmullw mm3, MMWORD [MMBLOCK(6,0,edx,SIZEOF_IFAST_MULT_TYPE)]
-
- movq mm4,mm0
- movq mm5,mm1
- psubw mm0,mm2 ; mm0=tmp11
- psubw mm1,mm3
- paddw mm4,mm2 ; mm4=tmp10
- paddw mm5,mm3 ; mm5=tmp13
-
- psllw mm1,PRE_MULTIPLY_SCALE_BITS
- pmulhw mm1,[GOTOFF(ebx,PW_F1414)]
- psubw mm1,mm5 ; mm1=tmp12
-
- movq mm6,mm4
- movq mm7,mm0
- psubw mm4,mm5 ; mm4=tmp3
- psubw mm0,mm1 ; mm0=tmp2
- paddw mm6,mm5 ; mm6=tmp0
- paddw mm7,mm1 ; mm7=tmp1
-
- movq MMWORD [wk(1)], mm4 ; wk(1)=tmp3
- movq MMWORD [wk(0)], mm0 ; wk(0)=tmp2
-
- ; -- Odd part
-
- movq mm2, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- pmullw mm2, MMWORD [MMBLOCK(1,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- pmullw mm3, MMWORD [MMBLOCK(3,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- movq mm5, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- pmullw mm5, MMWORD [MMBLOCK(5,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- pmullw mm1, MMWORD [MMBLOCK(7,0,edx,SIZEOF_IFAST_MULT_TYPE)]
-
- movq mm4,mm2
- movq mm0,mm5
- psubw mm2,mm1 ; mm2=z12
- psubw mm5,mm3 ; mm5=z10
- paddw mm4,mm1 ; mm4=z11
- paddw mm0,mm3 ; mm0=z13
-
- movq mm1,mm5 ; mm1=z10(unscaled)
- psllw mm2,PRE_MULTIPLY_SCALE_BITS
- psllw mm5,PRE_MULTIPLY_SCALE_BITS
-
- movq mm3,mm4
- psubw mm4,mm0
- paddw mm3,mm0 ; mm3=tmp7
-
- psllw mm4,PRE_MULTIPLY_SCALE_BITS
- pmulhw mm4,[GOTOFF(ebx,PW_F1414)] ; mm4=tmp11
-
- ; To avoid overflow...
- ;
- ; (Original)
- ; tmp12 = -2.613125930 * z10 + z5;
- ;
- ; (This implementation)
- ; tmp12 = (-1.613125930 - 1) * z10 + z5;
- ; = -1.613125930 * z10 - z10 + z5;
-
- movq mm0,mm5
- paddw mm5,mm2
- pmulhw mm5,[GOTOFF(ebx,PW_F1847)] ; mm5=z5
- pmulhw mm0,[GOTOFF(ebx,PW_MF1613)]
- pmulhw mm2,[GOTOFF(ebx,PW_F1082)]
- psubw mm0,mm1
- psubw mm2,mm5 ; mm2=tmp10
- paddw mm0,mm5 ; mm0=tmp12
-
- ; -- Final output stage
-
- psubw mm0,mm3 ; mm0=tmp6
- movq mm1,mm6
- movq mm5,mm7
- paddw mm6,mm3 ; mm6=data0=(00 01 02 03)
- paddw mm7,mm0 ; mm7=data1=(10 11 12 13)
- psubw mm1,mm3 ; mm1=data7=(70 71 72 73)
- psubw mm5,mm0 ; mm5=data6=(60 61 62 63)
- psubw mm4,mm0 ; mm4=tmp5
-
- movq mm3,mm6 ; transpose coefficients(phase 1)
- punpcklwd mm6,mm7 ; mm6=(00 10 01 11)
- punpckhwd mm3,mm7 ; mm3=(02 12 03 13)
- movq mm0,mm5 ; transpose coefficients(phase 1)
- punpcklwd mm5,mm1 ; mm5=(60 70 61 71)
- punpckhwd mm0,mm1 ; mm0=(62 72 63 73)
-
- movq mm7, MMWORD [wk(0)] ; mm7=tmp2
- movq mm1, MMWORD [wk(1)] ; mm1=tmp3
-
- movq MMWORD [wk(0)], mm5 ; wk(0)=(60 70 61 71)
- movq MMWORD [wk(1)], mm0 ; wk(1)=(62 72 63 73)
-
- paddw mm2,mm4 ; mm2=tmp4
- movq mm5,mm7
- movq mm0,mm1
- paddw mm7,mm4 ; mm7=data2=(20 21 22 23)
- paddw mm1,mm2 ; mm1=data4=(40 41 42 43)
- psubw mm5,mm4 ; mm5=data5=(50 51 52 53)
- psubw mm0,mm2 ; mm0=data3=(30 31 32 33)
-
- movq mm4,mm7 ; transpose coefficients(phase 1)
- punpcklwd mm7,mm0 ; mm7=(20 30 21 31)
- punpckhwd mm4,mm0 ; mm4=(22 32 23 33)
- movq mm2,mm1 ; transpose coefficients(phase 1)
- punpcklwd mm1,mm5 ; mm1=(40 50 41 51)
- punpckhwd mm2,mm5 ; mm2=(42 52 43 53)
-
- movq mm0,mm6 ; transpose coefficients(phase 2)
- punpckldq mm6,mm7 ; mm6=(00 10 20 30)
- punpckhdq mm0,mm7 ; mm0=(01 11 21 31)
- movq mm5,mm3 ; transpose coefficients(phase 2)
- punpckldq mm3,mm4 ; mm3=(02 12 22 32)
- punpckhdq mm5,mm4 ; mm5=(03 13 23 33)
-
- movq mm7, MMWORD [wk(0)] ; mm7=(60 70 61 71)
- movq mm4, MMWORD [wk(1)] ; mm4=(62 72 63 73)
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_JCOEF)], mm6
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(2,0,edi,SIZEOF_JCOEF)], mm3
- movq MMWORD [MMBLOCK(3,0,edi,SIZEOF_JCOEF)], mm5
-
- movq mm6,mm1 ; transpose coefficients(phase 2)
- punpckldq mm1,mm7 ; mm1=(40 50 60 70)
- punpckhdq mm6,mm7 ; mm6=(41 51 61 71)
- movq mm0,mm2 ; transpose coefficients(phase 2)
- punpckldq mm2,mm4 ; mm2=(42 52 62 72)
- punpckhdq mm0,mm4 ; mm0=(43 53 63 73)
-
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_JCOEF)], mm6
- movq MMWORD [MMBLOCK(2,1,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(3,1,edi,SIZEOF_JCOEF)], mm0
-
-.nextcolumn:
- add esi, byte 4*SIZEOF_JCOEF ; coef_block
- add edx, byte 4*SIZEOF_IFAST_MULT_TYPE ; quantptr
- add edi, byte 4*DCTSIZE*SIZEOF_JCOEF ; wsptr
- dec ecx ; ctr
- jnz near .columnloop
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, [original_ebp]
- lea esi, [workspace] ; JCOEF * wsptr
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.rowloop:
-
- ; -- Even part
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movq mm2, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
-
- movq mm4,mm0
- movq mm5,mm1
- psubw mm0,mm2 ; mm0=tmp11
- psubw mm1,mm3
- paddw mm4,mm2 ; mm4=tmp10
- paddw mm5,mm3 ; mm5=tmp13
-
- psllw mm1,PRE_MULTIPLY_SCALE_BITS
- pmulhw mm1,[GOTOFF(ebx,PW_F1414)]
- psubw mm1,mm5 ; mm1=tmp12
-
- movq mm6,mm4
- movq mm7,mm0
- psubw mm4,mm5 ; mm4=tmp3
- psubw mm0,mm1 ; mm0=tmp2
- paddw mm6,mm5 ; mm6=tmp0
- paddw mm7,mm1 ; mm7=tmp1
-
- movq MMWORD [wk(1)], mm4 ; wk(1)=tmp3
- movq MMWORD [wk(0)], mm0 ; wk(0)=tmp2
-
- ; -- Odd part
-
- movq mm2, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- movq mm5, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
-
- movq mm4,mm2
- movq mm0,mm5
- psubw mm2,mm1 ; mm2=z12
- psubw mm5,mm3 ; mm5=z10
- paddw mm4,mm1 ; mm4=z11
- paddw mm0,mm3 ; mm0=z13
-
- movq mm1,mm5 ; mm1=z10(unscaled)
- psllw mm2,PRE_MULTIPLY_SCALE_BITS
- psllw mm5,PRE_MULTIPLY_SCALE_BITS
-
- movq mm3,mm4
- psubw mm4,mm0
- paddw mm3,mm0 ; mm3=tmp7
-
- psllw mm4,PRE_MULTIPLY_SCALE_BITS
- pmulhw mm4,[GOTOFF(ebx,PW_F1414)] ; mm4=tmp11
-
- ; To avoid overflow...
- ;
- ; (Original)
- ; tmp12 = -2.613125930 * z10 + z5;
- ;
- ; (This implementation)
- ; tmp12 = (-1.613125930 - 1) * z10 + z5;
- ; = -1.613125930 * z10 - z10 + z5;
-
- movq mm0,mm5
- paddw mm5,mm2
- pmulhw mm5,[GOTOFF(ebx,PW_F1847)] ; mm5=z5
- pmulhw mm0,[GOTOFF(ebx,PW_MF1613)]
- pmulhw mm2,[GOTOFF(ebx,PW_F1082)]
- psubw mm0,mm1
- psubw mm2,mm5 ; mm2=tmp10
- paddw mm0,mm5 ; mm0=tmp12
-
- ; -- Final output stage
-
- psubw mm0,mm3 ; mm0=tmp6
- movq mm1,mm6
- movq mm5,mm7
- paddw mm6,mm3 ; mm6=data0=(00 10 20 30)
- paddw mm7,mm0 ; mm7=data1=(01 11 21 31)
- psraw mm6,(PASS1_BITS+3) ; descale
- psraw mm7,(PASS1_BITS+3) ; descale
- psubw mm1,mm3 ; mm1=data7=(07 17 27 37)
- psubw mm5,mm0 ; mm5=data6=(06 16 26 36)
- psraw mm1,(PASS1_BITS+3) ; descale
- psraw mm5,(PASS1_BITS+3) ; descale
- psubw mm4,mm0 ; mm4=tmp5
-
- packsswb mm6,mm5 ; mm6=(00 10 20 30 06 16 26 36)
- packsswb mm7,mm1 ; mm7=(01 11 21 31 07 17 27 37)
-
- movq mm3, MMWORD [wk(0)] ; mm3=tmp2
- movq mm0, MMWORD [wk(1)] ; mm0=tmp3
-
- paddw mm2,mm4 ; mm2=tmp4
- movq mm5,mm3
- movq mm1,mm0
- paddw mm3,mm4 ; mm3=data2=(02 12 22 32)
- paddw mm0,mm2 ; mm0=data4=(04 14 24 34)
- psraw mm3,(PASS1_BITS+3) ; descale
- psraw mm0,(PASS1_BITS+3) ; descale
- psubw mm5,mm4 ; mm5=data5=(05 15 25 35)
- psubw mm1,mm2 ; mm1=data3=(03 13 23 33)
- psraw mm5,(PASS1_BITS+3) ; descale
- psraw mm1,(PASS1_BITS+3) ; descale
-
- movq mm4,[GOTOFF(ebx,PB_CENTERJSAMP)] ; mm4=[PB_CENTERJSAMP]
-
- packsswb mm3,mm0 ; mm3=(02 12 22 32 04 14 24 34)
- packsswb mm1,mm5 ; mm1=(03 13 23 33 05 15 25 35)
-
- paddb mm6,mm4
- paddb mm7,mm4
- paddb mm3,mm4
- paddb mm1,mm4
-
- movq mm2,mm6 ; transpose coefficients(phase 1)
- punpcklbw mm6,mm7 ; mm6=(00 01 10 11 20 21 30 31)
- punpckhbw mm2,mm7 ; mm2=(06 07 16 17 26 27 36 37)
- movq mm0,mm3 ; transpose coefficients(phase 1)
- punpcklbw mm3,mm1 ; mm3=(02 03 12 13 22 23 32 33)
- punpckhbw mm0,mm1 ; mm0=(04 05 14 15 24 25 34 35)
-
- movq mm5,mm6 ; transpose coefficients(phase 2)
- punpcklwd mm6,mm3 ; mm6=(00 01 02 03 10 11 12 13)
- punpckhwd mm5,mm3 ; mm5=(20 21 22 23 30 31 32 33)
- movq mm4,mm0 ; transpose coefficients(phase 2)
- punpcklwd mm0,mm2 ; mm0=(04 05 06 07 14 15 16 17)
- punpckhwd mm4,mm2 ; mm4=(24 25 26 27 34 35 36 37)
-
- movq mm7,mm6 ; transpose coefficients(phase 3)
- punpckldq mm6,mm0 ; mm6=(00 01 02 03 04 05 06 07)
- punpckhdq mm7,mm0 ; mm7=(10 11 12 13 14 15 16 17)
- movq mm1,mm5 ; transpose coefficients(phase 3)
- punpckldq mm5,mm4 ; mm5=(20 21 22 23 24 25 26 27)
- punpckhdq mm1,mm4 ; mm1=(30 31 32 33 34 35 36 37)
-
- pushpic ebx ; save GOT address
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm6
- movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm7
- mov edx, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
- movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm5
- movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm1
-
- poppic ebx ; restore GOT address
-
- add esi, byte 4*SIZEOF_JCOEF ; wsptr
- add edi, byte 4*SIZEOF_JSAMPROW
- dec ecx ; ctr
- jnz near .rowloop
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JIDCT_INT_MMX_SUPPORTED
-%endif ; DCT_IFAST_SUPPORTED
diff --git a/jimmxint.asm b/jimmxint.asm
deleted file mode 100644
index 2a33a63..0000000
--- a/jimmxint.asm
+++ /dev/null
@@ -1,862 +0,0 @@
-;
-; jimmxint.asm - accurate integer IDCT (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a slow-but-accurate integer implementation of the
-; inverse DCT (Discrete Cosine Transform). The following code is based
-; directly on the IJG's original jidctint.c; see the jidctint.c for
-; more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_ISLOW_SUPPORTED
-%ifdef JIDCT_INT_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%define DESCALE_P1 (CONST_BITS-PASS1_BITS)
-%define DESCALE_P2 (CONST_BITS+PASS1_BITS+3)
-
-%if CONST_BITS == 13
-F_0_298 equ 2446 ; FIX(0.298631336)
-F_0_390 equ 3196 ; FIX(0.390180644)
-F_0_541 equ 4433 ; FIX(0.541196100)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_175 equ 9633 ; FIX(1.175875602)
-F_1_501 equ 12299 ; FIX(1.501321110)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_1_961 equ 16069 ; FIX(1.961570560)
-F_2_053 equ 16819 ; FIX(2.053119869)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_072 equ 25172 ; FIX(3.072711026)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_298 equ DESCALE( 320652955,30-CONST_BITS) ; FIX(0.298631336)
-F_0_390 equ DESCALE( 418953276,30-CONST_BITS) ; FIX(0.390180644)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_175 equ DESCALE(1262586813,30-CONST_BITS) ; FIX(1.175875602)
-F_1_501 equ DESCALE(1612031267,30-CONST_BITS) ; FIX(1.501321110)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_1_961 equ DESCALE(2106220350,30-CONST_BITS) ; FIX(1.961570560)
-F_2_053 equ DESCALE(2204520673,30-CONST_BITS) ; FIX(2.053119869)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_072 equ DESCALE(3299298341,30-CONST_BITS) ; FIX(3.072711026)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_idct_islow_mmx)
-
-EXTN(jconst_idct_islow_mmx):
-
-PW_F130_F054 times 2 dw (F_0_541+F_0_765), F_0_541
-PW_F054_MF130 times 2 dw F_0_541, (F_0_541-F_1_847)
-PW_MF078_F117 times 2 dw (F_1_175-F_1_961), F_1_175
-PW_F117_F078 times 2 dw F_1_175, (F_1_175-F_0_390)
-PW_MF060_MF089 times 2 dw (F_0_298-F_0_899),-F_0_899
-PW_MF089_F060 times 2 dw -F_0_899, (F_1_501-F_0_899)
-PW_MF050_MF256 times 2 dw (F_2_053-F_2_562),-F_2_562
-PW_MF256_F050 times 2 dw -F_2_562, (F_3_072-F_2_562)
-PD_DESCALE_P1 times 2 dd 1 << (DESCALE_P1-1)
-PD_DESCALE_P2 times 2 dd 1 << (DESCALE_P2-1)
-PB_CENTERJSAMP times 8 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_islow_mmx (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 12
-%define workspace wk(0)-DCTSIZE2*SIZEOF_JCOEF
- ; JCOEF workspace[DCTSIZE2]
-
- align 16
- global EXTN(jpeg_idct_islow_mmx)
-
-EXTN(jpeg_idct_islow_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input, store into work array.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
- lea edi, [workspace] ; JCOEF * wsptr
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.columnloop:
-%ifndef NO_ZERO_COLUMN_TEST_ISLOW_MMX
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- movq mm0, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- por mm1, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- por mm1, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- por mm1,mm0
- packsswb mm1,mm1
- movd eax,mm1
- test eax,eax
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- pmullw mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- psllw mm0,PASS1_BITS
-
- movq mm2,mm0 ; mm0=in0=(00 01 02 03)
- punpcklwd mm0,mm0 ; mm0=(00 00 01 01)
- punpckhwd mm2,mm2 ; mm2=(02 02 03 03)
-
- movq mm1,mm0
- punpckldq mm0,mm0 ; mm0=(00 00 00 00)
- punpckhdq mm1,mm1 ; mm1=(01 01 01 01)
- movq mm3,mm2
- punpckldq mm2,mm2 ; mm2=(02 02 02 02)
- punpckhdq mm3,mm3 ; mm3=(03 03 03 03)
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(2,0,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(2,1,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(3,0,edi,SIZEOF_JCOEF)], mm3
- movq MMWORD [MMBLOCK(3,1,edi,SIZEOF_JCOEF)], mm3
- jmp near .nextcolumn
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Even part
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- pmullw mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm1, MMWORD [MMBLOCK(2,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movq mm2, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- pmullw mm2, MMWORD [MMBLOCK(4,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm3, MMWORD [MMBLOCK(6,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- ; (Original)
- ; z1 = (z2 + z3) * 0.541196100;
- ; tmp2 = z1 + z3 * -1.847759065;
- ; tmp3 = z1 + z2 * 0.765366865;
- ;
- ; (This implementation)
- ; tmp2 = z2 * 0.541196100 + z3 * (0.541196100 - 1.847759065);
- ; tmp3 = z2 * (0.541196100 + 0.765366865) + z3 * 0.541196100;
-
- movq mm4,mm1 ; mm1=in2=z2
- movq mm5,mm1
- punpcklwd mm4,mm3 ; mm3=in6=z3
- punpckhwd mm5,mm3
- movq mm1,mm4
- movq mm3,mm5
- pmaddwd mm4,[GOTOFF(ebx,PW_F130_F054)] ; mm4=tmp3L
- pmaddwd mm5,[GOTOFF(ebx,PW_F130_F054)] ; mm5=tmp3H
- pmaddwd mm1,[GOTOFF(ebx,PW_F054_MF130)] ; mm1=tmp2L
- pmaddwd mm3,[GOTOFF(ebx,PW_F054_MF130)] ; mm3=tmp2H
-
- movq mm6,mm0
- paddw mm0,mm2 ; mm0=in0+in4
- psubw mm6,mm2 ; mm6=in0-in4
-
- pxor mm7,mm7
- pxor mm2,mm2
- punpcklwd mm7,mm0 ; mm7=tmp0L
- punpckhwd mm2,mm0 ; mm2=tmp0H
- psrad mm7,(16-CONST_BITS) ; psrad mm7,16 & pslld mm7,CONST_BITS
- psrad mm2,(16-CONST_BITS) ; psrad mm2,16 & pslld mm2,CONST_BITS
-
- movq mm0,mm7
- paddd mm7,mm4 ; mm7=tmp10L
- psubd mm0,mm4 ; mm0=tmp13L
- movq mm4,mm2
- paddd mm2,mm5 ; mm2=tmp10H
- psubd mm4,mm5 ; mm4=tmp13H
-
- movq MMWORD [wk(0)], mm7 ; wk(0)=tmp10L
- movq MMWORD [wk(1)], mm2 ; wk(1)=tmp10H
- movq MMWORD [wk(2)], mm0 ; wk(2)=tmp13L
- movq MMWORD [wk(3)], mm4 ; wk(3)=tmp13H
-
- pxor mm5,mm5
- pxor mm7,mm7
- punpcklwd mm5,mm6 ; mm5=tmp1L
- punpckhwd mm7,mm6 ; mm7=tmp1H
- psrad mm5,(16-CONST_BITS) ; psrad mm5,16 & pslld mm5,CONST_BITS
- psrad mm7,(16-CONST_BITS) ; psrad mm7,16 & pslld mm7,CONST_BITS
-
- movq mm2,mm5
- paddd mm5,mm1 ; mm5=tmp11L
- psubd mm2,mm1 ; mm2=tmp12L
- movq mm0,mm7
- paddd mm7,mm3 ; mm7=tmp11H
- psubd mm0,mm3 ; mm0=tmp12H
-
- movq MMWORD [wk(4)], mm5 ; wk(4)=tmp11L
- movq MMWORD [wk(5)], mm7 ; wk(5)=tmp11H
- movq MMWORD [wk(6)], mm2 ; wk(6)=tmp12L
- movq MMWORD [wk(7)], mm0 ; wk(7)=tmp12H
-
- ; -- Odd part
-
- movq mm4, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm6, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- pmullw mm4, MMWORD [MMBLOCK(1,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm6, MMWORD [MMBLOCK(3,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movq mm1, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- pmullw mm1, MMWORD [MMBLOCK(5,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm3, MMWORD [MMBLOCK(7,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- movq mm5,mm6
- movq mm7,mm4
- paddw mm5,mm3 ; mm5=z3
- paddw mm7,mm1 ; mm7=z4
-
- ; (Original)
- ; z5 = (z3 + z4) * 1.175875602;
- ; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
- ; z3 += z5; z4 += z5;
- ;
- ; (This implementation)
- ; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
- ; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
-
- movq mm2,mm5
- movq mm0,mm5
- punpcklwd mm2,mm7
- punpckhwd mm0,mm7
- movq mm5,mm2
- movq mm7,mm0
- pmaddwd mm2,[GOTOFF(ebx,PW_MF078_F117)] ; mm2=z3L
- pmaddwd mm0,[GOTOFF(ebx,PW_MF078_F117)] ; mm0=z3H
- pmaddwd mm5,[GOTOFF(ebx,PW_F117_F078)] ; mm5=z4L
- pmaddwd mm7,[GOTOFF(ebx,PW_F117_F078)] ; mm7=z4H
-
- movq MMWORD [wk(10)], mm2 ; wk(10)=z3L
- movq MMWORD [wk(11)], mm0 ; wk(11)=z3H
-
- ; (Original)
- ; z1 = tmp0 + tmp3; z2 = tmp1 + tmp2;
- ; tmp0 = tmp0 * 0.298631336; tmp1 = tmp1 * 2.053119869;
- ; tmp2 = tmp2 * 3.072711026; tmp3 = tmp3 * 1.501321110;
- ; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
- ; tmp0 += z1 + z3; tmp1 += z2 + z4;
- ; tmp2 += z2 + z3; tmp3 += z1 + z4;
- ;
- ; (This implementation)
- ; tmp0 = tmp0 * (0.298631336 - 0.899976223) + tmp3 * -0.899976223;
- ; tmp1 = tmp1 * (2.053119869 - 2.562915447) + tmp2 * -2.562915447;
- ; tmp2 = tmp1 * -2.562915447 + tmp2 * (3.072711026 - 2.562915447);
- ; tmp3 = tmp0 * -0.899976223 + tmp3 * (1.501321110 - 0.899976223);
- ; tmp0 += z3; tmp1 += z4;
- ; tmp2 += z3; tmp3 += z4;
-
- movq mm2,mm3
- movq mm0,mm3
- punpcklwd mm2,mm4
- punpckhwd mm0,mm4
- movq mm3,mm2
- movq mm4,mm0
- pmaddwd mm2,[GOTOFF(ebx,PW_MF060_MF089)] ; mm2=tmp0L
- pmaddwd mm0,[GOTOFF(ebx,PW_MF060_MF089)] ; mm0=tmp0H
- pmaddwd mm3,[GOTOFF(ebx,PW_MF089_F060)] ; mm3=tmp3L
- pmaddwd mm4,[GOTOFF(ebx,PW_MF089_F060)] ; mm4=tmp3H
-
- paddd mm2, MMWORD [wk(10)] ; mm2=tmp0L
- paddd mm0, MMWORD [wk(11)] ; mm0=tmp0H
- paddd mm3,mm5 ; mm3=tmp3L
- paddd mm4,mm7 ; mm4=tmp3H
-
- movq MMWORD [wk(8)], mm2 ; wk(8)=tmp0L
- movq MMWORD [wk(9)], mm0 ; wk(9)=tmp0H
-
- movq mm2,mm1
- movq mm0,mm1
- punpcklwd mm2,mm6
- punpckhwd mm0,mm6
- movq mm1,mm2
- movq mm6,mm0
- pmaddwd mm2,[GOTOFF(ebx,PW_MF050_MF256)] ; mm2=tmp1L
- pmaddwd mm0,[GOTOFF(ebx,PW_MF050_MF256)] ; mm0=tmp1H
- pmaddwd mm1,[GOTOFF(ebx,PW_MF256_F050)] ; mm1=tmp2L
- pmaddwd mm6,[GOTOFF(ebx,PW_MF256_F050)] ; mm6=tmp2H
-
- paddd mm2,mm5 ; mm2=tmp1L
- paddd mm0,mm7 ; mm0=tmp1H
- paddd mm1, MMWORD [wk(10)] ; mm1=tmp2L
- paddd mm6, MMWORD [wk(11)] ; mm6=tmp2H
-
- movq MMWORD [wk(10)], mm2 ; wk(10)=tmp1L
- movq MMWORD [wk(11)], mm0 ; wk(11)=tmp1H
-
- ; -- Final output stage
-
- movq mm5, MMWORD [wk(0)] ; mm5=tmp10L
- movq mm7, MMWORD [wk(1)] ; mm7=tmp10H
-
- movq mm2,mm5
- movq mm0,mm7
- paddd mm5,mm3 ; mm5=data0L
- paddd mm7,mm4 ; mm7=data0H
- psubd mm2,mm3 ; mm2=data7L
- psubd mm0,mm4 ; mm0=data7H
-
- movq mm3,[GOTOFF(ebx,PD_DESCALE_P1)] ; mm3=[PD_DESCALE_P1]
-
- paddd mm5,mm3
- paddd mm7,mm3
- psrad mm5,DESCALE_P1
- psrad mm7,DESCALE_P1
- paddd mm2,mm3
- paddd mm0,mm3
- psrad mm2,DESCALE_P1
- psrad mm0,DESCALE_P1
-
- packssdw mm5,mm7 ; mm5=data0=(00 01 02 03)
- packssdw mm2,mm0 ; mm2=data7=(70 71 72 73)
-
- movq mm4, MMWORD [wk(4)] ; mm4=tmp11L
- movq mm3, MMWORD [wk(5)] ; mm3=tmp11H
-
- movq mm7,mm4
- movq mm0,mm3
- paddd mm4,mm1 ; mm4=data1L
- paddd mm3,mm6 ; mm3=data1H
- psubd mm7,mm1 ; mm7=data6L
- psubd mm0,mm6 ; mm0=data6H
-
- movq mm1,[GOTOFF(ebx,PD_DESCALE_P1)] ; mm1=[PD_DESCALE_P1]
-
- paddd mm4,mm1
- paddd mm3,mm1
- psrad mm4,DESCALE_P1
- psrad mm3,DESCALE_P1
- paddd mm7,mm1
- paddd mm0,mm1
- psrad mm7,DESCALE_P1
- psrad mm0,DESCALE_P1
-
- packssdw mm4,mm3 ; mm4=data1=(10 11 12 13)
- packssdw mm7,mm0 ; mm7=data6=(60 61 62 63)
-
- movq mm6,mm5 ; transpose coefficients(phase 1)
- punpcklwd mm5,mm4 ; mm5=(00 10 01 11)
- punpckhwd mm6,mm4 ; mm6=(02 12 03 13)
- movq mm1,mm7 ; transpose coefficients(phase 1)
- punpcklwd mm7,mm2 ; mm7=(60 70 61 71)
- punpckhwd mm1,mm2 ; mm1=(62 72 63 73)
-
- movq mm3, MMWORD [wk(6)] ; mm3=tmp12L
- movq mm0, MMWORD [wk(7)] ; mm0=tmp12H
- movq mm4, MMWORD [wk(10)] ; mm4=tmp1L
- movq mm2, MMWORD [wk(11)] ; mm2=tmp1H
-
- movq MMWORD [wk(0)], mm5 ; wk(0)=(00 10 01 11)
- movq MMWORD [wk(1)], mm6 ; wk(1)=(02 12 03 13)
- movq MMWORD [wk(4)], mm7 ; wk(4)=(60 70 61 71)
- movq MMWORD [wk(5)], mm1 ; wk(5)=(62 72 63 73)
-
- movq mm5,mm3
- movq mm6,mm0
- paddd mm3,mm4 ; mm3=data2L
- paddd mm0,mm2 ; mm0=data2H
- psubd mm5,mm4 ; mm5=data5L
- psubd mm6,mm2 ; mm6=data5H
-
- movq mm7,[GOTOFF(ebx,PD_DESCALE_P1)] ; mm7=[PD_DESCALE_P1]
-
- paddd mm3,mm7
- paddd mm0,mm7
- psrad mm3,DESCALE_P1
- psrad mm0,DESCALE_P1
- paddd mm5,mm7
- paddd mm6,mm7
- psrad mm5,DESCALE_P1
- psrad mm6,DESCALE_P1
-
- packssdw mm3,mm0 ; mm3=data2=(20 21 22 23)
- packssdw mm5,mm6 ; mm5=data5=(50 51 52 53)
-
- movq mm1, MMWORD [wk(2)] ; mm1=tmp13L
- movq mm4, MMWORD [wk(3)] ; mm4=tmp13H
- movq mm2, MMWORD [wk(8)] ; mm2=tmp0L
- movq mm7, MMWORD [wk(9)] ; mm7=tmp0H
-
- movq mm0,mm1
- movq mm6,mm4
- paddd mm1,mm2 ; mm1=data3L
- paddd mm4,mm7 ; mm4=data3H
- psubd mm0,mm2 ; mm0=data4L
- psubd mm6,mm7 ; mm6=data4H
-
- movq mm2,[GOTOFF(ebx,PD_DESCALE_P1)] ; mm2=[PD_DESCALE_P1]
-
- paddd mm1,mm2
- paddd mm4,mm2
- psrad mm1,DESCALE_P1
- psrad mm4,DESCALE_P1
- paddd mm0,mm2
- paddd mm6,mm2
- psrad mm0,DESCALE_P1
- psrad mm6,DESCALE_P1
-
- packssdw mm1,mm4 ; mm1=data3=(30 31 32 33)
- packssdw mm0,mm6 ; mm0=data4=(40 41 42 43)
-
- movq mm7, MMWORD [wk(0)] ; mm7=(00 10 01 11)
- movq mm2, MMWORD [wk(1)] ; mm2=(02 12 03 13)
-
- movq mm4,mm3 ; transpose coefficients(phase 1)
- punpcklwd mm3,mm1 ; mm3=(20 30 21 31)
- punpckhwd mm4,mm1 ; mm4=(22 32 23 33)
- movq mm6,mm0 ; transpose coefficients(phase 1)
- punpcklwd mm0,mm5 ; mm0=(40 50 41 51)
- punpckhwd mm6,mm5 ; mm6=(42 52 43 53)
-
- movq mm1,mm7 ; transpose coefficients(phase 2)
- punpckldq mm7,mm3 ; mm7=(00 10 20 30)
- punpckhdq mm1,mm3 ; mm1=(01 11 21 31)
- movq mm5,mm2 ; transpose coefficients(phase 2)
- punpckldq mm2,mm4 ; mm2=(02 12 22 32)
- punpckhdq mm5,mm4 ; mm5=(03 13 23 33)
-
- movq mm3, MMWORD [wk(4)] ; mm3=(60 70 61 71)
- movq mm4, MMWORD [wk(5)] ; mm4=(62 72 63 73)
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_JCOEF)], mm7
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(2,0,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(3,0,edi,SIZEOF_JCOEF)], mm5
-
- movq mm7,mm0 ; transpose coefficients(phase 2)
- punpckldq mm0,mm3 ; mm0=(40 50 60 70)
- punpckhdq mm7,mm3 ; mm7=(41 51 61 71)
- movq mm1,mm6 ; transpose coefficients(phase 2)
- punpckldq mm6,mm4 ; mm6=(42 52 62 72)
- punpckhdq mm1,mm4 ; mm1=(43 53 63 73)
-
- movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_JCOEF)], mm7
- movq MMWORD [MMBLOCK(2,1,edi,SIZEOF_JCOEF)], mm6
- movq MMWORD [MMBLOCK(3,1,edi,SIZEOF_JCOEF)], mm1
-
-.nextcolumn:
- add esi, byte 4*SIZEOF_JCOEF ; coef_block
- add edx, byte 4*SIZEOF_ISLOW_MULT_TYPE ; quantptr
- add edi, byte 4*DCTSIZE*SIZEOF_JCOEF ; wsptr
- dec ecx ; ctr
- jnz near .columnloop
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, [original_ebp]
- lea esi, [workspace] ; JCOEF * wsptr
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.rowloop:
-
- ; -- Even part
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movq mm2, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
-
- ; (Original)
- ; z1 = (z2 + z3) * 0.541196100;
- ; tmp2 = z1 + z3 * -1.847759065;
- ; tmp3 = z1 + z2 * 0.765366865;
- ;
- ; (This implementation)
- ; tmp2 = z2 * 0.541196100 + z3 * (0.541196100 - 1.847759065);
- ; tmp3 = z2 * (0.541196100 + 0.765366865) + z3 * 0.541196100;
-
- movq mm4,mm1 ; mm1=in2=z2
- movq mm5,mm1
- punpcklwd mm4,mm3 ; mm3=in6=z3
- punpckhwd mm5,mm3
- movq mm1,mm4
- movq mm3,mm5
- pmaddwd mm4,[GOTOFF(ebx,PW_F130_F054)] ; mm4=tmp3L
- pmaddwd mm5,[GOTOFF(ebx,PW_F130_F054)] ; mm5=tmp3H
- pmaddwd mm1,[GOTOFF(ebx,PW_F054_MF130)] ; mm1=tmp2L
- pmaddwd mm3,[GOTOFF(ebx,PW_F054_MF130)] ; mm3=tmp2H
-
- movq mm6,mm0
- paddw mm0,mm2 ; mm0=in0+in4
- psubw mm6,mm2 ; mm6=in0-in4
-
- pxor mm7,mm7
- pxor mm2,mm2
- punpcklwd mm7,mm0 ; mm7=tmp0L
- punpckhwd mm2,mm0 ; mm2=tmp0H
- psrad mm7,(16-CONST_BITS) ; psrad mm7,16 & pslld mm7,CONST_BITS
- psrad mm2,(16-CONST_BITS) ; psrad mm2,16 & pslld mm2,CONST_BITS
-
- movq mm0,mm7
- paddd mm7,mm4 ; mm7=tmp10L
- psubd mm0,mm4 ; mm0=tmp13L
- movq mm4,mm2
- paddd mm2,mm5 ; mm2=tmp10H
- psubd mm4,mm5 ; mm4=tmp13H
-
- movq MMWORD [wk(0)], mm7 ; wk(0)=tmp10L
- movq MMWORD [wk(1)], mm2 ; wk(1)=tmp10H
- movq MMWORD [wk(2)], mm0 ; wk(2)=tmp13L
- movq MMWORD [wk(3)], mm4 ; wk(3)=tmp13H
-
- pxor mm5,mm5
- pxor mm7,mm7
- punpcklwd mm5,mm6 ; mm5=tmp1L
- punpckhwd mm7,mm6 ; mm7=tmp1H
- psrad mm5,(16-CONST_BITS) ; psrad mm5,16 & pslld mm5,CONST_BITS
- psrad mm7,(16-CONST_BITS) ; psrad mm7,16 & pslld mm7,CONST_BITS
-
- movq mm2,mm5
- paddd mm5,mm1 ; mm5=tmp11L
- psubd mm2,mm1 ; mm2=tmp12L
- movq mm0,mm7
- paddd mm7,mm3 ; mm7=tmp11H
- psubd mm0,mm3 ; mm0=tmp12H
-
- movq MMWORD [wk(4)], mm5 ; wk(4)=tmp11L
- movq MMWORD [wk(5)], mm7 ; wk(5)=tmp11H
- movq MMWORD [wk(6)], mm2 ; wk(6)=tmp12L
- movq MMWORD [wk(7)], mm0 ; wk(7)=tmp12H
-
- ; -- Odd part
-
- movq mm4, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm6, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
-
- movq mm5,mm6
- movq mm7,mm4
- paddw mm5,mm3 ; mm5=z3
- paddw mm7,mm1 ; mm7=z4
-
- ; (Original)
- ; z5 = (z3 + z4) * 1.175875602;
- ; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
- ; z3 += z5; z4 += z5;
- ;
- ; (This implementation)
- ; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
- ; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
-
- movq mm2,mm5
- movq mm0,mm5
- punpcklwd mm2,mm7
- punpckhwd mm0,mm7
- movq mm5,mm2
- movq mm7,mm0
- pmaddwd mm2,[GOTOFF(ebx,PW_MF078_F117)] ; mm2=z3L
- pmaddwd mm0,[GOTOFF(ebx,PW_MF078_F117)] ; mm0=z3H
- pmaddwd mm5,[GOTOFF(ebx,PW_F117_F078)] ; mm5=z4L
- pmaddwd mm7,[GOTOFF(ebx,PW_F117_F078)] ; mm7=z4H
-
- movq MMWORD [wk(10)], mm2 ; wk(10)=z3L
- movq MMWORD [wk(11)], mm0 ; wk(11)=z3H
-
- ; (Original)
- ; z1 = tmp0 + tmp3; z2 = tmp1 + tmp2;
- ; tmp0 = tmp0 * 0.298631336; tmp1 = tmp1 * 2.053119869;
- ; tmp2 = tmp2 * 3.072711026; tmp3 = tmp3 * 1.501321110;
- ; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
- ; tmp0 += z1 + z3; tmp1 += z2 + z4;
- ; tmp2 += z2 + z3; tmp3 += z1 + z4;
- ;
- ; (This implementation)
- ; tmp0 = tmp0 * (0.298631336 - 0.899976223) + tmp3 * -0.899976223;
- ; tmp1 = tmp1 * (2.053119869 - 2.562915447) + tmp2 * -2.562915447;
- ; tmp2 = tmp1 * -2.562915447 + tmp2 * (3.072711026 - 2.562915447);
- ; tmp3 = tmp0 * -0.899976223 + tmp3 * (1.501321110 - 0.899976223);
- ; tmp0 += z3; tmp1 += z4;
- ; tmp2 += z3; tmp3 += z4;
-
- movq mm2,mm3
- movq mm0,mm3
- punpcklwd mm2,mm4
- punpckhwd mm0,mm4
- movq mm3,mm2
- movq mm4,mm0
- pmaddwd mm2,[GOTOFF(ebx,PW_MF060_MF089)] ; mm2=tmp0L
- pmaddwd mm0,[GOTOFF(ebx,PW_MF060_MF089)] ; mm0=tmp0H
- pmaddwd mm3,[GOTOFF(ebx,PW_MF089_F060)] ; mm3=tmp3L
- pmaddwd mm4,[GOTOFF(ebx,PW_MF089_F060)] ; mm4=tmp3H
-
- paddd mm2, MMWORD [wk(10)] ; mm2=tmp0L
- paddd mm0, MMWORD [wk(11)] ; mm0=tmp0H
- paddd mm3,mm5 ; mm3=tmp3L
- paddd mm4,mm7 ; mm4=tmp3H
-
- movq MMWORD [wk(8)], mm2 ; wk(8)=tmp0L
- movq MMWORD [wk(9)], mm0 ; wk(9)=tmp0H
-
- movq mm2,mm1
- movq mm0,mm1
- punpcklwd mm2,mm6
- punpckhwd mm0,mm6
- movq mm1,mm2
- movq mm6,mm0
- pmaddwd mm2,[GOTOFF(ebx,PW_MF050_MF256)] ; mm2=tmp1L
- pmaddwd mm0,[GOTOFF(ebx,PW_MF050_MF256)] ; mm0=tmp1H
- pmaddwd mm1,[GOTOFF(ebx,PW_MF256_F050)] ; mm1=tmp2L
- pmaddwd mm6,[GOTOFF(ebx,PW_MF256_F050)] ; mm6=tmp2H
-
- paddd mm2,mm5 ; mm2=tmp1L
- paddd mm0,mm7 ; mm0=tmp1H
- paddd mm1, MMWORD [wk(10)] ; mm1=tmp2L
- paddd mm6, MMWORD [wk(11)] ; mm6=tmp2H
-
- movq MMWORD [wk(10)], mm2 ; wk(10)=tmp1L
- movq MMWORD [wk(11)], mm0 ; wk(11)=tmp1H
-
- ; -- Final output stage
-
- movq mm5, MMWORD [wk(0)] ; mm5=tmp10L
- movq mm7, MMWORD [wk(1)] ; mm7=tmp10H
-
- movq mm2,mm5
- movq mm0,mm7
- paddd mm5,mm3 ; mm5=data0L
- paddd mm7,mm4 ; mm7=data0H
- psubd mm2,mm3 ; mm2=data7L
- psubd mm0,mm4 ; mm0=data7H
-
- movq mm3,[GOTOFF(ebx,PD_DESCALE_P2)] ; mm3=[PD_DESCALE_P2]
-
- paddd mm5,mm3
- paddd mm7,mm3
- psrad mm5,DESCALE_P2
- psrad mm7,DESCALE_P2
- paddd mm2,mm3
- paddd mm0,mm3
- psrad mm2,DESCALE_P2
- psrad mm0,DESCALE_P2
-
- packssdw mm5,mm7 ; mm5=data0=(00 10 20 30)
- packssdw mm2,mm0 ; mm2=data7=(07 17 27 37)
-
- movq mm4, MMWORD [wk(4)] ; mm4=tmp11L
- movq mm3, MMWORD [wk(5)] ; mm3=tmp11H
-
- movq mm7,mm4
- movq mm0,mm3
- paddd mm4,mm1 ; mm4=data1L
- paddd mm3,mm6 ; mm3=data1H
- psubd mm7,mm1 ; mm7=data6L
- psubd mm0,mm6 ; mm0=data6H
-
- movq mm1,[GOTOFF(ebx,PD_DESCALE_P2)] ; mm1=[PD_DESCALE_P2]
-
- paddd mm4,mm1
- paddd mm3,mm1
- psrad mm4,DESCALE_P2
- psrad mm3,DESCALE_P2
- paddd mm7,mm1
- paddd mm0,mm1
- psrad mm7,DESCALE_P2
- psrad mm0,DESCALE_P2
-
- packssdw mm4,mm3 ; mm4=data1=(01 11 21 31)
- packssdw mm7,mm0 ; mm7=data6=(06 16 26 36)
-
- packsswb mm5,mm7 ; mm5=(00 10 20 30 06 16 26 36)
- packsswb mm4,mm2 ; mm4=(01 11 21 31 07 17 27 37)
-
- movq mm6, MMWORD [wk(6)] ; mm6=tmp12L
- movq mm1, MMWORD [wk(7)] ; mm1=tmp12H
- movq mm3, MMWORD [wk(10)] ; mm3=tmp1L
- movq mm0, MMWORD [wk(11)] ; mm0=tmp1H
-
- movq MMWORD [wk(0)], mm5 ; wk(0)=(00 10 20 30 06 16 26 36)
- movq MMWORD [wk(1)], mm4 ; wk(1)=(01 11 21 31 07 17 27 37)
-
- movq mm7,mm6
- movq mm2,mm1
- paddd mm6,mm3 ; mm6=data2L
- paddd mm1,mm0 ; mm1=data2H
- psubd mm7,mm3 ; mm7=data5L
- psubd mm2,mm0 ; mm2=data5H
-
- movq mm5,[GOTOFF(ebx,PD_DESCALE_P2)] ; mm5=[PD_DESCALE_P2]
-
- paddd mm6,mm5
- paddd mm1,mm5
- psrad mm6,DESCALE_P2
- psrad mm1,DESCALE_P2
- paddd mm7,mm5
- paddd mm2,mm5
- psrad mm7,DESCALE_P2
- psrad mm2,DESCALE_P2
-
- packssdw mm6,mm1 ; mm6=data2=(02 12 22 32)
- packssdw mm7,mm2 ; mm7=data5=(05 15 25 35)
-
- movq mm4, MMWORD [wk(2)] ; mm4=tmp13L
- movq mm3, MMWORD [wk(3)] ; mm3=tmp13H
- movq mm0, MMWORD [wk(8)] ; mm0=tmp0L
- movq mm5, MMWORD [wk(9)] ; mm5=tmp0H
-
- movq mm1,mm4
- movq mm2,mm3
- paddd mm4,mm0 ; mm4=data3L
- paddd mm3,mm5 ; mm3=data3H
- psubd mm1,mm0 ; mm1=data4L
- psubd mm2,mm5 ; mm2=data4H
-
- movq mm0,[GOTOFF(ebx,PD_DESCALE_P2)] ; mm0=[PD_DESCALE_P2]
-
- paddd mm4,mm0
- paddd mm3,mm0
- psrad mm4,DESCALE_P2
- psrad mm3,DESCALE_P2
- paddd mm1,mm0
- paddd mm2,mm0
- psrad mm1,DESCALE_P2
- psrad mm2,DESCALE_P2
-
- movq mm5,[GOTOFF(ebx,PB_CENTERJSAMP)] ; mm5=[PB_CENTERJSAMP]
-
- packssdw mm4,mm3 ; mm4=data3=(03 13 23 33)
- packssdw mm1,mm2 ; mm1=data4=(04 14 24 34)
-
- movq mm0, MMWORD [wk(0)] ; mm0=(00 10 20 30 06 16 26 36)
- movq mm3, MMWORD [wk(1)] ; mm3=(01 11 21 31 07 17 27 37)
-
- packsswb mm6,mm1 ; mm6=(02 12 22 32 04 14 24 34)
- packsswb mm4,mm7 ; mm4=(03 13 23 33 05 15 25 35)
-
- paddb mm0,mm5
- paddb mm3,mm5
- paddb mm6,mm5
- paddb mm4,mm5
-
- movq mm2,mm0 ; transpose coefficients(phase 1)
- punpcklbw mm0,mm3 ; mm0=(00 01 10 11 20 21 30 31)
- punpckhbw mm2,mm3 ; mm2=(06 07 16 17 26 27 36 37)
- movq mm1,mm6 ; transpose coefficients(phase 1)
- punpcklbw mm6,mm4 ; mm6=(02 03 12 13 22 23 32 33)
- punpckhbw mm1,mm4 ; mm1=(04 05 14 15 24 25 34 35)
-
- movq mm7,mm0 ; transpose coefficients(phase 2)
- punpcklwd mm0,mm6 ; mm0=(00 01 02 03 10 11 12 13)
- punpckhwd mm7,mm6 ; mm7=(20 21 22 23 30 31 32 33)
- movq mm5,mm1 ; transpose coefficients(phase 2)
- punpcklwd mm1,mm2 ; mm1=(04 05 06 07 14 15 16 17)
- punpckhwd mm5,mm2 ; mm5=(24 25 26 27 34 35 36 37)
-
- movq mm3,mm0 ; transpose coefficients(phase 3)
- punpckldq mm0,mm1 ; mm0=(00 01 02 03 04 05 06 07)
- punpckhdq mm3,mm1 ; mm3=(10 11 12 13 14 15 16 17)
- movq mm4,mm7 ; transpose coefficients(phase 3)
- punpckldq mm7,mm5 ; mm7=(20 21 22 23 24 25 26 27)
- punpckhdq mm4,mm5 ; mm4=(30 31 32 33 34 35 36 37)
-
- pushpic ebx ; save GOT address
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm0
- movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm3
- mov edx, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
- movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm7
- movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm4
-
- poppic ebx ; restore GOT address
-
- add esi, byte 4*SIZEOF_JCOEF ; wsptr
- add edi, byte 4*SIZEOF_JSAMPROW
- dec ecx ; ctr
- jnz near .rowloop
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JIDCT_INT_MMX_SUPPORTED
-%endif ; DCT_ISLOW_SUPPORTED
diff --git a/jimmxred.asm b/jimmxred.asm
deleted file mode 100644
index 491fa7b..0000000
--- a/jimmxred.asm
+++ /dev/null
@@ -1,719 +0,0 @@
-;
-; jimmxred.asm - reduced-size IDCT (MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains inverse-DCT routines that produce reduced-size
-; output: either 4x4 or 2x2 pixels from an 8x8 DCT block.
-; The following code is based directly on the IJG's original jidctred.c;
-; see the jidctred.c for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef IDCT_SCALING_SUPPORTED
-%ifdef JIDCT_INT_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%define DESCALE_P1_4 (CONST_BITS-PASS1_BITS+1)
-%define DESCALE_P2_4 (CONST_BITS+PASS1_BITS+3+1)
-%define DESCALE_P1_2 (CONST_BITS-PASS1_BITS+2)
-%define DESCALE_P2_2 (CONST_BITS+PASS1_BITS+3+2)
-
-%if CONST_BITS == 13
-F_0_211 equ 1730 ; FIX(0.211164243)
-F_0_509 equ 4176 ; FIX(0.509795579)
-F_0_601 equ 4926 ; FIX(0.601344887)
-F_0_720 equ 5906 ; FIX(0.720959822)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_850 equ 6967 ; FIX(0.850430095)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_061 equ 8697 ; FIX(1.061594337)
-F_1_272 equ 10426 ; FIX(1.272758580)
-F_1_451 equ 11893 ; FIX(1.451774981)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_2_172 equ 17799 ; FIX(2.172734803)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_624 equ 29692 ; FIX(3.624509785)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_211 equ DESCALE( 226735879,30-CONST_BITS) ; FIX(0.211164243)
-F_0_509 equ DESCALE( 547388834,30-CONST_BITS) ; FIX(0.509795579)
-F_0_601 equ DESCALE( 645689155,30-CONST_BITS) ; FIX(0.601344887)
-F_0_720 equ DESCALE( 774124714,30-CONST_BITS) ; FIX(0.720959822)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_850 equ DESCALE( 913142361,30-CONST_BITS) ; FIX(0.850430095)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_061 equ DESCALE(1139878239,30-CONST_BITS) ; FIX(1.061594337)
-F_1_272 equ DESCALE(1366614119,30-CONST_BITS) ; FIX(1.272758580)
-F_1_451 equ DESCALE(1558831516,30-CONST_BITS) ; FIX(1.451774981)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_2_172 equ DESCALE(2332956230,30-CONST_BITS) ; FIX(2.172734803)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_624 equ DESCALE(3891787747,30-CONST_BITS) ; FIX(3.624509785)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_idct_red_mmx)
-
-EXTN(jconst_idct_red_mmx):
-
-PW_F184_MF076 times 2 dw F_1_847,-F_0_765
-PW_F256_F089 times 2 dw F_2_562, F_0_899
-PW_F106_MF217 times 2 dw F_1_061,-F_2_172
-PW_MF060_MF050 times 2 dw -F_0_601,-F_0_509
-PW_F145_MF021 times 2 dw F_1_451,-F_0_211
-PW_F362_MF127 times 2 dw F_3_624,-F_1_272
-PW_F085_MF072 times 2 dw F_0_850,-F_0_720
-PD_DESCALE_P1_4 times 2 dd 1 << (DESCALE_P1_4-1)
-PD_DESCALE_P2_4 times 2 dd 1 << (DESCALE_P2_4-1)
-PD_DESCALE_P1_2 times 2 dd 1 << (DESCALE_P1_2-1)
-PD_DESCALE_P2_2 times 2 dd 1 << (DESCALE_P2_2-1)
-PB_CENTERJSAMP times 8 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients,
-; producing a reduced-size 4x4 output block.
-;
-; GLOBAL(void)
-; jpeg_idct_4x4_mmx (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_MMWORD ; mmword wk[WK_NUM]
-%define WK_NUM 2
-%define workspace wk(0)-DCTSIZE2*SIZEOF_JCOEF
- ; JCOEF workspace[DCTSIZE2]
-
- align 16
- global EXTN(jpeg_idct_4x4_mmx)
-
-EXTN(jpeg_idct_4x4_mmx):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [workspace]
- pushpic ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input, store into work array.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
- lea edi, [workspace] ; JCOEF * wsptr
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.columnloop:
-%ifndef NO_ZERO_COLUMN_TEST_4X4_MMX
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- movq mm0, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- por mm1, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- por mm1, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- por mm0,mm1
- packsswb mm0,mm0
- movd eax,mm0
- test eax,eax
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- pmullw mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- psllw mm0,PASS1_BITS
-
- movq mm2,mm0 ; mm0=in0=(00 01 02 03)
- punpcklwd mm0,mm0 ; mm0=(00 00 01 01)
- punpckhwd mm2,mm2 ; mm2=(02 02 03 03)
-
- movq mm1,mm0
- punpckldq mm0,mm0 ; mm0=(00 00 00 00)
- punpckhdq mm1,mm1 ; mm1=(01 01 01 01)
- movq mm3,mm2
- punpckldq mm2,mm2 ; mm2=(02 02 02 02)
- punpckhdq mm3,mm3 ; mm3=(03 03 03 03)
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(2,0,edi,SIZEOF_JCOEF)], mm2
- movq MMWORD [MMBLOCK(3,0,edi,SIZEOF_JCOEF)], mm3
- jmp near .nextcolumn
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Odd part
-
- movq mm0, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- pmullw mm0, MMWORD [MMBLOCK(1,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm1, MMWORD [MMBLOCK(3,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movq mm2, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- pmullw mm2, MMWORD [MMBLOCK(5,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm3, MMWORD [MMBLOCK(7,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- movq mm4,mm0
- movq mm5,mm0
- punpcklwd mm4,mm1
- punpckhwd mm5,mm1
- movq mm0,mm4
- movq mm1,mm5
- pmaddwd mm4,[GOTOFF(ebx,PW_F256_F089)] ; mm4=(tmp2L)
- pmaddwd mm5,[GOTOFF(ebx,PW_F256_F089)] ; mm5=(tmp2H)
- pmaddwd mm0,[GOTOFF(ebx,PW_F106_MF217)] ; mm0=(tmp0L)
- pmaddwd mm1,[GOTOFF(ebx,PW_F106_MF217)] ; mm1=(tmp0H)
-
- movq mm6,mm2
- movq mm7,mm2
- punpcklwd mm6,mm3
- punpckhwd mm7,mm3
- movq mm2,mm6
- movq mm3,mm7
- pmaddwd mm6,[GOTOFF(ebx,PW_MF060_MF050)] ; mm6=(tmp2L)
- pmaddwd mm7,[GOTOFF(ebx,PW_MF060_MF050)] ; mm7=(tmp2H)
- pmaddwd mm2,[GOTOFF(ebx,PW_F145_MF021)] ; mm2=(tmp0L)
- pmaddwd mm3,[GOTOFF(ebx,PW_F145_MF021)] ; mm3=(tmp0H)
-
- paddd mm6,mm4 ; mm6=tmp2L
- paddd mm7,mm5 ; mm7=tmp2H
- paddd mm2,mm0 ; mm2=tmp0L
- paddd mm3,mm1 ; mm3=tmp0H
-
- movq MMWORD [wk(0)], mm2 ; wk(0)=tmp0L
- movq MMWORD [wk(1)], mm3 ; wk(1)=tmp0H
-
- ; -- Even part
-
- movq mm4, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq mm5, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movq mm0, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- pmullw mm4, MMWORD [MMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm5, MMWORD [MMBLOCK(2,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm0, MMWORD [MMBLOCK(6,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- pxor mm1,mm1
- pxor mm2,mm2
- punpcklwd mm1,mm4 ; mm1=tmp0L
- punpckhwd mm2,mm4 ; mm2=tmp0H
- psrad mm1,(16-CONST_BITS-1) ; psrad mm1,16 & pslld mm1,CONST_BITS+1
- psrad mm2,(16-CONST_BITS-1) ; psrad mm2,16 & pslld mm2,CONST_BITS+1
-
- movq mm3,mm5 ; mm5=in2=z2
- punpcklwd mm5,mm0 ; mm0=in6=z3
- punpckhwd mm3,mm0
- pmaddwd mm5,[GOTOFF(ebx,PW_F184_MF076)] ; mm5=tmp2L
- pmaddwd mm3,[GOTOFF(ebx,PW_F184_MF076)] ; mm3=tmp2H
-
- movq mm4,mm1
- movq mm0,mm2
- paddd mm1,mm5 ; mm1=tmp10L
- paddd mm2,mm3 ; mm2=tmp10H
- psubd mm4,mm5 ; mm4=tmp12L
- psubd mm0,mm3 ; mm0=tmp12H
-
- ; -- Final output stage
-
- movq mm5,mm1
- movq mm3,mm2
- paddd mm1,mm6 ; mm1=data0L
- paddd mm2,mm7 ; mm2=data0H
- psubd mm5,mm6 ; mm5=data3L
- psubd mm3,mm7 ; mm3=data3H
-
- movq mm6,[GOTOFF(ebx,PD_DESCALE_P1_4)] ; mm6=[PD_DESCALE_P1_4]
-
- paddd mm1,mm6
- paddd mm2,mm6
- psrad mm1,DESCALE_P1_4
- psrad mm2,DESCALE_P1_4
- paddd mm5,mm6
- paddd mm3,mm6
- psrad mm5,DESCALE_P1_4
- psrad mm3,DESCALE_P1_4
-
- packssdw mm1,mm2 ; mm1=data0=(00 01 02 03)
- packssdw mm5,mm3 ; mm5=data3=(30 31 32 33)
-
- movq mm7, MMWORD [wk(0)] ; mm7=tmp0L
- movq mm6, MMWORD [wk(1)] ; mm6=tmp0H
-
- movq mm2,mm4
- movq mm3,mm0
- paddd mm4,mm7 ; mm4=data1L
- paddd mm0,mm6 ; mm0=data1H
- psubd mm2,mm7 ; mm2=data2L
- psubd mm3,mm6 ; mm3=data2H
-
- movq mm7,[GOTOFF(ebx,PD_DESCALE_P1_4)] ; mm7=[PD_DESCALE_P1_4]
-
- paddd mm4,mm7
- paddd mm0,mm7
- psrad mm4,DESCALE_P1_4
- psrad mm0,DESCALE_P1_4
- paddd mm2,mm7
- paddd mm3,mm7
- psrad mm2,DESCALE_P1_4
- psrad mm3,DESCALE_P1_4
-
- packssdw mm4,mm0 ; mm4=data1=(10 11 12 13)
- packssdw mm2,mm3 ; mm2=data2=(20 21 22 23)
-
- movq mm6,mm1 ; transpose coefficients(phase 1)
- punpcklwd mm1,mm4 ; mm1=(00 10 01 11)
- punpckhwd mm6,mm4 ; mm6=(02 12 03 13)
- movq mm7,mm2 ; transpose coefficients(phase 1)
- punpcklwd mm2,mm5 ; mm2=(20 30 21 31)
- punpckhwd mm7,mm5 ; mm7=(22 32 23 33)
-
- movq mm0,mm1 ; transpose coefficients(phase 2)
- punpckldq mm1,mm2 ; mm1=(00 10 20 30)
- punpckhdq mm0,mm2 ; mm0=(01 11 21 31)
- movq mm3,mm6 ; transpose coefficients(phase 2)
- punpckldq mm6,mm7 ; mm6=(02 12 22 32)
- punpckhdq mm3,mm7 ; mm3=(03 13 23 33)
-
- movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_JCOEF)], mm1
- movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_JCOEF)], mm0
- movq MMWORD [MMBLOCK(2,0,edi,SIZEOF_JCOEF)], mm6
- movq MMWORD [MMBLOCK(3,0,edi,SIZEOF_JCOEF)], mm3
-
-.nextcolumn:
- add esi, byte 4*SIZEOF_JCOEF ; coef_block
- add edx, byte 4*SIZEOF_ISLOW_MULT_TYPE ; quantptr
- add edi, byte 4*DCTSIZE*SIZEOF_JCOEF ; wsptr
- dec ecx ; ctr
- jnz near .columnloop
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, [original_ebp]
- lea esi, [workspace] ; JCOEF * wsptr
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
-
- ; -- Odd part
-
- movq mm0, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- movq mm2, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
-
- movq mm4,mm0
- movq mm5,mm0
- punpcklwd mm4,mm1
- punpckhwd mm5,mm1
- movq mm0,mm4
- movq mm1,mm5
- pmaddwd mm4,[GOTOFF(ebx,PW_F256_F089)] ; mm4=(tmp2L)
- pmaddwd mm5,[GOTOFF(ebx,PW_F256_F089)] ; mm5=(tmp2H)
- pmaddwd mm0,[GOTOFF(ebx,PW_F106_MF217)] ; mm0=(tmp0L)
- pmaddwd mm1,[GOTOFF(ebx,PW_F106_MF217)] ; mm1=(tmp0H)
-
- movq mm6,mm2
- movq mm7,mm2
- punpcklwd mm6,mm3
- punpckhwd mm7,mm3
- movq mm2,mm6
- movq mm3,mm7
- pmaddwd mm6,[GOTOFF(ebx,PW_MF060_MF050)] ; mm6=(tmp2L)
- pmaddwd mm7,[GOTOFF(ebx,PW_MF060_MF050)] ; mm7=(tmp2H)
- pmaddwd mm2,[GOTOFF(ebx,PW_F145_MF021)] ; mm2=(tmp0L)
- pmaddwd mm3,[GOTOFF(ebx,PW_F145_MF021)] ; mm3=(tmp0H)
-
- paddd mm6,mm4 ; mm6=tmp2L
- paddd mm7,mm5 ; mm7=tmp2H
- paddd mm2,mm0 ; mm2=tmp0L
- paddd mm3,mm1 ; mm3=tmp0H
-
- movq MMWORD [wk(0)], mm2 ; wk(0)=tmp0L
- movq MMWORD [wk(1)], mm3 ; wk(1)=tmp0H
-
- ; -- Even part
-
- movq mm4, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq mm5, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movq mm0, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
-
- pxor mm1,mm1
- pxor mm2,mm2
- punpcklwd mm1,mm4 ; mm1=tmp0L
- punpckhwd mm2,mm4 ; mm2=tmp0H
- psrad mm1,(16-CONST_BITS-1) ; psrad mm1,16 & pslld mm1,CONST_BITS+1
- psrad mm2,(16-CONST_BITS-1) ; psrad mm2,16 & pslld mm2,CONST_BITS+1
-
- movq mm3,mm5 ; mm5=in2=z2
- punpcklwd mm5,mm0 ; mm0=in6=z3
- punpckhwd mm3,mm0
- pmaddwd mm5,[GOTOFF(ebx,PW_F184_MF076)] ; mm5=tmp2L
- pmaddwd mm3,[GOTOFF(ebx,PW_F184_MF076)] ; mm3=tmp2H
-
- movq mm4,mm1
- movq mm0,mm2
- paddd mm1,mm5 ; mm1=tmp10L
- paddd mm2,mm3 ; mm2=tmp10H
- psubd mm4,mm5 ; mm4=tmp12L
- psubd mm0,mm3 ; mm0=tmp12H
-
- ; -- Final output stage
-
- movq mm5,mm1
- movq mm3,mm2
- paddd mm1,mm6 ; mm1=data0L
- paddd mm2,mm7 ; mm2=data0H
- psubd mm5,mm6 ; mm5=data3L
- psubd mm3,mm7 ; mm3=data3H
-
- movq mm6,[GOTOFF(ebx,PD_DESCALE_P2_4)] ; mm6=[PD_DESCALE_P2_4]
-
- paddd mm1,mm6
- paddd mm2,mm6
- psrad mm1,DESCALE_P2_4
- psrad mm2,DESCALE_P2_4
- paddd mm5,mm6
- paddd mm3,mm6
- psrad mm5,DESCALE_P2_4
- psrad mm3,DESCALE_P2_4
-
- packssdw mm1,mm2 ; mm1=data0=(00 10 20 30)
- packssdw mm5,mm3 ; mm5=data3=(03 13 23 33)
-
- movq mm7, MMWORD [wk(0)] ; mm7=tmp0L
- movq mm6, MMWORD [wk(1)] ; mm6=tmp0H
-
- movq mm2,mm4
- movq mm3,mm0
- paddd mm4,mm7 ; mm4=data1L
- paddd mm0,mm6 ; mm0=data1H
- psubd mm2,mm7 ; mm2=data2L
- psubd mm3,mm6 ; mm3=data2H
-
- movq mm7,[GOTOFF(ebx,PD_DESCALE_P2_4)] ; mm7=[PD_DESCALE_P2_4]
-
- paddd mm4,mm7
- paddd mm0,mm7
- psrad mm4,DESCALE_P2_4
- psrad mm0,DESCALE_P2_4
- paddd mm2,mm7
- paddd mm3,mm7
- psrad mm2,DESCALE_P2_4
- psrad mm3,DESCALE_P2_4
-
- packssdw mm4,mm0 ; mm4=data1=(01 11 21 31)
- packssdw mm2,mm3 ; mm2=data2=(02 12 22 32)
-
- movq mm6,[GOTOFF(ebx,PB_CENTERJSAMP)] ; mm6=[PB_CENTERJSAMP]
-
- packsswb mm1,mm2 ; mm1=(00 10 20 30 02 12 22 32)
- packsswb mm4,mm5 ; mm4=(01 11 21 31 03 13 23 33)
- paddb mm1,mm6
- paddb mm4,mm6
-
- movq mm7,mm1 ; transpose coefficients(phase 1)
- punpcklbw mm1,mm4 ; mm1=(00 01 10 11 20 21 30 31)
- punpckhbw mm7,mm4 ; mm7=(02 03 12 13 22 23 32 33)
-
- movq mm0,mm1 ; transpose coefficients(phase 2)
- punpcklwd mm1,mm7 ; mm1=(00 01 02 03 10 11 12 13)
- punpckhwd mm0,mm7 ; mm0=(20 21 22 23 30 31 32 33)
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
- movd DWORD [edx+eax*SIZEOF_JSAMPLE], mm1
- movd DWORD [esi+eax*SIZEOF_JSAMPLE], mm0
-
- psrlq mm1,4*BYTE_BIT
- psrlq mm0,4*BYTE_BIT
-
- mov edx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
- movd DWORD [edx+eax*SIZEOF_JSAMPLE], mm1
- movd DWORD [esi+eax*SIZEOF_JSAMPLE], mm0
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-
-; --------------------------------------------------------------------------
-;
-; Perform dequantization and inverse DCT on one block of coefficients,
-; producing a reduced-size 2x2 output block.
-;
-; GLOBAL(void)
-; jpeg_idct_2x2_mmx (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
- align 16
- global EXTN(jpeg_idct_2x2_mmx)
-
-EXTN(jpeg_idct_2x2_mmx):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input.
-
- mov edx, POINTER [compptr(ebp)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(ebp)] ; inptr
-
- ; | input: | result: |
- ; | 00 01 ** 03 ** 05 ** 07 | |
- ; | 10 11 ** 13 ** 15 ** 17 | |
- ; | ** ** ** ** ** ** ** ** | |
- ; | 30 31 ** 33 ** 35 ** 37 | A0 A1 A3 A5 A7 |
- ; | ** ** ** ** ** ** ** ** | B0 B1 B3 B5 B7 |
- ; | 50 51 ** 53 ** 55 ** 57 | |
- ; | ** ** ** ** ** ** ** ** | |
- ; | 70 71 ** 73 ** 75 ** 77 | |
-
- ; -- Odd part
-
- movq mm0, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- pmullw mm0, MMWORD [MMBLOCK(1,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm1, MMWORD [MMBLOCK(3,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movq mm2, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- pmullw mm2, MMWORD [MMBLOCK(5,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm3, MMWORD [MMBLOCK(7,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- ; mm0=(10 11 ** 13), mm1=(30 31 ** 33)
- ; mm2=(50 51 ** 53), mm3=(70 71 ** 73)
-
- pcmpeqd mm7,mm7
- pslld mm7,WORD_BIT ; mm7={0x0000 0xFFFF 0x0000 0xFFFF}
-
- movq mm4,mm0 ; mm4=(10 11 ** 13)
- movq mm5,mm2 ; mm5=(50 51 ** 53)
- punpcklwd mm4,mm1 ; mm4=(10 30 11 31)
- punpcklwd mm5,mm3 ; mm5=(50 70 51 71)
- pmaddwd mm4,[GOTOFF(ebx,PW_F362_MF127)]
- pmaddwd mm5,[GOTOFF(ebx,PW_F085_MF072)]
-
- psrld mm0,WORD_BIT ; mm0=(11 -- 13 --)
- pand mm1,mm7 ; mm1=(-- 31 -- 33)
- psrld mm2,WORD_BIT ; mm2=(51 -- 53 --)
- pand mm3,mm7 ; mm3=(-- 71 -- 73)
- por mm0,mm1 ; mm0=(11 31 13 33)
- por mm2,mm3 ; mm2=(51 71 53 73)
- pmaddwd mm0,[GOTOFF(ebx,PW_F362_MF127)]
- pmaddwd mm2,[GOTOFF(ebx,PW_F085_MF072)]
-
- paddd mm4,mm5 ; mm4=tmp0[col0 col1]
-
- movq mm6, MMWORD [MMBLOCK(1,1,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(3,1,esi,SIZEOF_JCOEF)]
- pmullw mm6, MMWORD [MMBLOCK(1,1,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm1, MMWORD [MMBLOCK(3,1,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movq mm3, MMWORD [MMBLOCK(5,1,esi,SIZEOF_JCOEF)]
- movq mm5, MMWORD [MMBLOCK(7,1,esi,SIZEOF_JCOEF)]
- pmullw mm3, MMWORD [MMBLOCK(5,1,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm5, MMWORD [MMBLOCK(7,1,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- ; mm6=(** 15 ** 17), mm1=(** 35 ** 37)
- ; mm3=(** 55 ** 57), mm5=(** 75 ** 77)
-
- psrld mm6,WORD_BIT ; mm6=(15 -- 17 --)
- pand mm1,mm7 ; mm1=(-- 35 -- 37)
- psrld mm3,WORD_BIT ; mm3=(55 -- 57 --)
- pand mm5,mm7 ; mm5=(-- 75 -- 77)
- por mm6,mm1 ; mm6=(15 35 17 37)
- por mm3,mm5 ; mm3=(55 75 57 77)
- pmaddwd mm6,[GOTOFF(ebx,PW_F362_MF127)]
- pmaddwd mm3,[GOTOFF(ebx,PW_F085_MF072)]
-
- paddd mm0,mm2 ; mm0=tmp0[col1 col3]
- paddd mm6,mm3 ; mm6=tmp0[col5 col7]
-
- ; -- Even part
-
- movq mm1, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq mm5, MMWORD [MMBLOCK(0,1,esi,SIZEOF_JCOEF)]
- pmullw mm1, MMWORD [MMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw mm5, MMWORD [MMBLOCK(0,1,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- ; mm1=(00 01 ** 03), mm5=(** 05 ** 07)
-
- movq mm2,mm1 ; mm2=(00 01 ** 03)
- pslld mm1,WORD_BIT ; mm1=(-- 00 -- **)
- psrad mm1,(WORD_BIT-CONST_BITS-2) ; mm1=tmp10[col0 ****]
-
- pand mm2,mm7 ; mm2=(-- 01 -- 03)
- pand mm5,mm7 ; mm5=(-- 05 -- 07)
- psrad mm2,(WORD_BIT-CONST_BITS-2) ; mm2=tmp10[col1 col3]
- psrad mm5,(WORD_BIT-CONST_BITS-2) ; mm5=tmp10[col5 col7]
-
- ; -- Final output stage
-
- movq mm3,mm1
- paddd mm1,mm4 ; mm1=data0[col0 ****]=(A0 **)
- psubd mm3,mm4 ; mm3=data1[col0 ****]=(B0 **)
- punpckldq mm1,mm3 ; mm1=(A0 B0)
-
- movq mm7,[GOTOFF(ebx,PD_DESCALE_P1_2)] ; mm7=[PD_DESCALE_P1_2]
-
- movq mm4,mm2
- movq mm3,mm5
- paddd mm2,mm0 ; mm2=data0[col1 col3]=(A1 A3)
- paddd mm5,mm6 ; mm5=data0[col5 col7]=(A5 A7)
- psubd mm4,mm0 ; mm4=data1[col1 col3]=(B1 B3)
- psubd mm3,mm6 ; mm3=data1[col5 col7]=(B5 B7)
-
- paddd mm1,mm7
- psrad mm1,DESCALE_P1_2
-
- paddd mm2,mm7
- paddd mm5,mm7
- psrad mm2,DESCALE_P1_2
- psrad mm5,DESCALE_P1_2
- paddd mm4,mm7
- paddd mm3,mm7
- psrad mm4,DESCALE_P1_2
- psrad mm3,DESCALE_P1_2
-
- ; ---- Pass 2: process rows, store into output array.
-
- mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(ebp)]
-
- ; | input:| result:|
- ; | A0 B0 | |
- ; | A1 B1 | C0 C1 |
- ; | A3 B3 | D0 D1 |
- ; | A5 B5 | |
- ; | A7 B7 | |
-
- ; -- Odd part
-
- packssdw mm2,mm4 ; mm2=(A1 A3 B1 B3)
- packssdw mm5,mm3 ; mm5=(A5 A7 B5 B7)
- pmaddwd mm2,[GOTOFF(ebx,PW_F362_MF127)]
- pmaddwd mm5,[GOTOFF(ebx,PW_F085_MF072)]
-
- paddd mm2,mm5 ; mm2=tmp0[row0 row1]
-
- ; -- Even part
-
- pslld mm1,(CONST_BITS+2) ; mm1=tmp10[row0 row1]
-
- ; -- Final output stage
-
- movq mm0,[GOTOFF(ebx,PD_DESCALE_P2_2)] ; mm0=[PD_DESCALE_P2_2]
-
- movq mm6,mm1
- paddd mm1,mm2 ; mm1=data0[row0 row1]=(C0 C1)
- psubd mm6,mm2 ; mm6=data1[row0 row1]=(D0 D1)
-
- paddd mm1,mm0
- paddd mm6,mm0
- psrad mm1,DESCALE_P2_2
- psrad mm6,DESCALE_P2_2
-
- movq mm7,mm1 ; transpose coefficients
- punpckldq mm1,mm6 ; mm1=(C0 D0)
- punpckhdq mm7,mm6 ; mm7=(C1 D1)
-
- packssdw mm1,mm7 ; mm1=(C0 D0 C1 D1)
- packsswb mm1,mm1 ; mm1=(C0 D0 C1 D1 C0 D0 C1 D1)
- paddb mm1,[GOTOFF(ebx,PB_CENTERJSAMP)]
-
- movd ecx,mm1
- movd ebx,mm1 ; ebx=(C0 D0 C1 D1)
- shr ecx,2*BYTE_BIT ; ecx=(C1 D1 -- --)
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- mov WORD [edx+eax*SIZEOF_JSAMPLE], bx
- mov WORD [esi+eax*SIZEOF_JSAMPLE], cx
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%endif ; JIDCT_INT_MMX_SUPPORTED
-%endif ; IDCT_SCALING_SUPPORTED
diff --git a/jiss2flt.asm b/jiss2flt.asm
deleted file mode 100644
index c0565a3..0000000
--- a/jiss2flt.asm
+++ /dev/null
@@ -1,508 +0,0 @@
-;
-; jiss2flt.asm - floating-point IDCT (SSE & SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a floating-point implementation of the inverse DCT
-; (Discrete Cosine Transform). The following code is based directly on
-; the IJG's original jidctflt.c; see the jidctflt.c for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-%ifdef JIDCT_FLT_SSE_SSE2_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%macro unpcklps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(0 1 4 5)
- shufps %1,%2,0x44
-%endmacro
-
-%macro unpckhps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(2 3 6 7)
- shufps %1,%2,0xEE
-%endmacro
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_idct_float_sse2)
-
-EXTN(jconst_idct_float_sse2):
-
-PD_1_414 times 4 dd 1.414213562373095048801689
-PD_1_847 times 4 dd 1.847759065022573512256366
-PD_1_082 times 4 dd 1.082392200292393968799446
-PD_M2_613 times 4 dd -2.613125929752753055713286
-PD_RNDINT_MAGIC times 4 dd 100663296.0 ; (float)(0x00C00000 << 3)
-PB_CENTERJSAMP times 16 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_float_sse2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 2
-%define workspace wk(0)-DCTSIZE2*SIZEOF_FAST_FLOAT
- ; FAST_FLOAT workspace[DCTSIZE2]
-
- align 16
- global EXTN(jpeg_idct_float_sse2)
-
-EXTN(jpeg_idct_float_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input, store into work array.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
- lea edi, [workspace] ; FAST_FLOAT * wsptr
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.columnloop:
-%ifndef NO_ZERO_COLUMN_TEST_FLOAT_SSE
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz near .columnDCT
-
- movq xmm1, _MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq xmm2, _MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movq xmm3, _MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- movq xmm4, _MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movq xmm5, _MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq xmm6, _MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- movq xmm7, _MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- por xmm1,xmm2
- por xmm3,xmm4
- por xmm5,xmm6
- por xmm1,xmm3
- por xmm5,xmm7
- por xmm1,xmm5
- packsswb xmm1,xmm1
- movd eax,xmm1
- test eax,eax
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movq xmm0, _MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
-
- punpcklwd xmm0,xmm0 ; xmm0=(00 00 01 01 02 02 03 03)
- psrad xmm0,(DWORD_BIT-WORD_BIT) ; xmm0=in0=(00 01 02 03)
- cvtdq2ps xmm0,xmm0 ; xmm0=in0=(00 01 02 03)
-
- mulps xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movaps xmm1,xmm0
- movaps xmm2,xmm0
- movaps xmm3,xmm0
-
- shufps xmm0,xmm0,0x00 ; xmm0=(00 00 00 00)
- shufps xmm1,xmm1,0x55 ; xmm1=(01 01 01 01)
- shufps xmm2,xmm2,0xAA ; xmm2=(02 02 02 02)
- shufps xmm3,xmm3,0xFF ; xmm3=(03 03 03 03)
-
- movaps XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], xmm0
- movaps XMMWORD [XMMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], xmm0
- movaps XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], xmm1
- movaps XMMWORD [XMMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], xmm1
- movaps XMMWORD [XMMBLOCK(2,0,edi,SIZEOF_FAST_FLOAT)], xmm2
- movaps XMMWORD [XMMBLOCK(2,1,edi,SIZEOF_FAST_FLOAT)], xmm2
- movaps XMMWORD [XMMBLOCK(3,0,edi,SIZEOF_FAST_FLOAT)], xmm3
- movaps XMMWORD [XMMBLOCK(3,1,edi,SIZEOF_FAST_FLOAT)], xmm3
- jmp near .nextcolumn
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Even part
-
- movq xmm0, _MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq xmm1, _MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movq xmm2, _MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movq xmm3, _MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
-
- punpcklwd xmm0,xmm0 ; xmm0=(00 00 01 01 02 02 03 03)
- punpcklwd xmm1,xmm1 ; xmm1=(20 20 21 21 22 22 23 23)
- psrad xmm0,(DWORD_BIT-WORD_BIT) ; xmm0=in0=(00 01 02 03)
- psrad xmm1,(DWORD_BIT-WORD_BIT) ; xmm1=in2=(20 21 22 23)
- cvtdq2ps xmm0,xmm0 ; xmm0=in0=(00 01 02 03)
- cvtdq2ps xmm1,xmm1 ; xmm1=in2=(20 21 22 23)
-
- punpcklwd xmm2,xmm2 ; xmm2=(40 40 41 41 42 42 43 43)
- punpcklwd xmm3,xmm3 ; xmm3=(60 60 61 61 62 62 63 63)
- psrad xmm2,(DWORD_BIT-WORD_BIT) ; xmm2=in4=(40 41 42 43)
- psrad xmm3,(DWORD_BIT-WORD_BIT) ; xmm3=in6=(60 61 62 63)
- cvtdq2ps xmm2,xmm2 ; xmm2=in4=(40 41 42 43)
- cvtdq2ps xmm3,xmm3 ; xmm3=in6=(60 61 62 63)
-
- mulps xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm1, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm2, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm3, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movaps xmm4,xmm0
- movaps xmm5,xmm1
- subps xmm0,xmm2 ; xmm0=tmp11
- subps xmm1,xmm3
- addps xmm4,xmm2 ; xmm4=tmp10
- addps xmm5,xmm3 ; xmm5=tmp13
-
- mulps xmm1,[GOTOFF(ebx,PD_1_414)]
- subps xmm1,xmm5 ; xmm1=tmp12
-
- movaps xmm6,xmm4
- movaps xmm7,xmm0
- subps xmm4,xmm5 ; xmm4=tmp3
- subps xmm0,xmm1 ; xmm0=tmp2
- addps xmm6,xmm5 ; xmm6=tmp0
- addps xmm7,xmm1 ; xmm7=tmp1
-
- movaps XMMWORD [wk(1)], xmm4 ; tmp3
- movaps XMMWORD [wk(0)], xmm0 ; tmp2
-
- ; -- Odd part
-
- movq xmm2, _MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq xmm3, _MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- movq xmm5, _MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq xmm1, _MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
-
- punpcklwd xmm2,xmm2 ; xmm2=(10 10 11 11 12 12 13 13)
- punpcklwd xmm3,xmm3 ; xmm3=(30 30 31 31 32 32 33 33)
- psrad xmm2,(DWORD_BIT-WORD_BIT) ; xmm2=in1=(10 11 12 13)
- psrad xmm3,(DWORD_BIT-WORD_BIT) ; xmm3=in3=(30 31 32 33)
- cvtdq2ps xmm2,xmm2 ; xmm2=in1=(10 11 12 13)
- cvtdq2ps xmm3,xmm3 ; xmm3=in3=(30 31 32 33)
-
- punpcklwd xmm5,xmm5 ; xmm5=(50 50 51 51 52 52 53 53)
- punpcklwd xmm1,xmm1 ; xmm1=(70 70 71 71 72 72 73 73)
- psrad xmm5,(DWORD_BIT-WORD_BIT) ; xmm5=in5=(50 51 52 53)
- psrad xmm1,(DWORD_BIT-WORD_BIT) ; xmm1=in7=(70 71 72 73)
- cvtdq2ps xmm5,xmm5 ; xmm5=in5=(50 51 52 53)
- cvtdq2ps xmm1,xmm1 ; xmm1=in7=(70 71 72 73)
-
- mulps xmm2, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm3, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm5, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm1, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movaps xmm4,xmm2
- movaps xmm0,xmm5
- addps xmm2,xmm1 ; xmm2=z11
- addps xmm5,xmm3 ; xmm5=z13
- subps xmm4,xmm1 ; xmm4=z12
- subps xmm0,xmm3 ; xmm0=z10
-
- movaps xmm1,xmm2
- subps xmm2,xmm5
- addps xmm1,xmm5 ; xmm1=tmp7
-
- mulps xmm2,[GOTOFF(ebx,PD_1_414)] ; xmm2=tmp11
-
- movaps xmm3,xmm0
- addps xmm0,xmm4
- mulps xmm0,[GOTOFF(ebx,PD_1_847)] ; xmm0=z5
- mulps xmm3,[GOTOFF(ebx,PD_M2_613)] ; xmm3=(z10 * -2.613125930)
- mulps xmm4,[GOTOFF(ebx,PD_1_082)] ; xmm4=(z12 * 1.082392200)
- addps xmm3,xmm0 ; xmm3=tmp12
- subps xmm4,xmm0 ; xmm4=tmp10
-
- ; -- Final output stage
-
- subps xmm3,xmm1 ; xmm3=tmp6
- movaps xmm5,xmm6
- movaps xmm0,xmm7
- addps xmm6,xmm1 ; xmm6=data0=(00 01 02 03)
- addps xmm7,xmm3 ; xmm7=data1=(10 11 12 13)
- subps xmm5,xmm1 ; xmm5=data7=(70 71 72 73)
- subps xmm0,xmm3 ; xmm0=data6=(60 61 62 63)
- subps xmm2,xmm3 ; xmm2=tmp5
-
- movaps xmm1,xmm6 ; transpose coefficients(phase 1)
- unpcklps xmm6,xmm7 ; xmm6=(00 10 01 11)
- unpckhps xmm1,xmm7 ; xmm1=(02 12 03 13)
- movaps xmm3,xmm0 ; transpose coefficients(phase 1)
- unpcklps xmm0,xmm5 ; xmm0=(60 70 61 71)
- unpckhps xmm3,xmm5 ; xmm3=(62 72 63 73)
-
- movaps xmm7, XMMWORD [wk(0)] ; xmm7=tmp2
- movaps xmm5, XMMWORD [wk(1)] ; xmm5=tmp3
-
- movaps XMMWORD [wk(0)], xmm0 ; wk(0)=(60 70 61 71)
- movaps XMMWORD [wk(1)], xmm3 ; wk(1)=(62 72 63 73)
-
- addps xmm4,xmm2 ; xmm4=tmp4
- movaps xmm0,xmm7
- movaps xmm3,xmm5
- addps xmm7,xmm2 ; xmm7=data2=(20 21 22 23)
- addps xmm5,xmm4 ; xmm5=data4=(40 41 42 43)
- subps xmm0,xmm2 ; xmm0=data5=(50 51 52 53)
- subps xmm3,xmm4 ; xmm3=data3=(30 31 32 33)
-
- movaps xmm2,xmm7 ; transpose coefficients(phase 1)
- unpcklps xmm7,xmm3 ; xmm7=(20 30 21 31)
- unpckhps xmm2,xmm3 ; xmm2=(22 32 23 33)
- movaps xmm4,xmm5 ; transpose coefficients(phase 1)
- unpcklps xmm5,xmm0 ; xmm5=(40 50 41 51)
- unpckhps xmm4,xmm0 ; xmm4=(42 52 43 53)
-
- movaps xmm3,xmm6 ; transpose coefficients(phase 2)
- unpcklps2 xmm6,xmm7 ; xmm6=(00 10 20 30)
- unpckhps2 xmm3,xmm7 ; xmm3=(01 11 21 31)
- movaps xmm0,xmm1 ; transpose coefficients(phase 2)
- unpcklps2 xmm1,xmm2 ; xmm1=(02 12 22 32)
- unpckhps2 xmm0,xmm2 ; xmm0=(03 13 23 33)
-
- movaps xmm7, XMMWORD [wk(0)] ; xmm7=(60 70 61 71)
- movaps xmm2, XMMWORD [wk(1)] ; xmm2=(62 72 63 73)
-
- movaps XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], xmm6
- movaps XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], xmm3
- movaps XMMWORD [XMMBLOCK(2,0,edi,SIZEOF_FAST_FLOAT)], xmm1
- movaps XMMWORD [XMMBLOCK(3,0,edi,SIZEOF_FAST_FLOAT)], xmm0
-
- movaps xmm6,xmm5 ; transpose coefficients(phase 2)
- unpcklps2 xmm5,xmm7 ; xmm5=(40 50 60 70)
- unpckhps2 xmm6,xmm7 ; xmm6=(41 51 61 71)
- movaps xmm3,xmm4 ; transpose coefficients(phase 2)
- unpcklps2 xmm4,xmm2 ; xmm4=(42 52 62 72)
- unpckhps2 xmm3,xmm2 ; xmm3=(43 53 63 73)
-
- movaps XMMWORD [XMMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], xmm5
- movaps XMMWORD [XMMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], xmm6
- movaps XMMWORD [XMMBLOCK(2,1,edi,SIZEOF_FAST_FLOAT)], xmm4
- movaps XMMWORD [XMMBLOCK(3,1,edi,SIZEOF_FAST_FLOAT)], xmm3
-
-.nextcolumn:
- add esi, byte 4*SIZEOF_JCOEF ; coef_block
- add edx, byte 4*SIZEOF_FLOAT_MULT_TYPE ; quantptr
- add edi, 4*DCTSIZE*SIZEOF_FAST_FLOAT ; wsptr
- dec ecx ; ctr
- jnz near .columnloop
-
- ; -- Prefetch the next coefficient block
-
- prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 0*32]
- prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 1*32]
- prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 2*32]
- prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 3*32]
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, [original_ebp]
- lea esi, [workspace] ; FAST_FLOAT * wsptr
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.rowloop:
-
- ; -- Even part
-
- movaps xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm2, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_FAST_FLOAT)]
-
- movaps xmm4,xmm0
- movaps xmm5,xmm1
- subps xmm0,xmm2 ; xmm0=tmp11
- subps xmm1,xmm3
- addps xmm4,xmm2 ; xmm4=tmp10
- addps xmm5,xmm3 ; xmm5=tmp13
-
- mulps xmm1,[GOTOFF(ebx,PD_1_414)]
- subps xmm1,xmm5 ; xmm1=tmp12
-
- movaps xmm6,xmm4
- movaps xmm7,xmm0
- subps xmm4,xmm5 ; xmm4=tmp3
- subps xmm0,xmm1 ; xmm0=tmp2
- addps xmm6,xmm5 ; xmm6=tmp0
- addps xmm7,xmm1 ; xmm7=tmp1
-
- movaps XMMWORD [wk(1)], xmm4 ; tmp3
- movaps XMMWORD [wk(0)], xmm0 ; tmp2
-
- ; -- Odd part
-
- movaps xmm2, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm5, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_FAST_FLOAT)]
-
- movaps xmm4,xmm2
- movaps xmm0,xmm5
- addps xmm2,xmm1 ; xmm2=z11
- addps xmm5,xmm3 ; xmm5=z13
- subps xmm4,xmm1 ; xmm4=z12
- subps xmm0,xmm3 ; xmm0=z10
-
- movaps xmm1,xmm2
- subps xmm2,xmm5
- addps xmm1,xmm5 ; xmm1=tmp7
-
- mulps xmm2,[GOTOFF(ebx,PD_1_414)] ; xmm2=tmp11
-
- movaps xmm3,xmm0
- addps xmm0,xmm4
- mulps xmm0,[GOTOFF(ebx,PD_1_847)] ; xmm0=z5
- mulps xmm3,[GOTOFF(ebx,PD_M2_613)] ; xmm3=(z10 * -2.613125930)
- mulps xmm4,[GOTOFF(ebx,PD_1_082)] ; xmm4=(z12 * 1.082392200)
- addps xmm3,xmm0 ; xmm3=tmp12
- subps xmm4,xmm0 ; xmm4=tmp10
-
- ; -- Final output stage
-
- subps xmm3,xmm1 ; xmm3=tmp6
- movaps xmm5,xmm6
- movaps xmm0,xmm7
- addps xmm6,xmm1 ; xmm6=data0=(00 10 20 30)
- addps xmm7,xmm3 ; xmm7=data1=(01 11 21 31)
- subps xmm5,xmm1 ; xmm5=data7=(07 17 27 37)
- subps xmm0,xmm3 ; xmm0=data6=(06 16 26 36)
- subps xmm2,xmm3 ; xmm2=tmp5
-
- movaps xmm1,[GOTOFF(ebx,PD_RNDINT_MAGIC)] ; xmm1=[PD_RNDINT_MAGIC]
- pcmpeqd xmm3,xmm3
- psrld xmm3,WORD_BIT ; xmm3={0xFFFF 0x0000 0xFFFF 0x0000 ..}
-
- addps xmm6,xmm1 ; xmm6=roundint(data0/8)=(00 ** 10 ** 20 ** 30 **)
- addps xmm7,xmm1 ; xmm7=roundint(data1/8)=(01 ** 11 ** 21 ** 31 **)
- addps xmm0,xmm1 ; xmm0=roundint(data6/8)=(06 ** 16 ** 26 ** 36 **)
- addps xmm5,xmm1 ; xmm5=roundint(data7/8)=(07 ** 17 ** 27 ** 37 **)
-
- pand xmm6,xmm3 ; xmm6=(00 -- 10 -- 20 -- 30 --)
- pslld xmm7,WORD_BIT ; xmm7=(-- 01 -- 11 -- 21 -- 31)
- pand xmm0,xmm3 ; xmm0=(06 -- 16 -- 26 -- 36 --)
- pslld xmm5,WORD_BIT ; xmm5=(-- 07 -- 17 -- 27 -- 37)
- por xmm6,xmm7 ; xmm6=(00 01 10 11 20 21 30 31)
- por xmm0,xmm5 ; xmm0=(06 07 16 17 26 27 36 37)
-
- movaps xmm1, XMMWORD [wk(0)] ; xmm1=tmp2
- movaps xmm3, XMMWORD [wk(1)] ; xmm3=tmp3
-
- addps xmm4,xmm2 ; xmm4=tmp4
- movaps xmm7,xmm1
- movaps xmm5,xmm3
- addps xmm1,xmm2 ; xmm1=data2=(02 12 22 32)
- addps xmm3,xmm4 ; xmm3=data4=(04 14 24 34)
- subps xmm7,xmm2 ; xmm7=data5=(05 15 25 35)
- subps xmm5,xmm4 ; xmm5=data3=(03 13 23 33)
-
- movaps xmm2,[GOTOFF(ebx,PD_RNDINT_MAGIC)] ; xmm2=[PD_RNDINT_MAGIC]
- pcmpeqd xmm4,xmm4
- psrld xmm4,WORD_BIT ; xmm4={0xFFFF 0x0000 0xFFFF 0x0000 ..}
-
- addps xmm3,xmm2 ; xmm3=roundint(data4/8)=(04 ** 14 ** 24 ** 34 **)
- addps xmm7,xmm2 ; xmm7=roundint(data5/8)=(05 ** 15 ** 25 ** 35 **)
- addps xmm1,xmm2 ; xmm1=roundint(data2/8)=(02 ** 12 ** 22 ** 32 **)
- addps xmm5,xmm2 ; xmm5=roundint(data3/8)=(03 ** 13 ** 23 ** 33 **)
-
- pand xmm3,xmm4 ; xmm3=(04 -- 14 -- 24 -- 34 --)
- pslld xmm7,WORD_BIT ; xmm7=(-- 05 -- 15 -- 25 -- 35)
- pand xmm1,xmm4 ; xmm1=(02 -- 12 -- 22 -- 32 --)
- pslld xmm5,WORD_BIT ; xmm5=(-- 03 -- 13 -- 23 -- 33)
- por xmm3,xmm7 ; xmm3=(04 05 14 15 24 25 34 35)
- por xmm1,xmm5 ; xmm1=(02 03 12 13 22 23 32 33)
-
- movdqa xmm2,[GOTOFF(ebx,PB_CENTERJSAMP)] ; xmm2=[PB_CENTERJSAMP]
-
- packsswb xmm6,xmm3 ; xmm6=(00 01 10 11 20 21 30 31 04 05 14 15 24 25 34 35)
- packsswb xmm1,xmm0 ; xmm1=(02 03 12 13 22 23 32 33 06 07 16 17 26 27 36 37)
- paddb xmm6,xmm2
- paddb xmm1,xmm2
-
- movdqa xmm4,xmm6 ; transpose coefficients(phase 2)
- punpcklwd xmm6,xmm1 ; xmm6=(00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33)
- punpckhwd xmm4,xmm1 ; xmm4=(04 05 06 07 14 15 16 17 24 25 26 27 34 35 36 37)
-
- movdqa xmm7,xmm6 ; transpose coefficients(phase 3)
- punpckldq xmm6,xmm4 ; xmm6=(00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17)
- punpckhdq xmm7,xmm4 ; xmm7=(20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37)
-
- pshufd xmm5,xmm6,0x4E ; xmm5=(10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07)
- pshufd xmm3,xmm7,0x4E ; xmm3=(30 31 32 33 34 35 36 37 20 21 22 23 24 25 26 27)
-
- pushpic ebx ; save GOT address
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm6
- movq _MMWORD [ebx+eax*SIZEOF_JSAMPLE], xmm7
- mov edx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm5
- movq _MMWORD [ebx+eax*SIZEOF_JSAMPLE], xmm3
-
- poppic ebx ; restore GOT address
-
- add esi, byte 4*SIZEOF_FAST_FLOAT ; wsptr
- add edi, byte 4*SIZEOF_JSAMPROW
- dec ecx ; ctr
- jnz near .rowloop
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JIDCT_FLT_SSE_SSE2_SUPPORTED
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/jiss2fst.asm b/jiss2fst.asm
deleted file mode 100644
index 937a260..0000000
--- a/jiss2fst.asm
+++ /dev/null
@@ -1,512 +0,0 @@
-;
-; jiss2fst.asm - fast integer IDCT (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a fast, not so accurate integer implementation of
-; the inverse DCT (Discrete Cosine Transform). The following code is
-; based directly on the IJG's original jidctfst.c; see the jidctfst.c
-; for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_IFAST_SUPPORTED
-%ifdef JIDCT_INT_SSE2_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 8 ; 14 is also OK.
-%define PASS1_BITS 2
-
-%if IFAST_SCALE_BITS != PASS1_BITS
-%error "'IFAST_SCALE_BITS' must be equal to 'PASS1_BITS'."
-%endif
-
-%if CONST_BITS == 8
-F_1_082 equ 277 ; FIX(1.082392200)
-F_1_414 equ 362 ; FIX(1.414213562)
-F_1_847 equ 473 ; FIX(1.847759065)
-F_2_613 equ 669 ; FIX(2.613125930)
-F_1_613 equ (F_2_613 - 256) ; FIX(2.613125930) - FIX(1)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_1_082 equ DESCALE(1162209775,30-CONST_BITS) ; FIX(1.082392200)
-F_1_414 equ DESCALE(1518500249,30-CONST_BITS) ; FIX(1.414213562)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_2_613 equ DESCALE(2805822602,30-CONST_BITS) ; FIX(2.613125930)
-F_1_613 equ (F_2_613 - (1 << CONST_BITS)) ; FIX(2.613125930) - FIX(1)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
-; PRE_MULTIPLY_SCALE_BITS <= 2 (to avoid overflow)
-; CONST_BITS + CONST_SHIFT + PRE_MULTIPLY_SCALE_BITS == 16 (for pmulhw)
-
-%define PRE_MULTIPLY_SCALE_BITS 2
-%define CONST_SHIFT (16 - PRE_MULTIPLY_SCALE_BITS - CONST_BITS)
-
- alignz 16
- global EXTN(jconst_idct_ifast_sse2)
-
-EXTN(jconst_idct_ifast_sse2):
-
-PW_F1414 times 8 dw F_1_414 << CONST_SHIFT
-PW_F1847 times 8 dw F_1_847 << CONST_SHIFT
-PW_MF1613 times 8 dw -F_1_613 << CONST_SHIFT
-PW_F1082 times 8 dw F_1_082 << CONST_SHIFT
-PB_CENTERJSAMP times 16 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_ifast_sse2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 2
-
- align 16
- global EXTN(jpeg_idct_ifast_sse2)
-
-EXTN(jpeg_idct_ifast_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; unused
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
-
-%ifndef NO_ZERO_COLUMN_TEST_IFAST_SSE2
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz near .columnDCT
-
- movdqa xmm0, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movdqa xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- por xmm0, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- por xmm1, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- por xmm0, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- por xmm1, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- por xmm0, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- por xmm1,xmm0
- packsswb xmm1,xmm1
- packsswb xmm1,xmm1
- movd eax,xmm1
- test eax,eax
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movdqa xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- pmullw xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- movdqa xmm7,xmm0 ; xmm0=in0=(00 01 02 03 04 05 06 07)
- punpcklwd xmm0,xmm0 ; xmm0=(00 00 01 01 02 02 03 03)
- punpckhwd xmm7,xmm7 ; xmm7=(04 04 05 05 06 06 07 07)
-
- pshufd xmm6,xmm0,0x00 ; xmm6=col0=(00 00 00 00 00 00 00 00)
- pshufd xmm2,xmm0,0x55 ; xmm2=col1=(01 01 01 01 01 01 01 01)
- pshufd xmm5,xmm0,0xAA ; xmm5=col2=(02 02 02 02 02 02 02 02)
- pshufd xmm0,xmm0,0xFF ; xmm0=col3=(03 03 03 03 03 03 03 03)
- pshufd xmm1,xmm7,0x00 ; xmm1=col4=(04 04 04 04 04 04 04 04)
- pshufd xmm4,xmm7,0x55 ; xmm4=col5=(05 05 05 05 05 05 05 05)
- pshufd xmm3,xmm7,0xAA ; xmm3=col6=(06 06 06 06 06 06 06 06)
- pshufd xmm7,xmm7,0xFF ; xmm7=col7=(07 07 07 07 07 07 07 07)
-
- movdqa XMMWORD [wk(0)], xmm2 ; wk(0)=col1
- movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=col3
- jmp near .column_end
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Even part
-
- movdqa xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movdqa xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- pmullw xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- pmullw xmm1, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- movdqa xmm2, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movdqa xmm3, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- pmullw xmm2, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- pmullw xmm3, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_IFAST_MULT_TYPE)]
-
- movdqa xmm4,xmm0
- movdqa xmm5,xmm1
- psubw xmm0,xmm2 ; xmm0=tmp11
- psubw xmm1,xmm3
- paddw xmm4,xmm2 ; xmm4=tmp10
- paddw xmm5,xmm3 ; xmm5=tmp13
-
- psllw xmm1,PRE_MULTIPLY_SCALE_BITS
- pmulhw xmm1,[GOTOFF(ebx,PW_F1414)]
- psubw xmm1,xmm5 ; xmm1=tmp12
-
- movdqa xmm6,xmm4
- movdqa xmm7,xmm0
- psubw xmm4,xmm5 ; xmm4=tmp3
- psubw xmm0,xmm1 ; xmm0=tmp2
- paddw xmm6,xmm5 ; xmm6=tmp0
- paddw xmm7,xmm1 ; xmm7=tmp1
-
- movdqa XMMWORD [wk(1)], xmm4 ; wk(1)=tmp3
- movdqa XMMWORD [wk(0)], xmm0 ; wk(0)=tmp2
-
- ; -- Odd part
-
- movdqa xmm2, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movdqa xmm3, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- pmullw xmm2, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- pmullw xmm3, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- movdqa xmm5, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movdqa xmm1, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- pmullw xmm5, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_IFAST_MULT_TYPE)]
- pmullw xmm1, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_IFAST_MULT_TYPE)]
-
- movdqa xmm4,xmm2
- movdqa xmm0,xmm5
- psubw xmm2,xmm1 ; xmm2=z12
- psubw xmm5,xmm3 ; xmm5=z10
- paddw xmm4,xmm1 ; xmm4=z11
- paddw xmm0,xmm3 ; xmm0=z13
-
- movdqa xmm1,xmm5 ; xmm1=z10(unscaled)
- psllw xmm2,PRE_MULTIPLY_SCALE_BITS
- psllw xmm5,PRE_MULTIPLY_SCALE_BITS
-
- movdqa xmm3,xmm4
- psubw xmm4,xmm0
- paddw xmm3,xmm0 ; xmm3=tmp7
-
- psllw xmm4,PRE_MULTIPLY_SCALE_BITS
- pmulhw xmm4,[GOTOFF(ebx,PW_F1414)] ; xmm4=tmp11
-
- ; To avoid overflow...
- ;
- ; (Original)
- ; tmp12 = -2.613125930 * z10 + z5;
- ;
- ; (This implementation)
- ; tmp12 = (-1.613125930 - 1) * z10 + z5;
- ; = -1.613125930 * z10 - z10 + z5;
-
- movdqa xmm0,xmm5
- paddw xmm5,xmm2
- pmulhw xmm5,[GOTOFF(ebx,PW_F1847)] ; xmm5=z5
- pmulhw xmm0,[GOTOFF(ebx,PW_MF1613)]
- pmulhw xmm2,[GOTOFF(ebx,PW_F1082)]
- psubw xmm0,xmm1
- psubw xmm2,xmm5 ; xmm2=tmp10
- paddw xmm0,xmm5 ; xmm0=tmp12
-
- ; -- Final output stage
-
- psubw xmm0,xmm3 ; xmm0=tmp6
- movdqa xmm1,xmm6
- movdqa xmm5,xmm7
- paddw xmm6,xmm3 ; xmm6=data0=(00 01 02 03 04 05 06 07)
- paddw xmm7,xmm0 ; xmm7=data1=(10 11 12 13 14 15 16 17)
- psubw xmm1,xmm3 ; xmm1=data7=(70 71 72 73 74 75 76 77)
- psubw xmm5,xmm0 ; xmm5=data6=(60 61 62 63 64 65 66 67)
- psubw xmm4,xmm0 ; xmm4=tmp5
-
- movdqa xmm3,xmm6 ; transpose coefficients(phase 1)
- punpcklwd xmm6,xmm7 ; xmm6=(00 10 01 11 02 12 03 13)
- punpckhwd xmm3,xmm7 ; xmm3=(04 14 05 15 06 16 07 17)
- movdqa xmm0,xmm5 ; transpose coefficients(phase 1)
- punpcklwd xmm5,xmm1 ; xmm5=(60 70 61 71 62 72 63 73)
- punpckhwd xmm0,xmm1 ; xmm0=(64 74 65 75 66 76 67 77)
-
- movdqa xmm7, XMMWORD [wk(0)] ; xmm7=tmp2
- movdqa xmm1, XMMWORD [wk(1)] ; xmm1=tmp3
-
- movdqa XMMWORD [wk(0)], xmm5 ; wk(0)=(60 70 61 71 62 72 63 73)
- movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=(64 74 65 75 66 76 67 77)
-
- paddw xmm2,xmm4 ; xmm2=tmp4
- movdqa xmm5,xmm7
- movdqa xmm0,xmm1
- paddw xmm7,xmm4 ; xmm7=data2=(20 21 22 23 24 25 26 27)
- paddw xmm1,xmm2 ; xmm1=data4=(40 41 42 43 44 45 46 47)
- psubw xmm5,xmm4 ; xmm5=data5=(50 51 52 53 54 55 56 57)
- psubw xmm0,xmm2 ; xmm0=data3=(30 31 32 33 34 35 36 37)
-
- movdqa xmm4,xmm7 ; transpose coefficients(phase 1)
- punpcklwd xmm7,xmm0 ; xmm7=(20 30 21 31 22 32 23 33)
- punpckhwd xmm4,xmm0 ; xmm4=(24 34 25 35 26 36 27 37)
- movdqa xmm2,xmm1 ; transpose coefficients(phase 1)
- punpcklwd xmm1,xmm5 ; xmm1=(40 50 41 51 42 52 43 53)
- punpckhwd xmm2,xmm5 ; xmm2=(44 54 45 55 46 56 47 57)
-
- movdqa xmm0,xmm3 ; transpose coefficients(phase 2)
- punpckldq xmm3,xmm4 ; xmm3=(04 14 24 34 05 15 25 35)
- punpckhdq xmm0,xmm4 ; xmm0=(06 16 26 36 07 17 27 37)
- movdqa xmm5,xmm6 ; transpose coefficients(phase 2)
- punpckldq xmm6,xmm7 ; xmm6=(00 10 20 30 01 11 21 31)
- punpckhdq xmm5,xmm7 ; xmm5=(02 12 22 32 03 13 23 33)
-
- movdqa xmm4, XMMWORD [wk(0)] ; xmm4=(60 70 61 71 62 72 63 73)
- movdqa xmm7, XMMWORD [wk(1)] ; xmm7=(64 74 65 75 66 76 67 77)
-
- movdqa XMMWORD [wk(0)], xmm3 ; wk(0)=(04 14 24 34 05 15 25 35)
- movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=(06 16 26 36 07 17 27 37)
-
- movdqa xmm3,xmm1 ; transpose coefficients(phase 2)
- punpckldq xmm1,xmm4 ; xmm1=(40 50 60 70 41 51 61 71)
- punpckhdq xmm3,xmm4 ; xmm3=(42 52 62 72 43 53 63 73)
- movdqa xmm0,xmm2 ; transpose coefficients(phase 2)
- punpckldq xmm2,xmm7 ; xmm2=(44 54 64 74 45 55 65 75)
- punpckhdq xmm0,xmm7 ; xmm0=(46 56 66 76 47 57 67 77)
-
- movdqa xmm4,xmm6 ; transpose coefficients(phase 3)
- punpcklqdq xmm6,xmm1 ; xmm6=col0=(00 10 20 30 40 50 60 70)
- punpckhqdq xmm4,xmm1 ; xmm4=col1=(01 11 21 31 41 51 61 71)
- movdqa xmm7,xmm5 ; transpose coefficients(phase 3)
- punpcklqdq xmm5,xmm3 ; xmm5=col2=(02 12 22 32 42 52 62 72)
- punpckhqdq xmm7,xmm3 ; xmm7=col3=(03 13 23 33 43 53 63 73)
-
- movdqa xmm1, XMMWORD [wk(0)] ; xmm1=(04 14 24 34 05 15 25 35)
- movdqa xmm3, XMMWORD [wk(1)] ; xmm3=(06 16 26 36 07 17 27 37)
-
- movdqa XMMWORD [wk(0)], xmm4 ; wk(0)=col1
- movdqa XMMWORD [wk(1)], xmm7 ; wk(1)=col3
-
- movdqa xmm4,xmm1 ; transpose coefficients(phase 3)
- punpcklqdq xmm1,xmm2 ; xmm1=col4=(04 14 24 34 44 54 64 74)
- punpckhqdq xmm4,xmm2 ; xmm4=col5=(05 15 25 35 45 55 65 75)
- movdqa xmm7,xmm3 ; transpose coefficients(phase 3)
- punpcklqdq xmm3,xmm0 ; xmm3=col6=(06 16 26 36 46 56 66 76)
- punpckhqdq xmm7,xmm0 ; xmm7=col7=(07 17 27 37 47 57 67 77)
-.column_end:
-
- ; -- Prefetch the next coefficient block
-
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 0*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 1*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 2*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 3*32]
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, [original_ebp]
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
-
- ; -- Even part
-
- ; xmm6=col0, xmm5=col2, xmm1=col4, xmm3=col6
-
- movdqa xmm2,xmm6
- movdqa xmm0,xmm5
- psubw xmm6,xmm1 ; xmm6=tmp11
- psubw xmm5,xmm3
- paddw xmm2,xmm1 ; xmm2=tmp10
- paddw xmm0,xmm3 ; xmm0=tmp13
-
- psllw xmm5,PRE_MULTIPLY_SCALE_BITS
- pmulhw xmm5,[GOTOFF(ebx,PW_F1414)]
- psubw xmm5,xmm0 ; xmm5=tmp12
-
- movdqa xmm1,xmm2
- movdqa xmm3,xmm6
- psubw xmm2,xmm0 ; xmm2=tmp3
- psubw xmm6,xmm5 ; xmm6=tmp2
- paddw xmm1,xmm0 ; xmm1=tmp0
- paddw xmm3,xmm5 ; xmm3=tmp1
-
- movdqa xmm0, XMMWORD [wk(0)] ; xmm0=col1
- movdqa xmm5, XMMWORD [wk(1)] ; xmm5=col3
-
- movdqa XMMWORD [wk(0)], xmm2 ; wk(0)=tmp3
- movdqa XMMWORD [wk(1)], xmm6 ; wk(1)=tmp2
-
- ; -- Odd part
-
- ; xmm0=col1, xmm5=col3, xmm4=col5, xmm7=col7
-
- movdqa xmm2,xmm0
- movdqa xmm6,xmm4
- psubw xmm0,xmm7 ; xmm0=z12
- psubw xmm4,xmm5 ; xmm4=z10
- paddw xmm2,xmm7 ; xmm2=z11
- paddw xmm6,xmm5 ; xmm6=z13
-
- movdqa xmm7,xmm4 ; xmm7=z10(unscaled)
- psllw xmm0,PRE_MULTIPLY_SCALE_BITS
- psllw xmm4,PRE_MULTIPLY_SCALE_BITS
-
- movdqa xmm5,xmm2
- psubw xmm2,xmm6
- paddw xmm5,xmm6 ; xmm5=tmp7
-
- psllw xmm2,PRE_MULTIPLY_SCALE_BITS
- pmulhw xmm2,[GOTOFF(ebx,PW_F1414)] ; xmm2=tmp11
-
- ; To avoid overflow...
- ;
- ; (Original)
- ; tmp12 = -2.613125930 * z10 + z5;
- ;
- ; (This implementation)
- ; tmp12 = (-1.613125930 - 1) * z10 + z5;
- ; = -1.613125930 * z10 - z10 + z5;
-
- movdqa xmm6,xmm4
- paddw xmm4,xmm0
- pmulhw xmm4,[GOTOFF(ebx,PW_F1847)] ; xmm4=z5
- pmulhw xmm6,[GOTOFF(ebx,PW_MF1613)]
- pmulhw xmm0,[GOTOFF(ebx,PW_F1082)]
- psubw xmm6,xmm7
- psubw xmm0,xmm4 ; xmm0=tmp10
- paddw xmm6,xmm4 ; xmm6=tmp12
-
- ; -- Final output stage
-
- psubw xmm6,xmm5 ; xmm6=tmp6
- movdqa xmm7,xmm1
- movdqa xmm4,xmm3
- paddw xmm1,xmm5 ; xmm1=data0=(00 10 20 30 40 50 60 70)
- paddw xmm3,xmm6 ; xmm3=data1=(01 11 21 31 41 51 61 71)
- psraw xmm1,(PASS1_BITS+3) ; descale
- psraw xmm3,(PASS1_BITS+3) ; descale
- psubw xmm7,xmm5 ; xmm7=data7=(07 17 27 37 47 57 67 77)
- psubw xmm4,xmm6 ; xmm4=data6=(06 16 26 36 46 56 66 76)
- psraw xmm7,(PASS1_BITS+3) ; descale
- psraw xmm4,(PASS1_BITS+3) ; descale
- psubw xmm2,xmm6 ; xmm2=tmp5
-
- packsswb xmm1,xmm4 ; xmm1=(00 10 20 30 40 50 60 70 06 16 26 36 46 56 66 76)
- packsswb xmm3,xmm7 ; xmm3=(01 11 21 31 41 51 61 71 07 17 27 37 47 57 67 77)
-
- movdqa xmm5, XMMWORD [wk(1)] ; xmm5=tmp2
- movdqa xmm6, XMMWORD [wk(0)] ; xmm6=tmp3
-
- paddw xmm0,xmm2 ; xmm0=tmp4
- movdqa xmm4,xmm5
- movdqa xmm7,xmm6
- paddw xmm5,xmm2 ; xmm5=data2=(02 12 22 32 42 52 62 72)
- paddw xmm6,xmm0 ; xmm6=data4=(04 14 24 34 44 54 64 74)
- psraw xmm5,(PASS1_BITS+3) ; descale
- psraw xmm6,(PASS1_BITS+3) ; descale
- psubw xmm4,xmm2 ; xmm4=data5=(05 15 25 35 45 55 65 75)
- psubw xmm7,xmm0 ; xmm7=data3=(03 13 23 33 43 53 63 73)
- psraw xmm4,(PASS1_BITS+3) ; descale
- psraw xmm7,(PASS1_BITS+3) ; descale
-
- movdqa xmm2,[GOTOFF(ebx,PB_CENTERJSAMP)] ; xmm2=[PB_CENTERJSAMP]
-
- packsswb xmm5,xmm6 ; xmm5=(02 12 22 32 42 52 62 72 04 14 24 34 44 54 64 74)
- packsswb xmm7,xmm4 ; xmm7=(03 13 23 33 43 53 63 73 05 15 25 35 45 55 65 75)
-
- paddb xmm1,xmm2
- paddb xmm3,xmm2
- paddb xmm5,xmm2
- paddb xmm7,xmm2
-
- movdqa xmm0,xmm1 ; transpose coefficients(phase 1)
- punpcklbw xmm1,xmm3 ; xmm1=(00 01 10 11 20 21 30 31 40 41 50 51 60 61 70 71)
- punpckhbw xmm0,xmm3 ; xmm0=(06 07 16 17 26 27 36 37 46 47 56 57 66 67 76 77)
- movdqa xmm6,xmm5 ; transpose coefficients(phase 1)
- punpcklbw xmm5,xmm7 ; xmm5=(02 03 12 13 22 23 32 33 42 43 52 53 62 63 72 73)
- punpckhbw xmm6,xmm7 ; xmm6=(04 05 14 15 24 25 34 35 44 45 54 55 64 65 74 75)
-
- movdqa xmm4,xmm1 ; transpose coefficients(phase 2)
- punpcklwd xmm1,xmm5 ; xmm1=(00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33)
- punpckhwd xmm4,xmm5 ; xmm4=(40 41 42 43 50 51 52 53 60 61 62 63 70 71 72 73)
- movdqa xmm2,xmm6 ; transpose coefficients(phase 2)
- punpcklwd xmm6,xmm0 ; xmm6=(04 05 06 07 14 15 16 17 24 25 26 27 34 35 36 37)
- punpckhwd xmm2,xmm0 ; xmm2=(44 45 46 47 54 55 56 57 64 65 66 67 74 75 76 77)
-
- movdqa xmm3,xmm1 ; transpose coefficients(phase 3)
- punpckldq xmm1,xmm6 ; xmm1=(00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17)
- punpckhdq xmm3,xmm6 ; xmm3=(20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37)
- movdqa xmm7,xmm4 ; transpose coefficients(phase 3)
- punpckldq xmm4,xmm2 ; xmm4=(40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57)
- punpckhdq xmm7,xmm2 ; xmm7=(60 61 62 63 64 65 66 67 70 71 72 73 74 75 76 77)
-
- pshufd xmm5,xmm1,0x4E ; xmm5=(10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07)
- pshufd xmm0,xmm3,0x4E ; xmm0=(30 31 32 33 34 35 36 37 20 21 22 23 24 25 26 27)
- pshufd xmm6,xmm4,0x4E ; xmm6=(50 51 52 53 54 55 56 57 40 41 42 43 44 45 46 47)
- pshufd xmm2,xmm7,0x4E ; xmm2=(70 71 72 73 74 75 76 77 60 61 62 63 64 65 66 67)
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm1
- movq _MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm3
- mov edx, JSAMPROW [edi+4*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+6*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm4
- movq _MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm7
-
- mov edx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm5
- movq _MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm0
- mov edx, JSAMPROW [edi+5*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+7*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm6
- movq _MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm2
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; unused
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JIDCT_INT_SSE2_SUPPORTED
-%endif ; DCT_IFAST_SUPPORTED
diff --git a/jiss2int.asm b/jiss2int.asm
deleted file mode 100644
index b0e7109..0000000
--- a/jiss2int.asm
+++ /dev/null
@@ -1,869 +0,0 @@
-;
-; jiss2int.asm - accurate integer IDCT (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a slow-but-accurate integer implementation of the
-; inverse DCT (Discrete Cosine Transform). The following code is based
-; directly on the IJG's original jidctint.c; see the jidctint.c for
-; more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_ISLOW_SUPPORTED
-%ifdef JIDCT_INT_SSE2_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%define DESCALE_P1 (CONST_BITS-PASS1_BITS)
-%define DESCALE_P2 (CONST_BITS+PASS1_BITS+3)
-
-%if CONST_BITS == 13
-F_0_298 equ 2446 ; FIX(0.298631336)
-F_0_390 equ 3196 ; FIX(0.390180644)
-F_0_541 equ 4433 ; FIX(0.541196100)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_175 equ 9633 ; FIX(1.175875602)
-F_1_501 equ 12299 ; FIX(1.501321110)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_1_961 equ 16069 ; FIX(1.961570560)
-F_2_053 equ 16819 ; FIX(2.053119869)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_072 equ 25172 ; FIX(3.072711026)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_298 equ DESCALE( 320652955,30-CONST_BITS) ; FIX(0.298631336)
-F_0_390 equ DESCALE( 418953276,30-CONST_BITS) ; FIX(0.390180644)
-F_0_541 equ DESCALE( 581104887,30-CONST_BITS) ; FIX(0.541196100)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_175 equ DESCALE(1262586813,30-CONST_BITS) ; FIX(1.175875602)
-F_1_501 equ DESCALE(1612031267,30-CONST_BITS) ; FIX(1.501321110)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_1_961 equ DESCALE(2106220350,30-CONST_BITS) ; FIX(1.961570560)
-F_2_053 equ DESCALE(2204520673,30-CONST_BITS) ; FIX(2.053119869)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_072 equ DESCALE(3299298341,30-CONST_BITS) ; FIX(3.072711026)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_idct_islow_sse2)
-
-EXTN(jconst_idct_islow_sse2):
-
-PW_F130_F054 times 4 dw (F_0_541+F_0_765), F_0_541
-PW_F054_MF130 times 4 dw F_0_541, (F_0_541-F_1_847)
-PW_MF078_F117 times 4 dw (F_1_175-F_1_961), F_1_175
-PW_F117_F078 times 4 dw F_1_175, (F_1_175-F_0_390)
-PW_MF060_MF089 times 4 dw (F_0_298-F_0_899),-F_0_899
-PW_MF089_F060 times 4 dw -F_0_899, (F_1_501-F_0_899)
-PW_MF050_MF256 times 4 dw (F_2_053-F_2_562),-F_2_562
-PW_MF256_F050 times 4 dw -F_2_562, (F_3_072-F_2_562)
-PD_DESCALE_P1 times 4 dd 1 << (DESCALE_P1-1)
-PD_DESCALE_P2 times 4 dd 1 << (DESCALE_P2-1)
-PB_CENTERJSAMP times 16 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_islow_sse2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 12
-
- align 16
- global EXTN(jpeg_idct_islow_sse2)
-
-EXTN(jpeg_idct_islow_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; unused
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
-
-%ifndef NO_ZERO_COLUMN_TEST_ISLOW_SSE2
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz near .columnDCT
-
- movdqa xmm0, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movdqa xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- por xmm0, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- por xmm1, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- por xmm0, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- por xmm1, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- por xmm0, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- por xmm1,xmm0
- packsswb xmm1,xmm1
- packsswb xmm1,xmm1
- movd eax,xmm1
- test eax,eax
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movdqa xmm5, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- pmullw xmm5, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- psllw xmm5,PASS1_BITS
-
- movdqa xmm4,xmm5 ; xmm5=in0=(00 01 02 03 04 05 06 07)
- punpcklwd xmm5,xmm5 ; xmm5=(00 00 01 01 02 02 03 03)
- punpckhwd xmm4,xmm4 ; xmm4=(04 04 05 05 06 06 07 07)
-
- pshufd xmm7,xmm5,0x00 ; xmm7=col0=(00 00 00 00 00 00 00 00)
- pshufd xmm6,xmm5,0x55 ; xmm6=col1=(01 01 01 01 01 01 01 01)
- pshufd xmm1,xmm5,0xAA ; xmm1=col2=(02 02 02 02 02 02 02 02)
- pshufd xmm5,xmm5,0xFF ; xmm5=col3=(03 03 03 03 03 03 03 03)
- pshufd xmm0,xmm4,0x00 ; xmm0=col4=(04 04 04 04 04 04 04 04)
- pshufd xmm3,xmm4,0x55 ; xmm3=col5=(05 05 05 05 05 05 05 05)
- pshufd xmm2,xmm4,0xAA ; xmm2=col6=(06 06 06 06 06 06 06 06)
- pshufd xmm4,xmm4,0xFF ; xmm4=col7=(07 07 07 07 07 07 07 07)
-
- movdqa XMMWORD [wk(8)], xmm6 ; wk(8)=col1
- movdqa XMMWORD [wk(9)], xmm5 ; wk(9)=col3
- movdqa XMMWORD [wk(10)], xmm3 ; wk(10)=col5
- movdqa XMMWORD [wk(11)], xmm4 ; wk(11)=col7
- jmp near .column_end
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Even part
-
- movdqa xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movdqa xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- pmullw xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm1, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movdqa xmm2, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movdqa xmm3, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- pmullw xmm2, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm3, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- ; (Original)
- ; z1 = (z2 + z3) * 0.541196100;
- ; tmp2 = z1 + z3 * -1.847759065;
- ; tmp3 = z1 + z2 * 0.765366865;
- ;
- ; (This implementation)
- ; tmp2 = z2 * 0.541196100 + z3 * (0.541196100 - 1.847759065);
- ; tmp3 = z2 * (0.541196100 + 0.765366865) + z3 * 0.541196100;
-
- movdqa xmm4,xmm1 ; xmm1=in2=z2
- movdqa xmm5,xmm1
- punpcklwd xmm4,xmm3 ; xmm3=in6=z3
- punpckhwd xmm5,xmm3
- movdqa xmm1,xmm4
- movdqa xmm3,xmm5
- pmaddwd xmm4,[GOTOFF(ebx,PW_F130_F054)] ; xmm4=tmp3L
- pmaddwd xmm5,[GOTOFF(ebx,PW_F130_F054)] ; xmm5=tmp3H
- pmaddwd xmm1,[GOTOFF(ebx,PW_F054_MF130)] ; xmm1=tmp2L
- pmaddwd xmm3,[GOTOFF(ebx,PW_F054_MF130)] ; xmm3=tmp2H
-
- movdqa xmm6,xmm0
- paddw xmm0,xmm2 ; xmm0=in0+in4
- psubw xmm6,xmm2 ; xmm6=in0-in4
-
- pxor xmm7,xmm7
- pxor xmm2,xmm2
- punpcklwd xmm7,xmm0 ; xmm7=tmp0L
- punpckhwd xmm2,xmm0 ; xmm2=tmp0H
- psrad xmm7,(16-CONST_BITS) ; psrad xmm7,16 & pslld xmm7,CONST_BITS
- psrad xmm2,(16-CONST_BITS) ; psrad xmm2,16 & pslld xmm2,CONST_BITS
-
- movdqa xmm0,xmm7
- paddd xmm7,xmm4 ; xmm7=tmp10L
- psubd xmm0,xmm4 ; xmm0=tmp13L
- movdqa xmm4,xmm2
- paddd xmm2,xmm5 ; xmm2=tmp10H
- psubd xmm4,xmm5 ; xmm4=tmp13H
-
- movdqa XMMWORD [wk(0)], xmm7 ; wk(0)=tmp10L
- movdqa XMMWORD [wk(1)], xmm2 ; wk(1)=tmp10H
- movdqa XMMWORD [wk(2)], xmm0 ; wk(2)=tmp13L
- movdqa XMMWORD [wk(3)], xmm4 ; wk(3)=tmp13H
-
- pxor xmm5,xmm5
- pxor xmm7,xmm7
- punpcklwd xmm5,xmm6 ; xmm5=tmp1L
- punpckhwd xmm7,xmm6 ; xmm7=tmp1H
- psrad xmm5,(16-CONST_BITS) ; psrad xmm5,16 & pslld xmm5,CONST_BITS
- psrad xmm7,(16-CONST_BITS) ; psrad xmm7,16 & pslld xmm7,CONST_BITS
-
- movdqa xmm2,xmm5
- paddd xmm5,xmm1 ; xmm5=tmp11L
- psubd xmm2,xmm1 ; xmm2=tmp12L
- movdqa xmm0,xmm7
- paddd xmm7,xmm3 ; xmm7=tmp11H
- psubd xmm0,xmm3 ; xmm0=tmp12H
-
- movdqa XMMWORD [wk(4)], xmm5 ; wk(4)=tmp11L
- movdqa XMMWORD [wk(5)], xmm7 ; wk(5)=tmp11H
- movdqa XMMWORD [wk(6)], xmm2 ; wk(6)=tmp12L
- movdqa XMMWORD [wk(7)], xmm0 ; wk(7)=tmp12H
-
- ; -- Odd part
-
- movdqa xmm4, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movdqa xmm6, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- pmullw xmm4, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm6, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movdqa xmm1, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movdqa xmm3, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- pmullw xmm1, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm3, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- movdqa xmm5,xmm6
- movdqa xmm7,xmm4
- paddw xmm5,xmm3 ; xmm5=z3
- paddw xmm7,xmm1 ; xmm7=z4
-
- ; (Original)
- ; z5 = (z3 + z4) * 1.175875602;
- ; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
- ; z3 += z5; z4 += z5;
- ;
- ; (This implementation)
- ; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
- ; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
-
- movdqa xmm2,xmm5
- movdqa xmm0,xmm5
- punpcklwd xmm2,xmm7
- punpckhwd xmm0,xmm7
- movdqa xmm5,xmm2
- movdqa xmm7,xmm0
- pmaddwd xmm2,[GOTOFF(ebx,PW_MF078_F117)] ; xmm2=z3L
- pmaddwd xmm0,[GOTOFF(ebx,PW_MF078_F117)] ; xmm0=z3H
- pmaddwd xmm5,[GOTOFF(ebx,PW_F117_F078)] ; xmm5=z4L
- pmaddwd xmm7,[GOTOFF(ebx,PW_F117_F078)] ; xmm7=z4H
-
- movdqa XMMWORD [wk(10)], xmm2 ; wk(10)=z3L
- movdqa XMMWORD [wk(11)], xmm0 ; wk(11)=z3H
-
- ; (Original)
- ; z1 = tmp0 + tmp3; z2 = tmp1 + tmp2;
- ; tmp0 = tmp0 * 0.298631336; tmp1 = tmp1 * 2.053119869;
- ; tmp2 = tmp2 * 3.072711026; tmp3 = tmp3 * 1.501321110;
- ; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
- ; tmp0 += z1 + z3; tmp1 += z2 + z4;
- ; tmp2 += z2 + z3; tmp3 += z1 + z4;
- ;
- ; (This implementation)
- ; tmp0 = tmp0 * (0.298631336 - 0.899976223) + tmp3 * -0.899976223;
- ; tmp1 = tmp1 * (2.053119869 - 2.562915447) + tmp2 * -2.562915447;
- ; tmp2 = tmp1 * -2.562915447 + tmp2 * (3.072711026 - 2.562915447);
- ; tmp3 = tmp0 * -0.899976223 + tmp3 * (1.501321110 - 0.899976223);
- ; tmp0 += z3; tmp1 += z4;
- ; tmp2 += z3; tmp3 += z4;
-
- movdqa xmm2,xmm3
- movdqa xmm0,xmm3
- punpcklwd xmm2,xmm4
- punpckhwd xmm0,xmm4
- movdqa xmm3,xmm2
- movdqa xmm4,xmm0
- pmaddwd xmm2,[GOTOFF(ebx,PW_MF060_MF089)] ; xmm2=tmp0L
- pmaddwd xmm0,[GOTOFF(ebx,PW_MF060_MF089)] ; xmm0=tmp0H
- pmaddwd xmm3,[GOTOFF(ebx,PW_MF089_F060)] ; xmm3=tmp3L
- pmaddwd xmm4,[GOTOFF(ebx,PW_MF089_F060)] ; xmm4=tmp3H
-
- paddd xmm2, XMMWORD [wk(10)] ; xmm2=tmp0L
- paddd xmm0, XMMWORD [wk(11)] ; xmm0=tmp0H
- paddd xmm3,xmm5 ; xmm3=tmp3L
- paddd xmm4,xmm7 ; xmm4=tmp3H
-
- movdqa XMMWORD [wk(8)], xmm2 ; wk(8)=tmp0L
- movdqa XMMWORD [wk(9)], xmm0 ; wk(9)=tmp0H
-
- movdqa xmm2,xmm1
- movdqa xmm0,xmm1
- punpcklwd xmm2,xmm6
- punpckhwd xmm0,xmm6
- movdqa xmm1,xmm2
- movdqa xmm6,xmm0
- pmaddwd xmm2,[GOTOFF(ebx,PW_MF050_MF256)] ; xmm2=tmp1L
- pmaddwd xmm0,[GOTOFF(ebx,PW_MF050_MF256)] ; xmm0=tmp1H
- pmaddwd xmm1,[GOTOFF(ebx,PW_MF256_F050)] ; xmm1=tmp2L
- pmaddwd xmm6,[GOTOFF(ebx,PW_MF256_F050)] ; xmm6=tmp2H
-
- paddd xmm2,xmm5 ; xmm2=tmp1L
- paddd xmm0,xmm7 ; xmm0=tmp1H
- paddd xmm1, XMMWORD [wk(10)] ; xmm1=tmp2L
- paddd xmm6, XMMWORD [wk(11)] ; xmm6=tmp2H
-
- movdqa XMMWORD [wk(10)], xmm2 ; wk(10)=tmp1L
- movdqa XMMWORD [wk(11)], xmm0 ; wk(11)=tmp1H
-
- ; -- Final output stage
-
- movdqa xmm5, XMMWORD [wk(0)] ; xmm5=tmp10L
- movdqa xmm7, XMMWORD [wk(1)] ; xmm7=tmp10H
-
- movdqa xmm2,xmm5
- movdqa xmm0,xmm7
- paddd xmm5,xmm3 ; xmm5=data0L
- paddd xmm7,xmm4 ; xmm7=data0H
- psubd xmm2,xmm3 ; xmm2=data7L
- psubd xmm0,xmm4 ; xmm0=data7H
-
- movdqa xmm3,[GOTOFF(ebx,PD_DESCALE_P1)] ; xmm3=[PD_DESCALE_P1]
-
- paddd xmm5,xmm3
- paddd xmm7,xmm3
- psrad xmm5,DESCALE_P1
- psrad xmm7,DESCALE_P1
- paddd xmm2,xmm3
- paddd xmm0,xmm3
- psrad xmm2,DESCALE_P1
- psrad xmm0,DESCALE_P1
-
- packssdw xmm5,xmm7 ; xmm5=data0=(00 01 02 03 04 05 06 07)
- packssdw xmm2,xmm0 ; xmm2=data7=(70 71 72 73 74 75 76 77)
-
- movdqa xmm4, XMMWORD [wk(4)] ; xmm4=tmp11L
- movdqa xmm3, XMMWORD [wk(5)] ; xmm3=tmp11H
-
- movdqa xmm7,xmm4
- movdqa xmm0,xmm3
- paddd xmm4,xmm1 ; xmm4=data1L
- paddd xmm3,xmm6 ; xmm3=data1H
- psubd xmm7,xmm1 ; xmm7=data6L
- psubd xmm0,xmm6 ; xmm0=data6H
-
- movdqa xmm1,[GOTOFF(ebx,PD_DESCALE_P1)] ; xmm1=[PD_DESCALE_P1]
-
- paddd xmm4,xmm1
- paddd xmm3,xmm1
- psrad xmm4,DESCALE_P1
- psrad xmm3,DESCALE_P1
- paddd xmm7,xmm1
- paddd xmm0,xmm1
- psrad xmm7,DESCALE_P1
- psrad xmm0,DESCALE_P1
-
- packssdw xmm4,xmm3 ; xmm4=data1=(10 11 12 13 14 15 16 17)
- packssdw xmm7,xmm0 ; xmm7=data6=(60 61 62 63 64 65 66 67)
-
- movdqa xmm6,xmm5 ; transpose coefficients(phase 1)
- punpcklwd xmm5,xmm4 ; xmm5=(00 10 01 11 02 12 03 13)
- punpckhwd xmm6,xmm4 ; xmm6=(04 14 05 15 06 16 07 17)
- movdqa xmm1,xmm7 ; transpose coefficients(phase 1)
- punpcklwd xmm7,xmm2 ; xmm7=(60 70 61 71 62 72 63 73)
- punpckhwd xmm1,xmm2 ; xmm1=(64 74 65 75 66 76 67 77)
-
- movdqa xmm3, XMMWORD [wk(6)] ; xmm3=tmp12L
- movdqa xmm0, XMMWORD [wk(7)] ; xmm0=tmp12H
- movdqa xmm4, XMMWORD [wk(10)] ; xmm4=tmp1L
- movdqa xmm2, XMMWORD [wk(11)] ; xmm2=tmp1H
-
- movdqa XMMWORD [wk(0)], xmm5 ; wk(0)=(00 10 01 11 02 12 03 13)
- movdqa XMMWORD [wk(1)], xmm6 ; wk(1)=(04 14 05 15 06 16 07 17)
- movdqa XMMWORD [wk(4)], xmm7 ; wk(4)=(60 70 61 71 62 72 63 73)
- movdqa XMMWORD [wk(5)], xmm1 ; wk(5)=(64 74 65 75 66 76 67 77)
-
- movdqa xmm5,xmm3
- movdqa xmm6,xmm0
- paddd xmm3,xmm4 ; xmm3=data2L
- paddd xmm0,xmm2 ; xmm0=data2H
- psubd xmm5,xmm4 ; xmm5=data5L
- psubd xmm6,xmm2 ; xmm6=data5H
-
- movdqa xmm7,[GOTOFF(ebx,PD_DESCALE_P1)] ; xmm7=[PD_DESCALE_P1]
-
- paddd xmm3,xmm7
- paddd xmm0,xmm7
- psrad xmm3,DESCALE_P1
- psrad xmm0,DESCALE_P1
- paddd xmm5,xmm7
- paddd xmm6,xmm7
- psrad xmm5,DESCALE_P1
- psrad xmm6,DESCALE_P1
-
- packssdw xmm3,xmm0 ; xmm3=data2=(20 21 22 23 24 25 26 27)
- packssdw xmm5,xmm6 ; xmm5=data5=(50 51 52 53 54 55 56 57)
-
- movdqa xmm1, XMMWORD [wk(2)] ; xmm1=tmp13L
- movdqa xmm4, XMMWORD [wk(3)] ; xmm4=tmp13H
- movdqa xmm2, XMMWORD [wk(8)] ; xmm2=tmp0L
- movdqa xmm7, XMMWORD [wk(9)] ; xmm7=tmp0H
-
- movdqa xmm0,xmm1
- movdqa xmm6,xmm4
- paddd xmm1,xmm2 ; xmm1=data3L
- paddd xmm4,xmm7 ; xmm4=data3H
- psubd xmm0,xmm2 ; xmm0=data4L
- psubd xmm6,xmm7 ; xmm6=data4H
-
- movdqa xmm2,[GOTOFF(ebx,PD_DESCALE_P1)] ; xmm2=[PD_DESCALE_P1]
-
- paddd xmm1,xmm2
- paddd xmm4,xmm2
- psrad xmm1,DESCALE_P1
- psrad xmm4,DESCALE_P1
- paddd xmm0,xmm2
- paddd xmm6,xmm2
- psrad xmm0,DESCALE_P1
- psrad xmm6,DESCALE_P1
-
- packssdw xmm1,xmm4 ; xmm1=data3=(30 31 32 33 34 35 36 37)
- packssdw xmm0,xmm6 ; xmm0=data4=(40 41 42 43 44 45 46 47)
-
- movdqa xmm7, XMMWORD [wk(0)] ; xmm7=(00 10 01 11 02 12 03 13)
- movdqa xmm2, XMMWORD [wk(1)] ; xmm2=(04 14 05 15 06 16 07 17)
-
- movdqa xmm4,xmm3 ; transpose coefficients(phase 1)
- punpcklwd xmm3,xmm1 ; xmm3=(20 30 21 31 22 32 23 33)
- punpckhwd xmm4,xmm1 ; xmm4=(24 34 25 35 26 36 27 37)
- movdqa xmm6,xmm0 ; transpose coefficients(phase 1)
- punpcklwd xmm0,xmm5 ; xmm0=(40 50 41 51 42 52 43 53)
- punpckhwd xmm6,xmm5 ; xmm6=(44 54 45 55 46 56 47 57)
-
- movdqa xmm1,xmm7 ; transpose coefficients(phase 2)
- punpckldq xmm7,xmm3 ; xmm7=(00 10 20 30 01 11 21 31)
- punpckhdq xmm1,xmm3 ; xmm1=(02 12 22 32 03 13 23 33)
- movdqa xmm5,xmm2 ; transpose coefficients(phase 2)
- punpckldq xmm2,xmm4 ; xmm2=(04 14 24 34 05 15 25 35)
- punpckhdq xmm5,xmm4 ; xmm5=(06 16 26 36 07 17 27 37)
-
- movdqa xmm3, XMMWORD [wk(4)] ; xmm3=(60 70 61 71 62 72 63 73)
- movdqa xmm4, XMMWORD [wk(5)] ; xmm4=(64 74 65 75 66 76 67 77)
-
- movdqa XMMWORD [wk(6)], xmm2 ; wk(6)=(04 14 24 34 05 15 25 35)
- movdqa XMMWORD [wk(7)], xmm5 ; wk(7)=(06 16 26 36 07 17 27 37)
-
- movdqa xmm2,xmm0 ; transpose coefficients(phase 2)
- punpckldq xmm0,xmm3 ; xmm0=(40 50 60 70 41 51 61 71)
- punpckhdq xmm2,xmm3 ; xmm2=(42 52 62 72 43 53 63 73)
- movdqa xmm5,xmm6 ; transpose coefficients(phase 2)
- punpckldq xmm6,xmm4 ; xmm6=(44 54 64 74 45 55 65 75)
- punpckhdq xmm5,xmm4 ; xmm5=(46 56 66 76 47 57 67 77)
-
- movdqa xmm3,xmm7 ; transpose coefficients(phase 3)
- punpcklqdq xmm7,xmm0 ; xmm7=col0=(00 10 20 30 40 50 60 70)
- punpckhqdq xmm3,xmm0 ; xmm3=col1=(01 11 21 31 41 51 61 71)
- movdqa xmm4,xmm1 ; transpose coefficients(phase 3)
- punpcklqdq xmm1,xmm2 ; xmm1=col2=(02 12 22 32 42 52 62 72)
- punpckhqdq xmm4,xmm2 ; xmm4=col3=(03 13 23 33 43 53 63 73)
-
- movdqa xmm0, XMMWORD [wk(6)] ; xmm0=(04 14 24 34 05 15 25 35)
- movdqa xmm2, XMMWORD [wk(7)] ; xmm2=(06 16 26 36 07 17 27 37)
-
- movdqa XMMWORD [wk(8)], xmm3 ; wk(8)=col1
- movdqa XMMWORD [wk(9)], xmm4 ; wk(9)=col3
-
- movdqa xmm3,xmm0 ; transpose coefficients(phase 3)
- punpcklqdq xmm0,xmm6 ; xmm0=col4=(04 14 24 34 44 54 64 74)
- punpckhqdq xmm3,xmm6 ; xmm3=col5=(05 15 25 35 45 55 65 75)
- movdqa xmm4,xmm2 ; transpose coefficients(phase 3)
- punpcklqdq xmm2,xmm5 ; xmm2=col6=(06 16 26 36 46 56 66 76)
- punpckhqdq xmm4,xmm5 ; xmm4=col7=(07 17 27 37 47 57 67 77)
-
- movdqa XMMWORD [wk(10)], xmm3 ; wk(10)=col5
- movdqa XMMWORD [wk(11)], xmm4 ; wk(11)=col7
-.column_end:
-
- ; -- Prefetch the next coefficient block
-
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 0*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 1*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 2*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 3*32]
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, [original_ebp]
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
-
- ; -- Even part
-
- ; xmm7=col0, xmm1=col2, xmm0=col4, xmm2=col6
-
- ; (Original)
- ; z1 = (z2 + z3) * 0.541196100;
- ; tmp2 = z1 + z3 * -1.847759065;
- ; tmp3 = z1 + z2 * 0.765366865;
- ;
- ; (This implementation)
- ; tmp2 = z2 * 0.541196100 + z3 * (0.541196100 - 1.847759065);
- ; tmp3 = z2 * (0.541196100 + 0.765366865) + z3 * 0.541196100;
-
- movdqa xmm6,xmm1 ; xmm1=in2=z2
- movdqa xmm5,xmm1
- punpcklwd xmm6,xmm2 ; xmm2=in6=z3
- punpckhwd xmm5,xmm2
- movdqa xmm1,xmm6
- movdqa xmm2,xmm5
- pmaddwd xmm6,[GOTOFF(ebx,PW_F130_F054)] ; xmm6=tmp3L
- pmaddwd xmm5,[GOTOFF(ebx,PW_F130_F054)] ; xmm5=tmp3H
- pmaddwd xmm1,[GOTOFF(ebx,PW_F054_MF130)] ; xmm1=tmp2L
- pmaddwd xmm2,[GOTOFF(ebx,PW_F054_MF130)] ; xmm2=tmp2H
-
- movdqa xmm3,xmm7
- paddw xmm7,xmm0 ; xmm7=in0+in4
- psubw xmm3,xmm0 ; xmm3=in0-in4
-
- pxor xmm4,xmm4
- pxor xmm0,xmm0
- punpcklwd xmm4,xmm7 ; xmm4=tmp0L
- punpckhwd xmm0,xmm7 ; xmm0=tmp0H
- psrad xmm4,(16-CONST_BITS) ; psrad xmm4,16 & pslld xmm4,CONST_BITS
- psrad xmm0,(16-CONST_BITS) ; psrad xmm0,16 & pslld xmm0,CONST_BITS
-
- movdqa xmm7,xmm4
- paddd xmm4,xmm6 ; xmm4=tmp10L
- psubd xmm7,xmm6 ; xmm7=tmp13L
- movdqa xmm6,xmm0
- paddd xmm0,xmm5 ; xmm0=tmp10H
- psubd xmm6,xmm5 ; xmm6=tmp13H
-
- movdqa XMMWORD [wk(0)], xmm4 ; wk(0)=tmp10L
- movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=tmp10H
- movdqa XMMWORD [wk(2)], xmm7 ; wk(2)=tmp13L
- movdqa XMMWORD [wk(3)], xmm6 ; wk(3)=tmp13H
-
- pxor xmm5,xmm5
- pxor xmm4,xmm4
- punpcklwd xmm5,xmm3 ; xmm5=tmp1L
- punpckhwd xmm4,xmm3 ; xmm4=tmp1H
- psrad xmm5,(16-CONST_BITS) ; psrad xmm5,16 & pslld xmm5,CONST_BITS
- psrad xmm4,(16-CONST_BITS) ; psrad xmm4,16 & pslld xmm4,CONST_BITS
-
- movdqa xmm0,xmm5
- paddd xmm5,xmm1 ; xmm5=tmp11L
- psubd xmm0,xmm1 ; xmm0=tmp12L
- movdqa xmm7,xmm4
- paddd xmm4,xmm2 ; xmm4=tmp11H
- psubd xmm7,xmm2 ; xmm7=tmp12H
-
- movdqa XMMWORD [wk(4)], xmm5 ; wk(4)=tmp11L
- movdqa XMMWORD [wk(5)], xmm4 ; wk(5)=tmp11H
- movdqa XMMWORD [wk(6)], xmm0 ; wk(6)=tmp12L
- movdqa XMMWORD [wk(7)], xmm7 ; wk(7)=tmp12H
-
- ; -- Odd part
-
- movdqa xmm6, XMMWORD [wk(9)] ; xmm6=col3
- movdqa xmm3, XMMWORD [wk(8)] ; xmm3=col1
- movdqa xmm1, XMMWORD [wk(11)] ; xmm1=col7
- movdqa xmm2, XMMWORD [wk(10)] ; xmm2=col5
-
- movdqa xmm5,xmm6
- movdqa xmm4,xmm3
- paddw xmm5,xmm1 ; xmm5=z3
- paddw xmm4,xmm2 ; xmm4=z4
-
- ; (Original)
- ; z5 = (z3 + z4) * 1.175875602;
- ; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
- ; z3 += z5; z4 += z5;
- ;
- ; (This implementation)
- ; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
- ; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
-
- movdqa xmm0,xmm5
- movdqa xmm7,xmm5
- punpcklwd xmm0,xmm4
- punpckhwd xmm7,xmm4
- movdqa xmm5,xmm0
- movdqa xmm4,xmm7
- pmaddwd xmm0,[GOTOFF(ebx,PW_MF078_F117)] ; xmm0=z3L
- pmaddwd xmm7,[GOTOFF(ebx,PW_MF078_F117)] ; xmm7=z3H
- pmaddwd xmm5,[GOTOFF(ebx,PW_F117_F078)] ; xmm5=z4L
- pmaddwd xmm4,[GOTOFF(ebx,PW_F117_F078)] ; xmm4=z4H
-
- movdqa XMMWORD [wk(10)], xmm0 ; wk(10)=z3L
- movdqa XMMWORD [wk(11)], xmm7 ; wk(11)=z3H
-
- ; (Original)
- ; z1 = tmp0 + tmp3; z2 = tmp1 + tmp2;
- ; tmp0 = tmp0 * 0.298631336; tmp1 = tmp1 * 2.053119869;
- ; tmp2 = tmp2 * 3.072711026; tmp3 = tmp3 * 1.501321110;
- ; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
- ; tmp0 += z1 + z3; tmp1 += z2 + z4;
- ; tmp2 += z2 + z3; tmp3 += z1 + z4;
- ;
- ; (This implementation)
- ; tmp0 = tmp0 * (0.298631336 - 0.899976223) + tmp3 * -0.899976223;
- ; tmp1 = tmp1 * (2.053119869 - 2.562915447) + tmp2 * -2.562915447;
- ; tmp2 = tmp1 * -2.562915447 + tmp2 * (3.072711026 - 2.562915447);
- ; tmp3 = tmp0 * -0.899976223 + tmp3 * (1.501321110 - 0.899976223);
- ; tmp0 += z3; tmp1 += z4;
- ; tmp2 += z3; tmp3 += z4;
-
- movdqa xmm0,xmm1
- movdqa xmm7,xmm1
- punpcklwd xmm0,xmm3
- punpckhwd xmm7,xmm3
- movdqa xmm1,xmm0
- movdqa xmm3,xmm7
- pmaddwd xmm0,[GOTOFF(ebx,PW_MF060_MF089)] ; xmm0=tmp0L
- pmaddwd xmm7,[GOTOFF(ebx,PW_MF060_MF089)] ; xmm7=tmp0H
- pmaddwd xmm1,[GOTOFF(ebx,PW_MF089_F060)] ; xmm1=tmp3L
- pmaddwd xmm3,[GOTOFF(ebx,PW_MF089_F060)] ; xmm3=tmp3H
-
- paddd xmm0, XMMWORD [wk(10)] ; xmm0=tmp0L
- paddd xmm7, XMMWORD [wk(11)] ; xmm7=tmp0H
- paddd xmm1,xmm5 ; xmm1=tmp3L
- paddd xmm3,xmm4 ; xmm3=tmp3H
-
- movdqa XMMWORD [wk(8)], xmm0 ; wk(8)=tmp0L
- movdqa XMMWORD [wk(9)], xmm7 ; wk(9)=tmp0H
-
- movdqa xmm0,xmm2
- movdqa xmm7,xmm2
- punpcklwd xmm0,xmm6
- punpckhwd xmm7,xmm6
- movdqa xmm2,xmm0
- movdqa xmm6,xmm7
- pmaddwd xmm0,[GOTOFF(ebx,PW_MF050_MF256)] ; xmm0=tmp1L
- pmaddwd xmm7,[GOTOFF(ebx,PW_MF050_MF256)] ; xmm7=tmp1H
- pmaddwd xmm2,[GOTOFF(ebx,PW_MF256_F050)] ; xmm2=tmp2L
- pmaddwd xmm6,[GOTOFF(ebx,PW_MF256_F050)] ; xmm6=tmp2H
-
- paddd xmm0,xmm5 ; xmm0=tmp1L
- paddd xmm7,xmm4 ; xmm7=tmp1H
- paddd xmm2, XMMWORD [wk(10)] ; xmm2=tmp2L
- paddd xmm6, XMMWORD [wk(11)] ; xmm6=tmp2H
-
- movdqa XMMWORD [wk(10)], xmm0 ; wk(10)=tmp1L
- movdqa XMMWORD [wk(11)], xmm7 ; wk(11)=tmp1H
-
- ; -- Final output stage
-
- movdqa xmm5, XMMWORD [wk(0)] ; xmm5=tmp10L
- movdqa xmm4, XMMWORD [wk(1)] ; xmm4=tmp10H
-
- movdqa xmm0,xmm5
- movdqa xmm7,xmm4
- paddd xmm5,xmm1 ; xmm5=data0L
- paddd xmm4,xmm3 ; xmm4=data0H
- psubd xmm0,xmm1 ; xmm0=data7L
- psubd xmm7,xmm3 ; xmm7=data7H
-
- movdqa xmm1,[GOTOFF(ebx,PD_DESCALE_P2)] ; xmm1=[PD_DESCALE_P2]
-
- paddd xmm5,xmm1
- paddd xmm4,xmm1
- psrad xmm5,DESCALE_P2
- psrad xmm4,DESCALE_P2
- paddd xmm0,xmm1
- paddd xmm7,xmm1
- psrad xmm0,DESCALE_P2
- psrad xmm7,DESCALE_P2
-
- packssdw xmm5,xmm4 ; xmm5=data0=(00 10 20 30 40 50 60 70)
- packssdw xmm0,xmm7 ; xmm0=data7=(07 17 27 37 47 57 67 77)
-
- movdqa xmm3, XMMWORD [wk(4)] ; xmm3=tmp11L
- movdqa xmm1, XMMWORD [wk(5)] ; xmm1=tmp11H
-
- movdqa xmm4,xmm3
- movdqa xmm7,xmm1
- paddd xmm3,xmm2 ; xmm3=data1L
- paddd xmm1,xmm6 ; xmm1=data1H
- psubd xmm4,xmm2 ; xmm4=data6L
- psubd xmm7,xmm6 ; xmm7=data6H
-
- movdqa xmm2,[GOTOFF(ebx,PD_DESCALE_P2)] ; xmm2=[PD_DESCALE_P2]
-
- paddd xmm3,xmm2
- paddd xmm1,xmm2
- psrad xmm3,DESCALE_P2
- psrad xmm1,DESCALE_P2
- paddd xmm4,xmm2
- paddd xmm7,xmm2
- psrad xmm4,DESCALE_P2
- psrad xmm7,DESCALE_P2
-
- packssdw xmm3,xmm1 ; xmm3=data1=(01 11 21 31 41 51 61 71)
- packssdw xmm4,xmm7 ; xmm4=data6=(06 16 26 36 46 56 66 76)
-
- packsswb xmm5,xmm4 ; xmm5=(00 10 20 30 40 50 60 70 06 16 26 36 46 56 66 76)
- packsswb xmm3,xmm0 ; xmm3=(01 11 21 31 41 51 61 71 07 17 27 37 47 57 67 77)
-
- movdqa xmm6, XMMWORD [wk(6)] ; xmm6=tmp12L
- movdqa xmm2, XMMWORD [wk(7)] ; xmm2=tmp12H
- movdqa xmm1, XMMWORD [wk(10)] ; xmm1=tmp1L
- movdqa xmm7, XMMWORD [wk(11)] ; xmm7=tmp1H
-
- movdqa XMMWORD [wk(0)], xmm5 ; wk(0)=(00 10 20 30 40 50 60 70 06 16 26 36 46 56 66 76)
- movdqa XMMWORD [wk(1)], xmm3 ; wk(1)=(01 11 21 31 41 51 61 71 07 17 27 37 47 57 67 77)
-
- movdqa xmm4,xmm6
- movdqa xmm0,xmm2
- paddd xmm6,xmm1 ; xmm6=data2L
- paddd xmm2,xmm7 ; xmm2=data2H
- psubd xmm4,xmm1 ; xmm4=data5L
- psubd xmm0,xmm7 ; xmm0=data5H
-
- movdqa xmm5,[GOTOFF(ebx,PD_DESCALE_P2)] ; xmm5=[PD_DESCALE_P2]
-
- paddd xmm6,xmm5
- paddd xmm2,xmm5
- psrad xmm6,DESCALE_P2
- psrad xmm2,DESCALE_P2
- paddd xmm4,xmm5
- paddd xmm0,xmm5
- psrad xmm4,DESCALE_P2
- psrad xmm0,DESCALE_P2
-
- packssdw xmm6,xmm2 ; xmm6=data2=(02 12 22 32 42 52 62 72)
- packssdw xmm4,xmm0 ; xmm4=data5=(05 15 25 35 45 55 65 75)
-
- movdqa xmm3, XMMWORD [wk(2)] ; xmm3=tmp13L
- movdqa xmm1, XMMWORD [wk(3)] ; xmm1=tmp13H
- movdqa xmm7, XMMWORD [wk(8)] ; xmm7=tmp0L
- movdqa xmm5, XMMWORD [wk(9)] ; xmm5=tmp0H
-
- movdqa xmm2,xmm3
- movdqa xmm0,xmm1
- paddd xmm3,xmm7 ; xmm3=data3L
- paddd xmm1,xmm5 ; xmm1=data3H
- psubd xmm2,xmm7 ; xmm2=data4L
- psubd xmm0,xmm5 ; xmm0=data4H
-
- movdqa xmm7,[GOTOFF(ebx,PD_DESCALE_P2)] ; xmm7=[PD_DESCALE_P2]
-
- paddd xmm3,xmm7
- paddd xmm1,xmm7
- psrad xmm3,DESCALE_P2
- psrad xmm1,DESCALE_P2
- paddd xmm2,xmm7
- paddd xmm0,xmm7
- psrad xmm2,DESCALE_P2
- psrad xmm0,DESCALE_P2
-
- movdqa xmm5,[GOTOFF(ebx,PB_CENTERJSAMP)] ; xmm5=[PB_CENTERJSAMP]
-
- packssdw xmm3,xmm1 ; xmm3=data3=(03 13 23 33 43 53 63 73)
- packssdw xmm2,xmm0 ; xmm2=data4=(04 14 24 34 44 54 64 74)
-
- movdqa xmm7, XMMWORD [wk(0)] ; xmm7=(00 10 20 30 40 50 60 70 06 16 26 36 46 56 66 76)
- movdqa xmm1, XMMWORD [wk(1)] ; xmm1=(01 11 21 31 41 51 61 71 07 17 27 37 47 57 67 77)
-
- packsswb xmm6,xmm2 ; xmm6=(02 12 22 32 42 52 62 72 04 14 24 34 44 54 64 74)
- packsswb xmm3,xmm4 ; xmm3=(03 13 23 33 43 53 63 73 05 15 25 35 45 55 65 75)
-
- paddb xmm7,xmm5
- paddb xmm1,xmm5
- paddb xmm6,xmm5
- paddb xmm3,xmm5
-
- movdqa xmm0,xmm7 ; transpose coefficients(phase 1)
- punpcklbw xmm7,xmm1 ; xmm7=(00 01 10 11 20 21 30 31 40 41 50 51 60 61 70 71)
- punpckhbw xmm0,xmm1 ; xmm0=(06 07 16 17 26 27 36 37 46 47 56 57 66 67 76 77)
- movdqa xmm2,xmm6 ; transpose coefficients(phase 1)
- punpcklbw xmm6,xmm3 ; xmm6=(02 03 12 13 22 23 32 33 42 43 52 53 62 63 72 73)
- punpckhbw xmm2,xmm3 ; xmm2=(04 05 14 15 24 25 34 35 44 45 54 55 64 65 74 75)
-
- movdqa xmm4,xmm7 ; transpose coefficients(phase 2)
- punpcklwd xmm7,xmm6 ; xmm7=(00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33)
- punpckhwd xmm4,xmm6 ; xmm4=(40 41 42 43 50 51 52 53 60 61 62 63 70 71 72 73)
- movdqa xmm5,xmm2 ; transpose coefficients(phase 2)
- punpcklwd xmm2,xmm0 ; xmm2=(04 05 06 07 14 15 16 17 24 25 26 27 34 35 36 37)
- punpckhwd xmm5,xmm0 ; xmm5=(44 45 46 47 54 55 56 57 64 65 66 67 74 75 76 77)
-
- movdqa xmm1,xmm7 ; transpose coefficients(phase 3)
- punpckldq xmm7,xmm2 ; xmm7=(00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17)
- punpckhdq xmm1,xmm2 ; xmm1=(20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37)
- movdqa xmm3,xmm4 ; transpose coefficients(phase 3)
- punpckldq xmm4,xmm5 ; xmm4=(40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57)
- punpckhdq xmm3,xmm5 ; xmm3=(60 61 62 63 64 65 66 67 70 71 72 73 74 75 76 77)
-
- pshufd xmm6,xmm7,0x4E ; xmm6=(10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07)
- pshufd xmm0,xmm1,0x4E ; xmm0=(30 31 32 33 34 35 36 37 20 21 22 23 24 25 26 27)
- pshufd xmm2,xmm4,0x4E ; xmm2=(50 51 52 53 54 55 56 57 40 41 42 43 44 45 46 47)
- pshufd xmm5,xmm3,0x4E ; xmm5=(70 71 72 73 74 75 76 77 60 61 62 63 64 65 66 67)
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm7
- movq _MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm1
- mov edx, JSAMPROW [edi+4*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+6*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm4
- movq _MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm3
-
- mov edx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm6
- movq _MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm0
- mov edx, JSAMPROW [edi+5*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+7*SIZEOF_JSAMPROW]
- movq _MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm2
- movq _MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm5
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; unused
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JIDCT_INT_SSE2_SUPPORTED
-%endif ; DCT_ISLOW_SUPPORTED
diff --git a/jiss2red.asm b/jiss2red.asm
deleted file mode 100644
index 53af6fe..0000000
--- a/jiss2red.asm
+++ /dev/null
@@ -1,607 +0,0 @@
-;
-; jiss2red.asm - reduced-size IDCT (SSE2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains inverse-DCT routines that produce reduced-size
-; output: either 4x4 or 2x2 pixels from an 8x8 DCT block.
-; The following code is based directly on the IJG's original jidctred.c;
-; see the jidctred.c for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef IDCT_SCALING_SUPPORTED
-%ifdef JIDCT_INT_SSE2_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%define CONST_BITS 13
-%define PASS1_BITS 2
-
-%define DESCALE_P1_4 (CONST_BITS-PASS1_BITS+1)
-%define DESCALE_P2_4 (CONST_BITS+PASS1_BITS+3+1)
-%define DESCALE_P1_2 (CONST_BITS-PASS1_BITS+2)
-%define DESCALE_P2_2 (CONST_BITS+PASS1_BITS+3+2)
-
-%if CONST_BITS == 13
-F_0_211 equ 1730 ; FIX(0.211164243)
-F_0_509 equ 4176 ; FIX(0.509795579)
-F_0_601 equ 4926 ; FIX(0.601344887)
-F_0_720 equ 5906 ; FIX(0.720959822)
-F_0_765 equ 6270 ; FIX(0.765366865)
-F_0_850 equ 6967 ; FIX(0.850430095)
-F_0_899 equ 7373 ; FIX(0.899976223)
-F_1_061 equ 8697 ; FIX(1.061594337)
-F_1_272 equ 10426 ; FIX(1.272758580)
-F_1_451 equ 11893 ; FIX(1.451774981)
-F_1_847 equ 15137 ; FIX(1.847759065)
-F_2_172 equ 17799 ; FIX(2.172734803)
-F_2_562 equ 20995 ; FIX(2.562915447)
-F_3_624 equ 29692 ; FIX(3.624509785)
-%else
-; NASM cannot do compile-time arithmetic on floating-point constants.
-%define DESCALE(x,n) (((x)+(1<<((n)-1)))>>(n))
-F_0_211 equ DESCALE( 226735879,30-CONST_BITS) ; FIX(0.211164243)
-F_0_509 equ DESCALE( 547388834,30-CONST_BITS) ; FIX(0.509795579)
-F_0_601 equ DESCALE( 645689155,30-CONST_BITS) ; FIX(0.601344887)
-F_0_720 equ DESCALE( 774124714,30-CONST_BITS) ; FIX(0.720959822)
-F_0_765 equ DESCALE( 821806413,30-CONST_BITS) ; FIX(0.765366865)
-F_0_850 equ DESCALE( 913142361,30-CONST_BITS) ; FIX(0.850430095)
-F_0_899 equ DESCALE( 966342111,30-CONST_BITS) ; FIX(0.899976223)
-F_1_061 equ DESCALE(1139878239,30-CONST_BITS) ; FIX(1.061594337)
-F_1_272 equ DESCALE(1366614119,30-CONST_BITS) ; FIX(1.272758580)
-F_1_451 equ DESCALE(1558831516,30-CONST_BITS) ; FIX(1.451774981)
-F_1_847 equ DESCALE(1984016188,30-CONST_BITS) ; FIX(1.847759065)
-F_2_172 equ DESCALE(2332956230,30-CONST_BITS) ; FIX(2.172734803)
-F_2_562 equ DESCALE(2751909506,30-CONST_BITS) ; FIX(2.562915447)
-F_3_624 equ DESCALE(3891787747,30-CONST_BITS) ; FIX(3.624509785)
-%endif
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_idct_red_sse2)
-
-EXTN(jconst_idct_red_sse2):
-
-PW_F184_MF076 times 4 dw F_1_847,-F_0_765
-PW_F256_F089 times 4 dw F_2_562, F_0_899
-PW_F106_MF217 times 4 dw F_1_061,-F_2_172
-PW_MF060_MF050 times 4 dw -F_0_601,-F_0_509
-PW_F145_MF021 times 4 dw F_1_451,-F_0_211
-PW_F362_MF127 times 4 dw F_3_624,-F_1_272
-PW_F085_MF072 times 4 dw F_0_850,-F_0_720
-PD_DESCALE_P1_4 times 4 dd 1 << (DESCALE_P1_4-1)
-PD_DESCALE_P2_4 times 4 dd 1 << (DESCALE_P2_4-1)
-PD_DESCALE_P1_2 times 4 dd 1 << (DESCALE_P1_2-1)
-PD_DESCALE_P2_2 times 4 dd 1 << (DESCALE_P2_2-1)
-PB_CENTERJSAMP times 16 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients,
-; producing a reduced-size 4x4 output block.
-;
-; GLOBAL(void)
-; jpeg_idct_4x4_sse2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 2
-
- align 16
- global EXTN(jpeg_idct_4x4_sse2)
-
-EXTN(jpeg_idct_4x4_sse2):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [wk(0)]
- pushpic ebx
-; push ecx ; unused
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
-
-%ifndef NO_ZERO_COLUMN_TEST_4X4_SSE2
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz short .columnDCT
-
- movdqa xmm0, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movdqa xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- por xmm0, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- por xmm1, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- por xmm0, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- por xmm1, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- por xmm0,xmm1
- packsswb xmm0,xmm0
- packsswb xmm0,xmm0
- movd eax,xmm0
- test eax,eax
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movdqa xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- pmullw xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- psllw xmm0,PASS1_BITS
-
- movdqa xmm3,xmm0 ; xmm0=in0=(00 01 02 03 04 05 06 07)
- punpcklwd xmm0,xmm0 ; xmm0=(00 00 01 01 02 02 03 03)
- punpckhwd xmm3,xmm3 ; xmm3=(04 04 05 05 06 06 07 07)
-
- pshufd xmm1,xmm0,0x50 ; xmm1=[col0 col1]=(00 00 00 00 01 01 01 01)
- pshufd xmm0,xmm0,0xFA ; xmm0=[col2 col3]=(02 02 02 02 03 03 03 03)
- pshufd xmm6,xmm3,0x50 ; xmm6=[col4 col5]=(04 04 04 04 05 05 05 05)
- pshufd xmm3,xmm3,0xFA ; xmm3=[col6 col7]=(06 06 06 06 07 07 07 07)
-
- jmp near .column_end
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Odd part
-
- movdqa xmm0, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movdqa xmm1, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- pmullw xmm0, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm1, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movdqa xmm2, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movdqa xmm3, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- pmullw xmm2, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm3, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- movdqa xmm4,xmm0
- movdqa xmm5,xmm0
- punpcklwd xmm4,xmm1
- punpckhwd xmm5,xmm1
- movdqa xmm0,xmm4
- movdqa xmm1,xmm5
- pmaddwd xmm4,[GOTOFF(ebx,PW_F256_F089)] ; xmm4=(tmp2L)
- pmaddwd xmm5,[GOTOFF(ebx,PW_F256_F089)] ; xmm5=(tmp2H)
- pmaddwd xmm0,[GOTOFF(ebx,PW_F106_MF217)] ; xmm0=(tmp0L)
- pmaddwd xmm1,[GOTOFF(ebx,PW_F106_MF217)] ; xmm1=(tmp0H)
-
- movdqa xmm6,xmm2
- movdqa xmm7,xmm2
- punpcklwd xmm6,xmm3
- punpckhwd xmm7,xmm3
- movdqa xmm2,xmm6
- movdqa xmm3,xmm7
- pmaddwd xmm6,[GOTOFF(ebx,PW_MF060_MF050)] ; xmm6=(tmp2L)
- pmaddwd xmm7,[GOTOFF(ebx,PW_MF060_MF050)] ; xmm7=(tmp2H)
- pmaddwd xmm2,[GOTOFF(ebx,PW_F145_MF021)] ; xmm2=(tmp0L)
- pmaddwd xmm3,[GOTOFF(ebx,PW_F145_MF021)] ; xmm3=(tmp0H)
-
- paddd xmm6,xmm4 ; xmm6=tmp2L
- paddd xmm7,xmm5 ; xmm7=tmp2H
- paddd xmm2,xmm0 ; xmm2=tmp0L
- paddd xmm3,xmm1 ; xmm3=tmp0H
-
- movdqa XMMWORD [wk(0)], xmm2 ; wk(0)=tmp0L
- movdqa XMMWORD [wk(1)], xmm3 ; wk(1)=tmp0H
-
- ; -- Even part
-
- movdqa xmm4, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movdqa xmm5, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movdqa xmm0, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- pmullw xmm4, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm5, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm0, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- pxor xmm1,xmm1
- pxor xmm2,xmm2
- punpcklwd xmm1,xmm4 ; xmm1=tmp0L
- punpckhwd xmm2,xmm4 ; xmm2=tmp0H
- psrad xmm1,(16-CONST_BITS-1) ; psrad xmm1,16 & pslld xmm1,CONST_BITS+1
- psrad xmm2,(16-CONST_BITS-1) ; psrad xmm2,16 & pslld xmm2,CONST_BITS+1
-
- movdqa xmm3,xmm5 ; xmm5=in2=z2
- punpcklwd xmm5,xmm0 ; xmm0=in6=z3
- punpckhwd xmm3,xmm0
- pmaddwd xmm5,[GOTOFF(ebx,PW_F184_MF076)] ; xmm5=tmp2L
- pmaddwd xmm3,[GOTOFF(ebx,PW_F184_MF076)] ; xmm3=tmp2H
-
- movdqa xmm4,xmm1
- movdqa xmm0,xmm2
- paddd xmm1,xmm5 ; xmm1=tmp10L
- paddd xmm2,xmm3 ; xmm2=tmp10H
- psubd xmm4,xmm5 ; xmm4=tmp12L
- psubd xmm0,xmm3 ; xmm0=tmp12H
-
- ; -- Final output stage
-
- movdqa xmm5,xmm1
- movdqa xmm3,xmm2
- paddd xmm1,xmm6 ; xmm1=data0L
- paddd xmm2,xmm7 ; xmm2=data0H
- psubd xmm5,xmm6 ; xmm5=data3L
- psubd xmm3,xmm7 ; xmm3=data3H
-
- movdqa xmm6,[GOTOFF(ebx,PD_DESCALE_P1_4)] ; xmm6=[PD_DESCALE_P1_4]
-
- paddd xmm1,xmm6
- paddd xmm2,xmm6
- psrad xmm1,DESCALE_P1_4
- psrad xmm2,DESCALE_P1_4
- paddd xmm5,xmm6
- paddd xmm3,xmm6
- psrad xmm5,DESCALE_P1_4
- psrad xmm3,DESCALE_P1_4
-
- packssdw xmm1,xmm2 ; xmm1=data0=(00 01 02 03 04 05 06 07)
- packssdw xmm5,xmm3 ; xmm5=data3=(30 31 32 33 34 35 36 37)
-
- movdqa xmm7, XMMWORD [wk(0)] ; xmm7=tmp0L
- movdqa xmm6, XMMWORD [wk(1)] ; xmm6=tmp0H
-
- movdqa xmm2,xmm4
- movdqa xmm3,xmm0
- paddd xmm4,xmm7 ; xmm4=data1L
- paddd xmm0,xmm6 ; xmm0=data1H
- psubd xmm2,xmm7 ; xmm2=data2L
- psubd xmm3,xmm6 ; xmm3=data2H
-
- movdqa xmm7,[GOTOFF(ebx,PD_DESCALE_P1_4)] ; xmm7=[PD_DESCALE_P1_4]
-
- paddd xmm4,xmm7
- paddd xmm0,xmm7
- psrad xmm4,DESCALE_P1_4
- psrad xmm0,DESCALE_P1_4
- paddd xmm2,xmm7
- paddd xmm3,xmm7
- psrad xmm2,DESCALE_P1_4
- psrad xmm3,DESCALE_P1_4
-
- packssdw xmm4,xmm0 ; xmm4=data1=(10 11 12 13 14 15 16 17)
- packssdw xmm2,xmm3 ; xmm2=data2=(20 21 22 23 24 25 26 27)
-
- movdqa xmm6,xmm1 ; transpose coefficients(phase 1)
- punpcklwd xmm1,xmm4 ; xmm1=(00 10 01 11 02 12 03 13)
- punpckhwd xmm6,xmm4 ; xmm6=(04 14 05 15 06 16 07 17)
- movdqa xmm7,xmm2 ; transpose coefficients(phase 1)
- punpcklwd xmm2,xmm5 ; xmm2=(20 30 21 31 22 32 23 33)
- punpckhwd xmm7,xmm5 ; xmm7=(24 34 25 35 26 36 27 37)
-
- movdqa xmm0,xmm1 ; transpose coefficients(phase 2)
- punpckldq xmm1,xmm2 ; xmm1=[col0 col1]=(00 10 20 30 01 11 21 31)
- punpckhdq xmm0,xmm2 ; xmm0=[col2 col3]=(02 12 22 32 03 13 23 33)
- movdqa xmm3,xmm6 ; transpose coefficients(phase 2)
- punpckldq xmm6,xmm7 ; xmm6=[col4 col5]=(04 14 24 34 05 15 25 35)
- punpckhdq xmm3,xmm7 ; xmm3=[col6 col7]=(06 16 26 36 07 17 27 37)
-.column_end:
-
- ; -- Prefetch the next coefficient block
-
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 0*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 1*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 2*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 3*32]
-
- ; ---- Pass 2: process rows, store into output array.
-
- mov eax, [original_ebp]
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
-
- ; -- Even part
-
- pxor xmm4,xmm4
- punpcklwd xmm4,xmm1 ; xmm4=tmp0
- psrad xmm4,(16-CONST_BITS-1) ; psrad xmm4,16 & pslld xmm4,CONST_BITS+1
-
- ; -- Odd part
-
- punpckhwd xmm1,xmm0
- punpckhwd xmm6,xmm3
- movdqa xmm5,xmm1
- movdqa xmm2,xmm6
- pmaddwd xmm1,[GOTOFF(ebx,PW_F256_F089)] ; xmm1=(tmp2)
- pmaddwd xmm6,[GOTOFF(ebx,PW_MF060_MF050)] ; xmm6=(tmp2)
- pmaddwd xmm5,[GOTOFF(ebx,PW_F106_MF217)] ; xmm5=(tmp0)
- pmaddwd xmm2,[GOTOFF(ebx,PW_F145_MF021)] ; xmm2=(tmp0)
-
- paddd xmm6,xmm1 ; xmm6=tmp2
- paddd xmm2,xmm5 ; xmm2=tmp0
-
- ; -- Even part
-
- punpcklwd xmm0,xmm3
- pmaddwd xmm0,[GOTOFF(ebx,PW_F184_MF076)] ; xmm0=tmp2
-
- movdqa xmm7,xmm4
- paddd xmm4,xmm0 ; xmm4=tmp10
- psubd xmm7,xmm0 ; xmm7=tmp12
-
- ; -- Final output stage
-
- movdqa xmm1,[GOTOFF(ebx,PD_DESCALE_P2_4)] ; xmm1=[PD_DESCALE_P2_4]
-
- movdqa xmm5,xmm4
- movdqa xmm3,xmm7
- paddd xmm4,xmm6 ; xmm4=data0=(00 10 20 30)
- paddd xmm7,xmm2 ; xmm7=data1=(01 11 21 31)
- psubd xmm5,xmm6 ; xmm5=data3=(03 13 23 33)
- psubd xmm3,xmm2 ; xmm3=data2=(02 12 22 32)
-
- paddd xmm4,xmm1
- paddd xmm7,xmm1
- psrad xmm4,DESCALE_P2_4
- psrad xmm7,DESCALE_P2_4
- paddd xmm5,xmm1
- paddd xmm3,xmm1
- psrad xmm5,DESCALE_P2_4
- psrad xmm3,DESCALE_P2_4
-
- packssdw xmm4,xmm3 ; xmm4=(00 10 20 30 02 12 22 32)
- packssdw xmm7,xmm5 ; xmm7=(01 11 21 31 03 13 23 33)
-
- movdqa xmm0,xmm4 ; transpose coefficients(phase 1)
- punpcklwd xmm4,xmm7 ; xmm4=(00 01 10 11 20 21 30 31)
- punpckhwd xmm0,xmm7 ; xmm0=(02 03 12 13 22 23 32 33)
-
- movdqa xmm6,xmm4 ; transpose coefficients(phase 2)
- punpckldq xmm4,xmm0 ; xmm4=(00 01 02 03 10 11 12 13)
- punpckhdq xmm6,xmm0 ; xmm6=(20 21 22 23 30 31 32 33)
-
- packsswb xmm4,xmm6 ; xmm4=(00 01 02 03 10 11 12 13 20 ..)
- paddb xmm4,[GOTOFF(ebx,PB_CENTERJSAMP)]
-
- pshufd xmm2,xmm4,0x39 ; xmm2=(10 11 12 13 20 21 22 23 30 ..)
- pshufd xmm1,xmm4,0x4E ; xmm1=(20 21 22 23 30 31 32 33 00 ..)
- pshufd xmm3,xmm4,0x93 ; xmm3=(30 31 32 33 00 01 02 03 10 ..)
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- movd _DWORD [edx+eax*SIZEOF_JSAMPLE], xmm4
- movd _DWORD [esi+eax*SIZEOF_JSAMPLE], xmm2
- mov edx, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
- movd _DWORD [edx+eax*SIZEOF_JSAMPLE], xmm1
- movd _DWORD [esi+eax*SIZEOF_JSAMPLE], xmm3
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; unused
- poppic ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-
-; --------------------------------------------------------------------------
-;
-; Perform dequantization and inverse DCT on one block of coefficients,
-; producing a reduced-size 2x2 output block.
-;
-; GLOBAL(void)
-; jpeg_idct_2x2_sse2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
- align 16
- global EXTN(jpeg_idct_2x2_sse2)
-
-EXTN(jpeg_idct_2x2_sse2):
- push ebp
- mov ebp,esp
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input.
-
- mov edx, POINTER [compptr(ebp)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(ebp)] ; inptr
-
- ; | input: | result: |
- ; | 00 01 ** 03 ** 05 ** 07 | |
- ; | 10 11 ** 13 ** 15 ** 17 | |
- ; | ** ** ** ** ** ** ** ** | |
- ; | 30 31 ** 33 ** 35 ** 37 | A0 A1 A3 A5 A7 |
- ; | ** ** ** ** ** ** ** ** | B0 B1 B3 B5 B7 |
- ; | 50 51 ** 53 ** 55 ** 57 | |
- ; | ** ** ** ** ** ** ** ** | |
- ; | 70 71 ** 73 ** 75 ** 77 | |
-
- ; -- Odd part
-
- movdqa xmm0, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movdqa xmm1, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- pmullw xmm0, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm1, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- movdqa xmm2, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movdqa xmm3, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- pmullw xmm2, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
- pmullw xmm3, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- ; xmm0=(10 11 ** 13 ** 15 ** 17), xmm1=(30 31 ** 33 ** 35 ** 37)
- ; xmm2=(50 51 ** 53 ** 55 ** 57), xmm3=(70 71 ** 73 ** 75 ** 77)
-
- pcmpeqd xmm7,xmm7
- pslld xmm7,WORD_BIT ; xmm7={0x0000 0xFFFF 0x0000 0xFFFF ..}
-
- movdqa xmm4,xmm0 ; xmm4=(10 11 ** 13 ** 15 ** 17)
- movdqa xmm5,xmm2 ; xmm5=(50 51 ** 53 ** 55 ** 57)
- punpcklwd xmm4,xmm1 ; xmm4=(10 30 11 31 ** ** 13 33)
- punpcklwd xmm5,xmm3 ; xmm5=(50 70 51 71 ** ** 53 73)
- pmaddwd xmm4,[GOTOFF(ebx,PW_F362_MF127)]
- pmaddwd xmm5,[GOTOFF(ebx,PW_F085_MF072)]
-
- psrld xmm0,WORD_BIT ; xmm0=(11 -- 13 -- 15 -- 17 --)
- pand xmm1,xmm7 ; xmm1=(-- 31 -- 33 -- 35 -- 37)
- psrld xmm2,WORD_BIT ; xmm2=(51 -- 53 -- 55 -- 57 --)
- pand xmm3,xmm7 ; xmm3=(-- 71 -- 73 -- 75 -- 77)
- por xmm0,xmm1 ; xmm0=(11 31 13 33 15 35 17 37)
- por xmm2,xmm3 ; xmm2=(51 71 53 73 55 75 57 77)
- pmaddwd xmm0,[GOTOFF(ebx,PW_F362_MF127)]
- pmaddwd xmm2,[GOTOFF(ebx,PW_F085_MF072)]
-
- paddd xmm4,xmm5 ; xmm4=tmp0[col0 col1 **** col3]
- paddd xmm0,xmm2 ; xmm0=tmp0[col1 col3 col5 col7]
-
- ; -- Even part
-
- movdqa xmm6, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- pmullw xmm6, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
-
- ; xmm6=(00 01 ** 03 ** 05 ** 07)
-
- movdqa xmm1,xmm6 ; xmm1=(00 01 ** 03 ** 05 ** 07)
- pslld xmm6,WORD_BIT ; xmm6=(-- 00 -- ** -- ** -- **)
- pand xmm1,xmm7 ; xmm1=(-- 01 -- 03 -- 05 -- 07)
- psrad xmm6,(WORD_BIT-CONST_BITS-2) ; xmm6=tmp10[col0 **** **** ****]
- psrad xmm1,(WORD_BIT-CONST_BITS-2) ; xmm1=tmp10[col1 col3 col5 col7]
-
- ; -- Final output stage
-
- movdqa xmm3,xmm6
- movdqa xmm5,xmm1
- paddd xmm6,xmm4 ; xmm6=data0[col0 **** **** ****]=(A0 ** ** **)
- paddd xmm1,xmm0 ; xmm1=data0[col1 col3 col5 col7]=(A1 A3 A5 A7)
- psubd xmm3,xmm4 ; xmm3=data1[col0 **** **** ****]=(B0 ** ** **)
- psubd xmm5,xmm0 ; xmm5=data1[col1 col3 col5 col7]=(B1 B3 B5 B7)
-
- movdqa xmm2,[GOTOFF(ebx,PD_DESCALE_P1_2)] ; xmm2=[PD_DESCALE_P1_2]
-
- punpckldq xmm6,xmm3 ; xmm6=(A0 B0 ** **)
-
- movdqa xmm7,xmm1
- punpcklqdq xmm1,xmm5 ; xmm1=(A1 A3 B1 B3)
- punpckhqdq xmm7,xmm5 ; xmm7=(A5 A7 B5 B7)
-
- paddd xmm6,xmm2
- psrad xmm6,DESCALE_P1_2
-
- paddd xmm1,xmm2
- paddd xmm7,xmm2
- psrad xmm1,DESCALE_P1_2
- psrad xmm7,DESCALE_P1_2
-
- ; -- Prefetch the next coefficient block
-
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 0*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 1*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 2*32]
- prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 3*32]
-
- ; ---- Pass 2: process rows, store into output array.
-
- mov edi, JSAMPARRAY [output_buf(ebp)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(ebp)]
-
- ; | input:| result:|
- ; | A0 B0 | |
- ; | A1 B1 | C0 C1 |
- ; | A3 B3 | D0 D1 |
- ; | A5 B5 | |
- ; | A7 B7 | |
-
- ; -- Odd part
-
- packssdw xmm1,xmm1 ; xmm1=(A1 A3 B1 B3 A1 A3 B1 B3)
- packssdw xmm7,xmm7 ; xmm7=(A5 A7 B5 B7 A5 A7 B5 B7)
- pmaddwd xmm1,[GOTOFF(ebx,PW_F362_MF127)]
- pmaddwd xmm7,[GOTOFF(ebx,PW_F085_MF072)]
-
- paddd xmm1,xmm7 ; xmm1=tmp0[row0 row1 row0 row1]
-
- ; -- Even part
-
- pslld xmm6,(CONST_BITS+2) ; xmm6=tmp10[row0 row1 **** ****]
-
- ; -- Final output stage
-
- movdqa xmm4,xmm6
- paddd xmm6,xmm1 ; xmm6=data0[row0 row1 **** ****]=(C0 C1 ** **)
- psubd xmm4,xmm1 ; xmm4=data1[row0 row1 **** ****]=(D0 D1 ** **)
-
- punpckldq xmm6,xmm4 ; xmm6=(C0 D0 C1 D1)
-
- paddd xmm6,[GOTOFF(ebx,PD_DESCALE_P2_2)]
- psrad xmm6,DESCALE_P2_2
-
- packssdw xmm6,xmm6 ; xmm6=(C0 D0 C1 D1 C0 D0 C1 D1)
- packsswb xmm6,xmm6 ; xmm6=(C0 D0 C1 D1 C0 D0 C1 D1 ..)
- paddb xmm6,[GOTOFF(ebx,PB_CENTERJSAMP)]
-
- pextrw ebx,xmm6,0x00 ; ebx=(C0 D0 -- --)
- pextrw ecx,xmm6,0x01 ; ecx=(C1 D1 -- --)
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov esi, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- mov WORD [edx+eax*SIZEOF_JSAMPLE], bx
- mov WORD [esi+eax*SIZEOF_JSAMPLE], cx
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- pop ebp
- ret
-
-%endif ; JIDCT_INT_SSE2_SUPPORTED
-%endif ; IDCT_SCALING_SUPPORTED
diff --git a/jisseflt.asm b/jisseflt.asm
deleted file mode 100644
index 20eaeeb..0000000
--- a/jisseflt.asm
+++ /dev/null
@@ -1,582 +0,0 @@
-;
-; jisseflt.asm - floating-point IDCT (SSE & MMX)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; This file contains a floating-point implementation of the inverse DCT
-; (Discrete Cosine Transform). The following code is based directly on
-; the IJG's original jidctflt.c; see the jidctflt.c for more details.
-;
-; Last Modified : February 4, 2006
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-%include "jdct.inc"
-
-%ifdef DCT_FLOAT_SUPPORTED
-%ifdef JIDCT_FLT_SSE_MMX_SUPPORTED
-
-; This module is specialized to the case DCTSIZE = 8.
-;
-%if DCTSIZE != 8
-%error "Sorry, this code only copes with 8x8 DCTs."
-%endif
-
-; --------------------------------------------------------------------------
-
-%macro unpcklps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(0 1 4 5)
- shufps %1,%2,0x44
-%endmacro
-
-%macro unpckhps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(2 3 6 7)
- shufps %1,%2,0xEE
-%endmacro
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
- global EXTN(jconst_idct_float_sse)
-
-EXTN(jconst_idct_float_sse):
-
-PD_1_414 times 4 dd 1.414213562373095048801689
-PD_1_847 times 4 dd 1.847759065022573512256366
-PD_1_082 times 4 dd 1.082392200292393968799446
-PD_M2_613 times 4 dd -2.613125929752753055713286
-PD_0_125 times 4 dd 0.125 ; 1/8
-PB_CENTERJSAMP times 8 db CENTERJSAMPLE
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Perform dequantization and inverse DCT on one block of coefficients.
-;
-; GLOBAL(void)
-; jpeg_idct_float_sse (j_decompress_ptr cinfo, jpeg_component_info * compptr,
-; JCOEFPTR coef_block,
-; JSAMPARRAY output_buf, JDIMENSION output_col)
-;
-
-%define cinfo(b) (b)+8 ; j_decompress_ptr cinfo
-%define compptr(b) (b)+12 ; jpeg_component_info * compptr
-%define coef_block(b) (b)+16 ; JCOEFPTR coef_block
-%define output_buf(b) (b)+20 ; JSAMPARRAY output_buf
-%define output_col(b) (b)+24 ; JDIMENSION output_col
-
-%define original_ebp ebp+0
-%define wk(i) ebp-(WK_NUM-(i))*SIZEOF_XMMWORD ; xmmword wk[WK_NUM]
-%define WK_NUM 2
-%define workspace wk(0)-DCTSIZE2*SIZEOF_FAST_FLOAT
- ; FAST_FLOAT workspace[DCTSIZE2]
-
- align 16
- global EXTN(jpeg_idct_float_sse)
-
-EXTN(jpeg_idct_float_sse):
- push ebp
- mov eax,esp ; eax = original ebp
- sub esp, byte 4
- and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
- mov [esp],eax
- mov ebp,esp ; ebp = aligned ebp
- lea esp, [workspace]
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
- push esi
- push edi
-
- get_GOT ebx ; get GOT address
-
- ; ---- Pass 1: process columns from input, store into work array.
-
-; mov eax, [original_ebp]
- mov edx, POINTER [compptr(eax)]
- mov edx, POINTER [jcompinfo_dct_table(edx)] ; quantptr
- mov esi, JCOEFPTR [coef_block(eax)] ; inptr
- lea edi, [workspace] ; FAST_FLOAT * wsptr
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.columnloop:
-%ifndef NO_ZERO_COLUMN_TEST_FLOAT_SSE
- mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
- or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
- jnz near .columnDCT
-
- movq mm0, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- por mm1, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- por mm1, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
- por mm0, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
- por mm1,mm0
- packsswb mm1,mm1
- movd eax,mm1
- test eax,eax
- jnz short .columnDCT
-
- ; -- AC terms all zero
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
-
- punpckhwd mm1,mm0 ; mm1=(** 02 ** 03)
- punpcklwd mm0,mm0 ; mm0=(00 00 01 01)
- psrad mm1,(DWORD_BIT-WORD_BIT) ; mm1=in0H=(02 03)
- psrad mm0,(DWORD_BIT-WORD_BIT) ; mm0=in0L=(00 01)
- cvtpi2ps xmm3,mm1 ; xmm3=(02 03 ** **)
- cvtpi2ps xmm0,mm0 ; xmm0=(00 01 ** **)
- movlhps xmm0,xmm3 ; xmm0=in0=(00 01 02 03)
-
- mulps xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movaps xmm1,xmm0
- movaps xmm2,xmm0
- movaps xmm3,xmm0
-
- shufps xmm0,xmm0,0x00 ; xmm0=(00 00 00 00)
- shufps xmm1,xmm1,0x55 ; xmm1=(01 01 01 01)
- shufps xmm2,xmm2,0xAA ; xmm2=(02 02 02 02)
- shufps xmm3,xmm3,0xFF ; xmm3=(03 03 03 03)
-
- movaps XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], xmm0
- movaps XMMWORD [XMMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], xmm0
- movaps XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], xmm1
- movaps XMMWORD [XMMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], xmm1
- movaps XMMWORD [XMMBLOCK(2,0,edi,SIZEOF_FAST_FLOAT)], xmm2
- movaps XMMWORD [XMMBLOCK(2,1,edi,SIZEOF_FAST_FLOAT)], xmm2
- movaps XMMWORD [XMMBLOCK(3,0,edi,SIZEOF_FAST_FLOAT)], xmm3
- movaps XMMWORD [XMMBLOCK(3,1,edi,SIZEOF_FAST_FLOAT)], xmm3
- jmp near .nextcolumn
- alignx 16,7
-%endif
-.columnDCT:
-
- ; -- Even part
-
- movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)]
- movq mm2, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)]
- movq mm3, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)]
-
- punpckhwd mm4,mm0 ; mm4=(** 02 ** 03)
- punpcklwd mm0,mm0 ; mm0=(00 00 01 01)
- punpckhwd mm5,mm1 ; mm5=(** 22 ** 23)
- punpcklwd mm1,mm1 ; mm1=(20 20 21 21)
-
- psrad mm4,(DWORD_BIT-WORD_BIT) ; mm4=in0H=(02 03)
- psrad mm0,(DWORD_BIT-WORD_BIT) ; mm0=in0L=(00 01)
- cvtpi2ps xmm4,mm4 ; xmm4=(02 03 ** **)
- cvtpi2ps xmm0,mm0 ; xmm0=(00 01 ** **)
- psrad mm5,(DWORD_BIT-WORD_BIT) ; mm5=in2H=(22 23)
- psrad mm1,(DWORD_BIT-WORD_BIT) ; mm1=in2L=(20 21)
- cvtpi2ps xmm5,mm5 ; xmm5=(22 23 ** **)
- cvtpi2ps xmm1,mm1 ; xmm1=(20 21 ** **)
-
- punpckhwd mm6,mm2 ; mm6=(** 42 ** 43)
- punpcklwd mm2,mm2 ; mm2=(40 40 41 41)
- punpckhwd mm7,mm3 ; mm7=(** 62 ** 63)
- punpcklwd mm3,mm3 ; mm3=(60 60 61 61)
-
- psrad mm6,(DWORD_BIT-WORD_BIT) ; mm6=in4H=(42 43)
- psrad mm2,(DWORD_BIT-WORD_BIT) ; mm2=in4L=(40 41)
- cvtpi2ps xmm6,mm6 ; xmm6=(42 43 ** **)
- cvtpi2ps xmm2,mm2 ; xmm2=(40 41 ** **)
- psrad mm7,(DWORD_BIT-WORD_BIT) ; mm7=in6H=(62 63)
- psrad mm3,(DWORD_BIT-WORD_BIT) ; mm3=in6L=(60 61)
- cvtpi2ps xmm7,mm7 ; xmm7=(62 63 ** **)
- cvtpi2ps xmm3,mm3 ; xmm3=(60 61 ** **)
-
- movlhps xmm0,xmm4 ; xmm0=in0=(00 01 02 03)
- movlhps xmm1,xmm5 ; xmm1=in2=(20 21 22 23)
- mulps xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm1, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movlhps xmm2,xmm6 ; xmm2=in4=(40 41 42 43)
- movlhps xmm3,xmm7 ; xmm3=in6=(60 61 62 63)
- mulps xmm2, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm3, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movaps xmm4,xmm0
- movaps xmm5,xmm1
- subps xmm0,xmm2 ; xmm0=tmp11
- subps xmm1,xmm3
- addps xmm4,xmm2 ; xmm4=tmp10
- addps xmm5,xmm3 ; xmm5=tmp13
-
- mulps xmm1,[GOTOFF(ebx,PD_1_414)]
- subps xmm1,xmm5 ; xmm1=tmp12
-
- movaps xmm6,xmm4
- movaps xmm7,xmm0
- subps xmm4,xmm5 ; xmm4=tmp3
- subps xmm0,xmm1 ; xmm0=tmp2
- addps xmm6,xmm5 ; xmm6=tmp0
- addps xmm7,xmm1 ; xmm7=tmp1
-
- movaps XMMWORD [wk(1)], xmm4 ; tmp3
- movaps XMMWORD [wk(0)], xmm0 ; tmp2
-
- ; -- Odd part
-
- movq mm4, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)]
- movq mm0, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)]
- movq mm5, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)]
- movq mm1, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)]
-
- punpckhwd mm6,mm4 ; mm6=(** 12 ** 13)
- punpcklwd mm4,mm4 ; mm4=(10 10 11 11)
- punpckhwd mm2,mm0 ; mm2=(** 32 ** 33)
- punpcklwd mm0,mm0 ; mm0=(30 30 31 31)
-
- psrad mm6,(DWORD_BIT-WORD_BIT) ; mm6=in1H=(12 13)
- psrad mm4,(DWORD_BIT-WORD_BIT) ; mm4=in1L=(10 11)
- cvtpi2ps xmm4,mm6 ; xmm4=(12 13 ** **)
- cvtpi2ps xmm2,mm4 ; xmm2=(10 11 ** **)
- psrad mm2,(DWORD_BIT-WORD_BIT) ; mm2=in3H=(32 33)
- psrad mm0,(DWORD_BIT-WORD_BIT) ; mm0=in3L=(30 31)
- cvtpi2ps xmm0,mm2 ; xmm0=(32 33 ** **)
- cvtpi2ps xmm3,mm0 ; xmm3=(30 31 ** **)
-
- punpckhwd mm7,mm5 ; mm7=(** 52 ** 53)
- punpcklwd mm5,mm5 ; mm5=(50 50 51 51)
- punpckhwd mm3,mm1 ; mm3=(** 72 ** 73)
- punpcklwd mm1,mm1 ; mm1=(70 70 71 71)
-
- movlhps xmm2,xmm4 ; xmm2=in1=(10 11 12 13)
- movlhps xmm3,xmm0 ; xmm3=in3=(30 31 32 33)
-
- psrad mm7,(DWORD_BIT-WORD_BIT) ; mm7=in5H=(52 53)
- psrad mm5,(DWORD_BIT-WORD_BIT) ; mm5=in5L=(50 51)
- cvtpi2ps xmm4,mm7 ; xmm4=(52 53 ** **)
- cvtpi2ps xmm5,mm5 ; xmm5=(50 51 ** **)
- psrad mm3,(DWORD_BIT-WORD_BIT) ; mm3=in7H=(72 73)
- psrad mm1,(DWORD_BIT-WORD_BIT) ; mm1=in7L=(70 71)
- cvtpi2ps xmm0,mm3 ; xmm0=(72 73 ** **)
- cvtpi2ps xmm1,mm1 ; xmm1=(70 71 ** **)
-
- mulps xmm2, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm3, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movlhps xmm5,xmm4 ; xmm5=in5=(50 51 52 53)
- movlhps xmm1,xmm0 ; xmm1=in7=(70 71 72 73)
- mulps xmm5, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
- mulps xmm1, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_FLOAT_MULT_TYPE)]
-
- movaps xmm4,xmm2
- movaps xmm0,xmm5
- addps xmm2,xmm1 ; xmm2=z11
- addps xmm5,xmm3 ; xmm5=z13
- subps xmm4,xmm1 ; xmm4=z12
- subps xmm0,xmm3 ; xmm0=z10
-
- movaps xmm1,xmm2
- subps xmm2,xmm5
- addps xmm1,xmm5 ; xmm1=tmp7
-
- mulps xmm2,[GOTOFF(ebx,PD_1_414)] ; xmm2=tmp11
-
- movaps xmm3,xmm0
- addps xmm0,xmm4
- mulps xmm0,[GOTOFF(ebx,PD_1_847)] ; xmm0=z5
- mulps xmm3,[GOTOFF(ebx,PD_M2_613)] ; xmm3=(z10 * -2.613125930)
- mulps xmm4,[GOTOFF(ebx,PD_1_082)] ; xmm4=(z12 * 1.082392200)
- addps xmm3,xmm0 ; xmm3=tmp12
- subps xmm4,xmm0 ; xmm4=tmp10
-
- ; -- Final output stage
-
- subps xmm3,xmm1 ; xmm3=tmp6
- movaps xmm5,xmm6
- movaps xmm0,xmm7
- addps xmm6,xmm1 ; xmm6=data0=(00 01 02 03)
- addps xmm7,xmm3 ; xmm7=data1=(10 11 12 13)
- subps xmm5,xmm1 ; xmm5=data7=(70 71 72 73)
- subps xmm0,xmm3 ; xmm0=data6=(60 61 62 63)
- subps xmm2,xmm3 ; xmm2=tmp5
-
- movaps xmm1,xmm6 ; transpose coefficients(phase 1)
- unpcklps xmm6,xmm7 ; xmm6=(00 10 01 11)
- unpckhps xmm1,xmm7 ; xmm1=(02 12 03 13)
- movaps xmm3,xmm0 ; transpose coefficients(phase 1)
- unpcklps xmm0,xmm5 ; xmm0=(60 70 61 71)
- unpckhps xmm3,xmm5 ; xmm3=(62 72 63 73)
-
- movaps xmm7, XMMWORD [wk(0)] ; xmm7=tmp2
- movaps xmm5, XMMWORD [wk(1)] ; xmm5=tmp3
-
- movaps XMMWORD [wk(0)], xmm0 ; wk(0)=(60 70 61 71)
- movaps XMMWORD [wk(1)], xmm3 ; wk(1)=(62 72 63 73)
-
- addps xmm4,xmm2 ; xmm4=tmp4
- movaps xmm0,xmm7
- movaps xmm3,xmm5
- addps xmm7,xmm2 ; xmm7=data2=(20 21 22 23)
- addps xmm5,xmm4 ; xmm5=data4=(40 41 42 43)
- subps xmm0,xmm2 ; xmm0=data5=(50 51 52 53)
- subps xmm3,xmm4 ; xmm3=data3=(30 31 32 33)
-
- movaps xmm2,xmm7 ; transpose coefficients(phase 1)
- unpcklps xmm7,xmm3 ; xmm7=(20 30 21 31)
- unpckhps xmm2,xmm3 ; xmm2=(22 32 23 33)
- movaps xmm4,xmm5 ; transpose coefficients(phase 1)
- unpcklps xmm5,xmm0 ; xmm5=(40 50 41 51)
- unpckhps xmm4,xmm0 ; xmm4=(42 52 43 53)
-
- movaps xmm3,xmm6 ; transpose coefficients(phase 2)
- unpcklps2 xmm6,xmm7 ; xmm6=(00 10 20 30)
- unpckhps2 xmm3,xmm7 ; xmm3=(01 11 21 31)
- movaps xmm0,xmm1 ; transpose coefficients(phase 2)
- unpcklps2 xmm1,xmm2 ; xmm1=(02 12 22 32)
- unpckhps2 xmm0,xmm2 ; xmm0=(03 13 23 33)
-
- movaps xmm7, XMMWORD [wk(0)] ; xmm7=(60 70 61 71)
- movaps xmm2, XMMWORD [wk(1)] ; xmm2=(62 72 63 73)
-
- movaps XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], xmm6
- movaps XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], xmm3
- movaps XMMWORD [XMMBLOCK(2,0,edi,SIZEOF_FAST_FLOAT)], xmm1
- movaps XMMWORD [XMMBLOCK(3,0,edi,SIZEOF_FAST_FLOAT)], xmm0
-
- movaps xmm6,xmm5 ; transpose coefficients(phase 2)
- unpcklps2 xmm5,xmm7 ; xmm5=(40 50 60 70)
- unpckhps2 xmm6,xmm7 ; xmm6=(41 51 61 71)
- movaps xmm3,xmm4 ; transpose coefficients(phase 2)
- unpcklps2 xmm4,xmm2 ; xmm4=(42 52 62 72)
- unpckhps2 xmm3,xmm2 ; xmm3=(43 53 63 73)
-
- movaps XMMWORD [XMMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], xmm5
- movaps XMMWORD [XMMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], xmm6
- movaps XMMWORD [XMMBLOCK(2,1,edi,SIZEOF_FAST_FLOAT)], xmm4
- movaps XMMWORD [XMMBLOCK(3,1,edi,SIZEOF_FAST_FLOAT)], xmm3
-
-.nextcolumn:
- add esi, byte 4*SIZEOF_JCOEF ; coef_block
- add edx, byte 4*SIZEOF_FLOAT_MULT_TYPE ; quantptr
- add edi, 4*DCTSIZE*SIZEOF_FAST_FLOAT ; wsptr
- dec ecx ; ctr
- jnz near .columnloop
-
- ; -- Prefetch the next coefficient block
-
- prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 0*32]
- prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 1*32]
- prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 2*32]
- prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 3*32]
-
- ; ---- Pass 2: process rows from work array, store into output array.
-
- mov eax, [original_ebp]
- lea esi, [workspace] ; FAST_FLOAT * wsptr
- mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
- mov eax, JDIMENSION [output_col(eax)]
- mov ecx, DCTSIZE/4 ; ctr
- alignx 16,7
-.rowloop:
-
- ; -- Even part
-
- movaps xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm2, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_FAST_FLOAT)]
-
- movaps xmm4,xmm0
- movaps xmm5,xmm1
- subps xmm0,xmm2 ; xmm0=tmp11
- subps xmm1,xmm3
- addps xmm4,xmm2 ; xmm4=tmp10
- addps xmm5,xmm3 ; xmm5=tmp13
-
- mulps xmm1,[GOTOFF(ebx,PD_1_414)]
- subps xmm1,xmm5 ; xmm1=tmp12
-
- movaps xmm6,xmm4
- movaps xmm7,xmm0
- subps xmm4,xmm5 ; xmm4=tmp3
- subps xmm0,xmm1 ; xmm0=tmp2
- addps xmm6,xmm5 ; xmm6=tmp0
- addps xmm7,xmm1 ; xmm7=tmp1
-
- movaps XMMWORD [wk(1)], xmm4 ; tmp3
- movaps XMMWORD [wk(0)], xmm0 ; tmp2
-
- ; -- Odd part
-
- movaps xmm2, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm3, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm5, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_FAST_FLOAT)]
- movaps xmm1, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_FAST_FLOAT)]
-
- movaps xmm4,xmm2
- movaps xmm0,xmm5
- addps xmm2,xmm1 ; xmm2=z11
- addps xmm5,xmm3 ; xmm5=z13
- subps xmm4,xmm1 ; xmm4=z12
- subps xmm0,xmm3 ; xmm0=z10
-
- movaps xmm1,xmm2
- subps xmm2,xmm5
- addps xmm1,xmm5 ; xmm1=tmp7
-
- mulps xmm2,[GOTOFF(ebx,PD_1_414)] ; xmm2=tmp11
-
- movaps xmm3,xmm0
- addps xmm0,xmm4
- mulps xmm0,[GOTOFF(ebx,PD_1_847)] ; xmm0=z5
- mulps xmm3,[GOTOFF(ebx,PD_M2_613)] ; xmm3=(z10 * -2.613125930)
- mulps xmm4,[GOTOFF(ebx,PD_1_082)] ; xmm4=(z12 * 1.082392200)
- addps xmm3,xmm0 ; xmm3=tmp12
- subps xmm4,xmm0 ; xmm4=tmp10
-
- ; -- Final output stage
-
- subps xmm3,xmm1 ; xmm3=tmp6
- movaps xmm5,xmm6
- movaps xmm0,xmm7
- addps xmm6,xmm1 ; xmm6=data0=(00 10 20 30)
- addps xmm7,xmm3 ; xmm7=data1=(01 11 21 31)
- subps xmm5,xmm1 ; xmm5=data7=(07 17 27 37)
- subps xmm0,xmm3 ; xmm0=data6=(06 16 26 36)
- subps xmm2,xmm3 ; xmm2=tmp5
-
- movaps xmm1,[GOTOFF(ebx,PD_0_125)] ; xmm1=[PD_0_125]
-
- mulps xmm6,xmm1 ; descale(1/8)
- mulps xmm7,xmm1 ; descale(1/8)
- mulps xmm5,xmm1 ; descale(1/8)
- mulps xmm0,xmm1 ; descale(1/8)
-
- movhlps xmm3,xmm6
- movhlps xmm1,xmm7
- cvtps2pi mm0,xmm6 ; round to int32, mm0=data0L=(00 10)
- cvtps2pi mm1,xmm7 ; round to int32, mm1=data1L=(01 11)
- cvtps2pi mm2,xmm3 ; round to int32, mm2=data0H=(20 30)
- cvtps2pi mm3,xmm1 ; round to int32, mm3=data1H=(21 31)
- packssdw mm0,mm2 ; mm0=data0=(00 10 20 30)
- packssdw mm1,mm3 ; mm1=data1=(01 11 21 31)
-
- movhlps xmm6,xmm5
- movhlps xmm7,xmm0
- cvtps2pi mm4,xmm5 ; round to int32, mm4=data7L=(07 17)
- cvtps2pi mm5,xmm0 ; round to int32, mm5=data6L=(06 16)
- cvtps2pi mm6,xmm6 ; round to int32, mm6=data7H=(27 37)
- cvtps2pi mm7,xmm7 ; round to int32, mm7=data6H=(26 36)
- packssdw mm4,mm6 ; mm4=data7=(07 17 27 37)
- packssdw mm5,mm7 ; mm5=data6=(06 16 26 36)
-
- packsswb mm0,mm5 ; mm0=(00 10 20 30 06 16 26 36)
- packsswb mm1,mm4 ; mm1=(01 11 21 31 07 17 27 37)
-
- movaps xmm3, XMMWORD [wk(0)] ; xmm3=tmp2
- movaps xmm1, XMMWORD [wk(1)] ; xmm1=tmp3
-
- movaps xmm6,[GOTOFF(ebx,PD_0_125)] ; xmm6=[PD_0_125]
-
- addps xmm4,xmm2 ; xmm4=tmp4
- movaps xmm5,xmm3
- movaps xmm0,xmm1
- addps xmm3,xmm2 ; xmm3=data2=(02 12 22 32)
- addps xmm1,xmm4 ; xmm1=data4=(04 14 24 34)
- subps xmm5,xmm2 ; xmm5=data5=(05 15 25 35)
- subps xmm0,xmm4 ; xmm0=data3=(03 13 23 33)
-
- mulps xmm3,xmm6 ; descale(1/8)
- mulps xmm1,xmm6 ; descale(1/8)
- mulps xmm5,xmm6 ; descale(1/8)
- mulps xmm0,xmm6 ; descale(1/8)
-
- movhlps xmm7,xmm3
- movhlps xmm2,xmm1
- cvtps2pi mm2,xmm3 ; round to int32, mm2=data2L=(02 12)
- cvtps2pi mm3,xmm1 ; round to int32, mm3=data4L=(04 14)
- cvtps2pi mm6,xmm7 ; round to int32, mm6=data2H=(22 32)
- cvtps2pi mm7,xmm2 ; round to int32, mm7=data4H=(24 34)
- packssdw mm2,mm6 ; mm2=data2=(02 12 22 32)
- packssdw mm3,mm7 ; mm3=data4=(04 14 24 34)
-
- movhlps xmm4,xmm5
- movhlps xmm6,xmm0
- cvtps2pi mm5,xmm5 ; round to int32, mm5=data5L=(05 15)
- cvtps2pi mm4,xmm0 ; round to int32, mm4=data3L=(03 13)
- cvtps2pi mm6,xmm4 ; round to int32, mm6=data5H=(25 35)
- cvtps2pi mm7,xmm6 ; round to int32, mm7=data3H=(23 33)
- packssdw mm5,mm6 ; mm5=data5=(05 15 25 35)
- packssdw mm4,mm7 ; mm4=data3=(03 13 23 33)
-
- movq mm6,[GOTOFF(ebx,PB_CENTERJSAMP)] ; mm6=[PB_CENTERJSAMP]
-
- packsswb mm2,mm3 ; mm2=(02 12 22 32 04 14 24 34)
- packsswb mm4,mm5 ; mm4=(03 13 23 33 05 15 25 35)
-
- paddb mm0,mm6
- paddb mm1,mm6
- paddb mm2,mm6
- paddb mm4,mm6
-
- movq mm7,mm0 ; transpose coefficients(phase 1)
- punpcklbw mm0,mm1 ; mm0=(00 01 10 11 20 21 30 31)
- punpckhbw mm7,mm1 ; mm7=(06 07 16 17 26 27 36 37)
- movq mm3,mm2 ; transpose coefficients(phase 1)
- punpcklbw mm2,mm4 ; mm2=(02 03 12 13 22 23 32 33)
- punpckhbw mm3,mm4 ; mm3=(04 05 14 15 24 25 34 35)
-
- movq mm5,mm0 ; transpose coefficients(phase 2)
- punpcklwd mm0,mm2 ; mm0=(00 01 02 03 10 11 12 13)
- punpckhwd mm5,mm2 ; mm5=(20 21 22 23 30 31 32 33)
- movq mm6,mm3 ; transpose coefficients(phase 2)
- punpcklwd mm3,mm7 ; mm3=(04 05 06 07 14 15 16 17)
- punpckhwd mm6,mm7 ; mm6=(24 25 26 27 34 35 36 37)
-
- movq mm1,mm0 ; transpose coefficients(phase 3)
- punpckldq mm0,mm3 ; mm0=(00 01 02 03 04 05 06 07)
- punpckhdq mm1,mm3 ; mm1=(10 11 12 13 14 15 16 17)
- movq mm4,mm5 ; transpose coefficients(phase 3)
- punpckldq mm5,mm6 ; mm5=(20 21 22 23 24 25 26 27)
- punpckhdq mm4,mm6 ; mm4=(30 31 32 33 34 35 36 37)
-
- pushpic ebx ; save GOT address
-
- mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
- movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm0
- movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm1
- mov edx, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
- mov ebx, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
- movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm5
- movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm4
-
- poppic ebx ; restore GOT address
-
- add esi, byte 4*SIZEOF_FAST_FLOAT ; wsptr
- add edi, byte 4*SIZEOF_JSAMPROW
- dec ecx ; ctr
- jnz near .rowloop
-
- emms ; empty MMX state
-
- pop edi
- pop esi
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- mov esp,ebp ; esp <- aligned ebp
- pop esp ; esp <- original ebp
- pop ebp
- ret
-
-%endif ; JIDCT_FLT_SSE_MMX_SUPPORTED
-%endif ; DCT_FLOAT_SUPPORTED
diff --git a/jmemansi.c b/jmemansi.c
deleted file mode 100644
index 2d93e49..0000000
--- a/jmemansi.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * jmemansi.c
- *
- * Copyright (C) 1992-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file provides a simple generic implementation of the system-
- * dependent portion of the JPEG memory manager. This implementation
- * assumes that you have the ANSI-standard library routine tmpfile().
- * Also, the problem of determining the amount of memory available
- * is shoved onto the user.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h" /* import the system-dependent declarations */
-
-#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
-#endif
-
-#ifndef SEEK_SET /* pre-ANSI systems may not define this; */
-#define SEEK_SET 0 /* if not, assume 0 is correct */
-#endif
-
-
-/*
- * Memory allocation and freeing are controlled by the regular library
- * routines malloc() and free().
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
- return (void *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
- free(object);
-}
-
-
-/*
- * "Large" objects are treated the same as "small" ones.
- * NB: although we include FAR keywords in the routine declarations,
- * this file won't actually work in 80x86 small/medium model; at least,
- * you probably won't be able to process useful-size images in only 64KB.
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
- return (void FAR *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
- free(object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- * It's impossible to do this in a portable way; our current solution is
- * to make the user tell us (with a default value set at compile time).
- * If you can actually get the available space, it's a good idea to subtract
- * a slop factor of 5% or so.
- */
-
-#ifndef DEFAULT_MAX_MEM /* so can override from makefile */
-#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */
-#endif
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
- long max_bytes_needed, long already_allocated)
-{
- return cinfo->mem->max_memory_to_use - already_allocated;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Backing store objects are only used when the value returned by
- * jpeg_mem_available is less than the total space needed. You can dispense
- * with these routines if you have plenty of virtual memory; see jmemnobs.c.
- */
-
-
-METHODDEF(void)
-read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- if (fseek(info->temp_file, file_offset, SEEK_SET))
- ERREXIT(cinfo, JERR_TFILE_SEEK);
- if (JFREAD(info->temp_file, buffer_address, byte_count)
- != (size_t) byte_count)
- ERREXIT(cinfo, JERR_TFILE_READ);
-}
-
-
-METHODDEF(void)
-write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- if (fseek(info->temp_file, file_offset, SEEK_SET))
- ERREXIT(cinfo, JERR_TFILE_SEEK);
- if (JFWRITE(info->temp_file, buffer_address, byte_count)
- != (size_t) byte_count)
- ERREXIT(cinfo, JERR_TFILE_WRITE);
-}
-
-
-METHODDEF(void)
-close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
-{
- fclose(info->temp_file);
- /* Since this implementation uses tmpfile() to create the file,
- * no explicit file deletion is needed.
- */
-}
-
-
-/*
- * Initial opening of a backing-store object.
- *
- * This version uses tmpfile(), which constructs a suitable file name
- * behind the scenes. We don't have to use info->temp_name[] at all;
- * indeed, we can't even find out the actual name of the temp file.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- long total_bytes_needed)
-{
- if ((info->temp_file = tmpfile()) == NULL)
- ERREXITS(cinfo, JERR_TFILE_CREATE, "");
- info->read_backing_store = read_backing_store;
- info->write_backing_store = write_backing_store;
- info->close_backing_store = close_backing_store;
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
- /* no work */
-}
diff --git a/jmemmgr.c b/jmemmgr.c
index e3149e5..5b33567 100644
--- a/jmemmgr.c
+++ b/jmemmgr.c
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : January 27, 2004
- * ---------------------------------------------------------------------
- *
* This file contains the JPEG system-independent memory management
* routines. This code is usable across a wide variety of machines; most
* of the system dependencies have been isolated in a separate file.
@@ -58,13 +51,27 @@
/*
- * SIMD Ext: Most of SSE/SSE2 instructions require that the memory address
- * is aligned to a 16-byte boundary; if not, a general-protection exception
- * (#GP) is generated.
+ * Many machines require storage alignment: longs must start on 4-byte
+ * boundaries, doubles on 8-byte boundaries, etc. On such machines, malloc()
+ * always returns pointers that are multiples of the worst-case alignment
+ * requirement, and we had better do so too.
+ * There isn't any really portable way to determine the worst-case alignment
+ * requirement. This module assumes that the alignment requirement is
+ * multiples of ALIGN_SIZE.
+ * By default, we define ALIGN_SIZE as sizeof(double). This is necessary on some
+ * workstations (where doubles really do need 8-byte alignment) and will work
+ * fine on nearly everything. If your machine has lesser alignment needs,
+ * you can save a few bytes by making ALIGN_SIZE smaller.
+ * The only place I know of where this will NOT work is certain Macintosh
+ * 680x0 compilers that define double as a 10-byte IEEE extended float.
+ * Doing 10-byte alignment is counterproductive because longwords won't be
+ * aligned well. Put "#define ALIGN_SIZE 4" in jconfig.h if you have
+ * such a compiler.
*/
-#define ALIGN_SIZE 16 /* sizeof SSE/SSE2 register */
-
+#ifndef ALIGN_SIZE /* so can override from jconfig.h */
+#define ALIGN_SIZE SIZEOF(double)
+#endif
/*
* We allocate objects from "pools", where each pool is gotten with a single
@@ -78,22 +85,19 @@
typedef struct small_pool_struct * small_pool_ptr;
typedef struct small_pool_struct {
- small_pool_ptr next; /* next in list of pools */
+ small_pool_ptr next; /* next in list of pools */
size_t bytes_used; /* how many bytes already used within pool */
size_t bytes_left; /* bytes still available in this pool */
- char dummy[ALIGN_SIZE-1];
} small_pool_hdr;
typedef struct large_pool_struct FAR * large_pool_ptr;
typedef struct large_pool_struct {
- large_pool_ptr next; /* next in list of pools */
+ large_pool_ptr next; /* next in list of pools */
size_t bytes_used; /* how many bytes already used within pool */
size_t bytes_left; /* bytes still available in this pool */
- char dummy[ALIGN_SIZE-1];
} large_pool_hdr;
-
/*
* Here is the full definition of a memory manager object.
*/
@@ -221,6 +225,10 @@
* and we also distinguish the first pool of a class from later ones.
* NOTE: the values given work fairly well on both 16- and 32-bit-int
* machines, but may be too small if longs are 64 bits or more.
+ *
+ * Since we do not know what alignment malloc() gives us, we have to
+ * allocate ALIGN_SIZE-1 extra space per pool to have room for alignment
+ * adjustment.
*/
static const size_t first_pool_slop[JPOOL_NUMPOOLS] =
@@ -245,17 +253,20 @@
my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
small_pool_ptr hdr_ptr, prev_hdr_ptr;
char * data_ptr;
- size_t odd_bytes, min_request, slop;
+ size_t min_request, slop;
+
+ /*
+ * Round up the requested size to a multiple of ALIGN_SIZE in order
+ * to assure alignment for the next object allocated in the same pool
+ * and so that algorithms can straddle outside the proper area up
+ * to the next alignment.
+ */
+ sizeofobject = jround_up(sizeofobject, ALIGN_SIZE);
/* Check for unsatisfiable request (do now to ensure no overflow below) */
- if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(small_pool_hdr)))
+ if ((SIZEOF(small_pool_hdr) + sizeofobject + ALIGN_SIZE - 1) > MAX_ALLOC_CHUNK)
out_of_memory(cinfo, 1); /* request exceeds malloc's ability */
- /* Round up the requested size to a multiple of ALIGN_SIZE */
- odd_bytes = sizeofobject % ALIGN_SIZE;
- if (odd_bytes > 0)
- sizeofobject += ALIGN_SIZE - odd_bytes;
-
/* See if space is available in any existing pool */
if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)
ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */
@@ -271,7 +282,7 @@
/* Time to make a new pool? */
if (hdr_ptr == NULL) {
/* min_request is what we need now, slop is what will be leftover */
- min_request = sizeofobject + SIZEOF(small_pool_hdr);
+ min_request = SIZEOF(small_pool_hdr) + sizeofobject + ALIGN_SIZE - 1;
if (prev_hdr_ptr == NULL) /* first pool in class? */
slop = first_pool_slop[pool_id];
else
@@ -300,7 +311,10 @@
}
/* OK, allocate the object from the current pool */
- data_ptr = (char *) ((size_t) (hdr_ptr + 1) & -ALIGN_SIZE);
+ data_ptr = (char *) hdr_ptr; /* point to first data byte in pool... */
+ data_ptr += SIZEOF(small_pool_hdr); /* ...by skipping the header... */
+ if ((unsigned long)data_ptr % ALIGN_SIZE) /* ...and adjust for alignment */
+ data_ptr += ALIGN_SIZE - (unsigned long)data_ptr % ALIGN_SIZE;
data_ptr += hdr_ptr->bytes_used; /* point to place for object */
hdr_ptr->bytes_used += sizeofobject;
hdr_ptr->bytes_left -= sizeofobject;
@@ -329,26 +343,29 @@
{
my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
large_pool_ptr hdr_ptr;
- size_t odd_bytes;
+ char FAR * data_ptr;
+
+ /*
+ * Round up the requested size to a multiple of ALIGN_SIZE so that
+ * algorithms can straddle outside the proper area up to the next
+ * alignment.
+ */
+ sizeofobject = jround_up(sizeofobject, ALIGN_SIZE);
/* Check for unsatisfiable request (do now to ensure no overflow below) */
- if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)))
+ if ((SIZEOF(large_pool_hdr) + sizeofobject + ALIGN_SIZE - 1) > MAX_ALLOC_CHUNK)
out_of_memory(cinfo, 3); /* request exceeds malloc's ability */
- /* Round up the requested size to a multiple of ALIGN_SIZE */
- odd_bytes = sizeofobject % ALIGN_SIZE;
- if (odd_bytes > 0)
- sizeofobject += ALIGN_SIZE - odd_bytes;
-
/* Always make a new pool */
if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS)
ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */
hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject +
- SIZEOF(large_pool_hdr));
+ SIZEOF(large_pool_hdr) +
+ ALIGN_SIZE - 1);
if (hdr_ptr == NULL)
out_of_memory(cinfo, 4); /* jpeg_get_large failed */
- mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr);
+ mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr) + ALIGN_SIZE - 1;
/* Success, initialize the new pool header and add to list */
hdr_ptr->next = mem->large_list[pool_id];
@@ -359,7 +376,12 @@
hdr_ptr->bytes_left = 0;
mem->large_list[pool_id] = hdr_ptr;
- return (void FAR *) ((size_t) (hdr_ptr + 1) & -ALIGN_SIZE);
+ data_ptr = (char *) hdr_ptr; /* point to first data byte in pool... */
+ data_ptr += SIZEOF(small_pool_hdr); /* ...by skipping the header... */
+ if ((unsigned long)data_ptr % ALIGN_SIZE) /* ...and adjust for alignment */
+ data_ptr += ALIGN_SIZE - (unsigned long)data_ptr % ALIGN_SIZE;
+
+ return (void FAR *) data_ptr;
}
@@ -374,6 +396,10 @@
* this chunking of rows. The rowsperchunk value is left in the mem manager
* object so that it can be saved away if this sarray is the workspace for
* a virtual array.
+ *
+ * Since we are often upsampling with a factor 2, we align the size (not
+ * the start) to 2 * ALIGN_SIZE so that the upsampling routines don't have
+ * to be as careful about size.
*/
METHODDEF(JSAMPARRAY)
@@ -386,12 +412,11 @@
JSAMPROW workspace;
JDIMENSION rowsperchunk, currow, i;
long ltemp;
- JDIMENSION odd_samples;
- /* Round up the row bytes to a multiple of ALIGN_SIZE */
- odd_samples = samplesperrow % (ALIGN_SIZE / SIZEOF(JSAMPLE));
- if (odd_samples > 0)
- samplesperrow += (ALIGN_SIZE / SIZEOF(JSAMPLE)) - odd_samples;
+ /* Make sure each row is properly aligned */
+ if ((ALIGN_SIZE % SIZEOF(JSAMPLE)) != 0)
+ out_of_memory(cinfo, 5); /* safety check */
+ samplesperrow = jround_up(samplesperrow, (2 * ALIGN_SIZE) / SIZEOF(JSAMPLE));
/* Calculate max # of rows allowed in one allocation chunk */
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
@@ -441,6 +466,10 @@
JDIMENSION rowsperchunk, currow, i;
long ltemp;
+ /* Make sure each row is properly aligned */
+ if ((SIZEOF(JBLOCK) % ALIGN_SIZE) != 0)
+ out_of_memory(cinfo, 6); /* safety check */
+
/* Calculate max # of rows allowed in one allocation chunk */
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
((long) blocksperrow * SIZEOF(JBLOCK));
@@ -1026,7 +1055,7 @@
cinfo->mem = NULL; /* for safety if init fails */
/* Check for configuration errors.
- * ALIGN_SIZE should be a power of 2; otherwise, it probably
+ * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably
* doesn't reflect any real hardware alignment requirement.
* The test is a little tricky: for X>0, X and X-1 have no one-bits
* in common if and only if X is a power of 2, ie has only one one-bit.
diff --git a/jmemname.c b/jmemname.c
deleted file mode 100644
index ed96dee..0000000
--- a/jmemname.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * jmemname.c
- *
- * Copyright (C) 1992-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file provides a generic implementation of the system-dependent
- * portion of the JPEG memory manager. This implementation assumes that
- * you must explicitly construct a name for each temp file.
- * Also, the problem of determining the amount of memory available
- * is shoved onto the user.
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h" /* import the system-dependent declarations */
-
-#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
-#endif
-
-#ifndef SEEK_SET /* pre-ANSI systems may not define this; */
-#define SEEK_SET 0 /* if not, assume 0 is correct */
-#endif
-
-#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
-#define READ_BINARY "r"
-#define RW_BINARY "w+"
-#else
-#ifdef VMS /* VMS is very nonstandard */
-#define READ_BINARY "rb", "ctx=stm"
-#define RW_BINARY "w+b", "ctx=stm"
-#else /* standard ANSI-compliant case */
-#define READ_BINARY "rb"
-#define RW_BINARY "w+b"
-#endif
-#endif
-
-
-/*
- * Selection of a file name for a temporary file.
- * This is system-dependent!
- *
- * The code as given is suitable for most Unix systems, and it is easily
- * modified for most non-Unix systems. Some notes:
- * 1. The temp file is created in the directory named by TEMP_DIRECTORY.
- * The default value is /usr/tmp, which is the conventional place for
- * creating large temp files on Unix. On other systems you'll probably
- * want to change the file location. You can do this by editing the
- * #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h.
- *
- * 2. If you need to change the file name as well as its location,
- * you can override the TEMP_FILE_NAME macro. (Note that this is
- * actually a printf format string; it must contain %s and %d.)
- * Few people should need to do this.
- *
- * 3. mktemp() is used to ensure that multiple processes running
- * simultaneously won't select the same file names. If your system
- * doesn't have mktemp(), define NO_MKTEMP to do it the hard way.
- * (If you don't have <errno.h>, also define NO_ERRNO_H.)
- *
- * 4. You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c
- * will cause the temp files to be removed if you stop the program early.
- */
-
-#ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */
-#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */
-#endif
-
-static int next_file_num; /* to distinguish among several temp files */
-
-#ifdef NO_MKTEMP
-
-#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */
-#define TEMP_FILE_NAME "%sJPG%03d.TMP"
-#endif
-
-#ifndef NO_ERRNO_H
-#include <errno.h> /* to define ENOENT */
-#endif
-
-/* ANSI C specifies that errno is a macro, but on older systems it's more
- * likely to be a plain int variable. And not all versions of errno.h
- * bother to declare it, so we have to in order to be most portable. Thus:
- */
-#ifndef errno
-extern int errno;
-#endif
-
-
-LOCAL(void)
-select_file_name (char * fname)
-{
- FILE * tfile;
-
- /* Keep generating file names till we find one that's not in use */
- for (;;) {
- next_file_num++; /* advance counter */
- sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num);
- if ((tfile = fopen(fname, READ_BINARY)) == NULL) {
- /* fopen could have failed for a reason other than the file not
- * being there; for example, file there but unreadable.
- * If <errno.h> isn't available, then we cannot test the cause.
- */
-#ifdef ENOENT
- if (errno != ENOENT)
- continue;
-#endif
- break;
- }
- fclose(tfile); /* oops, it's there; close tfile & try again */
- }
-}
-
-#else /* ! NO_MKTEMP */
-
-/* Note that mktemp() requires the initial filename to end in six X's */
-#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */
-#define TEMP_FILE_NAME "%sJPG%dXXXXXX"
-#endif
-
-LOCAL(void)
-select_file_name (char * fname)
-{
- next_file_num++; /* advance counter */
- sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num);
- mktemp(fname); /* make sure file name is unique */
- /* mktemp replaces the trailing XXXXXX with a unique string of characters */
-}
-
-#endif /* NO_MKTEMP */
-
-
-/*
- * Memory allocation and freeing are controlled by the regular library
- * routines malloc() and free().
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
- return (void *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
- free(object);
-}
-
-
-/*
- * "Large" objects are treated the same as "small" ones.
- * NB: although we include FAR keywords in the routine declarations,
- * this file won't actually work in 80x86 small/medium model; at least,
- * you probably won't be able to process useful-size images in only 64KB.
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
- return (void FAR *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
- free(object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- * It's impossible to do this in a portable way; our current solution is
- * to make the user tell us (with a default value set at compile time).
- * If you can actually get the available space, it's a good idea to subtract
- * a slop factor of 5% or so.
- */
-
-#ifndef DEFAULT_MAX_MEM /* so can override from makefile */
-#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */
-#endif
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
- long max_bytes_needed, long already_allocated)
-{
- return cinfo->mem->max_memory_to_use - already_allocated;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Backing store objects are only used when the value returned by
- * jpeg_mem_available is less than the total space needed. You can dispense
- * with these routines if you have plenty of virtual memory; see jmemnobs.c.
- */
-
-
-METHODDEF(void)
-read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- if (fseek(info->temp_file, file_offset, SEEK_SET))
- ERREXIT(cinfo, JERR_TFILE_SEEK);
- if (JFREAD(info->temp_file, buffer_address, byte_count)
- != (size_t) byte_count)
- ERREXIT(cinfo, JERR_TFILE_READ);
-}
-
-
-METHODDEF(void)
-write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- if (fseek(info->temp_file, file_offset, SEEK_SET))
- ERREXIT(cinfo, JERR_TFILE_SEEK);
- if (JFWRITE(info->temp_file, buffer_address, byte_count)
- != (size_t) byte_count)
- ERREXIT(cinfo, JERR_TFILE_WRITE);
-}
-
-
-METHODDEF(void)
-close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
-{
- fclose(info->temp_file); /* close the file */
- unlink(info->temp_name); /* delete the file */
-/* If your system doesn't have unlink(), use remove() instead.
- * remove() is the ANSI-standard name for this function, but if
- * your system was ANSI you'd be using jmemansi.c, right?
- */
- TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name);
-}
-
-
-/*
- * Initial opening of a backing-store object.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- long total_bytes_needed)
-{
- select_file_name(info->temp_name);
- if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL)
- ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
- info->read_backing_store = read_backing_store;
- info->write_backing_store = write_backing_store;
- info->close_backing_store = close_backing_store;
- TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
- next_file_num = 0; /* initialize temp file name generator */
- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
- /* no work */
-}
diff --git a/jmorecfg.h b/jmorecfg.h
index b425519..69d4fe0 100644
--- a/jmorecfg.h
+++ b/jmorecfg.h
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : March 28, 2005
- * ---------------------------------------------------------------------
- *
* This file contains additional configuration options that customize the
* JPEG software for special applications or support machine-dependent
* optimizations. Most users will not need to touch this file.
@@ -27,9 +20,7 @@
* We do not support run-time selection of data precision, sorry.
*/
-/* SIMD Ext: This SIMD code only copes with 8-bit sample values. */
-
-#define BITS_IN_JSAMPLE 8 /* SIMD Ext: cannot be changed! */
+#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
/*
@@ -71,11 +62,11 @@
#else /* not HAVE_UNSIGNED_CHAR */
typedef char JSAMPLE;
-#ifdef CHAR_IS_UNSIGNED
+#ifdef __CHAR_UNSIGNED__
#define GETJSAMPLE(value) ((int) (value))
#else
#define GETJSAMPLE(value) ((int) (value) & 0xFF)
-#endif /* CHAR_IS_UNSIGNED */
+#endif /* __CHAR_UNSIGNED__ */
#endif /* HAVE_UNSIGNED_CHAR */
@@ -122,11 +113,11 @@
#else /* not HAVE_UNSIGNED_CHAR */
typedef char JOCTET;
-#ifdef CHAR_IS_UNSIGNED
+#ifdef __CHAR_UNSIGNED__
#define GETJOCTET(value) (value)
#else
#define GETJOCTET(value) ((value) & 0xFF)
-#endif /* CHAR_IS_UNSIGNED */
+#endif /* __CHAR_UNSIGNED__ */
#endif /* HAVE_UNSIGNED_CHAR */
@@ -143,11 +134,11 @@
#ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char UINT8;
#else /* not HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
+#ifdef __CHAR_UNSIGNED__
typedef char UINT8;
-#else /* not CHAR_IS_UNSIGNED */
+#else /* not __CHAR_UNSIGNED__ */
typedef short UINT8;
-#endif /* CHAR_IS_UNSIGNED */
+#endif /* __CHAR_UNSIGNED__ */
#endif /* HAVE_UNSIGNED_CHAR */
/* UINT16 must hold at least the values 0..65535. */
@@ -166,8 +157,7 @@
/* INT32 must hold at least signed 32-bit values. */
- /* X11/xmd.h and basetsd.h (Win32 SDK) correctly define INT32 */
-#if !defined(XMD_H) && !defined(_BASETSD_H_) && !defined(_BASETSD_H)
+#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
typedef long INT32;
#endif
@@ -190,24 +180,14 @@
* or code profilers that require it.
*/
-#if defined(_MSC_VER) || defined(__BORLANDC__) || \
- defined(__WATCOMC__) || defined(__MWERKS__) || \
- defined(__ICC) || defined(__INTEL_COMPILER)
-#define JCDECL __cdecl
-#elif defined(__GNUC__)
-#define JCDECL __attribute__((__cdecl__))
-#else
-#define JCDECL
-#endif
-
/* a function called through method pointers: */
-#define METHODDEF(type) static type JCDECL
+#define METHODDEF(type) static type
/* a function used only in its module: */
#define LOCAL(type) static type
/* a function referenced thru EXTERNs: */
-#define GLOBAL(type) type JCDECL
+#define GLOBAL(type) type
/* a reference to a GLOBAL function: */
-#define EXTERN(type) extern type JCDECL
+#define EXTERN(type) extern type
/* This macro is used to declare a "method", that is, a function pointer.
@@ -217,9 +197,9 @@
*/
#ifdef HAVE_PROTOTYPES
-#define JMETHOD(type,methodname,arglist) type (JCDECL *methodname) arglist
+#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
#else
-#define JMETHOD(type,methodname,arglist) type (JCDECL *methodname) ()
+#define JMETHOD(type,methodname,arglist) type (*methodname) ()
#endif
@@ -229,13 +209,11 @@
* explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
*/
-#ifndef FAR
#ifdef NEED_FAR_POINTERS
#define FAR far
#else
#define FAR
#endif
-#endif /* !FAR */
/*
@@ -246,14 +224,8 @@
*/
#ifndef HAVE_BOOLEAN
-#ifdef TYPEDEF_UCHAR_BOOLEAN
-#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
-typedef unsigned char boolean;
-#endif
-#else /* !TYPEDEF_UCHAR_BOOLEAN */
typedef int boolean;
-#endif /* TYPEDEF_UCHAR_BOOLEAN */
-#endif /* !HAVE_BOOLEAN */
+#endif
#ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */
#endif
@@ -318,7 +290,6 @@
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
-#define UPSAMPLE_H1V2_SUPPORTED /* Fast/fancy processing for 1h2v? */
#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
@@ -345,105 +316,9 @@
#define RGB_BLUE 2 /* Offset of Blue */
#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */
-#undef RGBX_FILLER_0XFF /* fill dummy bytes with 0xFF in RGBX format */
-
-
-/* SIMD support options: */
-
-#ifndef JSIMD_MMX_NOT_SUPPORTED
-#define JSIMD_ENCODER_MMX_SUPPORTED /* Use MMX in encoding process */
-#define JSIMD_DECODER_MMX_SUPPORTED /* Use MMX in decoding process */
-#endif
-#ifndef JSIMD_3DNOW_NOT_SUPPORTED
-#define JSIMD_ENCODER_3DNOW_SUPPORTED /* Use 3DNow! in encoding process */
-#define JSIMD_DECODER_3DNOW_SUPPORTED /* Use 3DNow! in decoding process */
-#endif
-#ifndef JSIMD_SSE_NOT_SUPPORTED
-#define JSIMD_ENCODER_SSE_SUPPORTED /* Use SSE in encoding process */
-#define JSIMD_DECODER_SSE_SUPPORTED /* Use SSE in decoding process */
-#endif
-#ifndef JSIMD_SSE2_NOT_SUPPORTED
-#define JSIMD_ENCODER_SSE2_SUPPORTED /* Use SSE2 in encoding process */
-#define JSIMD_DECODER_SSE2_SUPPORTED /* Use SSE2 in decoding process */
-#endif
-
-/* (encoder part): */
-
-#undef JFDCT_INT_QUANTIZE_WITH_DIVISION /* Use general quantization method */
-
-#if defined(JSIMD_ENCODER_MMX_SUPPORTED)
-#define JCCOLOR_RGBYCC_MMX_SUPPORTED /* RGB->YCC conversion with MMX */
-#define JCSAMPLE_MMX_SUPPORTED /* downsampling with MMX */
-#define JFDCT_INT_MMX_SUPPORTED /* forward DCT with MMX */
-#endif
-#if defined(JSIMD_ENCODER_SSE2_SUPPORTED)
-#define JCCOLOR_RGBYCC_SSE2_SUPPORTED /* RGB->YCC conversion with SSE2 */
-#define JCSAMPLE_SSE2_SUPPORTED /* downsampling with SSE2 */
-#define JFDCT_INT_SSE2_SUPPORTED /* forward DCT with SSE2 */
-#endif
-#if defined(JSIMD_ENCODER_3DNOW_SUPPORTED) && \
- defined(JSIMD_ENCODER_MMX_SUPPORTED)
-#define JFDCT_FLT_3DNOW_MMX_SUPPORTED /* forward DCT with 3DNow!/MMX */
-#endif
-#if defined(JSIMD_ENCODER_SSE_SUPPORTED) && \
- defined(JSIMD_ENCODER_MMX_SUPPORTED)
-#define JFDCT_FLT_SSE_MMX_SUPPORTED /* forward DCT with SSE/MMX */
-#endif
-#if defined(JSIMD_ENCODER_SSE_SUPPORTED) && \
- defined(JSIMD_ENCODER_SSE2_SUPPORTED)
-#define JFDCT_FLT_SSE_SSE2_SUPPORTED /* forward DCT with SSE/SSE2 */
-#endif
-
-/* (decoder part): */
-
-#if defined(JSIMD_DECODER_MMX_SUPPORTED)
-#define JDCOLOR_YCCRGB_MMX_SUPPORTED /* YCC->RGB conversion with MMX */
-#define JDMERGE_MMX_SUPPORTED /* merged upsampling with MMX */
-#define JDSAMPLE_FANCY_MMX_SUPPORTED /* fancy upsampling with MMX */
-#define JDSAMPLE_SIMPLE_MMX_SUPPORTED /* sloppy upsampling with MMX */
-#define JIDCT_INT_MMX_SUPPORTED /* inverse DCT with MMX */
-#endif
-#if defined(JSIMD_DECODER_SSE2_SUPPORTED)
-#define JDCOLOR_YCCRGB_SSE2_SUPPORTED /* YCC->RGB conversion with SSE2 */
-#define JDMERGE_SSE2_SUPPORTED /* merged upsampling with SSE2 */
-#define JDSAMPLE_FANCY_SSE2_SUPPORTED /* fancy upsampling with SSE2 */
-#define JDSAMPLE_SIMPLE_SSE2_SUPPORTED /* sloppy upsampling with SSE2 */
-#define JIDCT_INT_SSE2_SUPPORTED /* inverse DCT with SSE2 */
-#endif
-#if defined(JSIMD_DECODER_3DNOW_SUPPORTED) && \
- defined(JSIMD_DECODER_MMX_SUPPORTED)
-#define JIDCT_FLT_3DNOW_MMX_SUPPORTED /* inverse DCT with 3DNow!/MMX */
-#endif
-#if defined(JSIMD_DECODER_SSE_SUPPORTED) && \
- defined(JSIMD_DECODER_MMX_SUPPORTED)
-#define JIDCT_FLT_SSE_MMX_SUPPORTED /* inverse DCT with SSE/MMX */
-#endif
-#if defined(JSIMD_DECODER_SSE_SUPPORTED) && \
- defined(JSIMD_DECODER_SSE2_SUPPORTED)
-#define JIDCT_FLT_SSE_SSE2_SUPPORTED /* inverse DCT with SSE/SSE2 */
-#endif
-
/* Definitions for speed-related optimizations. */
-
-/* If your compiler supports inline functions, define INLINE
- * as the inline keyword; otherwise define it as empty.
- */
-
-#ifndef INLINE
-#ifdef __GNUC__ /* for instance, GNU C knows about inline */
-#define INLINE __inline__
-#endif
-#ifdef _MSC_VER
-#define INLINE __inline
-#endif
-#ifndef INLINE
-#define INLINE /* default is to define it as empty */
-#endif
-#endif
-
-
/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
* two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER
* as short on such a machine. MULTIPLIER must be at least 16 bits wide.
diff --git a/jpeg.dsp b/jpeg.dsp
new file mode 100644
index 0000000..27edabf
--- /dev/null
+++ b/jpeg.dsp
@@ -0,0 +1,320 @@
+# Microsoft Developer Studio Project File - Name="jpeg" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=jpeg - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "jpeg.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "jpeg - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "jpeg - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "jpeg - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\Release"
+# PROP Intermediate_Dir "..\Release\jpeg"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /c /I "win"
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "jpeg - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\Debug"
+# PROP BASE Intermediate_Dir "..\Debug\jpeg"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "_DEBUG" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c /I "win"
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "jpeg - Win32 Release"
+# Name "jpeg - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\jcapimin.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcapistd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jccoefct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jccolor.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcdctmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jchuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcinit.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcmainct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcmarker.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcmaster.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcomapi.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcparam.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcphuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcprepct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jcsample.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jctrans.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdapimin.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdapistd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdatadst.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdatasrc.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdcoefct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdcolor.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jddctmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdhuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdinput.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdmainct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdmarker.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdmaster.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdmerge.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdphuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdpostct.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdsample.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdtrans.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jerror.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jfdctflt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jfdctfst.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jfdctint.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jidctflt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jidctfst.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jidctint.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jidctred.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmemmgr.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmemnobs.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jquant1.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jquant2.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\jutils.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\jchuff.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdct.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jdhuff.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jerror.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jinclude.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmemsys.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jmorecfg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpegint.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jpeglib.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\jversion.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/jpegdll.def b/jpegdll.def
deleted file mode 100644
index 5a86cd6..0000000
--- a/jpegdll.def
+++ /dev/null
@@ -1,73 +0,0 @@
-;
-; jpegdll.def - module definition file for Win32 DLL
-;
-
-; sed -e "/\(jinit\|jpeg_simd_\(cpu\|os\|merged\)\)/d" -e "s/^EXTERN(..*) \([_A-Za-z][_A-Za-z0-9]*\).*/ \1/p" -e d jpeglib.h jpegint.h
-
-EXPORTS
- ; API functions in jpeglib.h, which are intended
- ; to be called by the user applications.
- jpeg_std_error
- jpeg_CreateCompress
- jpeg_CreateDecompress
- jpeg_destroy_compress
- jpeg_destroy_decompress
- jpeg_stdio_dest
- jpeg_stdio_src
- jpeg_set_defaults
- jpeg_set_colorspace
- jpeg_default_colorspace
- jpeg_set_quality
- jpeg_set_linear_quality
- jpeg_add_quant_table
- jpeg_quality_scaling
- jpeg_simple_progression
- jpeg_suppress_tables
- jpeg_alloc_quant_table
- jpeg_alloc_huff_table
- jpeg_start_compress
- jpeg_write_scanlines
- jpeg_finish_compress
- jpeg_write_raw_data
- jpeg_write_marker
- jpeg_write_m_header
- jpeg_write_m_byte
- jpeg_write_tables
- jpeg_read_header
- jpeg_start_decompress
- jpeg_read_scanlines
- jpeg_finish_decompress
- jpeg_read_raw_data
- jpeg_has_multiple_scans
- jpeg_start_output
- jpeg_finish_output
- jpeg_input_complete
- jpeg_new_colormap
- jpeg_consume_input
- jpeg_calc_output_dimensions
- jpeg_save_markers
- jpeg_set_marker_processor
- jpeg_read_coefficients
- jpeg_write_coefficients
- jpeg_copy_critical_parameters
- jpeg_abort_compress
- jpeg_abort_decompress
- jpeg_abort
- jpeg_destroy
- jpeg_resync_to_restart
- ; Functions that are introduced by SIMD extension.
- jpeg_simd_support
- jpeg_simd_mask
- jpeg_simd_color_converter
- jpeg_simd_downsampler
- jpeg_simd_forward_dct
- jpeg_simd_color_deconverter
- jpeg_simd_upsampler
- jpeg_simd_inverse_dct
- ; Utility functions in jutils.c.
- ; These are needed by some applications.
- jdiv_round_up
- jround_up
- jcopy_sample_rows
- jcopy_block_row
- jzero_far
diff --git a/jpegdll.rc b/jpegdll.rc
deleted file mode 100644
index fb3d327..0000000
--- a/jpegdll.rc
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// jpegdll.rc - version information for Win32 DLL
-//
-
-// from <winver.h>
-#define VS_VERSION_INFO 1
-#define VS_FFI_FILEFLAGSMASK 0x0000003FL
-#define VS_FF_DEBUG 0x00000001L
-#define VOS__WINDOWS32 0x00000004L
-#define VFT_DLL 0x00000002L
-#define VFT2_UNKNOWN 0x00000000L
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,2,1,2
- PRODUCTVERSION 6,2,1,2
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-#ifdef _DEBUG
- FILEFLAGS VS_FF_DEBUG
-#else
- FILEFLAGS 0x00000000L
-#endif
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE VFT2_UNKNOWN
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "00000000"
- BEGIN
- VALUE "LegalCopyright", "Copyright (C) 1991-1998 Thomas G. Lane\0"
- VALUE "FileDescription", "Independent JPEG Group's JPEG Library"
- " with SIMD support\0"
- VALUE "ProductName", "The Independent JPEG Group's JPEG software"
- " release 6b with x86 SIMD extension for"
- " IJG JPEG library version 1.02\0"
- VALUE "Comments", "This is not an official binary from IJG. "
- "The SIMD code in this DLL is copyright (C)"
- " 1999-2006 MIYASAKA Masaru.\0"
- VALUE "FileVersion", "6.2.1.02\0"
- VALUE "ProductVersion", "6.2.1.02\0"
- VALUE "OriginalFilename", "jpeg62.dll\0"
- VALUE "InternalName", "jpeg62\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0, 0
- END
-END
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/jpegint.h b/jpegint.h
index 511e07c..95b00d4 100644
--- a/jpegint.h
+++ b/jpegint.h
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : February 4, 2006
- * ---------------------------------------------------------------------
- *
* This file provides common declarations for the various JPEG modules.
* These declarations are considered internal to the JPEG library; most
* applications using the library shouldn't need to include this file.
@@ -298,19 +291,6 @@
#endif
-/* SIMD Ext: This macro checks if constants for SSE/SSE2 instructions are
- * aligned to a 16-byte boundary. Most of SSE/SSE2 instructions require
- * that the memory operand is aligned to a 16-byte boundary; if not,
- * a general-protection exception (#GP) is generated.
- */
-
-#ifdef JSIMD_NO_SSECONST_ALIGNMENT_CHECK
-#define IS_CONST_ALIGNED_16(p) (1)
-#else
-#define IS_CONST_ALIGNED_16(p) (((unsigned)(p) & 0x0F) == 0)
-#endif
-
-
/* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES
@@ -347,8 +327,6 @@
#define jzero_far jZeroFar
#define jpeg_zigzag_order jZIGTable
#define jpeg_natural_order jZAGTable
-#define jpeg_simd_cpu_support jSiCpuSupport
-#define jpeg_simd_os_support jSiOsSupport
#endif /* NEED_SHORT_EXTERNAL_NAMES */
@@ -404,10 +382,6 @@
#endif
extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
-/* SIMD Ext: retrieve SIMD/CPU information */
-EXTERN(unsigned int) jpeg_simd_cpu_support JPP((void));
-EXTERN(unsigned int) jpeg_simd_os_support JPP((unsigned int simd));
-
/* Suppress undefined-structure complaints if necessary. */
#ifdef INCOMPLETE_TYPES_BROKEN
diff --git a/jpeglib.h b/jpeglib.h
index 0506316..d1be8dd 100644
--- a/jpeglib.h
+++ b/jpeglib.h
@@ -5,13 +5,6 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified for SIMD extension.
- * Last Modified : February 4, 2006
- * ---------------------------------------------------------------------
- *
* This file defines the application interface for the JPEG library.
* Most applications using the library need only include this file,
* and perhaps jerror.h if they want to know the exact error codes.
@@ -20,10 +13,6 @@
#ifndef JPEGLIB_H
#define JPEGLIB_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* First we include the configuration files that record how this
* installation of the JPEG library is set up. jconfig.h can be
@@ -44,13 +33,6 @@
#define JPEG_LIB_VERSION 62 /* Version 6b */
-/* SIMD Ext: Version ID for the SIMD extension.
- */
-
-#define JPEG_SIMDEXT_VERSION 102 /* version 1.02 */
-#define JPEG_SIMDEXT_VER_STR "1.02"
-
-
/* Various constants determining the sizes of things.
* All of these are specified by the JPEG standard, so don't change them
* if you want to be compatible.
@@ -253,15 +235,6 @@
JDITHER_FS /* Floyd-Steinberg error diffusion dither */
} J_DITHER_MODE;
-/* SIMD Ext: bitflags for jpeg_simd_support() and jpeg_simd_mask() */
-
-#define JSIMD_NONE 0x00
-#define JSIMD_MMX 0x01
-#define JSIMD_3DNOW 0x02
-#define JSIMD_SSE 0x04
-#define JSIMD_SSE2 0x08
-#define JSIMD_ALL (JSIMD_MMX | JSIMD_3DNOW | JSIMD_SSE | JSIMD_SSE2)
-
/* Common fields between JPEG compression and decompression master structs. */
@@ -904,18 +877,6 @@
#define jpeg_abort jAbort
#define jpeg_destroy jDestroy
#define jpeg_resync_to_restart jResyncRestart
-#define jpeg_simd_support jSiSupport
-#ifndef JSIMD_MASKFUNC_NOT_SUPPORTED
-#define jpeg_simd_mask jSiMask
-#endif
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-#define jpeg_simd_color_converter jSiCColor
-#define jpeg_simd_downsampler jSiDownsampler
-#define jpeg_simd_forward_dct jSiFDCT
-#define jpeg_simd_color_deconverter jSiDColor
-#define jpeg_simd_upsampler jSiUpsampler
-#define jpeg_simd_inverse_dct jSiIDCT
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
#endif /* NEED_SHORT_EXTERNAL_NAMES */
@@ -1076,24 +1037,6 @@
EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
int desired));
-/* SIMD Ext: retrieve SIMD/CPU information */
-EXTERN(unsigned int) jpeg_simd_support JPP((j_common_ptr cinfo));
-#ifndef JSIMD_MASKFUNC_NOT_SUPPORTED
-EXTERN(unsigned int) jpeg_simd_mask
- JPP((j_common_ptr cinfo, unsigned int remove, unsigned int add));
-#endif
-#ifndef JSIMD_MODEINFO_NOT_SUPPORTED
-EXTERN(unsigned int) jpeg_simd_color_converter JPP((j_compress_ptr cinfo));
-EXTERN(unsigned int) jpeg_simd_downsampler JPP((j_compress_ptr cinfo));
-EXTERN(unsigned int) jpeg_simd_forward_dct JPP((j_compress_ptr cinfo,
- int method));
-EXTERN(unsigned int) jpeg_simd_color_deconverter JPP((j_decompress_ptr cinfo));
-EXTERN(unsigned int) jpeg_simd_upsampler JPP((j_decompress_ptr cinfo,
- int do_fancy));
-EXTERN(unsigned int) jpeg_simd_inverse_dct JPP((j_decompress_ptr cinfo,
- int method));
-#endif /* !JSIMD_MODEINFO_NOT_SUPPORTED */
-
/* These marker codes are exported since applications and data source modules
* are likely to want to use them.
@@ -1150,8 +1093,4 @@
#include "jerror.h" /* fetch error codes too */
#endif
-#ifdef __cplusplus
-}
-#endif
-
#endif /* JPEGLIB_H */
diff --git a/jpegtran.1 b/jpegtran.1
deleted file mode 100644
index 6de18e2..0000000
--- a/jpegtran.1
+++ /dev/null
@@ -1,238 +0,0 @@
-.TH JPEGTRAN 1 "3 August 1997"
-.SH NAME
-jpegtran \- lossless transformation of JPEG files
-.SH SYNOPSIS
-.B jpegtran
-[
-.I options
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B jpegtran
-performs various useful transformations of JPEG files.
-It can translate the coded representation from one variant of JPEG to another,
-for example from baseline JPEG to progressive JPEG or vice versa. It can also
-perform some rearrangements of the image data, for example turning an image
-from landscape to portrait format by rotation.
-.PP
-.B jpegtran
-works by rearranging the compressed data (DCT coefficients), without
-ever fully decoding the image. Therefore, its transformations are lossless:
-there is no image degradation at all, which would not be true if you used
-.B djpeg
-followed by
-.B cjpeg
-to accomplish the same conversion. But by the same token,
-.B jpegtran
-cannot perform lossy operations such as changing the image quality.
-.PP
-.B jpegtran
-reads the named JPEG/JFIF file, or the standard input if no file is
-named, and produces a JPEG/JFIF file on the standard output.
-.SH OPTIONS
-All switch names may be abbreviated; for example,
-.B \-optimize
-may be written
-.B \-opt
-or
-.BR \-o .
-Upper and lower case are equivalent.
-British spellings are also accepted (e.g.,
-.BR \-optimise ),
-though for brevity these are not mentioned below.
-.PP
-To specify the coded JPEG representation used in the output file,
-.B jpegtran
-accepts a subset of the switches recognized by
-.BR cjpeg :
-.TP
-.B \-optimize
-Perform optimization of entropy encoding parameters.
-.TP
-.B \-progressive
-Create progressive JPEG file.
-.TP
-.BI \-restart " N"
-Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
-attached to the number.
-.TP
-.BI \-scans " file"
-Use the scan script given in the specified text file.
-.PP
-See
-.BR cjpeg (1)
-for more details about these switches.
-If you specify none of these switches, you get a plain baseline-JPEG output
-file. The quality setting and so forth are determined by the input file.
-.PP
-The image can be losslessly transformed by giving one of these switches:
-.TP
-.B \-flip horizontal
-Mirror image horizontally (left-right).
-.TP
-.B \-flip vertical
-Mirror image vertically (top-bottom).
-.TP
-.B \-rotate 90
-Rotate image 90 degrees clockwise.
-.TP
-.B \-rotate 180
-Rotate image 180 degrees.
-.TP
-.B \-rotate 270
-Rotate image 270 degrees clockwise (or 90 ccw).
-.TP
-.B \-transpose
-Transpose image (across UL-to-LR axis).
-.TP
-.B \-transverse
-Transverse transpose (across UR-to-LL axis).
-.PP
-The transpose transformation has no restrictions regarding image dimensions.
-The other transformations operate rather oddly if the image dimensions are not
-a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
-transform complete blocks of DCT coefficient data in the desired way.
-.PP
-.BR jpegtran 's
-default behavior when transforming an odd-size image is designed
-to preserve exact reversibility and mathematical consistency of the
-transformation set. As stated, transpose is able to flip the entire image
-area. Horizontal mirroring leaves any partial iMCU column at the right edge
-untouched, but is able to flip all rows of the image. Similarly, vertical
-mirroring leaves any partial iMCU row at the bottom edge untouched, but is
-able to flip all columns. The other transforms can be built up as sequences
-of transpose and flip operations; for consistency, their actions on edge
-pixels are defined to be the same as the end result of the corresponding
-transpose-and-flip sequence.
-.PP
-For practical use, you may prefer to discard any untransformable edge pixels
-rather than having a strange-looking strip along the right and/or bottom edges
-of a transformed image. To do this, add the
-.B \-trim
-switch:
-.TP
-.B \-trim
-Drop non-transformable edge blocks.
-.PP
-Obviously, a transformation with
-.B \-trim
-is not reversible, so strictly speaking
-.B jpegtran
-with this switch is not lossless. Also, the expected mathematical
-equivalences between the transformations no longer hold. For example,
-.B \-rot 270 -trim
-trims only the bottom edge, but
-.B \-rot 90 -trim
-followed by
-.B \-rot 180 -trim
-trims both edges.
-.PP
-Another not-strictly-lossless transformation switch is:
-.TP
-.B \-grayscale
-Force grayscale output.
-.PP
-This option discards the chrominance channels if the input image is YCbCr
-(ie, a standard color JPEG), resulting in a grayscale JPEG file. The
-luminance channel is preserved exactly, so this is a better method of reducing
-to grayscale than decompression, conversion, and recompression. This switch
-is particularly handy for fixing a monochrome picture that was mistakenly
-encoded as a color JPEG. (In such a case, the space savings from getting rid
-of the near-empty chroma channels won't be large; but the decoding time for
-a grayscale JPEG is substantially less than that for a color JPEG.)
-.PP
-.B jpegtran
-also recognizes these switches that control what to do with "extra" markers,
-such as comment blocks:
-.TP
-.B \-copy none
-Copy no extra markers from source file. This setting suppresses all
-comments and other excess baggage present in the source file.
-.TP
-.B \-copy comments
-Copy only comment markers. This setting copies comments from the source file,
-but discards any other inessential data.
-.TP
-.B \-copy all
-Copy all extra markers. This setting preserves miscellaneous markers
-found in the source file, such as JFIF thumbnails and Photoshop settings.
-In some files these extra markers can be sizable.
-.PP
-The default behavior is
-.BR "\-copy comments" .
-(Note: in IJG releases v6 and v6a,
-.B jpegtran
-always did the equivalent of
-.BR "\-copy none" .)
-.PP
-Additional switches recognized by jpegtran are:
-.TP
-.BI \-maxmemory " N"
-Set limit for amount of memory to use in processing large images. Value is
-in thousands of bytes, or millions of bytes if "M" is attached to the
-number. For example,
-.B \-max 4m
-selects 4000000 bytes. If more space is needed, temporary files will be used.
-.TP
-.BI \-outfile " name"
-Send output image to the named file, not to standard output.
-.TP
-.B \-verbose
-Enable debug printout. More
-.BR \-v 's
-give more output. Also, version information is printed at startup.
-.TP
-.B \-debug
-Same as
-.BR \-verbose .
-.SH EXAMPLES
-.LP
-This example converts a baseline JPEG file to progressive form:
-.IP
-.B jpegtran \-progressive
-.I foo.jpg
-.B >
-.I fooprog.jpg
-.PP
-This example rotates an image 90 degrees clockwise, discarding any
-unrotatable edge pixels:
-.IP
-.B jpegtran \-rot 90 -trim
-.I foo.jpg
-.B >
-.I foo90.jpg
-.SH ENVIRONMENT
-.TP
-.B JPEGMEM
-If this environment variable is set, its value is the default memory limit.
-The value is specified as described for the
-.B \-maxmemory
-switch.
-.B JPEGMEM
-overrides the default value specified when the program was compiled, and
-itself is overridden by an explicit
-.BR \-maxmemory .
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR djpeg (1),
-.BR rdjpgcom (1),
-.BR wrjpgcom (1)
-.br
-Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
-Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
-.SH AUTHOR
-Independent JPEG Group
-.SH BUGS
-Arithmetic coding is not supported for legal reasons.
-.PP
-The transform options can't transform odd-size images perfectly. Use
-.B \-trim
-if you don't like the results without it.
-.PP
-The entire image is read into memory and then written out again, even in
-cases where this isn't really necessary. Expect swapping on large images,
-especially when using the more complex transform options.
diff --git a/jpegtran.c b/jpegtran.c
deleted file mode 100644
index 20ef111..0000000
--- a/jpegtran.c
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * jpegtran.c
- *
- * Copyright (C) 1995-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a command-line user interface for JPEG transcoding.
- * It is very similar to cjpeg.c, but provides lossless transcoding between
- * different JPEG file formats. It also provides some lossless and sort-of-
- * lossless transformations of JPEG data.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-#include "transupp.h" /* Support routines for jpegtran */
-#include "jversion.h" /* for version message */
-
-#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h> /* Metrowerks needs this */
-#include <console.h> /* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h> /* Think declares it here */
-#endif
-#endif
-
-
-/*
- * Argument-parsing code.
- * The switch parser is designed to be useful with DOS-style command line
- * syntax, ie, intermixed switches and file names, where only the switches
- * to the left of a given file name affect processing of that file.
- * The main program in this file doesn't actually use this capability...
- */
-
-
-static const char * progname; /* program name for error messages */
-static char * outfilename; /* for -outfile switch */
-static JCOPY_OPTION copyoption; /* -copy switch */
-static jpeg_transform_info transformoption; /* image transformation options */
-
-
-LOCAL(void)
-usage (void)
-/* complain about bad command line */
-{
- fprintf(stderr, "usage: %s [switches] ", progname);
-#ifdef TWO_FILE_COMMANDLINE
- fprintf(stderr, "inputfile outputfile\n");
-#else
- fprintf(stderr, "[inputfile]\n");
-#endif
-
- fprintf(stderr, "Switches (names may be abbreviated):\n");
- fprintf(stderr, " -copy none Copy no extra markers from source file\n");
- fprintf(stderr, " -copy comments Copy only comment markers (default)\n");
- fprintf(stderr, " -copy all Copy all extra markers\n");
-#ifdef ENTROPY_OPT_SUPPORTED
- fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n");
-#endif
-#ifdef C_PROGRESSIVE_SUPPORTED
- fprintf(stderr, " -progressive Create progressive JPEG file\n");
-#endif
-#if TRANSFORMS_SUPPORTED
- fprintf(stderr, "Switches for modifying the image:\n");
- fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n");
- fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n");
- fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n");
- fprintf(stderr, " -transpose Transpose image\n");
- fprintf(stderr, " -transverse Transverse transpose image\n");
- fprintf(stderr, " -trim Drop non-transformable edge blocks\n");
-#endif /* TRANSFORMS_SUPPORTED */
- fprintf(stderr, "Switches for advanced users:\n");
- fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n");
- fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n");
- fprintf(stderr, " -outfile name Specify name for output file\n");
- fprintf(stderr, " -verbose or -debug Emit debug output\n");
- fprintf(stderr, "Switches for wizards:\n");
-#ifdef C_ARITH_CODING_SUPPORTED
- fprintf(stderr, " -arithmetic Use arithmetic coding\n");
-#endif
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
-#endif
- exit(EXIT_FAILURE);
-}
-
-
-LOCAL(void)
-select_transform (JXFORM_CODE transform)
-/* Silly little routine to detect multiple transform options,
- * which we can't handle.
- */
-{
-#if TRANSFORMS_SUPPORTED
- if (transformoption.transform == JXFORM_NONE ||
- transformoption.transform == transform) {
- transformoption.transform = transform;
- } else {
- fprintf(stderr, "%s: can only do one image transformation at a time\n",
- progname);
- usage();
- }
-#else
- fprintf(stderr, "%s: sorry, image transformation was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-}
-
-
-LOCAL(int)
-parse_switches (j_compress_ptr cinfo, int argc, char **argv,
- int last_file_arg_seen, boolean for_real)
-/* Parse optional switches.
- * Returns argv[] index of first file-name argument (== argc if none).
- * Any file names with indexes <= last_file_arg_seen are ignored;
- * they have presumably been processed in a previous iteration.
- * (Pass 0 for last_file_arg_seen on the first or only iteration.)
- * for_real is FALSE on the first (dummy) pass; we may skip any expensive
- * processing.
- */
-{
- int argn;
- char * arg;
- boolean simple_progressive;
- char * scansarg = NULL; /* saves -scans parm if any */
-
- /* Set up default JPEG parameters. */
- simple_progressive = FALSE;
- outfilename = NULL;
- copyoption = JCOPYOPT_DEFAULT;
- transformoption.transform = JXFORM_NONE;
- transformoption.trim = FALSE;
- transformoption.force_grayscale = FALSE;
- cinfo->err->trace_level = 0;
-
- /* Scan command line options, adjust parameters */
-
- for (argn = 1; argn < argc; argn++) {
- arg = argv[argn];
- if (*arg != '-') {
- /* Not a switch, must be a file name argument */
- if (argn <= last_file_arg_seen) {
- outfilename = NULL; /* -outfile applies to just one input file */
- continue; /* ignore this name if previously processed */
- }
- break; /* else done parsing switches */
- }
- arg++; /* advance past switch marker character */
-
- if (keymatch(arg, "arithmetic", 1)) {
- /* Use arithmetic coding. */
-#ifdef C_ARITH_CODING_SUPPORTED
- cinfo->arith_code = TRUE;
-#else
- fprintf(stderr, "%s: sorry, arithmetic coding not supported\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "copy", 1)) {
- /* Select which extra markers to copy. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "none", 1)) {
- copyoption = JCOPYOPT_NONE;
- } else if (keymatch(argv[argn], "comments", 1)) {
- copyoption = JCOPYOPT_COMMENTS;
- } else if (keymatch(argv[argn], "all", 1)) {
- copyoption = JCOPYOPT_ALL;
- } else
- usage();
-
- } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) {
- /* Enable debug printouts. */
- /* On first -d, print version identification */
- static boolean printed_version = FALSE;
-
- if (! printed_version) {
- fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n",
- JVERSION, JCOPYRIGHT);
- printed_version = TRUE;
- }
- cinfo->err->trace_level++;
-
- } else if (keymatch(arg, "flip", 1)) {
- /* Mirror left-right or top-bottom. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "horizontal", 1))
- select_transform(JXFORM_FLIP_H);
- else if (keymatch(argv[argn], "vertical", 1))
- select_transform(JXFORM_FLIP_V);
- else
- usage();
-
- } else if (keymatch(arg, "grayscale", 1) || keymatch(arg, "greyscale",1)) {
- /* Force to grayscale. */
-#if TRANSFORMS_SUPPORTED
- transformoption.force_grayscale = TRUE;
-#else
- select_transform(JXFORM_NONE); /* force an error */
-#endif
-
- } else if (keymatch(arg, "maxmemory", 3)) {
- /* Maximum memory in Kb (or Mb with 'm'). */
- long lval;
- char ch = 'x';
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
- usage();
- if (ch == 'm' || ch == 'M')
- lval *= 1000L;
- cinfo->mem->max_memory_to_use = lval * 1000L;
-
- } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
- /* Enable entropy parm optimization. */
-#ifdef ENTROPY_OPT_SUPPORTED
- cinfo->optimize_coding = TRUE;
-#else
- fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "outfile", 4)) {
- /* Set output file name. */
- if (++argn >= argc) /* advance to next argument */
- usage();
- outfilename = argv[argn]; /* save it away for later use */
-
- } else if (keymatch(arg, "progressive", 1)) {
- /* Select simple progressive mode. */
-#ifdef C_PROGRESSIVE_SUPPORTED
- simple_progressive = TRUE;
- /* We must postpone execution until num_components is known. */
-#else
- fprintf(stderr, "%s: sorry, progressive output was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "restart", 1)) {
- /* Restart interval in MCU rows (or in MCUs with 'b'). */
- long lval;
- char ch = 'x';
-
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1)
- usage();
- if (lval < 0 || lval > 65535L)
- usage();
- if (ch == 'b' || ch == 'B') {
- cinfo->restart_interval = (unsigned int) lval;
- cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
- } else {
- cinfo->restart_in_rows = (int) lval;
- /* restart_interval will be computed during startup */
- }
-
- } else if (keymatch(arg, "rotate", 2)) {
- /* Rotate 90, 180, or 270 degrees (measured clockwise). */
- if (++argn >= argc) /* advance to next argument */
- usage();
- if (keymatch(argv[argn], "90", 2))
- select_transform(JXFORM_ROT_90);
- else if (keymatch(argv[argn], "180", 3))
- select_transform(JXFORM_ROT_180);
- else if (keymatch(argv[argn], "270", 3))
- select_transform(JXFORM_ROT_270);
- else
- usage();
-
- } else if (keymatch(arg, "scans", 1)) {
- /* Set scan script. */
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- if (++argn >= argc) /* advance to next argument */
- usage();
- scansarg = argv[argn];
- /* We must postpone reading the file in case -progressive appears. */
-#else
- fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n",
- progname);
- exit(EXIT_FAILURE);
-#endif
-
- } else if (keymatch(arg, "transpose", 1)) {
- /* Transpose (across UL-to-LR axis). */
- select_transform(JXFORM_TRANSPOSE);
-
- } else if (keymatch(arg, "transverse", 6)) {
- /* Transverse transpose (across UR-to-LL axis). */
- select_transform(JXFORM_TRANSVERSE);
-
- } else if (keymatch(arg, "trim", 3)) {
- /* Trim off any partial edge MCUs that the transform can't handle. */
- transformoption.trim = TRUE;
-
- } else {
- usage(); /* bogus switch */
- }
- }
-
- /* Post-switch-scanning cleanup */
-
- if (for_real) {
-
-#ifdef C_PROGRESSIVE_SUPPORTED
- if (simple_progressive) /* process -progressive; -scans can override */
- jpeg_simple_progression(cinfo);
-#endif
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
- if (scansarg != NULL) /* process -scans if it was present */
- if (! read_scan_script(cinfo, scansarg))
- usage();
-#endif
- }
-
- return argn; /* return index of next arg (file name) */
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
- struct jpeg_decompress_struct srcinfo;
- struct jpeg_compress_struct dstinfo;
- struct jpeg_error_mgr jsrcerr, jdsterr;
-#ifdef PROGRESS_REPORT
- struct cdjpeg_progress_mgr progress;
-#endif
- jvirt_barray_ptr * src_coef_arrays;
- jvirt_barray_ptr * dst_coef_arrays;
- int file_index;
- FILE * input_file;
- FILE * output_file;
-
- /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
- argc = ccommand(&argv);
-#endif
-
- progname = argv[0];
- if (progname == NULL || progname[0] == 0)
- progname = "jpegtran"; /* in case C library doesn't provide it */
-
- /* Initialize the JPEG decompression object with default error handling. */
- srcinfo.err = jpeg_std_error(&jsrcerr);
- jpeg_create_decompress(&srcinfo);
- /* Initialize the JPEG compression object with default error handling. */
- dstinfo.err = jpeg_std_error(&jdsterr);
- jpeg_create_compress(&dstinfo);
-
- /* Now safe to enable signal catcher.
- * Note: we assume only the decompression object will have virtual arrays.
- */
-#ifdef NEED_SIGNAL_CATCHER
- enable_signal_catcher((j_common_ptr) &srcinfo);
-#endif
-
- /* Scan command line to find file names.
- * It is convenient to use just one switch-parsing routine, but the switch
- * values read here are mostly ignored; we will rescan the switches after
- * opening the input file. Also note that most of the switches affect the
- * destination JPEG object, so we parse into that and then copy over what
- * needs to affects the source too.
- */
-
- file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE);
- jsrcerr.trace_level = jdsterr.trace_level;
- srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use;
-
-#ifdef TWO_FILE_COMMANDLINE
- /* Must have either -outfile switch or explicit output file name */
- if (outfilename == NULL) {
- if (file_index != argc-2) {
- fprintf(stderr, "%s: must name one input and one output file\n",
- progname);
- usage();
- }
- outfilename = argv[file_index+1];
- } else {
- if (file_index != argc-1) {
- fprintf(stderr, "%s: must name one input and one output file\n",
- progname);
- usage();
- }
- }
-#else
- /* Unix style: expect zero or one file name */
- if (file_index < argc-1) {
- fprintf(stderr, "%s: only one input file\n", progname);
- usage();
- }
-#endif /* TWO_FILE_COMMANDLINE */
-
- /* Open the input file. */
- if (file_index < argc) {
- if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]);
- exit(EXIT_FAILURE);
- }
- } else {
- /* default input file is stdin */
- input_file = read_stdin();
- }
-
- /* Open the output file. */
- if (outfilename != NULL) {
- if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, outfilename);
- exit(EXIT_FAILURE);
- }
- } else {
- /* default output file is stdout */
- output_file = write_stdout();
- }
-
-#ifdef PROGRESS_REPORT
- start_progress_monitor((j_common_ptr) &dstinfo, &progress);
-#endif
-
- /* Specify data source for decompression */
- jpeg_stdio_src(&srcinfo, input_file);
-
- /* Enable saving of extra markers that we want to copy */
- jcopy_markers_setup(&srcinfo, copyoption);
-
- /* Read file header */
- (void) jpeg_read_header(&srcinfo, TRUE);
-
- /* Any space needed by a transform option must be requested before
- * jpeg_read_coefficients so that memory allocation will be done right.
- */
-#if TRANSFORMS_SUPPORTED
- jtransform_request_workspace(&srcinfo, &transformoption);
-#endif
-
- /* Read source file as DCT coefficients */
- src_coef_arrays = jpeg_read_coefficients(&srcinfo);
-
- /* Initialize destination compression parameters from source values */
- jpeg_copy_critical_parameters(&srcinfo, &dstinfo);
-
- /* Adjust destination parameters if required by transform options;
- * also find out which set of coefficient arrays will hold the output.
- */
-#if TRANSFORMS_SUPPORTED
- dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo,
- src_coef_arrays,
- &transformoption);
-#else
- dst_coef_arrays = src_coef_arrays;
-#endif
-
- /* Adjust default compression parameters by re-parsing the options */
- file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE);
-
- /* Specify data destination for compression */
- jpeg_stdio_dest(&dstinfo, output_file);
-
- /* Start compressor (note no image data is actually written here) */
- jpeg_write_coefficients(&dstinfo, dst_coef_arrays);
-
- /* Copy to the output file any extra markers that we want to preserve */
- jcopy_markers_execute(&srcinfo, &dstinfo, copyoption);
-
- /* Execute image transformation, if any */
-#if TRANSFORMS_SUPPORTED
- jtransform_execute_transformation(&srcinfo, &dstinfo,
- src_coef_arrays,
- &transformoption);
-#endif
-
- /* Finish compression and release memory */
- jpeg_finish_compress(&dstinfo);
- jpeg_destroy_compress(&dstinfo);
- (void) jpeg_finish_decompress(&srcinfo);
- jpeg_destroy_decompress(&srcinfo);
-
- /* Close files, if we opened them */
- if (input_file != stdin)
- fclose(input_file);
- if (output_file != stdout)
- fclose(output_file);
-
-#ifdef PROGRESS_REPORT
- end_progress_monitor((j_common_ptr) &dstinfo);
-#endif
-
- /* All done. */
- exit(jsrcerr.num_warnings + jdsterr.num_warnings ?EXIT_WARNING:EXIT_SUCCESS);
- return 0; /* suppress no-return-value warnings */
-}
diff --git a/jsimd.c b/jsimd.c
new file mode 100644
index 0000000..c92ae60
--- /dev/null
+++ b/jsimd.c
@@ -0,0 +1,364 @@
+/*
+ * jsimd.c
+ *
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+ *
+ * Based on the x86 SIMD extension for IJG JPEG library,
+ * Copyright (C) 1999-2006, MIYASAKA Masaru.
+ *
+ * This file contains the interface between the "normal" portions
+ * of the library and the SIMD implementations.
+ */
+
+#define JPEG_INTERNALS
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jsimd.h"
+#include "jdct.h"
+#include "jsimddct.h"
+#include "simd/jsimd.h"
+
+static unsigned int simd_support = ~0;
+
+/*
+ * Check what SIMD accelerations are supported.
+ *
+ * FIXME: This code is racy under a multi-threaded environment.
+ */
+LOCAL(void)
+init_simd (void)
+{
+ if (simd_support != ~0)
+ return;
+
+#ifdef WITH_SIMD
+ simd_support = jpeg_simd_cpu_support();
+#else
+ simd_support = JSIMD_NONE;
+#endif
+}
+
+GLOBAL(int)
+jsimd_can_rgb_ycc (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_ycc_rgb (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_rgb_ycc_convert (j_compress_ptr cinfo,
+ JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows)
+{
+}
+
+GLOBAL(void)
+jsimd_ycc_rgb_convert (j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows)
+{
+}
+
+GLOBAL(int)
+jsimd_can_h2v2_downsample (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_h2v1_downsample (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY output_data)
+{
+}
+
+GLOBAL(void)
+jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY output_data)
+{
+}
+
+GLOBAL(int)
+jsimd_can_h2v2_upsample (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_h2v1_upsample (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_h2v2_upsample (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr)
+{
+}
+
+GLOBAL(void)
+jsimd_h2v1_upsample (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr)
+{
+}
+
+GLOBAL(int)
+jsimd_can_h2v2_fancy_upsample (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_h2v1_fancy_upsample (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr)
+{
+}
+
+GLOBAL(void)
+jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JSAMPARRAY input_data,
+ JSAMPARRAY * output_data_ptr)
+{
+}
+
+GLOBAL(int)
+jsimd_can_h2v2_merged_upsample (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_h2v1_merged_upsample (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr,
+ JSAMPARRAY output_buf)
+{
+}
+
+GLOBAL(void)
+jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr,
+ JSAMPARRAY output_buf)
+{
+}
+
+GLOBAL(int)
+jsimd_can_convsamp (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_convsamp_float (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_convsamp (JSAMPARRAY sample_data, JDIMENSION start_col,
+ DCTELEM * workspace)
+{
+}
+
+GLOBAL(void)
+jsimd_convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col,
+ FAST_FLOAT * workspace)
+{
+}
+
+GLOBAL(int)
+jsimd_can_fdct_islow (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_fdct_ifast (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_fdct_float (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_fdct_islow (DCTELEM * data)
+{
+}
+
+GLOBAL(void)
+jsimd_fdct_ifast (DCTELEM * data)
+{
+}
+
+GLOBAL(void)
+jsimd_fdct_float (FAST_FLOAT * data)
+{
+}
+
+GLOBAL(int)
+jsimd_can_quantize (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_quantize_float (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_quantize (JCOEFPTR coef_block, DCTELEM * divisors,
+ DCTELEM * workspace)
+{
+}
+
+GLOBAL(void)
+jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors,
+ FAST_FLOAT * workspace)
+{
+}
+
+GLOBAL(int)
+jsimd_can_idct_2x2 (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_idct_4x4 (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col)
+{
+}
+
+GLOBAL(void)
+jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col)
+{
+}
+
+GLOBAL(int)
+jsimd_can_idct_islow (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_idct_ifast (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(int)
+jsimd_can_idct_float (void)
+{
+ init_simd();
+
+ return 0;
+}
+
+GLOBAL(void)
+jsimd_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col)
+{
+}
+
+GLOBAL(void)
+jsimd_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col)
+{
+}
+
+GLOBAL(void)
+jsimd_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col)
+{
+}
+
diff --git a/jsimd.h b/jsimd.h
new file mode 100644
index 0000000..90be19e
--- /dev/null
+++ b/jsimd.h
@@ -0,0 +1,89 @@
+/*
+ * jsimd.h
+ *
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+ *
+ * Based on the x86 SIMD extension for IJG JPEG library,
+ * Copyright (C) 1999-2006, MIYASAKA Masaru.
+ *
+ */
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jsimd_can_rgb_ycc jSCanRgbYcc
+#define jsimd_can_ycc_rgb jSCanYccRgb
+#define jsimd_rgb_ycc_convert jSRgbYccConv
+#define jsimd_ycc_rgb_convert jSYccRgbConv
+#define jsimd_can_h2v2_downsample jSCanH2V2Down
+#define jsimd_can_h2v1_downsample jSCanH2V1Down
+#define jsimd_h2v2_downsample jSH2V2Down
+#define jsimd_h2v1_downsample jSH2V1Down
+#define jsimd_can_h2v2_upsample jSCanH2V2Up
+#define jsimd_can_h2v1_upsample jSCanH2V1Up
+#define jsimd_h2v2_upsample jSH2V2Up
+#define jsimd_h2v1_upsample jSH2V1Up
+#define jsimd_can_h2v2_fancy_upsample jSCanH2V2FUp
+#define jsimd_can_h2v1_fancy_upsample jSCanH2V1FUp
+#define jsimd_h2v2_fancy_upsample jSH2V2FUp
+#define jsimd_h2v1_fancy_upsample jSH2V1FUp
+#define jsimd_can_h2v2_merged_upsample jSCanH2V2MUp
+#define jsimd_can_h2v1_merged_upsample jSCanH2V1MUp
+#define jsimd_h2v2_merged_upsample jSH2V2MUp
+#define jsimd_h2v1_merged_upsample jSH2V1MUp
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+EXTERN(int) jsimd_can_rgb_ycc JPP((void));
+EXTERN(int) jsimd_can_ycc_rgb JPP((void));
+
+EXTERN(void) jsimd_rgb_ycc_convert
+ JPP((j_compress_ptr cinfo,
+ JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
+ JDIMENSION output_row, int num_rows));
+EXTERN(void) jsimd_ycc_rgb_convert
+ JPP((j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf, JDIMENSION input_row,
+ JSAMPARRAY output_buf, int num_rows));
+
+EXTERN(int) jsimd_can_h2v2_downsample JPP((void));
+EXTERN(int) jsimd_can_h2v1_downsample JPP((void));
+
+EXTERN(void) jsimd_h2v2_downsample
+ JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY output_data));
+EXTERN(void) jsimd_h2v1_downsample
+ JPP((j_compress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY output_data));
+
+EXTERN(int) jsimd_can_h2v2_upsample JPP((void));
+EXTERN(int) jsimd_can_h2v1_upsample JPP((void));
+
+EXTERN(void) jsimd_h2v2_upsample
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+EXTERN(void) jsimd_h2v1_upsample
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+
+EXTERN(int) jsimd_can_h2v2_fancy_upsample JPP((void));
+EXTERN(int) jsimd_can_h2v1_fancy_upsample JPP((void));
+
+EXTERN(void) jsimd_h2v2_fancy_upsample
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+EXTERN(void) jsimd_h2v1_fancy_upsample
+ JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
+ JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr));
+
+EXTERN(int) jsimd_can_h2v2_merged_upsample JPP((void));
+EXTERN(int) jsimd_can_h2v1_merged_upsample JPP((void));
+
+EXTERN(void) jsimd_h2v2_merged_upsample
+ JPP((j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
+ JSAMPARRAY output_buf));
+EXTERN(void) jsimd_h2v1_merged_upsample
+ JPP((j_decompress_ptr cinfo,
+ JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
+ JSAMPARRAY output_buf));
+
diff --git a/jsimdcpu.asm b/jsimdcpu.asm
deleted file mode 100644
index 1c851d1..0000000
--- a/jsimdcpu.asm
+++ /dev/null
@@ -1,112 +0,0 @@
-;
-; jsimdcpu.asm - SIMD instruction support check
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : August 23, 2005
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-
-; --------------------------------------------------------------------------
- SECTION SEG_CONST
-
- alignz 16
-
-copyright:
- db " x86 SIMD ext for IJG lib V", JPEG_SIMDEXT_VER_STR
- db " Copyright 2006, MIYASAKA Masaru "
-
- alignz 16
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Check if the CPU supports SIMD instructions
-;
-; GLOBAL(unsigned int)
-; jpeg_simd_cpu_support (void)
-;
-
- align 16
- global EXTN(jpeg_simd_cpu_support)
-
-EXTN(jpeg_simd_cpu_support):
- push ebx
-; push ecx ; need not be preserved
-; push edx ; need not be preserved
-; push esi ; unused
- push edi
-
- xor edi,edi ; simd support flag
-
- pushfd
- pop eax
- mov edx,eax
- xor eax, 1<<21 ; flip ID bit in EFLAGS
- push eax
- popfd
- pushfd
- pop eax
- xor eax,edx
- jz short .return ; CPUID is not supported
-
- ; Check for MMX, SSE and SSE2 instruction support
- xor eax,eax
- cpuid
- test eax,eax
- jz short .return
-
- xor eax,eax
- inc eax
- cpuid
- mov eax,edx ; eax = Standard feature flags
-
- test eax, 1<<23 ; bit23:MMX
- jz short .no_mmx
- or edi, byte JSIMD_MMX
-.no_mmx:
- test eax, 1<<25 ; bit25:SSE
- jz short .no_sse
- or edi, byte JSIMD_SSE
-.no_sse:
- test eax, 1<<26 ; bit26:SSE2
- jz short .no_sse2
- or edi, byte JSIMD_SSE2
-.no_sse2:
-
- ; Check for 3DNow! instruction support
- mov eax, 0x80000000
- cpuid
- cmp eax, 0x80000000
- jbe short .return
-
- mov eax, 0x80000001
- cpuid
- mov eax,edx ; eax = Extended feature flags
-
- test eax, 1<<31 ; bit31:3DNow!(vendor independent)
- jz short .no_3dnow
- or edi, byte JSIMD_3DNOW
-.no_3dnow:
-
-.return:
- mov eax,edi
-
- pop edi
-; pop esi ; unused
-; pop edx ; need not be preserved
-; pop ecx ; need not be preserved
- pop ebx
- ret
-
diff --git a/jsimddct.h b/jsimddct.h
new file mode 100644
index 0000000..d73d0c4
--- /dev/null
+++ b/jsimddct.h
@@ -0,0 +1,101 @@
+/*
+ * jsimddct.h
+ *
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+ *
+ * Based on the x86 SIMD extension for IJG JPEG library,
+ * Copyright (C) 1999-2006, MIYASAKA Masaru.
+ *
+ */
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jsimd_can_convsamp jSCanConv
+#define jsimd_can_convsamp_float jSCanConvF
+#define jsimd_convsamp jSConv
+#define jsimd_convsamp_float jSConvF
+#define jsimd_can_fdct_islow jSCanFDCTIS
+#define jsimd_can_fdct_ifast jSCanFDCTIF
+#define jsimd_can_fdct_float jSCanFDCTFl
+#define jsimd_fdct_islow jSFDCTIS
+#define jsimd_fdct_ifast jSFDCTIF
+#define jsimd_fdct_float jSFDCTFl
+#define jsimd_can_quantize jSCanQuant
+#define jsimd_can_quantize_float jSCanQuantF
+#define jsimd_quantize jSQuant
+#define jsimd_quantize_float jSQuantF
+#define jsimd_can_idct_2x2 jSCanIDCT22
+#define jsimd_can_idct_4x4 jSCanIDCT44
+#define jsimd_idct_2x2 jSIDCT22
+#define jsimd_idct_4x4 jSIDCT44
+#define jsimd_can_idct_islow jSCanIDCTIS
+#define jsimd_can_idct_ifast jSCanIDCTIF
+#define jsimd_can_idct_float jSCanIDCTFl
+#define jsimd_idct_islow jSIDCTIS
+#define jsimd_idct_ifast jSIDCTIF
+#define jsimd_idct_float jSIDCTFl
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+EXTERN(int) jsimd_can_convsamp JPP((void));
+EXTERN(int) jsimd_can_convsamp_float JPP((void));
+
+EXTERN(void) jsimd_convsamp JPP((JSAMPARRAY sample_data,
+ JDIMENSION start_col,
+ DCTELEM * workspace));
+EXTERN(void) jsimd_convsamp_float JPP((JSAMPARRAY sample_data,
+ JDIMENSION start_col,
+ FAST_FLOAT * workspace));
+
+EXTERN(int) jsimd_can_fdct_islow JPP((void));
+EXTERN(int) jsimd_can_fdct_ifast JPP((void));
+EXTERN(int) jsimd_can_fdct_float JPP((void));
+
+EXTERN(void) jsimd_fdct_islow JPP((DCTELEM * data));
+EXTERN(void) jsimd_fdct_ifast JPP((DCTELEM * data));
+EXTERN(void) jsimd_fdct_float JPP((FAST_FLOAT * data));
+
+EXTERN(int) jsimd_can_quantize JPP((void));
+EXTERN(int) jsimd_can_quantize_float JPP((void));
+
+EXTERN(void) jsimd_quantize JPP((JCOEFPTR coef_block,
+ DCTELEM * divisors,
+ DCTELEM * workspace));
+EXTERN(void) jsimd_quantize_float JPP((JCOEFPTR coef_block,
+ FAST_FLOAT * divisors,
+ FAST_FLOAT * workspace));
+
+EXTERN(int) jsimd_can_idct_2x2 JPP((void));
+EXTERN(int) jsimd_can_idct_4x4 JPP((void));
+
+EXTERN(void) jsimd_idct_2x2 JPP((j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf,
+ JDIMENSION output_col));
+EXTERN(void) jsimd_idct_4x4 JPP((j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf,
+ JDIMENSION output_col));
+
+EXTERN(int) jsimd_can_idct_islow JPP((void));
+EXTERN(int) jsimd_can_idct_ifast JPP((void));
+EXTERN(int) jsimd_can_idct_float JPP((void));
+
+EXTERN(void) jsimd_idct_islow JPP((j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf,
+ JDIMENSION output_col));
+EXTERN(void) jsimd_idct_ifast JPP((j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf,
+ JDIMENSION output_col));
+EXTERN(void) jsimd_idct_float JPP((j_decompress_ptr cinfo,
+ jpeg_component_info * compptr,
+ JCOEFPTR coef_block,
+ JSAMPARRAY output_buf,
+ JDIMENSION output_col));
+
diff --git a/jsimddjg.asm b/jsimddjg.asm
deleted file mode 100644
index 02c82e4..0000000
--- a/jsimddjg.asm
+++ /dev/null
@@ -1,130 +0,0 @@
-;
-; jsimddjg.asm - SIMD instruction support check (for DJGPP V.2)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : September 26, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Check if the OS supports SIMD instructions (DJGPP V.2)
-;
-; GLOBAL(unsigned int)
-; jpeg_simd_os_support (unsigned int simd)
-;
-
-%define EXCEPTION_ILLEGAL_INSTRUCTION 6 ; vector number of #UD
-
-%define simd ebp+8 ; unsigned int simd
-%define mxcsr ebp-4 ; unsigned int mxcsr = 0x1F80
-
- align 16
- global EXTN(jpeg_simd_os_support)
-
-EXTN(jpeg_simd_os_support):
- push ebp
- mov ebp,esp
- push dword 0x1F80 ; default value of MXCSR register
- push ebx
-
- push DWORD [simd] ; simd_flags - modified from exception_handler
-
- mov bl, EXCEPTION_ILLEGAL_INSTRUCTION
- mov ax, 0x0202 ; Get Processor Exception Handler Vector
- int 0x31 ; DPMI function call
- push ecx ; selector of old exception handler
- push edx ; offset of old exception handler
-
- mov ecx,cs
- mov edx, exception_handler
- mov bl, EXCEPTION_ILLEGAL_INSTRUCTION
- mov ax, 0x0203 ; Set Processor Exception Handler Vector
- int 0x31 ; DPMI function call
-
- mov eax, DWORD [simd]
-
- ; If floating point emulation is enabled (CR0.EM = 1),
- ; executing an MMX/3DNow! instruction generates invalid
- ; opcode exception (#UD).
-
- push byte (.mmx_1 - .mmx_0) ; inst_bytes
- push byte (JSIMD_MMX | JSIMD_3DNOW) ; test_flags
- test eax, DWORD [esp]
- jz short .mmx_1
-.mmx_0: emms ; executing MMX instruction
-.mmx_1: add esp, byte 8
-
- push byte (.sse_1 - .sse_0)
- push byte (JSIMD_SSE | JSIMD_SSE2)
- test eax, DWORD [esp]
- jz short .sse_1
-.sse_0: ldmxcsr DWORD [mxcsr] ; executing SSE instruction
-.sse_1: add esp, byte 8
-
- pop edx ; offset of old exception handler
- pop ecx ; selector of old exception handler
- mov bl, EXCEPTION_ILLEGAL_INSTRUCTION
- mov ax, 0x0203 ; Set Processor Exception Handler Vector
- int 0x31 ; DPMI function call
-
- pop eax ; return simd_flags
- and eax, byte JSIMD_ALL
-
- pop ebx
- mov esp,ebp
- pop ebp
- ret
-
-; --------------------------------------------------------------------------
-;
-; LOCAL(void) far
-; exception_handler (unsigned long error_code,
-; void * context_eip, unsigned short context_cs,
-; unsigned long context_eflags,
-; void * context_esp, unsigned short context_ss);
-;
-
-%define error_code esp+12+8 ; unsigned long error_code
-%define context_eip esp+12+12 ; void * context_eip
-%define context_cs esp+12+16 ; unsigned short context_cs
-%define context_eflags esp+12+20 ; unsigned long context_eflags
-%define context_esp esp+12+24 ; void * context_esp
-%define context_ss esp+12+28 ; unsigned short context_ss
-
-%define test_flags(b) (b)+0
-%define inst_bytes(b) (b)+4
-%define simd_flags(b) (b)+16
-
- align 16
-
-exception_handler:
- push eax
- push ecx
- push edx
-
- mov eax, POINTER [context_esp]
- mov ecx, DWORD [test_flags(eax)]
- mov edx, DWORD [inst_bytes(eax)]
- not ecx
- add POINTER [context_eip], edx ; next instruction
- and DWORD [simd_flags(eax)], ecx ; turn off flag
-
- pop edx
- pop ecx
- pop eax
- retf
-
diff --git a/jsimdgcc.c b/jsimdgcc.c
deleted file mode 100644
index d6ad75b..0000000
--- a/jsimdgcc.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * jsimdgcc.c - SIMD instruction support check (gcc)
- *
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * For conditions of distribution and use, see copyright notice in jsimdext.inc
- *
- * Last Modified : January 24, 2006
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-#include <setjmp.h>
-#include <signal.h>
-
-
-static volatile int lockf /* = 0 */;
-static jmp_buf jmpbuf;
-
-
-/*
- * Exception handler for signal()
- */
-
-LOCAL(void)
-exception_handler (int sig)
-{
- signal(SIGILL, SIG_DFL);
- longjmp(jmpbuf, 1);
-}
-
-
-/*
- * Check if the OS supports SIMD instructions
- */
-
-GLOBAL(unsigned int)
-jpeg_simd_os_support (unsigned int simd)
-{
-#ifdef __GNUC__ /* gcc (i386) */
- unsigned int mxcsr = 0x1F80;
-
- /* enter critical section */
- __asm__ __volatile__ (
- "get_lock: \n\t"
- "movl $1,%%eax \n\t"
- "xchgl %0,%%eax \n\t" /* try to get lock */
- "cmpl $0,%%eax \n\t" /* test if successful */
- "je critical_section \n"
- "spin_loop: \n\t"
- /*".byte 0xF3,0x90 \n\t"*/ /* "pause" on P4 (short delay) */
- "cmpl $0,%0 \n\t" /* check if lock is free */
- "jne spin_loop \n\t"
- "jmp get_lock \n"
- "critical_section: \n\t"
- : "=m" (lockf) : "m" (lockf) : "%eax"
- );
-
- /* If floating point emulation is enabled (CR0.EM = 1),
- * executing an MMX/3DNow! instruction generates invalid
- * opcode exception (#UD).
- */
- if (simd & (JSIMD_MMX | JSIMD_3DNOW)) {
- if (!setjmp(jmpbuf)) {
- signal(SIGILL, exception_handler);
- __asm__ __volatile__ (
- ".byte 0x0F,0x77" /* emms */
- );
- signal(SIGILL, SIG_DFL);
- } else {
- simd &= ~(JSIMD_MMX | JSIMD_3DNOW);
- }
- }
- if (simd & (JSIMD_SSE | JSIMD_SSE2)) {
- if (!setjmp(jmpbuf)) {
- signal(SIGILL, exception_handler);
- __asm__ __volatile__ (
- "leal %0,%%eax \n\t"
- ".byte 0x0F,0xAE,0x10 \n\t" /* ldmxcsr [eax] */
- : : "m" (mxcsr) : "%eax"
- );
- signal(SIGILL, SIG_DFL);
- } else {
- simd &= ~(JSIMD_SSE | JSIMD_SSE2);
- }
- }
-
- /* leave critical section */
- lockf = 0; /* release lock */
-#endif /* __GNUC__ */
-
- return simd;
-}
diff --git a/jsimdw32.asm b/jsimdw32.asm
deleted file mode 100644
index 7f2cdbc..0000000
--- a/jsimdw32.asm
+++ /dev/null
@@ -1,121 +0,0 @@
-;
-; jsimdw32.asm - SIMD instruction support check (for Win32)
-;
-; x86 SIMD extension for IJG JPEG library
-; Copyright (C) 1999-2006, MIYASAKA Masaru.
-; For conditions of distribution and use, see copyright notice in jsimdext.inc
-;
-; This file should be assembled with NASM (Netwide Assembler),
-; can *not* be assembled with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler).
-; NASM is available from http://nasm.sourceforge.net/ or
-; http://sourceforge.net/project/showfiles.php?group_id=6208
-;
-; Last Modified : September 26, 2004
-;
-; [TAB8]
-
-%include "jsimdext.inc"
-
-; --------------------------------------------------------------------------
- SECTION SEG_TEXT
- BITS 32
-;
-; Check if the OS supports SIMD instructions (Win32)
-;
-; Reference: "Win32 Exception handling for assembler programmers"
-; http://www.jorgon.freeserve.co.uk/Except/Except.htm
-;
-; GLOBAL(unsigned int)
-; jpeg_simd_os_support (unsigned int simd)
-;
-
-%define simd ebp+8 ; unsigned int simd
-%define mxcsr ebp-4 ; unsigned int mxcsr = 0x1F80
-
- align 16
- global EXTN(jpeg_simd_os_support)
-
-EXTN(jpeg_simd_os_support):
- push ebp
- mov ebp,esp
- push dword 0x1F80 ; default value of MXCSR register
- push exception_handler
- push POINTER [fs:0] ; prev_record_ptr
- mov POINTER [fs:0], esp ; this_record_ptr
-
- mov eax, DWORD [simd]
- and eax, byte JSIMD_ALL
- xor ecx,ecx
- xor edx,edx
-
- ; If floating point emulation is enabled (CR0.EM = 1),
- ; executing an MMX/3DNow! instruction generates invalid
- ; opcode exception (#UD).
-
- mov cl, (JSIMD_MMX | JSIMD_3DNOW)
- mov dl, (.mmx_1 - .mmx_0)
- test al,cl
- jz short .mmx_1
-.mmx_0: emms ; executing MMX instruction
-.mmx_1:
- mov cl, (JSIMD_SSE | JSIMD_SSE2)
- mov dl, (.sse_1 - .sse_0)
- test al,cl
- jz short .sse_1
-.sse_0: ldmxcsr DWORD [mxcsr] ; executing SSE instruction
-.sse_1:
-
- pop POINTER [fs:0] ; prev_record_ptr
- mov esp,ebp
- pop ebp
- ret
-
-; --------------------------------------------------------------------------
-;
-; LOCAL(EXCEPTION_DISPOSITION)
-; exception_handler (struct _EXCEPTION_RECORD * ExceptionRecord,
-; void * EstablisherFrame, struct _CONTEXT * ContextRecord,
-; void * DispatcherContext);
-;
-
-%define ExceptionContinueExecution 0 ; from <excpt.h>
-%define ExceptionContinueSearch 1 ; typedef enum _EXCEPTION_DISPOSITION {
-%define ExceptionNestedException 2 ; ...
-%define ExceptionCollidedUnwind 3 ; } EXCEPTION_DISPOSITION
-
-%define EXCEPTION_ILLEGAL_INSTRUCTION 0xC000001D ; from <winbase.h>
-
-%define ExceptionRecord esp+4 ; struct _EXCEPTION_RECORD *
-%define EstablisherFrame esp+8 ; void * EstablisherFrame
-%define ContextRecord esp+12 ; struct _CONTEXT * ContextRecord
-%define DispatcherContext esp+16 ; void * DispatcherContext
-
-%define ExceptionCode(b) (b)+0 ; ExceptionRecord->ExceptionCode
-%define ExceptionFlags(b) (b)+4 ; ExceptionRecord->ExceptionFlags
-%define Context_Edx(b) (b)+168 ; ContextRecord->Edx
-%define Context_Ecx(b) (b)+172 ; ContextRecord->Ecx
-%define Context_Eax(b) (b)+176 ; ContextRecord->Eax
-%define Context_Eip(b) (b)+184 ; ContextRecord->Eip
-
- align 16
-
-exception_handler:
- mov edx, POINTER [ExceptionRecord]
- mov eax, ExceptionContinueSearch
-
- cmp DWORD [ExceptionFlags(edx)], byte 0
- jne short .return ; noncontinuable exception
- cmp DWORD [ExceptionCode(edx)], EXCEPTION_ILLEGAL_INSTRUCTION
- jne short .return ; not a #UD exception
-
- mov eax, POINTER [ContextRecord]
- mov ecx, DWORD [Context_Ecx(eax)]
- mov edx, DWORD [Context_Edx(eax)]
- not ecx
- add DWORD [Context_Eip(eax)], edx ; next instruction
- and DWORD [Context_Eax(eax)], ecx ; turn off flag
- mov eax, ExceptionContinueExecution
-.return:
- ret
-
diff --git a/libjpeg.doc b/libjpeg.doc
deleted file mode 100644
index 689b206..0000000
--- a/libjpeg.doc
+++ /dev/null
@@ -1,3006 +0,0 @@
-USING THE IJG JPEG LIBRARY
-
-Copyright (C) 1994-1998, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file describes how to use the IJG JPEG library within an application
-program. Read it if you want to write a program that uses the library.
-
-The file example.c provides heavily commented skeleton code for calling the
-JPEG library. Also see jpeglib.h (the include file to be used by application
-programs) for full details about data structures and function parameter lists.
-The library source code, of course, is the ultimate reference.
-
-Note that there have been *major* changes from the application interface
-presented by IJG version 4 and earlier versions. The old design had several
-inherent limitations, and it had accumulated a lot of cruft as we added
-features while trying to minimize application-interface changes. We have
-sacrificed backward compatibility in the version 5 rewrite, but we think the
-improvements justify this.
-
-
-TABLE OF CONTENTS
------------------
-
-Overview:
- Functions provided by the library
- Outline of typical usage
-Basic library usage:
- Data formats
- Compression details
- Decompression details
- Mechanics of usage: include files, linking, etc
-Advanced features:
- Compression parameter selection
- Decompression parameter selection
- Special color spaces
- Error handling
- Compressed data handling (source and destination managers)
- I/O suspension
- Progressive JPEG support
- Buffered-image mode
- Abbreviated datastreams and multiple images
- Special markers
- Raw (downsampled) image data
- Really raw data: DCT coefficients
- Progress monitoring
- Memory management
- Memory usage
- Library compile-time options
- Portability considerations
- Notes for MS-DOS implementors
-
-You should read at least the overview and basic usage sections before trying
-to program with the library. The sections on advanced features can be read
-if and when you need them.
-
-
-OVERVIEW
-========
-
-Functions provided by the library
----------------------------------
-
-The IJG JPEG library provides C code to read and write JPEG-compressed image
-files. The surrounding application program receives or supplies image data a
-scanline at a time, using a straightforward uncompressed image format. All
-details of color conversion and other preprocessing/postprocessing can be
-handled by the library.
-
-The library includes a substantial amount of code that is not covered by the
-JPEG standard but is necessary for typical applications of JPEG. These
-functions preprocess the image before JPEG compression or postprocess it after
-decompression. They include colorspace conversion, downsampling/upsampling,
-and color quantization. The application indirectly selects use of this code
-by specifying the format in which it wishes to supply or receive image data.
-For example, if colormapped output is requested, then the decompression
-library automatically invokes color quantization.
-
-A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
-and even more so in decompression postprocessing. The decompression library
-provides multiple implementations that cover most of the useful tradeoffs,
-ranging from very-high-quality down to fast-preview operation. On the
-compression side we have generally not provided low-quality choices, since
-compression is normally less time-critical. It should be understood that the
-low-quality modes may not meet the JPEG standard's accuracy requirements;
-nonetheless, they are useful for viewers.
-
-A word about functions *not* provided by the library. We handle a subset of
-the ISO JPEG standard; most baseline, extended-sequential, and progressive
-JPEG processes are supported. (Our subset includes all features now in common
-use.) Unsupported ISO options include:
- * Hierarchical storage
- * Lossless JPEG
- * Arithmetic entropy coding (unsupported for legal reasons)
- * DNL marker
- * Nonintegral subsampling ratios
-We support both 8- and 12-bit data precision, but this is a compile-time
-choice rather than a run-time choice; hence it is difficult to use both
-precisions in a single application.
-
-By itself, the library handles only interchange JPEG datastreams --- in
-particular the widely used JFIF file format. The library can be used by
-surrounding code to process interchange or abbreviated JPEG datastreams that
-are embedded in more complex file formats. (For example, this library is
-used by the free LIBTIFF library to support JPEG compression in TIFF.)
-
-
-Outline of typical usage
-------------------------
-
-The rough outline of a JPEG compression operation is:
-
- Allocate and initialize a JPEG compression object
- Specify the destination for the compressed data (eg, a file)
- Set parameters for compression, including image size & colorspace
- jpeg_start_compress(...);
- while (scan lines remain to be written)
- jpeg_write_scanlines(...);
- jpeg_finish_compress(...);
- Release the JPEG compression object
-
-A JPEG compression object holds parameters and working state for the JPEG
-library. We make creation/destruction of the object separate from starting
-or finishing compression of an image; the same object can be re-used for a
-series of image compression operations. This makes it easy to re-use the
-same parameter settings for a sequence of images. Re-use of a JPEG object
-also has important implications for processing abbreviated JPEG datastreams,
-as discussed later.
-
-The image data to be compressed is supplied to jpeg_write_scanlines() from
-in-memory buffers. If the application is doing file-to-file compression,
-reading image data from the source file is the application's responsibility.
-The library emits compressed data by calling a "data destination manager",
-which typically will write the data into a file; but the application can
-provide its own destination manager to do something else.
-
-Similarly, the rough outline of a JPEG decompression operation is:
-
- Allocate and initialize a JPEG decompression object
- Specify the source of the compressed data (eg, a file)
- Call jpeg_read_header() to obtain image info
- Set parameters for decompression
- jpeg_start_decompress(...);
- while (scan lines remain to be read)
- jpeg_read_scanlines(...);
- jpeg_finish_decompress(...);
- Release the JPEG decompression object
-
-This is comparable to the compression outline except that reading the
-datastream header is a separate step. This is helpful because information
-about the image's size, colorspace, etc is available when the application
-selects decompression parameters. For example, the application can choose an
-output scaling ratio that will fit the image into the available screen size.
-
-The decompression library obtains compressed data by calling a data source
-manager, which typically will read the data from a file; but other behaviors
-can be obtained with a custom source manager. Decompressed data is delivered
-into in-memory buffers passed to jpeg_read_scanlines().
-
-It is possible to abort an incomplete compression or decompression operation
-by calling jpeg_abort(); or, if you do not need to retain the JPEG object,
-simply release it by calling jpeg_destroy().
-
-JPEG compression and decompression objects are two separate struct types.
-However, they share some common fields, and certain routines such as
-jpeg_destroy() can work on either type of object.
-
-The JPEG library has no static variables: all state is in the compression
-or decompression object. Therefore it is possible to process multiple
-compression and decompression operations concurrently, using multiple JPEG
-objects.
-
-Both compression and decompression can be done in an incremental memory-to-
-memory fashion, if suitable source/destination managers are used. See the
-section on "I/O suspension" for more details.
-
-
-BASIC LIBRARY USAGE
-===================
-
-Data formats
-------------
-
-Before diving into procedural details, it is helpful to understand the
-image data format that the JPEG library expects or returns.
-
-The standard input image format is a rectangular array of pixels, with each
-pixel having the same number of "component" or "sample" values (color
-channels). You must specify how many components there are and the colorspace
-interpretation of the components. Most applications will use RGB data
-(three components per pixel) or grayscale data (one component per pixel).
-PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE.
-A remarkable number of people manage to miss this, only to find that their
-programs don't work with grayscale JPEG files.
-
-There is no provision for colormapped input. JPEG files are always full-color
-or full grayscale (or sometimes another colorspace such as CMYK). You can
-feed in a colormapped image by expanding it to full-color format. However
-JPEG often doesn't work very well with source data that has been colormapped,
-because of dithering noise. This is discussed in more detail in the JPEG FAQ
-and the other references mentioned in the README file.
-
-Pixels are stored by scanlines, with each scanline running from left to
-right. The component values for each pixel are adjacent in the row; for
-example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color. Each scanline is an
-array of data type JSAMPLE --- which is typically "unsigned char", unless
-you've changed jmorecfg.h. (You can also change the RGB pixel layout, say
-to B,G,R order, by modifying jmorecfg.h. But see the restrictions listed in
-that file before doing so.)
-
-A 2-D array of pixels is formed by making a list of pointers to the starts of
-scanlines; so the scanlines need not be physically adjacent in memory. Even
-if you process just one scanline at a time, you must make a one-element
-pointer array to conform to this structure. Pointers to JSAMPLE rows are of
-type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY.
-
-The library accepts or supplies one or more complete scanlines per call.
-It is not possible to process part of a row at a time. Scanlines are always
-processed top-to-bottom. You can process an entire image in one call if you
-have it all in memory, but usually it's simplest to process one scanline at
-a time.
-
-For best results, source data values should have the precision specified by
-BITS_IN_JSAMPLE (normally 8 bits). For instance, if you choose to compress
-data that's only 6 bits/channel, you should left-justify each value in a
-byte before passing it to the compressor. If you need to compress data
-that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 12.
-(See "Library compile-time options", later.)
-
-
-The data format returned by the decompressor is the same in all details,
-except that colormapped output is supported. (Again, a JPEG file is never
-colormapped. But you can ask the decompressor to perform on-the-fly color
-quantization to deliver colormapped output.) If you request colormapped
-output then the returned data array contains a single JSAMPLE per pixel;
-its value is an index into a color map. The color map is represented as
-a 2-D JSAMPARRAY in which each row holds the values of one color component,
-that is, colormap[i][j] is the value of the i'th color component for pixel
-value (map index) j. Note that since the colormap indexes are stored in
-JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE
-(ie, at most 256 colors for an 8-bit JPEG library).
-
-
-Compression details
--------------------
-
-Here we revisit the JPEG compression outline given in the overview.
-
-1. Allocate and initialize a JPEG compression object.
-
-A JPEG compression object is a "struct jpeg_compress_struct". (It also has
-a bunch of subsidiary structures which are allocated via malloc(), but the
-application doesn't control those directly.) This struct can be just a local
-variable in the calling routine, if a single routine is going to execute the
-whole JPEG compression sequence. Otherwise it can be static or allocated
-from malloc().
-
-You will also need a structure representing a JPEG error handler. The part
-of this that the library cares about is a "struct jpeg_error_mgr". If you
-are providing your own error handler, you'll typically want to embed the
-jpeg_error_mgr struct in a larger structure; this is discussed later under
-"Error handling". For now we'll assume you are just using the default error
-handler. The default error handler will print JPEG error/warning messages
-on stderr, and it will call exit() if a fatal error occurs.
-
-You must initialize the error handler structure, store a pointer to it into
-the JPEG object's "err" field, and then call jpeg_create_compress() to
-initialize the rest of the JPEG object.
-
-Typical code for this step, if you are using the default error handler, is
-
- struct jpeg_compress_struct cinfo;
- struct jpeg_error_mgr jerr;
- ...
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_compress(&cinfo);
-
-jpeg_create_compress allocates a small amount of memory, so it could fail
-if you are out of memory. In that case it will exit via the error handler;
-that's why the error handler must be initialized first.
-
-
-2. Specify the destination for the compressed data (eg, a file).
-
-As previously mentioned, the JPEG library delivers compressed data to a
-"data destination" module. The library includes one data destination
-module which knows how to write to a stdio stream. You can use your own
-destination module if you want to do something else, as discussed later.
-
-If you use the standard destination module, you must open the target stdio
-stream beforehand. Typical code for this step looks like:
-
- FILE * outfile;
- ...
- if ((outfile = fopen(filename, "wb")) == NULL) {
- fprintf(stderr, "can't open %s\n", filename);
- exit(1);
- }
- jpeg_stdio_dest(&cinfo, outfile);
-
-where the last line invokes the standard destination module.
-
-WARNING: it is critical that the binary compressed data be delivered to the
-output file unchanged. On non-Unix systems the stdio library may perform
-newline translation or otherwise corrupt binary data. To suppress this
-behavior, you may need to use a "b" option to fopen (as shown above), or use
-setmode() or another routine to put the stdio stream in binary mode. See
-cjpeg.c and djpeg.c for code that has been found to work on many systems.
-
-You can select the data destination after setting other parameters (step 3),
-if that's more convenient. You may not change the destination between
-calling jpeg_start_compress() and jpeg_finish_compress().
-
-
-3. Set parameters for compression, including image size & colorspace.
-
-You must supply information about the source image by setting the following
-fields in the JPEG object (cinfo structure):
-
- image_width Width of image, in pixels
- image_height Height of image, in pixels
- input_components Number of color channels (samples per pixel)
- in_color_space Color space of source image
-
-The image dimensions are, hopefully, obvious. JPEG supports image dimensions
-of 1 to 64K pixels in either direction. The input color space is typically
-RGB or grayscale, and input_components is 3 or 1 accordingly. (See "Special
-color spaces", later, for more info.) The in_color_space field must be
-assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or
-JCS_GRAYSCALE.
-
-JPEG has a large number of compression parameters that determine how the
-image is encoded. Most applications don't need or want to know about all
-these parameters. You can set all the parameters to reasonable defaults by
-calling jpeg_set_defaults(); then, if there are particular values you want
-to change, you can do so after that. The "Compression parameter selection"
-section tells about all the parameters.
-
-You must set in_color_space correctly before calling jpeg_set_defaults(),
-because the defaults depend on the source image colorspace. However the
-other three source image parameters need not be valid until you call
-jpeg_start_compress(). There's no harm in calling jpeg_set_defaults() more
-than once, if that happens to be convenient.
-
-Typical code for a 24-bit RGB source image is
-
- cinfo.image_width = Width; /* image width and height, in pixels */
- cinfo.image_height = Height;
- cinfo.input_components = 3; /* # of color components per pixel */
- cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
-
- jpeg_set_defaults(&cinfo);
- /* Make optional parameter settings here */
-
-
-4. jpeg_start_compress(...);
-
-After you have established the data destination and set all the necessary
-source image info and other parameters, call jpeg_start_compress() to begin
-a compression cycle. This will initialize internal state, allocate working
-storage, and emit the first few bytes of the JPEG datastream header.
-
-Typical code:
-
- jpeg_start_compress(&cinfo, TRUE);
-
-The "TRUE" parameter ensures that a complete JPEG interchange datastream
-will be written. This is appropriate in most cases. If you think you might
-want to use an abbreviated datastream, read the section on abbreviated
-datastreams, below.
-
-Once you have called jpeg_start_compress(), you may not alter any JPEG
-parameters or other fields of the JPEG object until you have completed
-the compression cycle.
-
-
-5. while (scan lines remain to be written)
- jpeg_write_scanlines(...);
-
-Now write all the required image data by calling jpeg_write_scanlines()
-one or more times. You can pass one or more scanlines in each call, up
-to the total image height. In most applications it is convenient to pass
-just one or a few scanlines at a time. The expected format for the passed
-data is discussed under "Data formats", above.
-
-Image data should be written in top-to-bottom scanline order. The JPEG spec
-contains some weasel wording about how top and bottom are application-defined
-terms (a curious interpretation of the English language...) but if you want
-your files to be compatible with everyone else's, you WILL use top-to-bottom
-order. If the source data must be read in bottom-to-top order, you can use
-the JPEG library's virtual array mechanism to invert the data efficiently.
-Examples of this can be found in the sample application cjpeg.
-
-The library maintains a count of the number of scanlines written so far
-in the next_scanline field of the JPEG object. Usually you can just use
-this variable as the loop counter, so that the loop test looks like
-"while (cinfo.next_scanline < cinfo.image_height)".
-
-Code for this step depends heavily on the way that you store the source data.
-example.c shows the following code for the case of a full-size 2-D source
-array containing 3-byte RGB pixels:
-
- JSAMPROW row_pointer[1]; /* pointer to a single row */
- int row_stride; /* physical row width in buffer */
-
- row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */
-
- while (cinfo.next_scanline < cinfo.image_height) {
- row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
- jpeg_write_scanlines(&cinfo, row_pointer, 1);
- }
-
-jpeg_write_scanlines() returns the number of scanlines actually written.
-This will normally be equal to the number passed in, so you can usually
-ignore the return value. It is different in just two cases:
- * If you try to write more scanlines than the declared image height,
- the additional scanlines are ignored.
- * If you use a suspending data destination manager, output buffer overrun
- will cause the compressor to return before accepting all the passed lines.
- This feature is discussed under "I/O suspension", below. The normal
- stdio destination manager will NOT cause this to happen.
-In any case, the return value is the same as the change in the value of
-next_scanline.
-
-
-6. jpeg_finish_compress(...);
-
-After all the image data has been written, call jpeg_finish_compress() to
-complete the compression cycle. This step is ESSENTIAL to ensure that the
-last bufferload of data is written to the data destination.
-jpeg_finish_compress() also releases working memory associated with the JPEG
-object.
-
-Typical code:
-
- jpeg_finish_compress(&cinfo);
-
-If using the stdio destination manager, don't forget to close the output
-stdio stream (if necessary) afterwards.
-
-If you have requested a multi-pass operating mode, such as Huffman code
-optimization, jpeg_finish_compress() will perform the additional passes using
-data buffered by the first pass. In this case jpeg_finish_compress() may take
-quite a while to complete. With the default compression parameters, this will
-not happen.
-
-It is an error to call jpeg_finish_compress() before writing the necessary
-total number of scanlines. If you wish to abort compression, call
-jpeg_abort() as discussed below.
-
-After completing a compression cycle, you may dispose of the JPEG object
-as discussed next, or you may use it to compress another image. In that case
-return to step 2, 3, or 4 as appropriate. If you do not change the
-destination manager, the new datastream will be written to the same target.
-If you do not change any JPEG parameters, the new datastream will be written
-with the same parameters as before. Note that you can change the input image
-dimensions freely between cycles, but if you change the input colorspace, you
-should call jpeg_set_defaults() to adjust for the new colorspace; and then
-you'll need to repeat all of step 3.
-
-
-7. Release the JPEG compression object.
-
-When you are done with a JPEG compression object, destroy it by calling
-jpeg_destroy_compress(). This will free all subsidiary memory (regardless of
-the previous state of the object). Or you can call jpeg_destroy(), which
-works for either compression or decompression objects --- this may be more
-convenient if you are sharing code between compression and decompression
-cases. (Actually, these routines are equivalent except for the declared type
-of the passed pointer. To avoid gripes from ANSI C compilers, jpeg_destroy()
-should be passed a j_common_ptr.)
-
-If you allocated the jpeg_compress_struct structure from malloc(), freeing
-it is your responsibility --- jpeg_destroy() won't. Ditto for the error
-handler structure.
-
-Typical code:
-
- jpeg_destroy_compress(&cinfo);
-
-
-8. Aborting.
-
-If you decide to abort a compression cycle before finishing, you can clean up
-in either of two ways:
-
-* If you don't need the JPEG object any more, just call
- jpeg_destroy_compress() or jpeg_destroy() to release memory. This is
- legitimate at any point after calling jpeg_create_compress() --- in fact,
- it's safe even if jpeg_create_compress() fails.
-
-* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call
- jpeg_abort() which works on both compression and decompression objects.
- This will return the object to an idle state, releasing any working memory.
- jpeg_abort() is allowed at any time after successful object creation.
-
-Note that cleaning up the data destination, if required, is your
-responsibility; neither of these routines will call term_destination().
-(See "Compressed data handling", below, for more about that.)
-
-jpeg_destroy() and jpeg_abort() are the only safe calls to make on a JPEG
-object that has reported an error by calling error_exit (see "Error handling"
-for more info). The internal state of such an object is likely to be out of
-whack. Either of these two routines will return the object to a known state.
-
-
-Decompression details
----------------------
-
-Here we revisit the JPEG decompression outline given in the overview.
-
-1. Allocate and initialize a JPEG decompression object.
-
-This is just like initialization for compression, as discussed above,
-except that the object is a "struct jpeg_decompress_struct" and you
-call jpeg_create_decompress(). Error handling is exactly the same.
-
-Typical code:
-
- struct jpeg_decompress_struct cinfo;
- struct jpeg_error_mgr jerr;
- ...
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_decompress(&cinfo);
-
-(Both here and in the IJG code, we usually use variable name "cinfo" for
-both compression and decompression objects.)
-
-
-2. Specify the source of the compressed data (eg, a file).
-
-As previously mentioned, the JPEG library reads compressed data from a "data
-source" module. The library includes one data source module which knows how
-to read from a stdio stream. You can use your own source module if you want
-to do something else, as discussed later.
-
-If you use the standard source module, you must open the source stdio stream
-beforehand. Typical code for this step looks like:
-
- FILE * infile;
- ...
- if ((infile = fopen(filename, "rb")) == NULL) {
- fprintf(stderr, "can't open %s\n", filename);
- exit(1);
- }
- jpeg_stdio_src(&cinfo, infile);
-
-where the last line invokes the standard source module.
-
-WARNING: it is critical that the binary compressed data be read unchanged.
-On non-Unix systems the stdio library may perform newline translation or
-otherwise corrupt binary data. To suppress this behavior, you may need to use
-a "b" option to fopen (as shown above), or use setmode() or another routine to
-put the stdio stream in binary mode. See cjpeg.c and djpeg.c for code that
-has been found to work on many systems.
-
-You may not change the data source between calling jpeg_read_header() and
-jpeg_finish_decompress(). If you wish to read a series of JPEG images from
-a single source file, you should repeat the jpeg_read_header() to
-jpeg_finish_decompress() sequence without reinitializing either the JPEG
-object or the data source module; this prevents buffered input data from
-being discarded.
-
-
-3. Call jpeg_read_header() to obtain image info.
-
-Typical code for this step is just
-
- jpeg_read_header(&cinfo, TRUE);
-
-This will read the source datastream header markers, up to the beginning
-of the compressed data proper. On return, the image dimensions and other
-info have been stored in the JPEG object. The application may wish to
-consult this information before selecting decompression parameters.
-
-More complex code is necessary if
- * A suspending data source is used --- in that case jpeg_read_header()
- may return before it has read all the header data. See "I/O suspension",
- below. The normal stdio source manager will NOT cause this to happen.
- * Abbreviated JPEG files are to be processed --- see the section on
- abbreviated datastreams. Standard applications that deal only in
- interchange JPEG files need not be concerned with this case either.
-
-It is permissible to stop at this point if you just wanted to find out the
-image dimensions and other header info for a JPEG file. In that case,
-call jpeg_destroy() when you are done with the JPEG object, or call
-jpeg_abort() to return it to an idle state before selecting a new data
-source and reading another header.
-
-
-4. Set parameters for decompression.
-
-jpeg_read_header() sets appropriate default decompression parameters based on
-the properties of the image (in particular, its colorspace). However, you
-may well want to alter these defaults before beginning the decompression.
-For example, the default is to produce full color output from a color file.
-If you want colormapped output you must ask for it. Other options allow the
-returned image to be scaled and allow various speed/quality tradeoffs to be
-selected. "Decompression parameter selection", below, gives details.
-
-If the defaults are appropriate, nothing need be done at this step.
-
-Note that all default values are set by each call to jpeg_read_header().
-If you reuse a decompression object, you cannot expect your parameter
-settings to be preserved across cycles, as you can for compression.
-You must set desired parameter values each time.
-
-
-5. jpeg_start_decompress(...);
-
-Once the parameter values are satisfactory, call jpeg_start_decompress() to
-begin decompression. This will initialize internal state, allocate working
-memory, and prepare for returning data.
-
-Typical code is just
-
- jpeg_start_decompress(&cinfo);
-
-If you have requested a multi-pass operating mode, such as 2-pass color
-quantization, jpeg_start_decompress() will do everything needed before data
-output can begin. In this case jpeg_start_decompress() may take quite a while
-to complete. With a single-scan (non progressive) JPEG file and default
-decompression parameters, this will not happen; jpeg_start_decompress() will
-return quickly.
-
-After this call, the final output image dimensions, including any requested
-scaling, are available in the JPEG object; so is the selected colormap, if
-colormapped output has been requested. Useful fields include
-
- output_width image width and height, as scaled
- output_height
- out_color_components # of color components in out_color_space
- output_components # of color components returned per pixel
- colormap the selected colormap, if any
- actual_number_of_colors number of entries in colormap
-
-output_components is 1 (a colormap index) when quantizing colors; otherwise it
-equals out_color_components. It is the number of JSAMPLE values that will be
-emitted per pixel in the output arrays.
-
-Typically you will need to allocate data buffers to hold the incoming image.
-You will need output_width * output_components JSAMPLEs per scanline in your
-output buffer, and a total of output_height scanlines will be returned.
-
-Note: if you are using the JPEG library's internal memory manager to allocate
-data buffers (as djpeg does), then the manager's protocol requires that you
-request large buffers *before* calling jpeg_start_decompress(). This is a
-little tricky since the output_XXX fields are not normally valid then. You
-can make them valid by calling jpeg_calc_output_dimensions() after setting the
-relevant parameters (scaling, output color space, and quantization flag).
-
-
-6. while (scan lines remain to be read)
- jpeg_read_scanlines(...);
-
-Now you can read the decompressed image data by calling jpeg_read_scanlines()
-one or more times. At each call, you pass in the maximum number of scanlines
-to be read (ie, the height of your working buffer); jpeg_read_scanlines()
-will return up to that many lines. The return value is the number of lines
-actually read. The format of the returned data is discussed under "Data
-formats", above. Don't forget that grayscale and color JPEGs will return
-different data formats!
-
-Image data is returned in top-to-bottom scanline order. If you must write
-out the image in bottom-to-top order, you can use the JPEG library's virtual
-array mechanism to invert the data efficiently. Examples of this can be
-found in the sample application djpeg.
-
-The library maintains a count of the number of scanlines returned so far
-in the output_scanline field of the JPEG object. Usually you can just use
-this variable as the loop counter, so that the loop test looks like
-"while (cinfo.output_scanline < cinfo.output_height)". (Note that the test
-should NOT be against image_height, unless you never use scaling. The
-image_height field is the height of the original unscaled image.)
-The return value always equals the change in the value of output_scanline.
-
-If you don't use a suspending data source, it is safe to assume that
-jpeg_read_scanlines() reads at least one scanline per call, until the
-bottom of the image has been reached.
-
-If you use a buffer larger than one scanline, it is NOT safe to assume that
-jpeg_read_scanlines() fills it. (The current implementation returns only a
-few scanlines per call, no matter how large a buffer you pass.) So you must
-always provide a loop that calls jpeg_read_scanlines() repeatedly until the
-whole image has been read.
-
-
-7. jpeg_finish_decompress(...);
-
-After all the image data has been read, call jpeg_finish_decompress() to
-complete the decompression cycle. This causes working memory associated
-with the JPEG object to be released.
-
-Typical code:
-
- jpeg_finish_decompress(&cinfo);
-
-If using the stdio source manager, don't forget to close the source stdio
-stream if necessary.
-
-It is an error to call jpeg_finish_decompress() before reading the correct
-total number of scanlines. If you wish to abort decompression, call
-jpeg_abort() as discussed below.
-
-After completing a decompression cycle, you may dispose of the JPEG object as
-discussed next, or you may use it to decompress another image. In that case
-return to step 2 or 3 as appropriate. If you do not change the source
-manager, the next image will be read from the same source.
-
-
-8. Release the JPEG decompression object.
-
-When you are done with a JPEG decompression object, destroy it by calling
-jpeg_destroy_decompress() or jpeg_destroy(). The previous discussion of
-destroying compression objects applies here too.
-
-Typical code:
-
- jpeg_destroy_decompress(&cinfo);
-
-
-9. Aborting.
-
-You can abort a decompression cycle by calling jpeg_destroy_decompress() or
-jpeg_destroy() if you don't need the JPEG object any more, or
-jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object.
-The previous discussion of aborting compression cycles applies here too.
-
-
-Mechanics of usage: include files, linking, etc
------------------------------------------------
-
-Applications using the JPEG library should include the header file jpeglib.h
-to obtain declarations of data types and routines. Before including
-jpeglib.h, include system headers that define at least the typedefs FILE and
-size_t. On ANSI-conforming systems, including <stdio.h> is sufficient; on
-older Unix systems, you may need <sys/types.h> to define size_t.
-
-If the application needs to refer to individual JPEG library error codes, also
-include jerror.h to define those symbols.
-
-jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h. If you are
-installing the JPEG header files in a system directory, you will want to
-install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h.
-
-The most convenient way to include the JPEG code into your executable program
-is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix
-machines) and reference it at your link step. If you use only half of the
-library (only compression or only decompression), only that much code will be
-included from the library, unless your linker is hopelessly brain-damaged.
-The supplied makefiles build libjpeg.a automatically (see install.doc).
-
-While you can build the JPEG library as a shared library if the whim strikes
-you, we don't really recommend it. The trouble with shared libraries is that
-at some point you'll probably try to substitute a new version of the library
-without recompiling the calling applications. That generally doesn't work
-because the parameter struct declarations usually change with each new
-version. In other words, the library's API is *not* guaranteed binary
-compatible across versions; we only try to ensure source-code compatibility.
-(In hindsight, it might have been smarter to hide the parameter structs from
-applications and introduce a ton of access functions instead. Too late now,
-however.)
-
-On some systems your application may need to set up a signal handler to ensure
-that temporary files are deleted if the program is interrupted. This is most
-critical if you are on MS-DOS and use the jmemdos.c memory manager back end;
-it will try to grab extended memory for temp files, and that space will NOT be
-freed automatically. See cjpeg.c or djpeg.c for an example signal handler.
-
-It may be worth pointing out that the core JPEG library does not actually
-require the stdio library: only the default source/destination managers and
-error handler need it. You can use the library in a stdio-less environment
-if you replace those modules and use jmemnobs.c (or another memory manager of
-your own devising). More info about the minimum system library requirements
-may be found in jinclude.h.
-
-
-ADVANCED FEATURES
-=================
-
-Compression parameter selection
--------------------------------
-
-This section describes all the optional parameters you can set for JPEG
-compression, as well as the "helper" routines provided to assist in this
-task. Proper setting of some parameters requires detailed understanding
-of the JPEG standard; if you don't know what a parameter is for, it's best
-not to mess with it! See REFERENCES in the README file for pointers to
-more info about JPEG.
-
-It's a good idea to call jpeg_set_defaults() first, even if you plan to set
-all the parameters; that way your code is more likely to work with future JPEG
-libraries that have additional parameters. For the same reason, we recommend
-you use a helper routine where one is provided, in preference to twiddling
-cinfo fields directly.
-
-The helper routines are:
-
-jpeg_set_defaults (j_compress_ptr cinfo)
- This routine sets all JPEG parameters to reasonable defaults, using
- only the input image's color space (field in_color_space, which must
- already be set in cinfo). Many applications will only need to use
- this routine and perhaps jpeg_set_quality().
-
-jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
- Sets the JPEG file's colorspace (field jpeg_color_space) as specified,
- and sets other color-space-dependent parameters appropriately. See
- "Special color spaces", below, before using this. A large number of
- parameters, including all per-component parameters, are set by this
- routine; if you want to twiddle individual parameters you should call
- jpeg_set_colorspace() before rather than after.
-
-jpeg_default_colorspace (j_compress_ptr cinfo)
- Selects an appropriate JPEG colorspace based on cinfo->in_color_space,
- and calls jpeg_set_colorspace(). This is actually a subroutine of
- jpeg_set_defaults(). It's broken out in case you want to change
- just the colorspace-dependent JPEG parameters.
-
-jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
- Constructs JPEG quantization tables appropriate for the indicated
- quality setting. The quality value is expressed on the 0..100 scale
- recommended by IJG (cjpeg's "-quality" switch uses this routine).
- Note that the exact mapping from quality values to tables may change
- in future IJG releases as more is learned about DCT quantization.
- If the force_baseline parameter is TRUE, then the quantization table
- entries are constrained to the range 1..255 for full JPEG baseline
- compatibility. In the current implementation, this only makes a
- difference for quality settings below 25, and it effectively prevents
- very small/low quality files from being generated. The IJG decoder
- is capable of reading the non-baseline files generated at low quality
- settings when force_baseline is FALSE, but other decoders may not be.
-
-jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
- boolean force_baseline)
- Same as jpeg_set_quality() except that the generated tables are the
- sample tables given in the JPEC spec section K.1, multiplied by the
- specified scale factor (which is expressed as a percentage; thus
- scale_factor = 100 reproduces the spec's tables). Note that larger
- scale factors give lower quality. This entry point is useful for
- conforming to the Adobe PostScript DCT conventions, but we do not
- recommend linear scaling as a user-visible quality scale otherwise.
- force_baseline again constrains the computed table entries to 1..255.
-
-int jpeg_quality_scaling (int quality)
- Converts a value on the IJG-recommended quality scale to a linear
- scaling percentage. Note that this routine may change or go away
- in future releases --- IJG may choose to adopt a scaling method that
- can't be expressed as a simple scalar multiplier, in which case the
- premise of this routine collapses. Caveat user.
-
-jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
- const unsigned int *basic_table,
- int scale_factor, boolean force_baseline)
- Allows an arbitrary quantization table to be created. which_tbl
- indicates which table slot to fill. basic_table points to an array
- of 64 unsigned ints given in normal array order. These values are
- multiplied by scale_factor/100 and then clamped to the range 1..65535
- (or to 1..255 if force_baseline is TRUE).
- CAUTION: prior to library version 6a, jpeg_add_quant_table expected
- the basic table to be given in JPEG zigzag order. If you need to
- write code that works with either older or newer versions of this
- routine, you must check the library version number. Something like
- "#if JPEG_LIB_VERSION >= 61" is the right test.
-
-jpeg_simple_progression (j_compress_ptr cinfo)
- Generates a default scan script for writing a progressive-JPEG file.
- This is the recommended method of creating a progressive file,
- unless you want to make a custom scan sequence. You must ensure that
- the JPEG color space is set correctly before calling this routine.
-
-
-Compression parameters (cinfo fields) include:
-
-J_DCT_METHOD dct_method
- Selects the algorithm used for the DCT step. Choices are:
- JDCT_ISLOW: slow but accurate integer algorithm
- JDCT_IFAST: faster, less accurate integer method
- JDCT_FLOAT: floating-point method
- JDCT_DEFAULT: default method (normally JDCT_ISLOW)
- JDCT_FASTEST: fastest method (normally JDCT_IFAST)
- The FLOAT method is very slightly more accurate than the ISLOW method,
- but may give different results on different machines due to varying
- roundoff behavior. The integer methods should give the same results
- on all machines. On machines with sufficiently fast FP hardware, the
- floating-point method may also be the fastest. The IFAST method is
- considerably less accurate than the other two; its use is not
- recommended if high quality is a concern. JDCT_DEFAULT and
- JDCT_FASTEST are macros configurable by each installation.
-
-J_COLOR_SPACE jpeg_color_space
-int num_components
- The JPEG color space and corresponding number of components; see
- "Special color spaces", below, for more info. We recommend using
- jpeg_set_color_space() if you want to change these.
-
-boolean optimize_coding
- TRUE causes the compressor to compute optimal Huffman coding tables
- for the image. This requires an extra pass over the data and
- therefore costs a good deal of space and time. The default is
- FALSE, which tells the compressor to use the supplied or default
- Huffman tables. In most cases optimal tables save only a few percent
- of file size compared to the default tables. Note that when this is
- TRUE, you need not supply Huffman tables at all, and any you do
- supply will be overwritten.
-
-unsigned int restart_interval
-int restart_in_rows
- To emit restart markers in the JPEG file, set one of these nonzero.
- Set restart_interval to specify the exact interval in MCU blocks.
- Set restart_in_rows to specify the interval in MCU rows. (If
- restart_in_rows is not 0, then restart_interval is set after the
- image width in MCUs is computed.) Defaults are zero (no restarts).
- One restart marker per MCU row is often a good choice.
- NOTE: the overhead of restart markers is higher in grayscale JPEG
- files than in color files, and MUCH higher in progressive JPEGs.
- If you use restarts, you may want to use larger intervals in those
- cases.
-
-const jpeg_scan_info * scan_info
-int num_scans
- By default, scan_info is NULL; this causes the compressor to write a
- single-scan sequential JPEG file. If not NULL, scan_info points to
- an array of scan definition records of length num_scans. The
- compressor will then write a JPEG file having one scan for each scan
- definition record. This is used to generate noninterleaved or
- progressive JPEG files. The library checks that the scan array
- defines a valid JPEG scan sequence. (jpeg_simple_progression creates
- a suitable scan definition array for progressive JPEG.) This is
- discussed further under "Progressive JPEG support".
-
-int smoothing_factor
- If non-zero, the input image is smoothed; the value should be 1 for
- minimal smoothing to 100 for maximum smoothing. Consult jcsample.c
- for details of the smoothing algorithm. The default is zero.
-
-boolean write_JFIF_header
- If TRUE, a JFIF APP0 marker is emitted. jpeg_set_defaults() and
- jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space
- (ie, YCbCr or grayscale) is selected, otherwise FALSE.
-
-UINT8 JFIF_major_version
-UINT8 JFIF_minor_version
- The version number to be written into the JFIF marker.
- jpeg_set_defaults() initializes the version to 1.01 (major=minor=1).
- You should set it to 1.02 (major=1, minor=2) if you plan to write
- any JFIF 1.02 extension markers.
-
-UINT8 density_unit
-UINT16 X_density
-UINT16 Y_density
- The resolution information to be written into the JFIF marker;
- not used otherwise. density_unit may be 0 for unknown,
- 1 for dots/inch, or 2 for dots/cm. The default values are 0,1,1
- indicating square pixels of unknown size.
-
-boolean write_Adobe_marker
- If TRUE, an Adobe APP14 marker is emitted. jpeg_set_defaults() and
- jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK,
- or YCCK is selected, otherwise FALSE. It is generally a bad idea
- to set both write_JFIF_header and write_Adobe_marker. In fact,
- you probably shouldn't change the default settings at all --- the
- default behavior ensures that the JPEG file's color space can be
- recognized by the decoder.
-
-JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
- Pointers to coefficient quantization tables, one per table slot,
- or NULL if no table is defined for a slot. Usually these should
- be set via one of the above helper routines; jpeg_add_quant_table()
- is general enough to define any quantization table. The other
- routines will set up table slot 0 for luminance quality and table
- slot 1 for chrominance.
-
-JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
-JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
- Pointers to Huffman coding tables, one per table slot, or NULL if
- no table is defined for a slot. Slots 0 and 1 are filled with the
- JPEG sample tables by jpeg_set_defaults(). If you need to allocate
- more table structures, jpeg_alloc_huff_table() may be used.
- Note that optimal Huffman tables can be computed for an image
- by setting optimize_coding, as discussed above; there's seldom
- any need to mess with providing your own Huffman tables.
-
-There are some additional cinfo fields which are not documented here
-because you currently can't change them; for example, you can't set
-arith_code TRUE because arithmetic coding is unsupported.
-
-
-Per-component parameters are stored in the struct cinfo.comp_info[i] for
-component number i. Note that components here refer to components of the
-JPEG color space, *not* the source image color space. A suitably large
-comp_info[] array is allocated by jpeg_set_defaults(); if you choose not
-to use that routine, it's up to you to allocate the array.
-
-int component_id
- The one-byte identifier code to be recorded in the JPEG file for
- this component. For the standard color spaces, we recommend you
- leave the default values alone.
-
-int h_samp_factor
-int v_samp_factor
- Horizontal and vertical sampling factors for the component; must
- be 1..4 according to the JPEG standard. Note that larger sampling
- factors indicate a higher-resolution component; many people find
- this behavior quite unintuitive. The default values are 2,2 for
- luminance components and 1,1 for chrominance components, except
- for grayscale where 1,1 is used.
-
-int quant_tbl_no
- Quantization table number for component. The default value is
- 0 for luminance components and 1 for chrominance components.
-
-int dc_tbl_no
-int ac_tbl_no
- DC and AC entropy coding table numbers. The default values are
- 0 for luminance components and 1 for chrominance components.
-
-int component_index
- Must equal the component's index in comp_info[]. (Beginning in
- release v6, the compressor library will fill this in automatically;
- you don't have to.)
-
-
-Decompression parameter selection
----------------------------------
-
-Decompression parameter selection is somewhat simpler than compression
-parameter selection, since all of the JPEG internal parameters are
-recorded in the source file and need not be supplied by the application.
-(Unless you are working with abbreviated files, in which case see
-"Abbreviated datastreams", below.) Decompression parameters control
-the postprocessing done on the image to deliver it in a format suitable
-for the application's use. Many of the parameters control speed/quality
-tradeoffs, in which faster decompression may be obtained at the price of
-a poorer-quality image. The defaults select the highest quality (slowest)
-processing.
-
-The following fields in the JPEG object are set by jpeg_read_header() and
-may be useful to the application in choosing decompression parameters:
-
-JDIMENSION image_width Width and height of image
-JDIMENSION image_height
-int num_components Number of color components
-J_COLOR_SPACE jpeg_color_space Colorspace of image
-boolean saw_JFIF_marker TRUE if a JFIF APP0 marker was seen
- UINT8 JFIF_major_version Version information from JFIF marker
- UINT8 JFIF_minor_version
- UINT8 density_unit Resolution data from JFIF marker
- UINT16 X_density
- UINT16 Y_density
-boolean saw_Adobe_marker TRUE if an Adobe APP14 marker was seen
- UINT8 Adobe_transform Color transform code from Adobe marker
-
-The JPEG color space, unfortunately, is something of a guess since the JPEG
-standard proper does not provide a way to record it. In practice most files
-adhere to the JFIF or Adobe conventions, and the decoder will recognize these
-correctly. See "Special color spaces", below, for more info.
-
-
-The decompression parameters that determine the basic properties of the
-returned image are:
-
-J_COLOR_SPACE out_color_space
- Output color space. jpeg_read_header() sets an appropriate default
- based on jpeg_color_space; typically it will be RGB or grayscale.
- The application can change this field to request output in a different
- colorspace. For example, set it to JCS_GRAYSCALE to get grayscale
- output from a color file. (This is useful for previewing: grayscale
- output is faster than full color since the color components need not
- be processed.) Note that not all possible color space transforms are
- currently implemented; you may need to extend jdcolor.c if you want an
- unusual conversion.
-
-unsigned int scale_num, scale_denom
- Scale the image by the fraction scale_num/scale_denom. Default is
- 1/1, or no scaling. Currently, the only supported scaling ratios
- are 1/1, 1/2, 1/4, and 1/8. (The library design allows for arbitrary
- scaling ratios but this is not likely to be implemented any time soon.)
- Smaller scaling ratios permit significantly faster decoding since
- fewer pixels need be processed and a simpler IDCT method can be used.
-
-boolean quantize_colors
- If set TRUE, colormapped output will be delivered. Default is FALSE,
- meaning that full-color output will be delivered.
-
-The next three parameters are relevant only if quantize_colors is TRUE.
-
-int desired_number_of_colors
- Maximum number of colors to use in generating a library-supplied color
- map (the actual number of colors is returned in a different field).
- Default 256. Ignored when the application supplies its own color map.
-
-boolean two_pass_quantize
- If TRUE, an extra pass over the image is made to select a custom color
- map for the image. This usually looks a lot better than the one-size-
- fits-all colormap that is used otherwise. Default is TRUE. Ignored
- when the application supplies its own color map.
-
-J_DITHER_MODE dither_mode
- Selects color dithering method. Supported values are:
- JDITHER_NONE no dithering: fast, very low quality
- JDITHER_ORDERED ordered dither: moderate speed and quality
- JDITHER_FS Floyd-Steinberg dither: slow, high quality
- Default is JDITHER_FS. (At present, ordered dither is implemented
- only in the single-pass, standard-colormap case. If you ask for
- ordered dither when two_pass_quantize is TRUE or when you supply
- an external color map, you'll get F-S dithering.)
-
-When quantize_colors is TRUE, the target color map is described by the next
-two fields. colormap is set to NULL by jpeg_read_header(). The application
-can supply a color map by setting colormap non-NULL and setting
-actual_number_of_colors to the map size. Otherwise, jpeg_start_decompress()
-selects a suitable color map and sets these two fields itself.
-[Implementation restriction: at present, an externally supplied colormap is
-only accepted for 3-component output color spaces.]
-
-JSAMPARRAY colormap
- The color map, represented as a 2-D pixel array of out_color_components
- rows and actual_number_of_colors columns. Ignored if not quantizing.
- CAUTION: if the JPEG library creates its own colormap, the storage
- pointed to by this field is released by jpeg_finish_decompress().
- Copy the colormap somewhere else first, if you want to save it.
-
-int actual_number_of_colors
- The number of colors in the color map.
-
-Additional decompression parameters that the application may set include:
-
-J_DCT_METHOD dct_method
- Selects the algorithm used for the DCT step. Choices are the same
- as described above for compression.
-
-boolean do_fancy_upsampling
- If TRUE, do careful upsampling of chroma components. If FALSE,
- a faster but sloppier method is used. Default is TRUE. The visual
- impact of the sloppier method is often very small.
-
-boolean do_block_smoothing
- If TRUE, interblock smoothing is applied in early stages of decoding
- progressive JPEG files; if FALSE, not. Default is TRUE. Early
- progression stages look "fuzzy" with smoothing, "blocky" without.
- In any case, block smoothing ceases to be applied after the first few
- AC coefficients are known to full accuracy, so it is relevant only
- when using buffered-image mode for progressive images.
-
-boolean enable_1pass_quant
-boolean enable_external_quant
-boolean enable_2pass_quant
- These are significant only in buffered-image mode, which is
- described in its own section below.
-
-
-The output image dimensions are given by the following fields. These are
-computed from the source image dimensions and the decompression parameters
-by jpeg_start_decompress(). You can also call jpeg_calc_output_dimensions()
-to obtain the values that will result from the current parameter settings.
-This can be useful if you are trying to pick a scaling ratio that will get
-close to a desired target size. It's also important if you are using the
-JPEG library's memory manager to allocate output buffer space, because you
-are supposed to request such buffers *before* jpeg_start_decompress().
-
-JDIMENSION output_width Actual dimensions of output image.
-JDIMENSION output_height
-int out_color_components Number of color components in out_color_space.
-int output_components Number of color components returned.
-int rec_outbuf_height Recommended height of scanline buffer.
-
-When quantizing colors, output_components is 1, indicating a single color map
-index per pixel. Otherwise it equals out_color_components. The output arrays
-are required to be output_width * output_components JSAMPLEs wide.
-
-rec_outbuf_height is the recommended minimum height (in scanlines) of the
-buffer passed to jpeg_read_scanlines(). If the buffer is smaller, the
-library will still work, but time will be wasted due to unnecessary data
-copying. In high-quality modes, rec_outbuf_height is always 1, but some
-faster, lower-quality modes set it to larger values (typically 2 to 4).
-If you are going to ask for a high-speed processing mode, you may as well
-go to the trouble of honoring rec_outbuf_height so as to avoid data copying.
-(An output buffer larger than rec_outbuf_height lines is OK, but won't
-provide any material speed improvement over that height.)
-
-
-Special color spaces
---------------------
-
-The JPEG standard itself is "color blind" and doesn't specify any particular
-color space. It is customary to convert color data to a luminance/chrominance
-color space before compressing, since this permits greater compression. The
-existing de-facto JPEG file format standards specify YCbCr or grayscale data
-(JFIF), or grayscale, RGB, YCbCr, CMYK, or YCCK (Adobe). For special
-applications such as multispectral images, other color spaces can be used,
-but it must be understood that such files will be unportable.
-
-The JPEG library can handle the most common colorspace conversions (namely
-RGB <=> YCbCr and CMYK <=> YCCK). It can also deal with data of an unknown
-color space, passing it through without conversion. If you deal extensively
-with an unusual color space, you can easily extend the library to understand
-additional color spaces and perform appropriate conversions.
-
-For compression, the source data's color space is specified by field
-in_color_space. This is transformed to the JPEG file's color space given
-by jpeg_color_space. jpeg_set_defaults() chooses a reasonable JPEG color
-space depending on in_color_space, but you can override this by calling
-jpeg_set_colorspace(). Of course you must select a supported transformation.
-jccolor.c currently supports the following transformations:
- RGB => YCbCr
- RGB => GRAYSCALE
- YCbCr => GRAYSCALE
- CMYK => YCCK
-plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB,
-YCbCr => YCbCr, CMYK => CMYK, YCCK => YCCK, and UNKNOWN => UNKNOWN.
-
-The de-facto file format standards (JFIF and Adobe) specify APPn markers that
-indicate the color space of the JPEG file. It is important to ensure that
-these are written correctly, or omitted if the JPEG file's color space is not
-one of the ones supported by the de-facto standards. jpeg_set_colorspace()
-will set the compression parameters to include or omit the APPn markers
-properly, so long as it is told the truth about the JPEG color space.
-For example, if you are writing some random 3-component color space without
-conversion, don't try to fake out the library by setting in_color_space and
-jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN. You may want to write an
-APPn marker of your own devising to identify the colorspace --- see "Special
-markers", below.
-
-When told that the color space is UNKNOWN, the library will default to using
-luminance-quality compression parameters for all color components. You may
-well want to change these parameters. See the source code for
-jpeg_set_colorspace(), in jcparam.c, for details.
-
-For decompression, the JPEG file's color space is given in jpeg_color_space,
-and this is transformed to the output color space out_color_space.
-jpeg_read_header's setting of jpeg_color_space can be relied on if the file
-conforms to JFIF or Adobe conventions, but otherwise it is no better than a
-guess. If you know the JPEG file's color space for certain, you can override
-jpeg_read_header's guess by setting jpeg_color_space. jpeg_read_header also
-selects a default output color space based on (its guess of) jpeg_color_space;
-set out_color_space to override this. Again, you must select a supported
-transformation. jdcolor.c currently supports
- YCbCr => GRAYSCALE
- YCbCr => RGB
- GRAYSCALE => RGB
- YCCK => CMYK
-as well as the null transforms. (Since GRAYSCALE=>RGB is provided, an
-application can force grayscale JPEGs to look like color JPEGs if it only
-wants to handle one case.)
-
-The two-pass color quantizer, jquant2.c, is specialized to handle RGB data
-(it weights distances appropriately for RGB colors). You'll need to modify
-the code if you want to use it for non-RGB output color spaces. Note that
-jquant2.c is used to map to an application-supplied colormap as well as for
-the normal two-pass colormap selection process.
-
-CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG
-files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect.
-This is arguably a bug in Photoshop, but if you need to work with Photoshop
-CMYK files, you will have to deal with it in your application. We cannot
-"fix" this in the library by inverting the data during the CMYK<=>YCCK
-transform, because that would break other applications, notably Ghostscript.
-Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK
-data in the same inverted-YCCK representation used in bare JPEG files, but
-the surrounding PostScript code performs an inversion using the PS image
-operator. I am told that Photoshop 3.0 will write uninverted YCCK in
-EPS/JPEG files, and will omit the PS-level inversion. (But the data
-polarity used in bare JPEG files will not change in 3.0.) In either case,
-the JPEG library must not invert the data itself, or else Ghostscript would
-read these EPS files incorrectly.
-
-
-Error handling
---------------
-
-When the default error handler is used, any error detected inside the JPEG
-routines will cause a message to be printed on stderr, followed by exit().
-You can supply your own error handling routines to override this behavior
-and to control the treatment of nonfatal warnings and trace/debug messages.
-The file example.c illustrates the most common case, which is to have the
-application regain control after an error rather than exiting.
-
-The JPEG library never writes any message directly; it always goes through
-the error handling routines. Three classes of messages are recognized:
- * Fatal errors: the library cannot continue.
- * Warnings: the library can continue, but the data is corrupt, and a
- damaged output image is likely to result.
- * Trace/informational messages. These come with a trace level indicating
- the importance of the message; you can control the verbosity of the
- program by adjusting the maximum trace level that will be displayed.
-
-You may, if you wish, simply replace the entire JPEG error handling module
-(jerror.c) with your own code. However, you can avoid code duplication by
-only replacing some of the routines depending on the behavior you need.
-This is accomplished by calling jpeg_std_error() as usual, but then overriding
-some of the method pointers in the jpeg_error_mgr struct, as illustrated by
-example.c.
-
-All of the error handling routines will receive a pointer to the JPEG object
-(a j_common_ptr which points to either a jpeg_compress_struct or a
-jpeg_decompress_struct; if you need to tell which, test the is_decompressor
-field). This struct includes a pointer to the error manager struct in its
-"err" field. Frequently, custom error handler routines will need to access
-additional data which is not known to the JPEG library or the standard error
-handler. The most convenient way to do this is to embed either the JPEG
-object or the jpeg_error_mgr struct in a larger structure that contains
-additional fields; then casting the passed pointer provides access to the
-additional fields. Again, see example.c for one way to do it. (Beginning
-with IJG version 6b, there is also a void pointer "client_data" in each
-JPEG object, which the application can also use to find related data.
-The library does not touch client_data at all.)
-
-The individual methods that you might wish to override are:
-
-error_exit (j_common_ptr cinfo)
- Receives control for a fatal error. Information sufficient to
- generate the error message has been stored in cinfo->err; call
- output_message to display it. Control must NOT return to the caller;
- generally this routine will exit() or longjmp() somewhere.
- Typically you would override this routine to get rid of the exit()
- default behavior. Note that if you continue processing, you should
- clean up the JPEG object with jpeg_abort() or jpeg_destroy().
-
-output_message (j_common_ptr cinfo)
- Actual output of any JPEG message. Override this to send messages
- somewhere other than stderr. Note that this method does not know
- how to generate a message, only where to send it.
-
-format_message (j_common_ptr cinfo, char * buffer)
- Constructs a readable error message string based on the error info
- stored in cinfo->err. This method is called by output_message. Few
- applications should need to override this method. One possible
- reason for doing so is to implement dynamic switching of error message
- language.
-
-emit_message (j_common_ptr cinfo, int msg_level)
- Decide whether or not to emit a warning or trace message; if so,
- calls output_message. The main reason for overriding this method
- would be to abort on warnings. msg_level is -1 for warnings,
- 0 and up for trace messages.
-
-Only error_exit() and emit_message() are called from the rest of the JPEG
-library; the other two are internal to the error handler.
-
-The actual message texts are stored in an array of strings which is pointed to
-by the field err->jpeg_message_table. The messages are numbered from 0 to
-err->last_jpeg_message, and it is these code numbers that are used in the
-JPEG library code. You could replace the message texts (for instance, with
-messages in French or German) by changing the message table pointer. See
-jerror.h for the default texts. CAUTION: this table will almost certainly
-change or grow from one library version to the next.
-
-It may be useful for an application to add its own message texts that are
-handled by the same mechanism. The error handler supports a second "add-on"
-message table for this purpose. To define an addon table, set the pointer
-err->addon_message_table and the message numbers err->first_addon_message and
-err->last_addon_message. If you number the addon messages beginning at 1000
-or so, you won't have to worry about conflicts with the library's built-in
-messages. See the sample applications cjpeg/djpeg for an example of using
-addon messages (the addon messages are defined in cderror.h).
-
-Actual invocation of the error handler is done via macros defined in jerror.h:
- ERREXITn(...) for fatal errors
- WARNMSn(...) for corrupt-data warnings
- TRACEMSn(...) for trace and informational messages.
-These macros store the message code and any additional parameters into the
-error handler struct, then invoke the error_exit() or emit_message() method.
-The variants of each macro are for varying numbers of additional parameters.
-The additional parameters are inserted into the generated message using
-standard printf() format codes.
-
-See jerror.h and jerror.c for further details.
-
-
-Compressed data handling (source and destination managers)
-----------------------------------------------------------
-
-The JPEG compression library sends its compressed data to a "destination
-manager" module. The default destination manager just writes the data to a
-stdio stream, but you can provide your own manager to do something else.
-Similarly, the decompression library calls a "source manager" to obtain the
-compressed data; you can provide your own source manager if you want the data
-to come from somewhere other than a stdio stream.
-
-In both cases, compressed data is processed a bufferload at a time: the
-destination or source manager provides a work buffer, and the library invokes
-the manager only when the buffer is filled or emptied. (You could define a
-one-character buffer to force the manager to be invoked for each byte, but
-that would be rather inefficient.) The buffer's size and location are
-controlled by the manager, not by the library. For example, if you desired to
-decompress a JPEG datastream that was all in memory, you could just make the
-buffer pointer and length point to the original data in memory. Then the
-buffer-reload procedure would be invoked only if the decompressor ran off the
-end of the datastream, which would indicate an erroneous datastream.
-
-The work buffer is defined as an array of datatype JOCTET, which is generally
-"char" or "unsigned char". On a machine where char is not exactly 8 bits
-wide, you must define JOCTET as a wider data type and then modify the data
-source and destination modules to transcribe the work arrays into 8-bit units
-on external storage.
-
-A data destination manager struct contains a pointer and count defining the
-next byte to write in the work buffer and the remaining free space:
-
- JOCTET * next_output_byte; /* => next byte to write in buffer */
- size_t free_in_buffer; /* # of byte spaces remaining in buffer */
-
-The library increments the pointer and decrements the count until the buffer
-is filled. The manager's empty_output_buffer method must reset the pointer
-and count. The manager is expected to remember the buffer's starting address
-and total size in private fields not visible to the library.
-
-A data destination manager provides three methods:
-
-init_destination (j_compress_ptr cinfo)
- Initialize destination. This is called by jpeg_start_compress()
- before any data is actually written. It must initialize
- next_output_byte and free_in_buffer. free_in_buffer must be
- initialized to a positive value.
-
-empty_output_buffer (j_compress_ptr cinfo)
- This is called whenever the buffer has filled (free_in_buffer
- reaches zero). In typical applications, it should write out the
- *entire* buffer (use the saved start address and buffer length;
- ignore the current state of next_output_byte and free_in_buffer).
- Then reset the pointer & count to the start of the buffer, and
- return TRUE indicating that the buffer has been dumped.
- free_in_buffer must be set to a positive value when TRUE is
- returned. A FALSE return should only be used when I/O suspension is
- desired (this operating mode is discussed in the next section).
-
-term_destination (j_compress_ptr cinfo)
- Terminate destination --- called by jpeg_finish_compress() after all
- data has been written. In most applications, this must flush any
- data remaining in the buffer. Use either next_output_byte or
- free_in_buffer to determine how much data is in the buffer.
-
-term_destination() is NOT called by jpeg_abort() or jpeg_destroy(). If you
-want the destination manager to be cleaned up during an abort, you must do it
-yourself.
-
-You will also need code to create a jpeg_destination_mgr struct, fill in its
-method pointers, and insert a pointer to the struct into the "dest" field of
-the JPEG compression object. This can be done in-line in your setup code if
-you like, but it's probably cleaner to provide a separate routine similar to
-the jpeg_stdio_dest() routine of the supplied destination manager.
-
-Decompression source managers follow a parallel design, but with some
-additional frammishes. The source manager struct contains a pointer and count
-defining the next byte to read from the work buffer and the number of bytes
-remaining:
-
- const JOCTET * next_input_byte; /* => next byte to read from buffer */
- size_t bytes_in_buffer; /* # of bytes remaining in buffer */
-
-The library increments the pointer and decrements the count until the buffer
-is emptied. The manager's fill_input_buffer method must reset the pointer and
-count. In most applications, the manager must remember the buffer's starting
-address and total size in private fields not visible to the library.
-
-A data source manager provides five methods:
-
-init_source (j_decompress_ptr cinfo)
- Initialize source. This is called by jpeg_read_header() before any
- data is actually read. Unlike init_destination(), it may leave
- bytes_in_buffer set to 0 (in which case a fill_input_buffer() call
- will occur immediately).
-
-fill_input_buffer (j_decompress_ptr cinfo)
- This is called whenever bytes_in_buffer has reached zero and more
- data is wanted. In typical applications, it should read fresh data
- into the buffer (ignoring the current state of next_input_byte and
- bytes_in_buffer), reset the pointer & count to the start of the
- buffer, and return TRUE indicating that the buffer has been reloaded.
- It is not necessary to fill the buffer entirely, only to obtain at
- least one more byte. bytes_in_buffer MUST be set to a positive value
- if TRUE is returned. A FALSE return should only be used when I/O
- suspension is desired (this mode is discussed in the next section).
-
-skip_input_data (j_decompress_ptr cinfo, long num_bytes)
- Skip num_bytes worth of data. The buffer pointer and count should
- be advanced over num_bytes input bytes, refilling the buffer as
- needed. This is used to skip over a potentially large amount of
- uninteresting data (such as an APPn marker). In some applications
- it may be possible to optimize away the reading of the skipped data,
- but it's not clear that being smart is worth much trouble; large
- skips are uncommon. bytes_in_buffer may be zero on return.
- A zero or negative skip count should be treated as a no-op.
-
-resync_to_restart (j_decompress_ptr cinfo, int desired)
- This routine is called only when the decompressor has failed to find
- a restart (RSTn) marker where one is expected. Its mission is to
- find a suitable point for resuming decompression. For most
- applications, we recommend that you just use the default resync
- procedure, jpeg_resync_to_restart(). However, if you are able to back
- up in the input data stream, or if you have a-priori knowledge about
- the likely location of restart markers, you may be able to do better.
- Read the read_restart_marker() and jpeg_resync_to_restart() routines
- in jdmarker.c if you think you'd like to implement your own resync
- procedure.
-
-term_source (j_decompress_ptr cinfo)
- Terminate source --- called by jpeg_finish_decompress() after all
- data has been read. Often a no-op.
-
-For both fill_input_buffer() and skip_input_data(), there is no such thing
-as an EOF return. If the end of the file has been reached, the routine has
-a choice of exiting via ERREXIT() or inserting fake data into the buffer.
-In most cases, generating a warning message and inserting a fake EOI marker
-is the best course of action --- this will allow the decompressor to output
-however much of the image is there. In pathological cases, the decompressor
-may swallow the EOI and again demand data ... just keep feeding it fake EOIs.
-jdatasrc.c illustrates the recommended error recovery behavior.
-
-term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want
-the source manager to be cleaned up during an abort, you must do it yourself.
-
-You will also need code to create a jpeg_source_mgr struct, fill in its method
-pointers, and insert a pointer to the struct into the "src" field of the JPEG
-decompression object. This can be done in-line in your setup code if you
-like, but it's probably cleaner to provide a separate routine similar to the
-jpeg_stdio_src() routine of the supplied source manager.
-
-For more information, consult the stdio source and destination managers
-in jdatasrc.c and jdatadst.c.
-
-
-I/O suspension
---------------
-
-Some applications need to use the JPEG library as an incremental memory-to-
-memory filter: when the compressed data buffer is filled or emptied, they want
-control to return to the outer loop, rather than expecting that the buffer can
-be emptied or reloaded within the data source/destination manager subroutine.
-The library supports this need by providing an "I/O suspension" mode, which we
-describe in this section.
-
-The I/O suspension mode is not a panacea: nothing is guaranteed about the
-maximum amount of time spent in any one call to the library, so it will not
-eliminate response-time problems in single-threaded applications. If you
-need guaranteed response time, we suggest you "bite the bullet" and implement
-a real multi-tasking capability.
-
-To use I/O suspension, cooperation is needed between the calling application
-and the data source or destination manager; you will always need a custom
-source/destination manager. (Please read the previous section if you haven't
-already.) The basic idea is that the empty_output_buffer() or
-fill_input_buffer() routine is a no-op, merely returning FALSE to indicate
-that it has done nothing. Upon seeing this, the JPEG library suspends
-operation and returns to its caller. The surrounding application is
-responsible for emptying or refilling the work buffer before calling the
-JPEG library again.
-
-Compression suspension:
-
-For compression suspension, use an empty_output_buffer() routine that returns
-FALSE; typically it will not do anything else. This will cause the
-compressor to return to the caller of jpeg_write_scanlines(), with the return
-value indicating that not all the supplied scanlines have been accepted.
-The application must make more room in the output buffer, adjust the output
-buffer pointer/count appropriately, and then call jpeg_write_scanlines()
-again, pointing to the first unconsumed scanline.
-
-When forced to suspend, the compressor will backtrack to a convenient stopping
-point (usually the start of the current MCU); it will regenerate some output
-data when restarted. Therefore, although empty_output_buffer() is only
-called when the buffer is filled, you should NOT write out the entire buffer
-after a suspension. Write only the data up to the current position of
-next_output_byte/free_in_buffer. The data beyond that point will be
-regenerated after resumption.
-
-Because of the backtracking behavior, a good-size output buffer is essential
-for efficiency; you don't want the compressor to suspend often. (In fact, an
-overly small buffer could lead to infinite looping, if a single MCU required
-more data than would fit in the buffer.) We recommend a buffer of at least
-several Kbytes. You may want to insert explicit code to ensure that you don't
-call jpeg_write_scanlines() unless there is a reasonable amount of space in
-the output buffer; in other words, flush the buffer before trying to compress
-more data.
-
-The compressor does not allow suspension while it is trying to write JPEG
-markers at the beginning and end of the file. This means that:
- * At the beginning of a compression operation, there must be enough free
- space in the output buffer to hold the header markers (typically 600 or
- so bytes). The recommended buffer size is bigger than this anyway, so
- this is not a problem as long as you start with an empty buffer. However,
- this restriction might catch you if you insert large special markers, such
- as a JFIF thumbnail image, without flushing the buffer afterwards.
- * When you call jpeg_finish_compress(), there must be enough space in the
- output buffer to emit any buffered data and the final EOI marker. In the
- current implementation, half a dozen bytes should suffice for this, but
- for safety's sake we recommend ensuring that at least 100 bytes are free
- before calling jpeg_finish_compress().
-
-A more significant restriction is that jpeg_finish_compress() cannot suspend.
-This means you cannot use suspension with multi-pass operating modes, namely
-Huffman code optimization and multiple-scan output. Those modes write the
-whole file during jpeg_finish_compress(), which will certainly result in
-buffer overrun. (Note that this restriction applies only to compression,
-not decompression. The decompressor supports input suspension in all of its
-operating modes.)
-
-Decompression suspension:
-
-For decompression suspension, use a fill_input_buffer() routine that simply
-returns FALSE (except perhaps during error recovery, as discussed below).
-This will cause the decompressor to return to its caller with an indication
-that suspension has occurred. This can happen at four places:
- * jpeg_read_header(): will return JPEG_SUSPENDED.
- * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE.
- * jpeg_read_scanlines(): will return the number of scanlines already
- completed (possibly 0).
- * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE.
-The surrounding application must recognize these cases, load more data into
-the input buffer, and repeat the call. In the case of jpeg_read_scanlines(),
-increment the passed pointers past any scanlines successfully read.
-
-Just as with compression, the decompressor will typically backtrack to a
-convenient restart point before suspending. When fill_input_buffer() is
-called, next_input_byte/bytes_in_buffer point to the current restart point,
-which is where the decompressor will backtrack to if FALSE is returned.
-The data beyond that position must NOT be discarded if you suspend; it needs
-to be re-read upon resumption. In most implementations, you'll need to shift
-this data down to the start of your work buffer and then load more data after
-it. Again, this behavior means that a several-Kbyte work buffer is essential
-for decent performance; furthermore, you should load a reasonable amount of
-new data before resuming decompression. (If you loaded, say, only one new
-byte each time around, you could waste a LOT of cycles.)
-
-The skip_input_data() source manager routine requires special care in a
-suspension scenario. This routine is NOT granted the ability to suspend the
-decompressor; it can decrement bytes_in_buffer to zero, but no more. If the
-requested skip distance exceeds the amount of data currently in the input
-buffer, then skip_input_data() must set bytes_in_buffer to zero and record the
-additional skip distance somewhere else. The decompressor will immediately
-call fill_input_buffer(), which should return FALSE, which will cause a
-suspension return. The surrounding application must then arrange to discard
-the recorded number of bytes before it resumes loading the input buffer.
-(Yes, this design is rather baroque, but it avoids complexity in the far more
-common case where a non-suspending source manager is used.)
-
-If the input data has been exhausted, we recommend that you emit a warning
-and insert dummy EOI markers just as a non-suspending data source manager
-would do. This can be handled either in the surrounding application logic or
-within fill_input_buffer(); the latter is probably more efficient. If
-fill_input_buffer() knows that no more data is available, it can set the
-pointer/count to point to a dummy EOI marker and then return TRUE just as
-though it had read more data in a non-suspending situation.
-
-The decompressor does not attempt to suspend within standard JPEG markers;
-instead it will backtrack to the start of the marker and reprocess the whole
-marker next time. Hence the input buffer must be large enough to hold the
-longest standard marker in the file. Standard JPEG markers should normally
-not exceed a few hundred bytes each (DHT tables are typically the longest).
-We recommend at least a 2K buffer for performance reasons, which is much
-larger than any correct marker is likely to be. For robustness against
-damaged marker length counts, you may wish to insert a test in your
-application for the case that the input buffer is completely full and yet
-the decoder has suspended without consuming any data --- otherwise, if this
-situation did occur, it would lead to an endless loop. (The library can't
-provide this test since it has no idea whether "the buffer is full", or
-even whether there is a fixed-size input buffer.)
-
-The input buffer would need to be 64K to allow for arbitrary COM or APPn
-markers, but these are handled specially: they are either saved into allocated
-memory, or skipped over by calling skip_input_data(). In the former case,
-suspension is handled correctly, and in the latter case, the problem of
-buffer overrun is placed on skip_input_data's shoulders, as explained above.
-Note that if you provide your own marker handling routine for large markers,
-you should consider how to deal with buffer overflow.
-
-Multiple-buffer management:
-
-In some applications it is desirable to store the compressed data in a linked
-list of buffer areas, so as to avoid data copying. This can be handled by
-having empty_output_buffer() or fill_input_buffer() set the pointer and count
-to reference the next available buffer; FALSE is returned only if no more
-buffers are available. Although seemingly straightforward, there is a
-pitfall in this approach: the backtrack that occurs when FALSE is returned
-could back up into an earlier buffer. For example, when fill_input_buffer()
-is called, the current pointer & count indicate the backtrack restart point.
-Since fill_input_buffer() will set the pointer and count to refer to a new
-buffer, the restart position must be saved somewhere else. Suppose a second
-call to fill_input_buffer() occurs in the same library call, and no
-additional input data is available, so fill_input_buffer must return FALSE.
-If the JPEG library has not moved the pointer/count forward in the current
-buffer, then *the correct restart point is the saved position in the prior
-buffer*. Prior buffers may be discarded only after the library establishes
-a restart point within a later buffer. Similar remarks apply for output into
-a chain of buffers.
-
-The library will never attempt to backtrack over a skip_input_data() call,
-so any skipped data can be permanently discarded. You still have to deal
-with the case of skipping not-yet-received data, however.
-
-It's much simpler to use only a single buffer; when fill_input_buffer() is
-called, move any unconsumed data (beyond the current pointer/count) down to
-the beginning of this buffer and then load new data into the remaining buffer
-space. This approach requires a little more data copying but is far easier
-to get right.
-
-
-Progressive JPEG support
-------------------------
-
-Progressive JPEG rearranges the stored data into a series of scans of
-increasing quality. In situations where a JPEG file is transmitted across a
-slow communications link, a decoder can generate a low-quality image very
-quickly from the first scan, then gradually improve the displayed quality as
-more scans are received. The final image after all scans are complete is
-identical to that of a regular (sequential) JPEG file of the same quality
-setting. Progressive JPEG files are often slightly smaller than equivalent
-sequential JPEG files, but the possibility of incremental display is the main
-reason for using progressive JPEG.
-
-The IJG encoder library generates progressive JPEG files when given a
-suitable "scan script" defining how to divide the data into scans.
-Creation of progressive JPEG files is otherwise transparent to the encoder.
-Progressive JPEG files can also be read transparently by the decoder library.
-If the decoding application simply uses the library as defined above, it
-will receive a final decoded image without any indication that the file was
-progressive. Of course, this approach does not allow incremental display.
-To perform incremental display, an application needs to use the decoder
-library's "buffered-image" mode, in which it receives a decoded image
-multiple times.
-
-Each displayed scan requires about as much work to decode as a full JPEG
-image of the same size, so the decoder must be fairly fast in relation to the
-data transmission rate in order to make incremental display useful. However,
-it is possible to skip displaying the image and simply add the incoming bits
-to the decoder's coefficient buffer. This is fast because only Huffman
-decoding need be done, not IDCT, upsampling, colorspace conversion, etc.
-The IJG decoder library allows the application to switch dynamically between
-displaying the image and simply absorbing the incoming bits. A properly
-coded application can automatically adapt the number of display passes to
-suit the time available as the image is received. Also, a final
-higher-quality display cycle can be performed from the buffered data after
-the end of the file is reached.
-
-Progressive compression:
-
-To create a progressive JPEG file (or a multiple-scan sequential JPEG file),
-set the scan_info cinfo field to point to an array of scan descriptors, and
-perform compression as usual. Instead of constructing your own scan list,
-you can call the jpeg_simple_progression() helper routine to create a
-recommended progression sequence; this method should be used by all
-applications that don't want to get involved in the nitty-gritty of
-progressive scan sequence design. (If you want to provide user control of
-scan sequences, you may wish to borrow the scan script reading code found
-in rdswitch.c, so that you can read scan script files just like cjpeg's.)
-When scan_info is not NULL, the compression library will store DCT'd data
-into a buffer array as jpeg_write_scanlines() is called, and will emit all
-the requested scans during jpeg_finish_compress(). This implies that
-multiple-scan output cannot be created with a suspending data destination
-manager, since jpeg_finish_compress() does not support suspension. We
-should also note that the compressor currently forces Huffman optimization
-mode when creating a progressive JPEG file, because the default Huffman
-tables are unsuitable for progressive files.
-
-Progressive decompression:
-
-When buffered-image mode is not used, the decoder library will read all of
-a multi-scan file during jpeg_start_decompress(), so that it can provide a
-final decoded image. (Here "multi-scan" means either progressive or
-multi-scan sequential.) This makes multi-scan files transparent to the
-decoding application. However, existing applications that used suspending
-input with version 5 of the IJG library will need to be modified to check
-for a suspension return from jpeg_start_decompress().
-
-To perform incremental display, an application must use the library's
-buffered-image mode. This is described in the next section.
-
-
-Buffered-image mode
--------------------
-
-In buffered-image mode, the library stores the partially decoded image in a
-coefficient buffer, from which it can be read out as many times as desired.
-This mode is typically used for incremental display of progressive JPEG files,
-but it can be used with any JPEG file. Each scan of a progressive JPEG file
-adds more data (more detail) to the buffered image. The application can
-display in lockstep with the source file (one display pass per input scan),
-or it can allow input processing to outrun display processing. By making
-input and display processing run independently, it is possible for the
-application to adapt progressive display to a wide range of data transmission
-rates.
-
-The basic control flow for buffered-image decoding is
-
- jpeg_create_decompress()
- set data source
- jpeg_read_header()
- set overall decompression parameters
- cinfo.buffered_image = TRUE; /* select buffered-image mode */
- jpeg_start_decompress()
- for (each output pass) {
- adjust output decompression parameters if required
- jpeg_start_output() /* start a new output pass */
- for (all scanlines in image) {
- jpeg_read_scanlines()
- display scanlines
- }
- jpeg_finish_output() /* terminate output pass */
- }
- jpeg_finish_decompress()
- jpeg_destroy_decompress()
-
-This differs from ordinary unbuffered decoding in that there is an additional
-level of looping. The application can choose how many output passes to make
-and how to display each pass.
-
-The simplest approach to displaying progressive images is to do one display
-pass for each scan appearing in the input file. In this case the outer loop
-condition is typically
- while (! jpeg_input_complete(&cinfo))
-and the start-output call should read
- jpeg_start_output(&cinfo, cinfo.input_scan_number);
-The second parameter to jpeg_start_output() indicates which scan of the input
-file is to be displayed; the scans are numbered starting at 1 for this
-purpose. (You can use a loop counter starting at 1 if you like, but using
-the library's input scan counter is easier.) The library automatically reads
-data as necessary to complete each requested scan, and jpeg_finish_output()
-advances to the next scan or end-of-image marker (hence input_scan_number
-will be incremented by the time control arrives back at jpeg_start_output()).
-With this technique, data is read from the input file only as needed, and
-input and output processing run in lockstep.
-
-After reading the final scan and reaching the end of the input file, the
-buffered image remains available; it can be read additional times by
-repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output()
-sequence. For example, a useful technique is to use fast one-pass color
-quantization for display passes made while the image is arriving, followed by
-a final display pass using two-pass quantization for highest quality. This
-is done by changing the library parameters before the final output pass.
-Changing parameters between passes is discussed in detail below.
-
-In general the last scan of a progressive file cannot be recognized as such
-until after it is read, so a post-input display pass is the best approach if
-you want special processing in the final pass.
-
-When done with the image, be sure to call jpeg_finish_decompress() to release
-the buffered image (or just use jpeg_destroy_decompress()).
-
-If input data arrives faster than it can be displayed, the application can
-cause the library to decode input data in advance of what's needed to produce
-output. This is done by calling the routine jpeg_consume_input().
-The return value is one of the following:
- JPEG_REACHED_SOS: reached an SOS marker (the start of a new scan)
- JPEG_REACHED_EOI: reached the EOI marker (end of image)
- JPEG_ROW_COMPLETED: completed reading one MCU row of compressed data
- JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan
- JPEG_SUSPENDED: suspended before completing any of the above
-(JPEG_SUSPENDED can occur only if a suspending data source is used.) This
-routine can be called at any time after initializing the JPEG object. It
-reads some additional data and returns when one of the indicated significant
-events occurs. (If called after the EOI marker is reached, it will
-immediately return JPEG_REACHED_EOI without attempting to read more data.)
-
-The library's output processing will automatically call jpeg_consume_input()
-whenever the output processing overtakes the input; thus, simple lockstep
-display requires no direct calls to jpeg_consume_input(). But by adding
-calls to jpeg_consume_input(), you can absorb data in advance of what is
-being displayed. This has two benefits:
- * You can limit buildup of unprocessed data in your input buffer.
- * You can eliminate extra display passes by paying attention to the
- state of the library's input processing.
-
-The first of these benefits only requires interspersing calls to
-jpeg_consume_input() with your display operations and any other processing
-you may be doing. To avoid wasting cycles due to backtracking, it's best to
-call jpeg_consume_input() only after a hundred or so new bytes have arrived.
-This is discussed further under "I/O suspension", above. (Note: the JPEG
-library currently is not thread-safe. You must not call jpeg_consume_input()
-from one thread of control if a different library routine is working on the
-same JPEG object in another thread.)
-
-When input arrives fast enough that more than one new scan is available
-before you start a new output pass, you may as well skip the output pass
-corresponding to the completed scan. This occurs for free if you pass
-cinfo.input_scan_number as the target scan number to jpeg_start_output().
-The input_scan_number field is simply the index of the scan currently being
-consumed by the input processor. You can ensure that this is up-to-date by
-emptying the input buffer just before calling jpeg_start_output(): call
-jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or
-JPEG_REACHED_EOI.
-
-The target scan number passed to jpeg_start_output() is saved in the
-cinfo.output_scan_number field. The library's output processing calls
-jpeg_consume_input() whenever the current input scan number and row within
-that scan is less than or equal to the current output scan number and row.
-Thus, input processing can "get ahead" of the output processing but is not
-allowed to "fall behind". You can achieve several different effects by
-manipulating this interlock rule. For example, if you pass a target scan
-number greater than the current input scan number, the output processor will
-wait until that scan starts to arrive before producing any output. (To avoid
-an infinite loop, the target scan number is automatically reset to the last
-scan number when the end of image is reached. Thus, if you specify a large
-target scan number, the library will just absorb the entire input file and
-then perform an output pass. This is effectively the same as what
-jpeg_start_decompress() does when you don't select buffered-image mode.)
-When you pass a target scan number equal to the current input scan number,
-the image is displayed no faster than the current input scan arrives. The
-final possibility is to pass a target scan number less than the current input
-scan number; this disables the input/output interlock and causes the output
-processor to simply display whatever it finds in the image buffer, without
-waiting for input. (However, the library will not accept a target scan
-number less than one, so you can't avoid waiting for the first scan.)
-
-When data is arriving faster than the output display processing can advance
-through the image, jpeg_consume_input() will store data into the buffered
-image beyond the point at which the output processing is reading data out
-again. If the input arrives fast enough, it may "wrap around" the buffer to
-the point where the input is more than one whole scan ahead of the output.
-If the output processing simply proceeds through its display pass without
-paying attention to the input, the effect seen on-screen is that the lower
-part of the image is one or more scans better in quality than the upper part.
-Then, when the next output scan is started, you have a choice of what target
-scan number to use. The recommended choice is to use the current input scan
-number at that time, which implies that you've skipped the output scans
-corresponding to the input scans that were completed while you processed the
-previous output scan. In this way, the decoder automatically adapts its
-speed to the arriving data, by skipping output scans as necessary to keep up
-with the arriving data.
-
-When using this strategy, you'll want to be sure that you perform a final
-output pass after receiving all the data; otherwise your last display may not
-be full quality across the whole screen. So the right outer loop logic is
-something like this:
- do {
- absorb any waiting input by calling jpeg_consume_input()
- final_pass = jpeg_input_complete(&cinfo);
- adjust output decompression parameters if required
- jpeg_start_output(&cinfo, cinfo.input_scan_number);
- ...
- jpeg_finish_output()
- } while (! final_pass);
-rather than quitting as soon as jpeg_input_complete() returns TRUE. This
-arrangement makes it simple to use higher-quality decoding parameters
-for the final pass. But if you don't want to use special parameters for
-the final pass, the right loop logic is like this:
- for (;;) {
- absorb any waiting input by calling jpeg_consume_input()
- jpeg_start_output(&cinfo, cinfo.input_scan_number);
- ...
- jpeg_finish_output()
- if (jpeg_input_complete(&cinfo) &&
- cinfo.input_scan_number == cinfo.output_scan_number)
- break;
- }
-In this case you don't need to know in advance whether an output pass is to
-be the last one, so it's not necessary to have reached EOF before starting
-the final output pass; rather, what you want to test is whether the output
-pass was performed in sync with the final input scan. This form of the loop
-will avoid an extra output pass whenever the decoder is able (or nearly able)
-to keep up with the incoming data.
-
-When the data transmission speed is high, you might begin a display pass,
-then find that much or all of the file has arrived before you can complete
-the pass. (You can detect this by noting the JPEG_REACHED_EOI return code
-from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().)
-In this situation you may wish to abort the current display pass and start a
-new one using the newly arrived information. To do so, just call
-jpeg_finish_output() and then start a new pass with jpeg_start_output().
-
-A variant strategy is to abort and restart display if more than one complete
-scan arrives during an output pass; this can be detected by noting
-JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number. This
-idea should be employed with caution, however, since the display process
-might never get to the bottom of the image before being aborted, resulting
-in the lower part of the screen being several passes worse than the upper.
-In most cases it's probably best to abort an output pass only if the whole
-file has arrived and you want to begin the final output pass immediately.
-
-When receiving data across a communication link, we recommend always using
-the current input scan number for the output target scan number; if a
-higher-quality final pass is to be done, it should be started (aborting any
-incomplete output pass) as soon as the end of file is received. However,
-many other strategies are possible. For example, the application can examine
-the parameters of the current input scan and decide whether to display it or
-not. If the scan contains only chroma data, one might choose not to use it
-as the target scan, expecting that the scan will be small and will arrive
-quickly. To skip to the next scan, call jpeg_consume_input() until it
-returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher
-number as the target scan for jpeg_start_output(); but that method doesn't
-let you inspect the next scan's parameters before deciding to display it.
-
-
-In buffered-image mode, jpeg_start_decompress() never performs input and
-thus never suspends. An application that uses input suspension with
-buffered-image mode must be prepared for suspension returns from these
-routines:
-* jpeg_start_output() performs input only if you request 2-pass quantization
- and the target scan isn't fully read yet. (This is discussed below.)
-* jpeg_read_scanlines(), as always, returns the number of scanlines that it
- was able to produce before suspending.
-* jpeg_finish_output() will read any markers following the target scan,
- up to the end of the file or the SOS marker that begins another scan.
- (But it reads no input if jpeg_consume_input() has already reached the
- end of the file or a SOS marker beyond the target output scan.)
-* jpeg_finish_decompress() will read until the end of file, and thus can
- suspend if the end hasn't already been reached (as can be tested by
- calling jpeg_input_complete()).
-jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress()
-all return TRUE if they completed their tasks, FALSE if they had to suspend.
-In the event of a FALSE return, the application must load more input data
-and repeat the call. Applications that use non-suspending data sources need
-not check the return values of these three routines.
-
-
-It is possible to change decoding parameters between output passes in the
-buffered-image mode. The decoder library currently supports only very
-limited changes of parameters. ONLY THE FOLLOWING parameter changes are
-allowed after jpeg_start_decompress() is called:
-* dct_method can be changed before each call to jpeg_start_output().
- For example, one could use a fast DCT method for early scans, changing
- to a higher quality method for the final scan.
-* dither_mode can be changed before each call to jpeg_start_output();
- of course this has no impact if not using color quantization. Typically
- one would use ordered dither for initial passes, then switch to
- Floyd-Steinberg dither for the final pass. Caution: changing dither mode
- can cause more memory to be allocated by the library. Although the amount
- of memory involved is not large (a scanline or so), it may cause the
- initial max_memory_to_use specification to be exceeded, which in the worst
- case would result in an out-of-memory failure.
-* do_block_smoothing can be changed before each call to jpeg_start_output().
- This setting is relevant only when decoding a progressive JPEG image.
- During the first DC-only scan, block smoothing provides a very "fuzzy" look
- instead of the very "blocky" look seen without it; which is better seems a
- matter of personal taste. But block smoothing is nearly always a win
- during later stages, especially when decoding a successive-approximation
- image: smoothing helps to hide the slight blockiness that otherwise shows
- up on smooth gradients until the lowest coefficient bits are sent.
-* Color quantization mode can be changed under the rules described below.
- You *cannot* change between full-color and quantized output (because that
- would alter the required I/O buffer sizes), but you can change which
- quantization method is used.
-
-When generating color-quantized output, changing quantization method is a
-very useful way of switching between high-speed and high-quality display.
-The library allows you to change among its three quantization methods:
-1. Single-pass quantization to a fixed color cube.
- Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL.
-2. Single-pass quantization to an application-supplied colormap.
- Selected by setting cinfo.colormap to point to the colormap (the value of
- two_pass_quantize is ignored); also set cinfo.actual_number_of_colors.
-3. Two-pass quantization to a colormap chosen specifically for the image.
- Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL.
- (This is the default setting selected by jpeg_read_header, but it is
- probably NOT what you want for the first pass of progressive display!)
-These methods offer successively better quality and lesser speed. However,
-only the first method is available for quantizing in non-RGB color spaces.
-
-IMPORTANT: because the different quantizer methods have very different
-working-storage requirements, the library requires you to indicate which
-one(s) you intend to use before you call jpeg_start_decompress(). (If we did
-not require this, the max_memory_to_use setting would be a complete fiction.)
-You do this by setting one or more of these three cinfo fields to TRUE:
- enable_1pass_quant Fixed color cube colormap
- enable_external_quant Externally-supplied colormap
- enable_2pass_quant Two-pass custom colormap
-All three are initialized FALSE by jpeg_read_header(). But
-jpeg_start_decompress() automatically sets TRUE the one selected by the
-current two_pass_quantize and colormap settings, so you only need to set the
-enable flags for any other quantization methods you plan to change to later.
-
-After setting the enable flags correctly at jpeg_start_decompress() time, you
-can change to any enabled quantization method by setting two_pass_quantize
-and colormap properly just before calling jpeg_start_output(). The following
-special rules apply:
-1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass
- or 2-pass mode from a different mode, or when you want the 2-pass
- quantizer to be re-run to generate a new colormap.
-2. To switch to an external colormap, or to change to a different external
- colormap than was used on the prior pass, you must call
- jpeg_new_colormap() after setting cinfo.colormap.
-NOTE: if you want to use the same colormap as was used in the prior pass,
-you should not do either of these things. This will save some nontrivial
-switchover costs.
-(These requirements exist because cinfo.colormap will always be non-NULL
-after completing a prior output pass, since both the 1-pass and 2-pass
-quantizers set it to point to their output colormaps. Thus you have to
-do one of these two things to notify the library that something has changed.
-Yup, it's a bit klugy, but it's necessary to do it this way for backwards
-compatibility.)
-
-Note that in buffered-image mode, the library generates any requested colormap
-during jpeg_start_output(), not during jpeg_start_decompress().
-
-When using two-pass quantization, jpeg_start_output() makes a pass over the
-buffered image to determine the optimum color map; it therefore may take a
-significant amount of time, whereas ordinarily it does little work. The
-progress monitor hook is called during this pass, if defined. It is also
-important to realize that if the specified target scan number is greater than
-or equal to the current input scan number, jpeg_start_output() will attempt
-to consume input as it makes this pass. If you use a suspending data source,
-you need to check for a FALSE return from jpeg_start_output() under these
-conditions. The combination of 2-pass quantization and a not-yet-fully-read
-target scan is the only case in which jpeg_start_output() will consume input.
-
-
-Application authors who support buffered-image mode may be tempted to use it
-for all JPEG images, even single-scan ones. This will work, but it is
-inefficient: there is no need to create an image-sized coefficient buffer for
-single-scan images. Requesting buffered-image mode for such an image wastes
-memory. Worse, it can cost time on large images, since the buffered data has
-to be swapped out or written to a temporary file. If you are concerned about
-maximum performance on baseline JPEG files, you should use buffered-image
-mode only when the incoming file actually has multiple scans. This can be
-tested by calling jpeg_has_multiple_scans(), which will return a correct
-result at any time after jpeg_read_header() completes.
-
-It is also worth noting that when you use jpeg_consume_input() to let input
-processing get ahead of output processing, the resulting pattern of access to
-the coefficient buffer is quite nonsequential. It's best to use the memory
-manager jmemnobs.c if you can (ie, if you have enough real or virtual main
-memory). If not, at least make sure that max_memory_to_use is set as high as
-possible. If the JPEG memory manager has to use a temporary file, you will
-probably see a lot of disk traffic and poor performance. (This could be
-improved with additional work on the memory manager, but we haven't gotten
-around to it yet.)
-
-In some applications it may be convenient to use jpeg_consume_input() for all
-input processing, including reading the initial markers; that is, you may
-wish to call jpeg_consume_input() instead of jpeg_read_header() during
-startup. This works, but note that you must check for JPEG_REACHED_SOS and
-JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes.
-Once the first SOS marker has been reached, you must call
-jpeg_start_decompress() before jpeg_consume_input() will consume more input;
-it'll just keep returning JPEG_REACHED_SOS until you do. If you read a
-tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI
-without ever returning JPEG_REACHED_SOS; be sure to check for this case.
-If this happens, the decompressor will not read any more input until you call
-jpeg_abort() to reset it. It is OK to call jpeg_consume_input() even when not
-using buffered-image mode, but in that case it's basically a no-op after the
-initial markers have been read: it will just return JPEG_SUSPENDED.
-
-
-Abbreviated datastreams and multiple images
--------------------------------------------
-
-A JPEG compression or decompression object can be reused to process multiple
-images. This saves a small amount of time per image by eliminating the
-"create" and "destroy" operations, but that isn't the real purpose of the
-feature. Rather, reuse of an object provides support for abbreviated JPEG
-datastreams. Object reuse can also simplify processing a series of images in
-a single input or output file. This section explains these features.
-
-A JPEG file normally contains several hundred bytes worth of quantization
-and Huffman tables. In a situation where many images will be stored or
-transmitted with identical tables, this may represent an annoying overhead.
-The JPEG standard therefore permits tables to be omitted. The standard
-defines three classes of JPEG datastreams:
- * "Interchange" datastreams contain an image and all tables needed to decode
- the image. These are the usual kind of JPEG file.
- * "Abbreviated image" datastreams contain an image, but are missing some or
- all of the tables needed to decode that image.
- * "Abbreviated table specification" (henceforth "tables-only") datastreams
- contain only table specifications.
-To decode an abbreviated image, it is necessary to load the missing table(s)
-into the decoder beforehand. This can be accomplished by reading a separate
-tables-only file. A variant scheme uses a series of images in which the first
-image is an interchange (complete) datastream, while subsequent ones are
-abbreviated and rely on the tables loaded by the first image. It is assumed
-that once the decoder has read a table, it will remember that table until a
-new definition for the same table number is encountered.
-
-It is the application designer's responsibility to figure out how to associate
-the correct tables with an abbreviated image. While abbreviated datastreams
-can be useful in a closed environment, their use is strongly discouraged in
-any situation where data exchange with other applications might be needed.
-Caveat designer.
-
-The JPEG library provides support for reading and writing any combination of
-tables-only datastreams and abbreviated images. In both compression and
-decompression objects, a quantization or Huffman table will be retained for
-the lifetime of the object, unless it is overwritten by a new table definition.
-
-
-To create abbreviated image datastreams, it is only necessary to tell the
-compressor not to emit some or all of the tables it is using. Each
-quantization and Huffman table struct contains a boolean field "sent_table",
-which normally is initialized to FALSE. For each table used by the image, the
-header-writing process emits the table and sets sent_table = TRUE unless it is
-already TRUE. (In normal usage, this prevents outputting the same table
-definition multiple times, as would otherwise occur because the chroma
-components typically share tables.) Thus, setting this field to TRUE before
-calling jpeg_start_compress() will prevent the table from being written at
-all.
-
-If you want to create a "pure" abbreviated image file containing no tables,
-just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the
-tables. If you want to emit some but not all tables, you'll need to set the
-individual sent_table fields directly.
-
-To create an abbreviated image, you must also call jpeg_start_compress()
-with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress()
-will force all the sent_table fields to FALSE. (This is a safety feature to
-prevent abbreviated images from being created accidentally.)
-
-To create a tables-only file, perform the same parameter setup that you
-normally would, but instead of calling jpeg_start_compress() and so on, call
-jpeg_write_tables(&cinfo). This will write an abbreviated datastream
-containing only SOI, DQT and/or DHT markers, and EOI. All the quantization
-and Huffman tables that are currently defined in the compression object will
-be emitted unless their sent_tables flag is already TRUE, and then all the
-sent_tables flags will be set TRUE.
-
-A sure-fire way to create matching tables-only and abbreviated image files
-is to proceed as follows:
-
- create JPEG compression object
- set JPEG parameters
- set destination to tables-only file
- jpeg_write_tables(&cinfo);
- set destination to image file
- jpeg_start_compress(&cinfo, FALSE);
- write data...
- jpeg_finish_compress(&cinfo);
-
-Since the JPEG parameters are not altered between writing the table file and
-the abbreviated image file, the same tables are sure to be used. Of course,
-you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence
-many times to produce many abbreviated image files matching the table file.
-
-You cannot suppress output of the computed Huffman tables when Huffman
-optimization is selected. (If you could, there'd be no way to decode the
-image...) Generally, you don't want to set optimize_coding = TRUE when
-you are trying to produce abbreviated files.
-
-In some cases you might want to compress an image using tables which are
-not stored in the application, but are defined in an interchange or
-tables-only file readable by the application. This can be done by setting up
-a JPEG decompression object to read the specification file, then copying the
-tables into your compression object. See jpeg_copy_critical_parameters()
-for an example of copying quantization tables.
-
-
-To read abbreviated image files, you simply need to load the proper tables
-into the decompression object before trying to read the abbreviated image.
-If the proper tables are stored in the application program, you can just
-allocate the table structs and fill in their contents directly. For example,
-to load a fixed quantization table into table slot "n":
-
- if (cinfo.quant_tbl_ptrs[n] == NULL)
- cinfo.quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) &cinfo);
- quant_ptr = cinfo.quant_tbl_ptrs[n]; /* quant_ptr is JQUANT_TBL* */
- for (i = 0; i < 64; i++) {
- /* Qtable[] is desired quantization table, in natural array order */
- quant_ptr->quantval[i] = Qtable[i];
- }
-
-Code to load a fixed Huffman table is typically (for AC table "n"):
-
- if (cinfo.ac_huff_tbl_ptrs[n] == NULL)
- cinfo.ac_huff_tbl_ptrs[n] = jpeg_alloc_huff_table((j_common_ptr) &cinfo);
- huff_ptr = cinfo.ac_huff_tbl_ptrs[n]; /* huff_ptr is JHUFF_TBL* */
- for (i = 1; i <= 16; i++) {
- /* counts[i] is number of Huffman codes of length i bits, i=1..16 */
- huff_ptr->bits[i] = counts[i];
- }
- for (i = 0; i < 256; i++) {
- /* symbols[] is the list of Huffman symbols, in code-length order */
- huff_ptr->huffval[i] = symbols[i];
- }
-
-(Note that trying to set cinfo.quant_tbl_ptrs[n] to point directly at a
-constant JQUANT_TBL object is not safe. If the incoming file happened to
-contain a quantization table definition, your master table would get
-overwritten! Instead allocate a working table copy and copy the master table
-into it, as illustrated above. Ditto for Huffman tables, of course.)
-
-You might want to read the tables from a tables-only file, rather than
-hard-wiring them into your application. The jpeg_read_header() call is
-sufficient to read a tables-only file. You must pass a second parameter of
-FALSE to indicate that you do not require an image to be present. Thus, the
-typical scenario is
-
- create JPEG decompression object
- set source to tables-only file
- jpeg_read_header(&cinfo, FALSE);
- set source to abbreviated image file
- jpeg_read_header(&cinfo, TRUE);
- set decompression parameters
- jpeg_start_decompress(&cinfo);
- read data...
- jpeg_finish_decompress(&cinfo);
-
-In some cases, you may want to read a file without knowing whether it contains
-an image or just tables. In that case, pass FALSE and check the return value
-from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found,
-JPEG_HEADER_TABLES_ONLY if only tables were found. (A third return value,
-JPEG_SUSPENDED, is possible when using a suspending data source manager.)
-Note that jpeg_read_header() will not complain if you read an abbreviated
-image for which you haven't loaded the missing tables; the missing-table check
-occurs later, in jpeg_start_decompress().
-
-
-It is possible to read a series of images from a single source file by
-repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence,
-without releasing/recreating the JPEG object or the data source module.
-(If you did reinitialize, any partial bufferload left in the data source
-buffer at the end of one image would be discarded, causing you to lose the
-start of the next image.) When you use this method, stored tables are
-automatically carried forward, so some of the images can be abbreviated images
-that depend on tables from earlier images.
-
-If you intend to write a series of images into a single destination file,
-you might want to make a specialized data destination module that doesn't
-flush the output buffer at term_destination() time. This would speed things
-up by some trifling amount. Of course, you'd need to remember to flush the
-buffer after the last image. You can make the later images be abbreviated
-ones by passing FALSE to jpeg_start_compress().
-
-
-Special markers
----------------
-
-Some applications may need to insert or extract special data in the JPEG
-datastream. The JPEG standard provides marker types "COM" (comment) and
-"APP0" through "APP15" (application) to hold application-specific data.
-Unfortunately, the use of these markers is not specified by the standard.
-COM markers are fairly widely used to hold user-supplied text. The JFIF file
-format spec uses APP0 markers with specified initial strings to hold certain
-data. Adobe applications use APP14 markers beginning with the string "Adobe"
-for miscellaneous data. Other APPn markers are rarely seen, but might
-contain almost anything.
-
-If you wish to store user-supplied text, we recommend you use COM markers
-and place readable 7-bit ASCII text in them. Newline conventions are not
-standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR
-(Mac style). A robust COM reader should be able to cope with random binary
-garbage, including nulls, since some applications generate COM markers
-containing non-ASCII junk. (But yours should not be one of them.)
-
-For program-supplied data, use an APPn marker, and be sure to begin it with an
-identifying string so that you can tell whether the marker is actually yours.
-It's probably best to avoid using APP0 or APP14 for any private markers.
-(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you
-not use APP8 markers for any private purposes, either.)
-
-Keep in mind that at most 65533 bytes can be put into one marker, but you
-can have as many markers as you like.
-
-By default, the IJG compression library will write a JFIF APP0 marker if the
-selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if
-the selected colorspace is RGB, CMYK, or YCCK. You can disable this, but
-we don't recommend it. The decompression library will recognize JFIF and
-Adobe markers and will set the JPEG colorspace properly when one is found.
-
-
-You can write special markers immediately following the datastream header by
-calling jpeg_write_marker() after jpeg_start_compress() and before the first
-call to jpeg_write_scanlines(). When you do this, the markers appear after
-the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before
-all else. Specify the marker type parameter as "JPEG_COM" for COM or
-"JPEG_APP0 + n" for APPn. (Actually, jpeg_write_marker will let you write
-any marker type, but we don't recommend writing any other kinds of marker.)
-For example, to write a user comment string pointed to by comment_text:
- jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text));
-
-If it's not convenient to store all the marker data in memory at once,
-you can instead call jpeg_write_m_header() followed by multiple calls to
-jpeg_write_m_byte(). If you do it this way, it's your responsibility to
-call jpeg_write_m_byte() exactly the number of times given in the length
-parameter to jpeg_write_m_header(). (This method lets you empty the
-output buffer partway through a marker, which might be important when
-using a suspending data destination module. In any case, if you are using
-a suspending destination, you should flush its buffer after inserting
-any special markers. See "I/O suspension".)
-
-Or, if you prefer to synthesize the marker byte sequence yourself,
-you can just cram it straight into the data destination module.
-
-If you are writing JFIF 1.02 extension markers (thumbnail images), don't
-forget to set cinfo.JFIF_minor_version = 2 so that the encoder will write the
-correct JFIF version number in the JFIF header marker. The library's default
-is to write version 1.01, but that's wrong if you insert any 1.02 extension
-markers. (We could probably get away with just defaulting to 1.02, but there
-used to be broken decoders that would complain about unknown minor version
-numbers. To reduce compatibility risks it's safest not to write 1.02 unless
-you are actually using 1.02 extensions.)
-
-
-When reading, two methods of handling special markers are available:
-1. You can ask the library to save the contents of COM and/or APPn markers
-into memory, and then examine them at your leisure afterwards.
-2. You can supply your own routine to process COM and/or APPn markers
-on-the-fly as they are read.
-The first method is simpler to use, especially if you are using a suspending
-data source; writing a marker processor that copes with input suspension is
-not easy (consider what happens if the marker is longer than your available
-input buffer). However, the second method conserves memory since the marker
-data need not be kept around after it's been processed.
-
-For either method, you'd normally set up marker handling after creating a
-decompression object and before calling jpeg_read_header(), because the
-markers of interest will typically be near the head of the file and so will
-be scanned by jpeg_read_header. Once you've established a marker handling
-method, it will be used for the life of that decompression object
-(potentially many datastreams), unless you change it. Marker handling is
-determined separately for COM markers and for each APPn marker code.
-
-
-To save the contents of special markers in memory, call
- jpeg_save_markers(cinfo, marker_code, length_limit)
-where marker_code is the marker type to save, JPEG_COM or JPEG_APP0+n.
-(To arrange to save all the special marker types, you need to call this
-routine 17 times, for COM and APP0-APP15.) If the incoming marker is longer
-than length_limit data bytes, only length_limit bytes will be saved; this
-parameter allows you to avoid chewing up memory when you only need to see the
-first few bytes of a potentially large marker. If you want to save all the
-data, set length_limit to 0xFFFF; that is enough since marker lengths are only
-16 bits. As a special case, setting length_limit to 0 prevents that marker
-type from being saved at all. (That is the default behavior, in fact.)
-
-After jpeg_read_header() completes, you can examine the special markers by
-following the cinfo->marker_list pointer chain. All the special markers in
-the file appear in this list, in order of their occurrence in the file (but
-omitting any markers of types you didn't ask for). Both the original data
-length and the saved data length are recorded for each list entry; the latter
-will not exceed length_limit for the particular marker type. Note that these
-lengths exclude the marker length word, whereas the stored representation
-within the JPEG file includes it. (Hence the maximum data length is really
-only 65533.)
-
-It is possible that additional special markers appear in the file beyond the
-SOS marker at which jpeg_read_header stops; if so, the marker list will be
-extended during reading of the rest of the file. This is not expected to be
-common, however. If you are short on memory you may want to reset the length
-limit to zero for all marker types after finishing jpeg_read_header, to
-ensure that the max_memory_to_use setting cannot be exceeded due to addition
-of later markers.
-
-The marker list remains stored until you call jpeg_finish_decompress or
-jpeg_abort, at which point the memory is freed and the list is set to empty.
-(jpeg_destroy also releases the storage, of course.)
-
-Note that the library is internally interested in APP0 and APP14 markers;
-if you try to set a small nonzero length limit on these types, the library
-will silently force the length up to the minimum it wants. (But you can set
-a zero length limit to prevent them from being saved at all.) Also, in a
-16-bit environment, the maximum length limit may be constrained to less than
-65533 by malloc() limitations. It is therefore best not to assume that the
-effective length limit is exactly what you set it to be.
-
-
-If you want to supply your own marker-reading routine, you do it by calling
-jpeg_set_marker_processor(). A marker processor routine must have the
-signature
- boolean jpeg_marker_parser_method (j_decompress_ptr cinfo)
-Although the marker code is not explicitly passed, the routine can find it
-in cinfo->unread_marker. At the time of call, the marker proper has been
-read from the data source module. The processor routine is responsible for
-reading the marker length word and the remaining parameter bytes, if any.
-Return TRUE to indicate success. (FALSE should be returned only if you are
-using a suspending data source and it tells you to suspend. See the standard
-marker processors in jdmarker.c for appropriate coding methods if you need to
-use a suspending data source.)
-
-If you override the default APP0 or APP14 processors, it is up to you to
-recognize JFIF and Adobe markers if you want colorspace recognition to occur
-properly. We recommend copying and extending the default processors if you
-want to do that. (A better idea is to save these marker types for later
-examination by calling jpeg_save_markers(); that method doesn't interfere
-with the library's own processing of these markers.)
-
-jpeg_set_marker_processor() and jpeg_save_markers() are mutually exclusive
---- if you call one it overrides any previous call to the other, for the
-particular marker type specified.
-
-A simple example of an external COM processor can be found in djpeg.c.
-Also, see jpegtran.c for an example of using jpeg_save_markers.
-
-
-Raw (downsampled) image data
-----------------------------
-
-Some applications need to supply already-downsampled image data to the JPEG
-compressor, or to receive raw downsampled data from the decompressor. The
-library supports this requirement by allowing the application to write or
-read raw data, bypassing the normal preprocessing or postprocessing steps.
-The interface is different from the standard one and is somewhat harder to
-use. If your interest is merely in bypassing color conversion, we recommend
-that you use the standard interface and simply set jpeg_color_space =
-in_color_space (or jpeg_color_space = out_color_space for decompression).
-The mechanism described in this section is necessary only to supply or
-receive downsampled image data, in which not all components have the same
-dimensions.
-
-
-To compress raw data, you must supply the data in the colorspace to be used
-in the JPEG file (please read the earlier section on Special color spaces)
-and downsampled to the sampling factors specified in the JPEG parameters.
-You must supply the data in the format used internally by the JPEG library,
-namely a JSAMPIMAGE array. This is an array of pointers to two-dimensional
-arrays, each of type JSAMPARRAY. Each 2-D array holds the values for one
-color component. This structure is necessary since the components are of
-different sizes. If the image dimensions are not a multiple of the MCU size,
-you must also pad the data correctly (usually, this is done by replicating
-the last column and/or row). The data must be padded to a multiple of a DCT
-block in each component: that is, each downsampled row must contain a
-multiple of 8 valid samples, and there must be a multiple of 8 sample rows
-for each component. (For applications such as conversion of digital TV
-images, the standard image size is usually a multiple of the DCT block size,
-so that no padding need actually be done.)
-
-The procedure for compression of raw data is basically the same as normal
-compression, except that you call jpeg_write_raw_data() in place of
-jpeg_write_scanlines(). Before calling jpeg_start_compress(), you must do
-the following:
- * Set cinfo->raw_data_in to TRUE. (It is set FALSE by jpeg_set_defaults().)
- This notifies the library that you will be supplying raw data.
- * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace()
- call is a good idea. Note that since color conversion is bypassed,
- in_color_space is ignored, except that jpeg_set_defaults() uses it to
- choose the default jpeg_color_space setting.
- * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and
- cinfo->comp_info[i].v_samp_factor, are correct. Since these indicate the
- dimensions of the data you are supplying, it's wise to set them
- explicitly, rather than assuming the library's defaults are what you want.
-
-To pass raw data to the library, call jpeg_write_raw_data() in place of
-jpeg_write_scanlines(). The two routines work similarly except that
-jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY.
-The scanlines count passed to and returned from jpeg_write_raw_data is
-measured in terms of the component with the largest v_samp_factor.
-
-jpeg_write_raw_data() processes one MCU row per call, which is to say
-v_samp_factor*DCTSIZE sample rows of each component. The passed num_lines
-value must be at least max_v_samp_factor*DCTSIZE, and the return value will
-be exactly that amount (or possibly some multiple of that amount, in future
-library versions). This is true even on the last call at the bottom of the
-image; don't forget to pad your data as necessary.
-
-The required dimensions of the supplied data can be computed for each
-component as
- cinfo->comp_info[i].width_in_blocks*DCTSIZE samples per row
- cinfo->comp_info[i].height_in_blocks*DCTSIZE rows in image
-after jpeg_start_compress() has initialized those fields. If the valid data
-is smaller than this, it must be padded appropriately. For some sampling
-factors and image sizes, additional dummy DCT blocks are inserted to make
-the image a multiple of the MCU dimensions. The library creates such dummy
-blocks itself; it does not read them from your supplied data. Therefore you
-need never pad by more than DCTSIZE samples. An example may help here.
-Assume 2h2v downsampling of YCbCr data, that is
- cinfo->comp_info[0].h_samp_factor = 2 for Y
- cinfo->comp_info[0].v_samp_factor = 2
- cinfo->comp_info[1].h_samp_factor = 1 for Cb
- cinfo->comp_info[1].v_samp_factor = 1
- cinfo->comp_info[2].h_samp_factor = 1 for Cr
- cinfo->comp_info[2].v_samp_factor = 1
-and suppose that the nominal image dimensions (cinfo->image_width and
-cinfo->image_height) are 101x101 pixels. Then jpeg_start_compress() will
-compute downsampled_width = 101 and width_in_blocks = 13 for Y,
-downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same
-for the height fields). You must pad the Y data to at least 13*8 = 104
-columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows. The
-MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16
-scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual
-sample rows of Y and 8 each of Cb and Cr. A total of 7 MCU rows are needed,
-so you must pass a total of 7*16 = 112 "scanlines". The last DCT block row
-of Y data is dummy, so it doesn't matter what you pass for it in the data
-arrays, but the scanlines count must total up to 112 so that all of the Cb
-and Cr data gets passed.
-
-Output suspension is supported with raw-data compression: if the data
-destination module suspends, jpeg_write_raw_data() will return 0.
-In this case the same data rows must be passed again on the next call.
-
-
-Decompression with raw data output implies bypassing all postprocessing:
-you cannot ask for rescaling or color quantization, for instance. More
-seriously, you must deal with the color space and sampling factors present in
-the incoming file. If your application only handles, say, 2h1v YCbCr data,
-you must check for and fail on other color spaces or other sampling factors.
-The library will not convert to a different color space for you.
-
-To obtain raw data output, set cinfo->raw_data_out = TRUE before
-jpeg_start_decompress() (it is set FALSE by jpeg_read_header()). Be sure to
-verify that the color space and sampling factors are ones you can handle.
-Then call jpeg_read_raw_data() in place of jpeg_read_scanlines(). The
-decompression process is otherwise the same as usual.
-
-jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a
-buffer of at least max_v_samp_factor*DCTSIZE scanlines (scanline counting is
-the same as for raw-data compression). The buffer you pass must be large
-enough to hold the actual data plus padding to DCT-block boundaries. As with
-compression, any entirely dummy DCT blocks are not processed so you need not
-allocate space for them, but the total scanline count includes them. The
-above example of computing buffer dimensions for raw-data compression is
-equally valid for decompression.
-
-Input suspension is supported with raw-data decompression: if the data source
-module suspends, jpeg_read_raw_data() will return 0. You can also use
-buffered-image mode to read raw data in multiple passes.
-
-
-Really raw data: DCT coefficients
----------------------------------
-
-It is possible to read or write the contents of a JPEG file as raw DCT
-coefficients. This facility is mainly intended for use in lossless
-transcoding between different JPEG file formats. Other possible applications
-include lossless cropping of a JPEG image, lossless reassembly of a
-multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc.
-
-To read the contents of a JPEG file as DCT coefficients, open the file and do
-jpeg_read_header() as usual. But instead of calling jpeg_start_decompress()
-and jpeg_read_scanlines(), call jpeg_read_coefficients(). This will read the
-entire image into a set of virtual coefficient-block arrays, one array per
-component. The return value is a pointer to an array of virtual-array
-descriptors. Each virtual array can be accessed directly using the JPEG
-memory manager's access_virt_barray method (see Memory management, below,
-and also read structure.doc's discussion of virtual array handling). Or,
-for simple transcoding to a different JPEG file format, the array list can
-just be handed directly to jpeg_write_coefficients().
-
-Each block in the block arrays contains quantized coefficient values in
-normal array order (not JPEG zigzag order). The block arrays contain only
-DCT blocks containing real data; any entirely-dummy blocks added to fill out
-interleaved MCUs at the right or bottom edges of the image are discarded
-during reading and are not stored in the block arrays. (The size of each
-block array can be determined from the width_in_blocks and height_in_blocks
-fields of the component's comp_info entry.) This is also the data format
-expected by jpeg_write_coefficients().
-
-When you are done using the virtual arrays, call jpeg_finish_decompress()
-to release the array storage and return the decompression object to an idle
-state; or just call jpeg_destroy() if you don't need to reuse the object.
-
-If you use a suspending data source, jpeg_read_coefficients() will return
-NULL if it is forced to suspend; a non-NULL return value indicates successful
-completion. You need not test for a NULL return value when using a
-non-suspending data source.
-
-It is also possible to call jpeg_read_coefficients() to obtain access to the
-decoder's coefficient arrays during a normal decode cycle in buffered-image
-mode. This frammish might be useful for progressively displaying an incoming
-image and then re-encoding it without loss. To do this, decode in buffered-
-image mode as discussed previously, then call jpeg_read_coefficients() after
-the last jpeg_finish_output() call. The arrays will be available for your use
-until you call jpeg_finish_decompress().
-
-
-To write the contents of a JPEG file as DCT coefficients, you must provide
-the DCT coefficients stored in virtual block arrays. You can either pass
-block arrays read from an input JPEG file by jpeg_read_coefficients(), or
-allocate virtual arrays from the JPEG compression object and fill them
-yourself. In either case, jpeg_write_coefficients() is substituted for
-jpeg_start_compress() and jpeg_write_scanlines(). Thus the sequence is
- * Create compression object
- * Set all compression parameters as necessary
- * Request virtual arrays if needed
- * jpeg_write_coefficients()
- * jpeg_finish_compress()
- * Destroy or re-use compression object
-jpeg_write_coefficients() is passed a pointer to an array of virtual block
-array descriptors; the number of arrays is equal to cinfo.num_components.
-
-The virtual arrays need only have been requested, not realized, before
-jpeg_write_coefficients() is called. A side-effect of
-jpeg_write_coefficients() is to realize any virtual arrays that have been
-requested from the compression object's memory manager. Thus, when obtaining
-the virtual arrays from the compression object, you should fill the arrays
-after calling jpeg_write_coefficients(). The data is actually written out
-when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes
-the file header.
-
-When writing raw DCT coefficients, it is crucial that the JPEG quantization
-tables and sampling factors match the way the data was encoded, or the
-resulting file will be invalid. For transcoding from an existing JPEG file,
-we recommend using jpeg_copy_critical_parameters(). This routine initializes
-all the compression parameters to default values (like jpeg_set_defaults()),
-then copies the critical information from a source decompression object.
-The decompression object should have just been used to read the entire
-JPEG input file --- that is, it should be awaiting jpeg_finish_decompress().
-
-jpeg_write_coefficients() marks all tables stored in the compression object
-as needing to be written to the output file (thus, it acts like
-jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid
-emitting abbreviated JPEG files by accident. If you really want to emit an
-abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables'
-individual sent_table flags, between calling jpeg_write_coefficients() and
-jpeg_finish_compress().
-
-
-Progress monitoring
--------------------
-
-Some applications may need to regain control from the JPEG library every so
-often. The typical use of this feature is to produce a percent-done bar or
-other progress display. (For a simple example, see cjpeg.c or djpeg.c.)
-Although you do get control back frequently during the data-transferring pass
-(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes
-will occur inside jpeg_finish_compress or jpeg_start_decompress; those
-routines may take a long time to execute, and you don't get control back
-until they are done.
-
-You can define a progress-monitor routine which will be called periodically
-by the library. No guarantees are made about how often this call will occur,
-so we don't recommend you use it for mouse tracking or anything like that.
-At present, a call will occur once per MCU row, scanline, or sample row
-group, whichever unit is convenient for the current processing mode; so the
-wider the image, the longer the time between calls. During the data
-transferring pass, only one call occurs per call of jpeg_read_scanlines or
-jpeg_write_scanlines, so don't pass a large number of scanlines at once if
-you want fine resolution in the progress count. (If you really need to use
-the callback mechanism for time-critical tasks like mouse tracking, you could
-insert additional calls inside some of the library's inner loops.)
-
-To establish a progress-monitor callback, create a struct jpeg_progress_mgr,
-fill in its progress_monitor field with a pointer to your callback routine,
-and set cinfo->progress to point to the struct. The callback will be called
-whenever cinfo->progress is non-NULL. (This pointer is set to NULL by
-jpeg_create_compress or jpeg_create_decompress; the library will not change
-it thereafter. So if you allocate dynamic storage for the progress struct,
-make sure it will live as long as the JPEG object does. Allocating from the
-JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.) You
-can use the same callback routine for both compression and decompression.
-
-The jpeg_progress_mgr struct contains four fields which are set by the library:
- long pass_counter; /* work units completed in this pass */
- long pass_limit; /* total number of work units in this pass */
- int completed_passes; /* passes completed so far */
- int total_passes; /* total number of passes expected */
-During any one pass, pass_counter increases from 0 up to (not including)
-pass_limit; the step size is usually but not necessarily 1. The pass_limit
-value may change from one pass to another. The expected total number of
-passes is in total_passes, and the number of passes already completed is in
-completed_passes. Thus the fraction of work completed may be estimated as
- completed_passes + (pass_counter/pass_limit)
- --------------------------------------------
- total_passes
-ignoring the fact that the passes may not be equal amounts of work.
-
-When decompressing, pass_limit can even change within a pass, because it
-depends on the number of scans in the JPEG file, which isn't always known in
-advance. The computed fraction-of-work-done may jump suddenly (if the library
-discovers it has overestimated the number of scans) or even decrease (in the
-opposite case). It is not wise to put great faith in the work estimate.
-
-When using the decompressor's buffered-image mode, the progress monitor work
-estimate is likely to be completely unhelpful, because the library has no way
-to know how many output passes will be demanded of it. Currently, the library
-sets total_passes based on the assumption that there will be one more output
-pass if the input file end hasn't yet been read (jpeg_input_complete() isn't
-TRUE), but no more output passes if the file end has been reached when the
-output pass is started. This means that total_passes will rise as additional
-output passes are requested. If you have a way of determining the input file
-size, estimating progress based on the fraction of the file that's been read
-will probably be more useful than using the library's value.
-
-
-Memory management
------------------
-
-This section covers some key facts about the JPEG library's built-in memory
-manager. For more info, please read structure.doc's section about the memory
-manager, and consult the source code if necessary.
-
-All memory and temporary file allocation within the library is done via the
-memory manager. If necessary, you can replace the "back end" of the memory
-manager to control allocation yourself (for example, if you don't want the
-library to use malloc() and free() for some reason).
-
-Some data is allocated "permanently" and will not be freed until the JPEG
-object is destroyed. Most data is allocated "per image" and is freed by
-jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort. You can call the
-memory manager yourself to allocate structures that will automatically be
-freed at these times. Typical code for this is
- ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size);
-Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object.
-Use alloc_large instead of alloc_small for anything bigger than a few Kbytes.
-There are also alloc_sarray and alloc_barray routines that automatically
-build 2-D sample or block arrays.
-
-The library's minimum space requirements to process an image depend on the
-image's width, but not on its height, because the library ordinarily works
-with "strip" buffers that are as wide as the image but just a few rows high.
-Some operating modes (eg, two-pass color quantization) require full-image
-buffers. Such buffers are treated as "virtual arrays": only the current strip
-need be in memory, and the rest can be swapped out to a temporary file.
-
-If you use the simplest memory manager back end (jmemnobs.c), then no
-temporary files are used; virtual arrays are simply malloc()'d. Images bigger
-than memory can be processed only if your system supports virtual memory.
-The other memory manager back ends support temporary files of various flavors
-and thus work in machines without virtual memory. They may also be useful on
-Unix machines if you need to process images that exceed available swap space.
-
-When using temporary files, the library will make the in-memory buffers for
-its virtual arrays just big enough to stay within a "maximum memory" setting.
-Your application can set this limit by setting cinfo->mem->max_memory_to_use
-after creating the JPEG object. (Of course, there is still a minimum size for
-the buffers, so the max-memory setting is effective only if it is bigger than
-the minimum space needed.) If you allocate any large structures yourself, you
-must allocate them before jpeg_start_compress() or jpeg_start_decompress() in
-order to have them counted against the max memory limit. Also keep in mind
-that space allocated with alloc_small() is ignored, on the assumption that
-it's too small to be worth worrying about; so a reasonable safety margin
-should be left when setting max_memory_to_use.
-
-If you use the jmemname.c or jmemdos.c memory manager back end, it is
-important to clean up the JPEG object properly to ensure that the temporary
-files get deleted. (This is especially crucial with jmemdos.c, where the
-"temporary files" may be extended-memory segments; if they are not freed,
-DOS will require a reboot to recover the memory.) Thus, with these memory
-managers, it's a good idea to provide a signal handler that will trap any
-early exit from your program. The handler should call either jpeg_abort()
-or jpeg_destroy() for any active JPEG objects. A handler is not needed with
-jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either,
-since the C library is supposed to take care of deleting files made with
-tmpfile().
-
-
-Memory usage
-------------
-
-Working memory requirements while performing compression or decompression
-depend on image dimensions, image characteristics (such as colorspace and
-JPEG process), and operating mode (application-selected options).
-
-As of v6b, the decompressor requires:
- 1. About 24K in more-or-less-fixed-size data. This varies a bit depending
- on operating mode and image characteristics (particularly color vs.
- grayscale), but it doesn't depend on image dimensions.
- 2. Strip buffers (of size proportional to the image width) for IDCT and
- upsampling results. The worst case for commonly used sampling factors
- is about 34 bytes * width in pixels for a color image. A grayscale image
- only needs about 8 bytes per pixel column.
- 3. A full-image DCT coefficient buffer is needed to decode a multi-scan JPEG
- file (including progressive JPEGs), or whenever you select buffered-image
- mode. This takes 2 bytes/coefficient. At typical 2x2 sampling, that's
- 3 bytes per pixel for a color image. Worst case (1x1 sampling) requires
- 6 bytes/pixel. For grayscale, figure 2 bytes/pixel.
- 4. To perform 2-pass color quantization, the decompressor also needs a
- 128K color lookup table and a full-image pixel buffer (3 bytes/pixel).
-This does not count any memory allocated by the application, such as a
-buffer to hold the final output image.
-
-The above figures are valid for 8-bit JPEG data precision and a machine with
-32-bit ints. For 12-bit JPEG data, double the size of the strip buffers and
-quantization pixel buffer. The "fixed-size" data will be somewhat smaller
-with 16-bit ints, larger with 64-bit ints. Also, CMYK or other unusual
-color spaces will require different amounts of space.
-
-The full-image coefficient and pixel buffers, if needed at all, do not
-have to be fully RAM resident; you can have the library use temporary
-files instead when the total memory usage would exceed a limit you set.
-(But if your OS supports virtual memory, it's probably better to just use
-jmemnobs and let the OS do the swapping.)
-
-The compressor's memory requirements are similar, except that it has no need
-for color quantization. Also, it needs a full-image DCT coefficient buffer
-if Huffman-table optimization is asked for, even if progressive mode is not
-requested.
-
-If you need more detailed information about memory usage in a particular
-situation, you can enable the MEM_STATS code in jmemmgr.c.
-
-
-Library compile-time options
-----------------------------
-
-A number of compile-time options are available by modifying jmorecfg.h.
-
-The JPEG standard provides for both the baseline 8-bit DCT process and
-a 12-bit DCT process. The IJG code supports 12-bit lossy JPEG if you define
-BITS_IN_JSAMPLE as 12 rather than 8. Note that this causes JSAMPLE to be
-larger than a char, so it affects the surrounding application's image data.
-The sample applications cjpeg and djpeg can support 12-bit mode only for PPM
-and GIF file formats; you must disable the other file formats to compile a
-12-bit cjpeg or djpeg. (install.doc has more information about that.)
-At present, a 12-bit library can handle *only* 12-bit images, not both
-precisions. (If you need to include both 8- and 12-bit libraries in a single
-application, you could probably do it by defining NEED_SHORT_EXTERNAL_NAMES
-for just one of the copies. You'd have to access the 8-bit and 12-bit copies
-from separate application source files. This is untested ... if you try it,
-we'd like to hear whether it works!)
-
-Note that a 12-bit library always compresses in Huffman optimization mode,
-in order to generate valid Huffman tables. This is necessary because our
-default Huffman tables only cover 8-bit data. If you need to output 12-bit
-files in one pass, you'll have to supply suitable default Huffman tables.
-You may also want to supply your own DCT quantization tables; the existing
-quality-scaling code has been developed for 8-bit use, and probably doesn't
-generate especially good tables for 12-bit.
-
-The maximum number of components (color channels) in the image is determined
-by MAX_COMPONENTS. The JPEG standard allows up to 255 components, but we
-expect that few applications will need more than four or so.
-
-On machines with unusual data type sizes, you may be able to improve
-performance or reduce memory space by tweaking the various typedefs in
-jmorecfg.h. In particular, on some RISC CPUs, access to arrays of "short"s
-is quite slow; consider trading memory for speed by making JCOEF, INT16, and
-UINT16 be "int" or "unsigned int". UINT8 is also a candidate to become int.
-You probably don't want to make JSAMPLE be int unless you have lots of memory
-to burn.
-
-You can reduce the size of the library by compiling out various optional
-functions. To do this, undefine xxx_SUPPORTED symbols as necessary.
-
-You can also save a few K by not having text error messages in the library;
-the standard error message table occupies about 5Kb. This is particularly
-reasonable for embedded applications where there's no good way to display
-a message anyway. To do this, remove the creation of the message table
-(jpeg_std_message_table[]) from jerror.c, and alter format_message to do
-something reasonable without it. You could output the numeric value of the
-message code number, for example. If you do this, you can also save a couple
-more K by modifying the TRACEMSn() macros in jerror.h to expand to nothing;
-you don't need trace capability anyway, right?
-
-
-Portability considerations
---------------------------
-
-The JPEG library has been written to be extremely portable; the sample
-applications cjpeg and djpeg are slightly less so. This section summarizes
-the design goals in this area. (If you encounter any bugs that cause the
-library to be less portable than is claimed here, we'd appreciate hearing
-about them.)
-
-The code works fine on ANSI C, C++, and pre-ANSI C compilers, using any of
-the popular system include file setups, and some not-so-popular ones too.
-See install.doc for configuration procedures.
-
-The code is not dependent on the exact sizes of the C data types. As
-distributed, we make the assumptions that
- char is at least 8 bits wide
- short is at least 16 bits wide
- int is at least 16 bits wide
- long is at least 32 bits wide
-(These are the minimum requirements of the ANSI C standard.) Wider types will
-work fine, although memory may be used inefficiently if char is much larger
-than 8 bits or short is much bigger than 16 bits. The code should work
-equally well with 16- or 32-bit ints.
-
-In a system where these assumptions are not met, you may be able to make the
-code work by modifying the typedefs in jmorecfg.h. However, you will probably
-have difficulty if int is less than 16 bits wide, since references to plain
-int abound in the code.
-
-char can be either signed or unsigned, although the code runs faster if an
-unsigned char type is available. If char is wider than 8 bits, you will need
-to redefine JOCTET and/or provide custom data source/destination managers so
-that JOCTET represents exactly 8 bits of data on external storage.
-
-The JPEG library proper does not assume ASCII representation of characters.
-But some of the image file I/O modules in cjpeg/djpeg do have ASCII
-dependencies in file-header manipulation; so does cjpeg's select_file_type()
-routine.
-
-The JPEG library does not rely heavily on the C library. In particular, C
-stdio is used only by the data source/destination modules and the error
-handler, all of which are application-replaceable. (cjpeg/djpeg are more
-heavily dependent on stdio.) malloc and free are called only from the memory
-manager "back end" module, so you can use a different memory allocator by
-replacing that one file.
-
-The code generally assumes that C names must be unique in the first 15
-characters. However, global function names can be made unique in the
-first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES.
-
-More info about porting the code may be gleaned by reading jconfig.doc,
-jmorecfg.h, and jinclude.h.
-
-
-Notes for MS-DOS implementors
------------------------------
-
-The IJG code is designed to work efficiently in 80x86 "small" or "medium"
-memory models (i.e., data pointers are 16 bits unless explicitly declared
-"far"; code pointers can be either size). You may be able to use small
-model to compile cjpeg or djpeg by itself, but you will probably have to use
-medium model for any larger application. This won't make much difference in
-performance. You *will* take a noticeable performance hit if you use a
-large-data memory model (perhaps 10%-25%), and you should avoid "huge" model
-if at all possible.
-
-The JPEG library typically needs 2Kb-3Kb of stack space. It will also
-malloc about 20K-30K of near heap space while executing (and lots of far
-heap, but that doesn't count in this calculation). This figure will vary
-depending on selected operating mode, and to a lesser extent on image size.
-There is also about 5Kb-6Kb of constant data which will be allocated in the
-near data segment (about 4Kb of this is the error message table).
-Thus you have perhaps 20K available for other modules' static data and near
-heap space before you need to go to a larger memory model. The C library's
-static data will account for several K of this, but that still leaves a good
-deal for your needs. (If you are tight on space, you could reduce the sizes
-of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to
-1K. Another possibility is to move the error message table to far memory;
-this should be doable with only localized hacking on jerror.c.)
-
-About 2K of the near heap space is "permanent" memory that will not be
-released until you destroy the JPEG object. This is only an issue if you
-save a JPEG object between compression or decompression operations.
-
-Far data space may also be a tight resource when you are dealing with large
-images. The most memory-intensive case is decompression with two-pass color
-quantization, or single-pass quantization to an externally supplied color
-map. This requires a 128Kb color lookup table plus strip buffers amounting
-to about 40 bytes per column for typical sampling ratios (eg, about 25600
-bytes for a 640-pixel-wide image). You may not be able to process wide
-images if you have large data structures of your own.
-
-Of course, all of these concerns vanish if you use a 32-bit flat-memory-model
-compiler, such as DJGPP or Watcom C. We highly recommend flat model if you
-can use it; the JPEG library is significantly faster in flat model.
diff --git a/libjpeg.spec b/libjpeg.spec
deleted file mode 100644
index 2c9c224..0000000
--- a/libjpeg.spec
+++ /dev/null
@@ -1,234 +0,0 @@
-%define LIBVER 62.1.0
-Summary: A library for manipulating JPEG image format files (with SIMD support)
-Summary(ja): JPEG ·Á¼°²èÁü¥Õ¥¡¥¤¥ë¤ò°·¤¦°Ù¤Î¥é¥¤¥Ö¥é¥ê (x86 SIMD ÂбþÈÇ)
-Name: libjpeg
-Version: 6bx1.02
-Release: 1
-License: distributable
-Group: System Environment/Libraries
-Source0: http://cetus.sakura.ne.jp/softlab/jpeg-x86simd/sources/jpegsrc-6b-x86simd-1.02.tar.bz2
-Buildroot: %{_tmppath}/%{name}-%{version}-root
-ExclusiveArch: %{ix86}
-BuildPrereq: nasm >= 0.98.25
-
-%package devel
-Summary: Development tools for programs which will use the libjpeg library.
-Summary(ja): libjpeg ¥é¥¤¥Ö¥é¥ê¤ò»È¤¦¥×¥í¥°¥é¥à¸þ¤±³«È¯¥Ä¡¼¥ë
-Group: Development/Libraries
-Requires: libjpeg = %{version}-%{release}
-
-%description
-The libjpeg package contains a library of functions for manipulating
-JPEG images, as well as simple client programs for accessing the
-libjpeg functions. Libjpeg client programs include cjpeg, djpeg,
-jpegtran, rdjpgcom and wrjpgcom. Cjpeg compresses an image file into
-JPEG format. Djpeg decompresses a JPEG file into a regular image
-file. Jpegtran can perform various useful transformations on JPEG
-files. Rdjpgcom displays any text comments included in a JPEG file.
-Wrjpgcom inserts text comments into a JPEG file.
-
-The libjpeg library in this package uses SIMD instructions if available.
-On a processor that supports SIMD instructions (MMX, SSE, etc),
-it runs 2-3 times faster than the original version of libjpeg.
-
-%description -l ja
-libjpeg ¥Ñ¥Ã¥±¡¼¥¸¤Ë¤Ï JPEG ²èÁü¤ò°·¤¦°Ù¤ËɬÍפʥ饤¥Ö¥é¥ê¤È¡¤
-libjpeg ´Ø¿ô¤Ë¥¢¥¯¥»¥¹¤¹¤ë°Ù¤Î´Êñ¤Ê¥¯¥é¥¤¥¢¥ó¥È¥×¥í¥°¥é¥à¤¬
-¼ý¤á¤é¤ì¤Æ¤¤¤Þ¤¹¡¥libjpeg ¥¯¥é¥¤¥¢¥ó¥È¥×¥í¥°¥é¥à¤Ë¤Ï cjpeg, djpeg,
-jpegtran, rdjpgcom, wrjpgcom ¤¬¤¢¤ê¤Þ¤¹¡¥cjpeg ¤Ï²èÁü¥Õ¥¡¥¤¥ë¤ò
-JPEG ·Á¼°¤Ë°µ½Ì¤·¤Þ¤¹¡¥djpeg ¤Ï JPEG ¥Õ¥¡¥¤¥ë¤òÄ̾ï¤Î²èÁü¥Õ¥¡¥¤¥ë¤Ë
-Ÿ³«¤·¤Þ¤¹¡¥jpegtran ¤Ï JPEG ¥Õ¥¡¥¤¥ë¤ËÍÍ¡¹¤ÊÊÑ´¹¤ò»Ü¤¹¤³¤È¤¬½ÐÍè¤Þ¤¹¡¥
-rdjpgcom ¤Ï JPEG ¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¥Æ¥¥¹¥È·Á¼°¤Î¥³¥á¥ó¥È¤òɽ¼¨¤·¡¤
-wrjpgcom ¤Ï JPEG ¥Õ¥¡¥¤¥ë¤Ë¥Æ¥¥¹¥È·Á¼°¤Î¥³¥á¥ó¥È¤òÄɲä·¤Þ¤¹¡¥
-
-¤³¤Î¥Ñ¥Ã¥±¡¼¥¸¤Ë¼ý¤á¤é¤ì¤Æ¤¤¤ë libjpeg ¥é¥¤¥Ö¥é¥ê¤Ï¡¢x86 SIMD ÂбþÈǤǤ¹¡£
-MMX ¤ä SSE ¤Ê¤É¤Î SIMD ±é»»µ¡Ç½¤òÁõÈ÷¤·¤Æ¤¤¤ë¥×¥í¥»¥Ã¥µ¾å¤ÇÆ°ºî¤µ¤»¤ë¤È¡¢
-¥ª¥ê¥¸¥Ê¥ëÈǤΠlibjpeg ¥é¥¤¥Ö¥é¥ê¤ÈÈæ³Ó¤·¤Æ 2¡Á3ÇÜÄøÅ٤ήÅÙ¤ÇÆ°ºî¤·¤Þ¤¹¡£
-
-%description devel
-The libjpeg-devel package includes the header files and static libraries
-necessary for developing programs which will manipulate JPEG files using
-the libjpeg library.
-
-If you are going to develop programs which will manipulate JPEG images,
-you should install libjpeg-devel. You'll also need to have the libjpeg
-package installed.
-
-%description devel -l ja
-libjpeg-devel ¥Ñ¥Ã¥±¡¼¥¸¤Ë¤Ï¡¤libjpeg ¥é¥¤¥Ö¥é¥ê¤ò»È¤Ã¤Æ JPEG ¥Õ¥¡¥¤¥ë¤ò
-°·¤¦¥×¥í¥°¥é¥à¤ò³«È¯¤¹¤ë¤Î¤ËɬÍפʥإåÀ¥Õ¥¡¥¤¥ë¤È¥¹¥¿¥Æ¥£¥Ã¥¯¥é¥¤¥Ö¥é¥ê¤¬
-¼ý¤á¤é¤ì¤Æ¤¤¤Þ¤¹¡¥
-
-JPEG ²èÁü¤ò°·¤¦¥×¥í¥°¥é¥à¤ò³«È¯¤¹¤ëºÝ¤Ë¤Ï¡¤libjpeg-devel ¤ò
-¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ²¼¤µ¤¤¡¥Æ±»þ¤Ë libjpeg ¥Ñ¥Ã¥±¡¼¥¸¤â¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë
-ɬÍפ¬¤¢¤ê¤Þ¤¹¡¥
-
-%prep
-%setup -q -n jpeg-6bx
-# suppress "libtoolize --copy --force"
-mv configure.in configure.in_
-
-%build
-%configure --enable-shared --enable-static
-
-make libdir=%{_libdir} %{?_smp_mflags}
-LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD make test
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%makeinstall
-#strip -R .comment $RPM_BUILD_ROOT/usr/bin/* || :
-#/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-%doc usage.doc wizard.doc README
-%{_libdir}/libjpeg.so.*
-%{_bindir}/*
-%{_mandir}/*/*
-
-%files devel
-%defattr(-,root,root)
-%doc libjpeg.doc coderules.doc structure.doc example.c
-%doc simd_*.txt
-%{_libdir}/*.a
-%{_libdir}/*.la
-%{_libdir}/*.so
-/usr/include/*.h
-
-%changelog
-* Sat Feb 04 2006 MIYASAKA Masaru <alkaid@coral.ocn.ne.jp> - 6bx1.02-1
-- upgraded to 6bx1.02
-
-* Thu Jan 26 2006 MIYASAKA Masaru <alkaid@coral.ocn.ne.jp> - 6bx1.01-1
-- upgraded to 6bx1.01
-
-* Thu Mar 24 2005 MIYASAKA Masaru <alkaid@coral.ocn.ne.jp> - 6bx1.0-1
-- based on 6b-33 from Fedora Core 3 and modified for SIMD-extended libjpeg
-- added Japanese summary and description, which is delivered from Vine Linux
-- moved wizard.doc to main package
-
-* Thu Oct 7 2004 Matthias Clasen <mclasen@redhat.com> - 6b-33
-- Add URL. (#134791)
-
-* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
-- rebuilt
-
-* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
-- rebuilt
-
-* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
-- rebuilt
-
-* Thu Sep 25 2003 Jeremy Katz <katzj@redhat.com> 6b-30
-- rebuild to fix gzipped file md5sums (#91211)
-
-* Tue Sep 23 2003 Florian La Roche <Florian.LaRoche@redhat.de>
-- do not set rpath
-
-* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
-- rebuilt
-
-* Thu Feb 13 2003 Elliot Lee <sopwith@redhat.com> 6b-27
-- Add libjpeg-shared.patch to fix shlibs on powerpc
-
-* Tue Feb 04 2003 Florian La Roche <Florian.LaRoche@redhat.de>
-- add symlink to shared lib
-
-* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
-- rebuilt
-
-* Mon Jan 6 2003 Jonathan Blandford <jrb@redhat.com>
-- add docs, #76508
-
-* Fri Dec 13 2002 Elliot Lee <sopwith@redhat.com> 6b-23
-- Merge in multilib changes
-- _smp_mflags
-
-* Tue Sep 10 2002 Than Ngo <than@redhat.com> 6b-22
-- use %%_libdir
-
-* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
-- automated rebuild
-
-* Thu May 23 2002 Tim Powers <timp@redhat.com>
-- automated rebuild
-
-* Thu Jan 31 2002 Bernhard Rosenkraenzer <bero@redhat.com> 6b-19
-- Fix bug #59011
-
-* Mon Jan 28 2002 Bernhard Rosenkraenzer <bero@redhat.com> 6b-18
-- Fix bug #58982
-
-* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
-- automated rebuild
-
-* Tue Jul 24 2001 Bill Nottingham <notting@redhat.com>
-- require libjpeg = %%{version}
-
-* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
-- Bump release + rebuild.
-
-* Mon Dec 11 2000 Than Ngo <than@redhat.com>
-- rebuilt with the fixed fileutils
-- use %%{_tmppath}
-
-* Wed Nov 8 2000 Bernhard Rosenkraenzer <bero@redhat.com>
-- fix a typo (strip -R .comment, not .comments)
-
-* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
-- automatic rebuild
-
-* Sat Jun 17 2000 Bernhard Rosenkraenzer <bero@redhat.com>
-- FHSify
-- add some C++ tweaks to the headers as suggested by bug #9822)
-
-* Wed May 5 2000 Bill Nottingham <notting@redhat.com>
-- configure tweaks for ia64; remove alpha patch (it's pointless)
-
-* Sat Feb 5 2000 Bernhard Rosenkräîzer <bero@redhat.com>
-- rebuild to get compressed man pages
-- fix description
-- some minor tweaks to the spec file
-- add docs
-- fix build on alpha (alphaev6 stuff)
-
-* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
-- auto rebuild in the new build environment (release 9)
-
-* Wed Jan 13 1999 Cristian Gafton <gafton@redhat.com>
-- patch to build on arm
-- build for glibc 2.1
-
-* Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com>
-- strip binaries
-
-* Mon Aug 3 1998 Jeff Johnson <jbj@redhat.com>
-- fix buildroot problem.
-
-* Tue Jun 09 1998 Prospector System <bugs@redhat.com>
-- translations modified for de
-
-* Thu Jun 04 1998 Marc Ewing <marc@redhat.com>
-- up to release 4
-- remove patch that set (improper) soname - libjpeg now does it itself
-
-* Thu May 07 1998 Prospector System <bugs@redhat.com>
-- translations modified for de, fr, tr
-
-* Fri May 01 1998 Cristian Gafton <gafton@redhat.com>
-- fixed build on manhattan
-
-* Wed Apr 08 1998 Cristian Gafton <gafton@redhat.com>
-- upgraded to version 6b
-
-* Wed Oct 08 1997 Donnie Barnes <djb@redhat.com>
-- new package to remove jpeg stuff from libgr and put in it's own package
diff --git a/ltmain.sh b/ltmain.sh
deleted file mode 100644
index 0dbca1e..0000000
--- a/ltmain.sh
+++ /dev/null
@@ -1,5065 +0,0 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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.
-
-# 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 "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit 0
-fi
-
-# define SED for historic ltconfig's generated by Libtool 1.3
-test -z "$SED" && SED=sed
-
-# The name of this program.
-progname=`$echo "$0" | ${SED} 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.4.3
-TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)"
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# 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'
-# test EBCDIC or ASCII
-case `echo A|od -x` in
- *[Cc]1*) # EBCDIC based system
- SP2NL="tr '\100' '\n'"
- NL2SP="tr '\r\n' '\100\100'"
- ;;
- *) # Assume ASCII based system
- SP2NL="tr '\040' '\012'"
- NL2SP="tr '\015\012' '\040\040'"
- ;;
-esac
-
-# NLS nuisances.
-# 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).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
-
-# Make sure IFS has a sensible default
-: ${IFS=" "}
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- echo "$modename: not configured to build any kind of library" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-
-# Parse our command line options once, thoroughly.
-while test $# -gt 0
-do
- arg="$1"
- shift
-
- case $arg in
- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- execute_dlfiles)
- execute_dlfiles="$execute_dlfiles $arg"
- ;;
- *)
- eval "$prev=\$arg"
- ;;
- esac
-
- prev=
- prevopt=
- continue
- fi
-
- # Have we seen a non-optional argument yet?
- case $arg in
- --help)
- show_help=yes
- ;;
-
- --version)
- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- exit 0
- ;;
-
- --config)
- ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
- exit 0
- ;;
-
- --debug)
- echo "$progname: enabling shell trace mode"
- set -x
- ;;
-
- --dry-run | -n)
- run=:
- ;;
-
- --features)
- echo "host: $host"
- if test "$build_libtool_libs" = yes; then
- echo "enable shared libraries"
- else
- echo "disable shared libraries"
- fi
- if test "$build_old_libs" = yes; then
- echo "enable static libraries"
- else
- echo "disable static libraries"
- fi
- exit 0
- ;;
-
- --finish) mode="finish" ;;
-
- --mode) prevopt="--mode" prev=mode ;;
- --mode=*) mode="$optarg" ;;
-
- --preserve-dup-deps) duplicate_deps="yes" ;;
-
- --quiet | --silent)
- show=:
- ;;
-
- -dlopen)
- prevopt="-dlopen"
- prev=execute_dlfiles
- ;;
-
- -*)
- $echo "$modename: unrecognized option \`$arg'" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
-
- *)
- nonopt="$arg"
- break
- ;;
- esac
-done
-
-if test -n "$prevopt"; then
- $echo "$modename: option \`$prevopt' requires an argument" 1>&2
- $echo "$help" 1>&2
- exit 1
-fi
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-if test -z "$show_help"; then
-
- # Infer the operation mode.
- if test -z "$mode"; then
- case $nonopt in
- *cc | *++ | gcc* | *-gcc* | xlc*)
- mode=link
- for arg
- do
- case $arg in
- -c)
- mode=compile
- break
- ;;
- esac
- done
- ;;
- *db | *dbx | *strace | *truss)
- mode=execute
- ;;
- *install*|cp|mv)
- mode=install
- ;;
- *rm)
- mode=uninstall
- ;;
- *)
- # If we have no mode, but dlfiles were specified, then do execute mode.
- test -n "$execute_dlfiles" && mode=execute
-
- # Just use the default operation mode.
- if test -z "$mode"; then
- if test -n "$nonopt"; then
- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
- else
- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
- fi
- fi
- ;;
- esac
- fi
-
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- $echo "$modename: unrecognized option \`-dlopen'" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$modename --help --mode=$mode' for more information."
-
- # These modes are in order of execution frequency so that they run quickly.
- case $mode in
- # libtool compile mode
- compile)
- modename="$modename: compile"
- # Get the compilation command and the source file.
- base_compile=
- prev=
- lastarg=
- srcfile="$nonopt"
- suppress_output=
-
- user_target=no
- for arg
- do
- case $prev in
- "") ;;
- xcompiler)
- # Aesthetically quote the previous argument.
- prev=
- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-
- case $arg in
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
-
- # Add the previous argument to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
- continue
- ;;
- esac
-
- # Accept any command-line options.
- case $arg in
- -o)
- if test "$user_target" != "no"; then
- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
- exit 1
- fi
- user_target=next
- ;;
-
- -static)
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
-
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
-
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- lastarg="$lastarg $arg"
- done
- IFS="$save_ifs"
- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
- # Add the arguments to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
- continue
- ;;
- esac
-
- case $user_target in
- next)
- # The next one is the -o target name
- user_target=yes
- continue
- ;;
- yes)
- # We got the output file
- user_target=set
- libobj="$arg"
- continue
- ;;
- esac
-
- # Accept the current argument as the source file.
- lastarg="$srcfile"
- srcfile="$arg"
-
- # Aesthetically quote the previous argument.
-
- # Backslashify any backslashes, double quotes, and dollar signs.
- # These are the only characters that are still specially
- # interpreted inside of double-quoted scrings.
- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- case $lastarg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- lastarg="\"$lastarg\""
- ;;
- esac
-
- # Add the previous argument to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
- done
-
- case $user_target in
- set)
- ;;
- no)
- # Get the name of the library object.
- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
- ;;
- *)
- $echo "$modename: you must specify a target with \`-o'" 1>&2
- exit 1
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
- xform='[cCFSfmso]'
- case $libobj in
- *.ada) xform=ada ;;
- *.adb) xform=adb ;;
- *.ads) xform=ads ;;
- *.asm) xform=asm ;;
- *.c++) xform=c++ ;;
- *.cc) xform=cc ;;
- *.cpp) xform=cpp ;;
- *.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
- *.for) xform=for ;;
- esac
-
- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
- case $libobj in
- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
- *)
- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
- exit 1
- ;;
- esac
-
- if test -z "$base_compile"; then
- $echo "$modename: you must specify a compilation command" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
- removelist="$obj $libobj"
- else
- removelist="$libobj"
- fi
-
- $run $rm $removelist
- trap "$run $rm $removelist; exit 1" 1 2 15
-
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- 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"
- removelist="$removelist $output_obj $lockfile"
- trap "$run $rm $removelist; exit 1" 1 2 15
- else
- 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 $run ln "$0" "$lockfile" 2>/dev/null; do
- $show "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."
-
- $run $rm $removelist
- exit 1
- fi
- echo $srcfile > "$lockfile"
- fi
-
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
-
- # 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
- # All platforms use -DPIC, to notify preprocessed assembler code.
- command="$base_compile $srcfile $pic_flag -DPIC"
- else
- # Don't build PIC code
- command="$base_compile $srcfile"
- fi
- if test "$build_old_libs" = yes; then
- lo_libobj="$libobj"
- dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$libobj"; then
- dir="$objdir"
- else
- dir="$dir/$objdir"
- fi
- libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
-
- if test -d "$dir"; then
- $show "$rm $libobj"
- $run $rm $libobj
- else
- $show "$mkdir $dir"
- $run $mkdir $dir
- status=$?
- if test $status -ne 0 && test ! -d $dir; then
- exit $status
- fi
- fi
- fi
- if test "$compiler_o_lo" = yes; then
- output_obj="$libobj"
- command="$command -o $output_obj"
- elif test "$compiler_c_o" = yes; then
- output_obj="$obj"
- command="$command -o $output_obj"
- fi
-
- $run $rm "$output_obj"
- $show "$command"
- if $run eval "$command"; then :
- else
- test -n "$output_obj" && $run $rm $removelist
- exit 1
- fi
-
- 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."
-
- $run $rm $removelist
- exit 1
- fi
-
- # Just move the object if needed, then go on to compile the next one
- if test x"$output_obj" != x"$libobj"; then
- $show "$mv $output_obj $libobj"
- if $run $mv $output_obj $libobj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
-
- # If we have no pic_flag, then copy the object into place and finish.
- if (test -z "$pic_flag" || test "$pic_mode" != default) &&
- test "$build_old_libs" = yes; then
- # Rename the .lo from within objdir to obj
- if test -f $obj; then
- $show $rm $obj
- $run $rm $obj
- fi
-
- $show "$mv $libobj $obj"
- if $run $mv $libobj $obj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
-
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
- libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
- # Now arrange that obj and lo_libobj become the same file
- $show "(cd $xdir && $LN_S $baseobj $libobj)"
- if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $run $rm "$lockfile"
- fi
- exit 0
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
-
- # Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
- 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 $srcfile"
- else
- # All platforms use -DPIC, to notify preprocessed assembler code.
- command="$base_compile $srcfile $pic_flag -DPIC"
- fi
- if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
- output_obj="$obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- $run $rm "$output_obj"
- $show "$command"
- if $run eval "$command"; then :
- else
- $run $rm $removelist
- exit 1
- fi
-
- 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."
-
- $run $rm $removelist
- exit 1
- fi
-
- # Just move the object if needed
- if test x"$output_obj" != x"$obj"; then
- $show "$mv $output_obj $obj"
- if $run $mv $output_obj $obj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
-
- # Create an invalid libtool object if no PIC, so that we do not
- # accidentally link it into a program.
- if test "$build_libtool_libs" != yes; then
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > \$libobj" || exit $?
- else
- # Move the .lo from within objdir
- $show "$mv $libobj $lo_libobj"
- if $run $mv $libobj $lo_libobj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
- fi
-
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $run $rm "$lockfile"
- fi
-
- exit 0
- ;;
-
- # libtool link mode
- link | relink)
- modename="$modename: link"
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- # 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 invokation.
- # 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"
- 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`
-
- avoid_version=no
- dlfiles=
- dlprefiles=
- dlself=no
- export_dynamic=no
- export_symbols=
- export_symbols_regex=
- generated=
- libobjs=
- ltlibs=
- module=no
- no_install=no
- objs=
- prefer_static_libs=no
- preload=no
- prev=
- prevarg=
- release=
- rpath=
- xrpath=
- perm_rpath=
- temp_rpath=
- thread_safe=no
- vinfo=
-
- # We need to know -static, to get the right output filenames.
- for arg
- do
- case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
- fi
- if test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- else
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- fi
- build_libtool_libs=no
- build_old_libs=yes
- prefer_static_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
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
- ;;
- *) qarg=$arg ;;
- esac
- libtool_args="$libtool_args $qarg"
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
- ;;
- esac
-
- case $prev in
- dlfiles|dlprefiles)
- if test "$preload" = no; then
- # Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$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"
- if test ! -f "$arg"; then
- $echo "$modename: symbol file \`$arg' does not exist"
- exit 1
- fi
- prev=
- continue
- ;;
- expsyms_regex)
- export_symbols_regex="$arg"
- prev=
- continue
- ;;
- release)
- release="-$arg"
- prev=
- continue
- ;;
- rpath | xrpath)
- # We need an absolute path.
- case $arg in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit 1
- ;;
- 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
- ;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
- prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
- continue
- ;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
- prev=
- compile_command="$compile_command $wl$qarg"
- finalize_command="$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
- compile_command="$compile_command $link_static_flag"
- finalize_command="$finalize_command $link_static_flag"
- fi
- continue
- ;;
-
- -allow-undefined)
- # FIXME: remove this flag sometime in the future.
- $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
- continue
- ;;
-
- -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
- $echo "$modename: more than one -exported-symbols argument is not allowed"
- exit 1
- fi
- if test "X$arg" = "X-export-symbols"; then
- prev=expsyms
- else
- prev=expsyms_regex
- fi
- 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* | no/*-*-nonstopux*)
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- ;;
- esac
- continue
- ;;
-
- -L*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
- fi
- 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*)
- case :$dllsearchpath: in
- *":$dir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$dir";;
- esac
- ;;
- esac
- continue
- ;;
-
- -l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
- case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
- # These systems don't actually have a C or math library (as such)
- continue
- ;;
- *-*-mingw* | *-*-os2*)
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-openbsd* | *-*-freebsd*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- esac
- fi
- deplibs="$deplibs $arg"
- continue
- ;;
-
- -module)
- module=yes
- continue
- ;;
-
- -no-fast-install)
- fast_install=no
- continue
- ;;
-
- -no-install)
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- # The PATH hackery in wrapper scripts is required on Windows
- # in order for the loader to find any dlls it needs.
- $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
- $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
- fast_install=no
- ;;
- *) no_install=yes ;;
- esac
- continue
- ;;
-
- -no-undefined)
- allow_undefined=no
- continue
- ;;
-
- -o) prev=output ;;
-
- -release)
- prev=release
- continue
- ;;
-
- -rpath)
- prev=rpath
- continue
- ;;
-
- -R)
- prev=xrpath
- continue
- ;;
-
- -R*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit 1
- ;;
- esac
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- continue
- ;;
-
- -static)
- # 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
- ;;
-
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $flag"
- done
- IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
- ;;
-
- -Wl,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $wl$flag"
- linker_flags="$linker_flags $flag"
- done
- IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Xlinker)
- prev=xlinker
- continue
- ;;
-
- # Some other compiler flag.
- -* | +*)
- # Unknown arguments in both finalize_command and compile_command need
- # to be aesthetically quoted because they are evaled later.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- ;;
-
- *.lo | *.$objext)
- # A library or standard object.
- if test "$prev" = dlfiles; then
- # This file was specified with -dlopen.
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $arg"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
- prev=
- else
- case $arg in
- *.lo) libobjs="$libobjs $arg" ;;
- *) objs="$objs $arg" ;;
- esac
- 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.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- ;;
- esac # arg
-
- # Now actually substitute the argument into the commands.
- if test -n "$arg"; then
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- fi
- done # argument parsing loop
-
- if test -n "$prev"; then
- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
- fi
-
- # calculate the name of the file, without its directory
- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
- 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\"
-
- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$output_objdir" = "X$output"; then
- output_objdir="$objdir"
- else
- output_objdir="$output_objdir/$objdir"
- fi
- # Create the object directory.
- if test ! -d $output_objdir; then
- $show "$mkdir $output_objdir"
- $run $mkdir $output_objdir
- status=$?
- if test $status -ne 0 && test ! -d $output_objdir; then
- exit $status
- fi
- fi
-
- # Determine the type of output
- case $output in
- "")
- $echo "$modename: you must specify an output file" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- *.$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 test "X$duplicate_deps" = "Xyes" ; then
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- libs="$libs $deplib"
- done
- 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 link"
- for file in $dlfiles $dlprefiles; do
- case $file in
- *.la) ;;
- *)
- $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
- exit 1
- ;;
- 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
- if test $linkmode = prog; then
- # Determine which files to process
- case $pass in
- dlopen)
- libs="$dlfiles"
- save_deplibs="$deplibs" # Collect dlpreopened libraries
- deplibs=
- ;;
- dlpreopen) libs="$dlprefiles" ;;
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
- esac
- fi
- for deplib in $libs; do
- lib=
- found=no
- case $deplib in
- -l*)
- if test $linkmode = oldlib && test $linkmode = obj; then
- $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
- continue
- fi
- if test $pass = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
- for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
- # Search the libtool library
- lib="$searchdir/lib${name}.la"
- if test -f "$lib"; then
- found=yes
- break
- fi
- 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
- fi
- ;; # -l
- -L*)
- case $linkmode in
- lib)
- deplibs="$deplib $deplibs"
- test $pass = conv && continue
- newdependency_libs="$deplib $newdependency_libs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
- ;;
- prog)
- if test $pass = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- if test $pass = scan; then
- deplibs="$deplib $deplibs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- ;;
- *)
- $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
- ;;
- esac # linkmode
- continue
- ;; # -L
- -R*)
- if test $pass = link; then
- dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
- # 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)
- if test "$deplibs_check_method" != pass_all; 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 used here."
- else
- echo
- echo "*** Warning: Linking the shared library $output against the"
- echo "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
- 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 = 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
- continue
- ;;
- %DEPLIBS%)
- alldeplibs=yes
- continue
- ;;
- esac # case $deplib
- if test $found = yes || test -f "$lib"; then :
- else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
- exit 1
- fi
-
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
- fi
-
- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$ladir" = "X$lib" && ladir="."
-
- dlname=
- dlopen=
- dlpreopen=
- libdir=
- library_names=
- old_library=
- # If the library was installed with an old release of libtool,
- # it will not redefine variable installed.
- installed=yes
-
- # Read the .la file
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
-
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test $linkmode = oldlib && test $linkmode = obj; }; then
- # Add dl[pre]opened files of deplib
- 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
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit 1
- 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 test "X$duplicate_deps" = "Xyes" ; 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
- $echo "$modename: \`$lib' is not a convenience library" 1>&2
- exit 1
- 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
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit 1
- fi
-
- # This library was specified with -dlopen.
- if test $pass = dlopen; then
- if test -z "$libdir"; then
- $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
- exit 1
- 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.
- dlprefiles="$dlprefiles $lib"
- 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
- $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
- abs_ladir="$ladir"
- fi
- ;;
- esac
- laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-
- # 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
- $echo "$modename: warning: library \`$lib' was moved." 1>&2
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
- dir="$libdir"
- absdir="$libdir"
- fi
- else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- fi # $installed = yes
- name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-
- # This library was specified with -dlpreopen.
- if test $pass = dlpreopen; then
- if test -z "$libdir"; then
- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
- exit 1
- 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"
- # 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"
- 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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
- 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 test "X$duplicate_deps" = "Xyes" ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done # for deplib
- continue
- fi # $linkmode = prog...
-
- link_static=no # Whether the deplib will be linked statically
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- # Link against this shared library
-
- if test "$linkmode,$pass" = "prog,link" ||
- { 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
- if test $linkmode = prog; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var"; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
- esac
- fi
- fi
- 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
-
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
-
- if test -n "$old_archive_from_expsyms_cmds"; then
- # figure out the soname
- set dummy $library_names
- realname="$2"
- shift; 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*)
- major=`expr $current - $age`
- versuffix="-$major"
- ;;
- esac
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- # Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
- soname=`echo $soroot | ${SED} -e 's/^.*\///'`
- newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
-
- # If the library has no export list, then create one now
- if test -f "$output_objdir/$soname-def"; then :
- else
- $show "extracting exported symbol list from \`$soname'"
- save_ifs="$IFS"; IFS='~'
- eval cmds=\"$extract_expsyms_cmds\"
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- # Create $newlib
- if test -f "$output_objdir/$newlib"; then :; else
- $show "generating import library for \`$soname'"
- save_ifs="$IFS"; IFS='~'
- eval cmds=\"$old_archive_from_expsyms_cmds\"
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- 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"
- 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; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- 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
- $echo "$modename: configuration error: unsupported hardcode properties"
- exit 1
- 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; 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"
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- 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
- 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
-
- # Try to link the static library
- # 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
- convenience="$convenience $dir/$old_library"
- old_convenience="$old_convenience $dir/$old_library"
- 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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
- 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 test "X$duplicate_deps" = "Xyes" ; 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
- case $deplib in
- -L*) path="$deplib" ;;
- *.la)
- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$deplib" && dir="."
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
- absdir="$dir"
- fi
- ;;
- esac
- if grep "^installed=no" $deplib > /dev/null; then
- path="-L$absdir/$objdir"
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
- fi
- if test "$absdir" != "$libdir"; then
- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
- fi
- path="-L$absdir"
- fi
- ;;
- *) continue ;;
- esac
- case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$deplibs $path" ;;
- esac
- done
- fi # link_all_deplibs != no
- fi # linkmode = lib
- done # for deplib in $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
- test $pass != scan && dependency_libs="$newdependency_libs"
- 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
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- *)
- 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
- if test "$pass" = "conv" &&
- { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
- libs="$deplibs" # reset libs
- deplibs=
- fi
- done # for pass
- if test $linkmode = prog; then
- dlfiles="$newdlfiles"
- dlprefiles="$newdlprefiles"
- fi
-
- case $linkmode in
- oldlib)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
- fi
-
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
- fi
-
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
- fi
-
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
- fi
-
- # 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*)
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- eval libname=\"$libname_spec\"
- ;;
- *)
- if test "$module" = no; then
- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
- if test "$need_lib_prefix" != no; then
- # Add the "lib" prefix for modules if required
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
- eval libname=\"$libname_spec\"
- else
- libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
- fi
- ;;
- esac
-
- if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
- exit 1
- else
- echo
- echo "*** Warning: Linking the shared library $output against the non-libtool"
- echo "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
- fi
- fi
-
- if test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
- fi
-
- set dummy $rpath
- if test $# -gt 2; then
- $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
- fi
- install_libdir="$2"
-
- oldlibs=
- if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
- # Building a libtool convenience library.
- libext=al
- oldlibs="$output_objdir/$libname.$libext $oldlibs"
- build_libtool_libs=convenience
- build_old_libs=yes
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
- fi
- else
-
- # Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
- set dummy $vinfo 0 0 0
- IFS="$save_ifs"
-
- if test -n "$8"; then
- $echo "$modename: too many parameters to \`-version-info'" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- current="$2"
- revision="$3"
- age="$4"
-
- # 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]) ;;
- *)
- $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
- ;;
- esac
-
- case $revision in
- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
- *)
- $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
- ;;
- esac
-
- case $age in
- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
- *)
- $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
- ;;
- esac
-
- if test $age -gt $current; then
- $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
- 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
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- minor_current=`expr $current + 1`
- 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)
- major=`expr $current - $age + 1`
-
- 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 != 0; do
- iface=`expr $revision - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring_prefix$major.$iface:$verstring"
- done
-
- # Before this point, $major must not contain `.'.
- major=.$major
- versuffix="$major.$revision"
- ;;
-
- linux)
- major=.`expr $current - $age`
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- major=.`expr $current - $age`
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test $loop != 0; do
- iface=`expr $current - $loop`
- loop=`expr $loop - 1`
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- sunos)
- major=".$current"
- versuffix=".$current.$revision"
- ;;
-
- windows)
- # Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
- major=`expr $current - $age`
- versuffix="-$major"
- ;;
-
- *)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
- ;;
- esac
-
- # Clear the version info if we defaulted, and they specified a release.
- if test -z "$vinfo" && test -n "$release"; then
- major=
- verstring="0.0"
- 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
- $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
- fi
- fi
-
- if test "$mode" != relink; then
- # Remove our outputs.
- $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
- $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
- 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 "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`echo "$dependency_libs " | ${SED} -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*)
- # these systems don't actually have a c library (as such)!
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C library is in the System framework
- deplibs="$deplibs -framework System"
- ;;
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- *-*-openbsd* | *-*-freebsd*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *)
- # 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 behaviour.
- 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.
- $rm conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $rm conftest
- $CC -o conftest conftest.c $deplibs
- if test $? -eq 0 ; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: dynamic linker does not accept needed library $i."
- 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 I believe you do not have"
- echo "*** because a test_compile did reveal that the linker did not use it for"
- echo "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- else
- newdeplibs="$newdeplibs $i"
- fi
- done
- else
- # Error occured in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- $rm conftest
- $CC -o conftest conftest.c $i
- # Did it work?
- if test $? -eq 0 ; then
- ldd_output=`ldd conftest`
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: dynamic linker does not accept needed library $i."
- 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 a test_compile did reveal that the linker did not use this one"
- echo "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- else
- droppeddeps=yes
- echo
- echo "*** Warning! Library $i is needed by this library but I was not able to"
- echo "*** make it link in! You will probably need to install it or some"
- echo "*** library that it depends on before this library will be fully"
- echo "*** functional. Installing it before continuing would be even better."
- fi
- else
- newdeplibs="$newdeplibs $i"
- fi
- done
- fi
- ;;
- file_magic*)
- set dummy $deplibs_check_method
- file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; 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
- # 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} 10q \
- | egrep "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- 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
- else
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
- done # Gone through all deplibs.
- ;;
- match_pattern*)
- set dummy $deplibs_check_method
- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
- for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; 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 below in file_magic test
- if eval echo \"$potent_lib\" 2>/dev/null \
- | ${SED} 10q \
- | egrep "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- 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
- else
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- fi
- done # Gone through all deplibs.
- ;;
- none | unknown | *)
- newdeplibs=""
- if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
- -e 's/ -[LR][^ ]*//g' -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 is the System framework
- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
- ;;
- 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
-
- # 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"
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- 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 library_names=\"$library_names_spec\"
- set dummy $library_names
- realname="$2"
- shift; shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
- test -z "$dlname" && dlname=$soname
-
- lib="$output_objdir/$realname"
- for link
- do
- linknames="$linknames $link"
- done
-
- # Ensure that we have .o objects for linkers which dislike .lo
- # (e.g. aix) in case we are running --disable-static
- for obj in $libobjs; do
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
- if test ! -f $xdir/$oldobj; then
- $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
- $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
- fi
- done
-
- # Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- $show "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $run $rm $export_symbols
- eval cmds=\"$export_symbols_cmds\"
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex"; then
- $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
- $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- $show "$mv \"${export_symbols}T\" \"$export_symbols\""
- $run eval '$mv "${export_symbols}T" "$export_symbols"'
- fi
- fi
- fi
-
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
- fi
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- else
- gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
- generated="$generated $gentop"
-
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
- done
- 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
- $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
- fi
-
- # Do each of the archive commands.
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval cmds=\"$archive_expsym_cmds\"
- else
- save_deplibs="$deplibs"
- for conv in $convenience; do
- tmp_deplibs=
- for test_deplib in $deplibs; do
- if test "$test_deplib" != "$conv"; then
- tmp_deplibs="$tmp_deplibs $test_deplib"
- fi
- done
- deplibs="$tmp_deplibs"
- done
- eval cmds=\"$archive_cmds\"
- deplibs="$save_deplibs"
- fi
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
- exit 0
- fi
-
- # Create links to the real library.
- for linkname in $linknames; do
- if test "$realname" != "$linkname"; then
- $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
- $run 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 "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
- fi
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
- fi
-
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
- fi
-
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
- fi
-
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
- fi
-
- case $output in
- *.lo)
- if test -n "$objs$old_deplibs"; then
- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit 1
- fi
- libobj="$output"
- obj=`$echo "X$output" | $Xsed -e "$lo2o"`
- ;;
- *)
- libobj=
- obj="$output"
- ;;
- esac
-
- # Delete the old objects.
- $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
- wl=
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
- else
- gentop="$output_objdir/${obj}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
- generated="$generated $gentop"
-
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
- done
- 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"
- eval cmds=\"$reload_cmds\"
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
-
- # Exit if we aren't doing a library object file.
- if test -z "$libobj"; then
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
- fi
-
- exit 0
- fi
-
- if test "$build_libtool_libs" != yes; then
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${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"
- $run eval "echo timestamp > $libobj" || exit $?
- exit 0
- 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"
- eval cmds=\"$reload_cmds\"
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- else
- # Just create a symlink.
- $show $rm $libobj
- $run $rm $libobj
- xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$libobj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
- oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
- $show "(cd $xdir && $LN_S $oldobj $baseobj)"
- $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
- fi
-
- if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
- fi
-
- exit 0
- ;;
-
- prog)
- case $host in
- *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
- esac
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
- fi
-
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
- fi
-
- if test "$preload" = yes; then
- if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
- test "$dlopen_self_static" = unknown; then
- $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
- fi
- fi
-
- 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 / -framework System /'`
- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
- case $host in
- *darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- ;;
- esac
- ;;
- esac
-
- 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*)
- case :$dllsearchpath: in
- *":$libdir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
- 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
-
- dlsyms=
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- dlsyms="${outputname}S.c"
- else
- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
- fi
- fi
-
- if test -n "$dlsyms"; then
- case $dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${outputname}.nm"
-
- $show "$rm $nlist ${nlist}S ${nlist}T"
- $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
- # Parse the name list into a source file.
- $show "creating $output_objdir/$dlsyms"
-
- test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- $show "generating symbol list for \`$output'"
-
- test -z "$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 arg in $progfiles; do
- $show "extracting global C symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- if test -n "$export_symbols_regex"; then
- $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$output.exp"
- $run $rm $export_symbols
- $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- else
- $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
- $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
- $run eval 'mv "$nlist"T "$nlist"'
- fi
- fi
-
- for arg in $dlprefiles; do
- $show "extracting global C symbols from \`$arg'"
- name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
- $run eval 'echo ": $name " >> "$nlist"'
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -z "$run"; then
- # 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 >/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/$dlsyms"'
- else
- echo '/* NONE */' >> "$output_objdir/$dlsyms"
- fi
-
- $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
- $echo >> "$output_objdir/$dlsyms" "\
- {0, (lt_ptr) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- fi
-
- pic_flag_for_symtable=
- 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*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
- esac;;
- *-*-hpux*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DPIC";;
- esac
- esac
-
- # Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
- # Clean up the generated files.
- $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
- $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
- # Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- ;;
- *)
- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit 1
- ;;
- 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
-
- if test $need_relink = no || test "$build_libtool_libs" != yes; 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.
- $show "$link_command"
- $run eval "$link_command"
- status=$?
-
- # Delete the generated files.
- if test -n "$dlsyms"; then
- $show "$rm $output_objdir/${outputname}S.${objext}"
- $run $rm "$output_objdir/${outputname}S.${objext}"
- fi
-
- exit $status
- fi
-
- if test -n "$shlibpath_var"; then
- # We should set the shlibpath_var
- rpath=
- for dir in $temp_rpath; do
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*)
- # Absolute path.
- rpath="$rpath$dir:"
- ;;
- *)
- # Relative path: add a thisdir entry.
- rpath="$rpath\$thisdir/$dir:"
- ;;
- esac
- done
- temp_rpath="$rpath"
- 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.
- $run $rm $output
- # Link the executable and exit
- $show "$link_command"
- $run eval "$link_command" || exit $?
- exit 0
- 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"
-
- $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
- $echo "$modename: \`$output' will be relinked during installation" 1>&2
- 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.
- $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
- $show "$link_command"
- $run eval "$link_command" || exit $?
-
- # Now create the wrapper script.
- $show "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}\" || 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
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; 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 $0 --fallback-echo"; then
- case $0 in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
- *) qecho="$SHELL `pwd`/$0 --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 our run command is non-null.
- if test -z "$run"; then
- # win32 will think the script is a binary if it has
- # a .exe suffix, so we strip it off here.
- case $output in
- *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
- esac
- # test for cygwin because mv fails w/o .exe extensions
- case $host in
- *cygwin*) exeext=.exe ;;
- *) exeext= ;;
- esac
- $rm $output
- trap "$rm $output; exit 1" 1 2 15
-
- $echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# 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'
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variable:
- 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 >> $output "\
-
- # 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
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- echo >> $output "\
- 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 >> $output "\
-
- # 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 >> $output "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- echo >> $output "\
-
- 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 >> $output "\
- # 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 >> $output "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
-
- $echo >> $output "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # win32 systems need to use the prog path for dll
- # lookup to work
- *-*-cygwin* | *-*-pw32*)
- $echo >> $output "\
- exec \$progdir/\$program \${1+\"\$@\"}
-"
- ;;
-
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2*)
- $echo >> $output "\
- exec \$progdir\\\\\$program \${1+\"\$@\"}
-"
- ;;
-
- *)
- $echo >> $output "\
- # Export the path to the program.
- PATH=\"\$progdir:\$PATH\"
- export PATH
-
- exec \$program \${1+\"\$@\"}
-"
- ;;
- esac
- $echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
- 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\
-"
- chmod +x $output
- fi
- exit 0
- ;;
- 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"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
- build_libtool_libs=no
- else
- oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
- fi
- addlibs="$old_convenience"
- fi
-
- if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
- generated="$generated $gentop"
-
- # Add in members from convenience archives.
- for xlib in $addlibs; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
- done
- fi
-
- # Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- eval cmds=\"$old_archive_from_new_cmds\"
- else
- # Ensure that we have .o objects in place in case we decided
- # not to build a shared library, and have fallen back to building
- # static libs even though --disable-static was passed!
- for oldobj in $oldobjs; do
- if test ! -f $oldobj; then
- xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$oldobj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
- obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
- $show "(cd $xdir && ${LN_S} $obj $baseobj)"
- $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
- fi
- done
-
- eval cmds=\"$old_archive_cmds\"
- fi
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- done
-
- if test -n "$generated"; then
- $show "${rm}r$generated"
- $run ${rm}r$generated
- fi
-
- # Now create the libtool archive.
- case $output in
- *.la)
- old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
- $show "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}\" || 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
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
- fi
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-
- # Only create the output if not a dry run.
- if test -z "$run"; then
- 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)
- name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
- fi
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
- esac
- done
- dependency_libs="$newdependency_libs"
- newdlfiles=
- for lib in $dlfiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
- fi
- newdlfiles="$newdlfiles $libdir/$name"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
- fi
- newdlprefiles="$newdlprefiles $libdir/$name"
- 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) tdlname=../bin/$dlname ;;
- esac
- $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# 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'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# 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
- fi
-
- # Do a symbolic link so that the libtool archive can be found in
- # LD_LIBRARY_PATH before the program is installed.
- $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
- $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
- ;;
- esac
- exit 0
- ;;
-
- # libtool install mode
- install)
- modename="$modename: install"
-
- # 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" | $Xsed | grep shtool > /dev/null; then
- # Aesthetically quote it.
- arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
- arg="\"$arg\""
- ;;
- esac
- install_prog="$arg "
- arg="$1"
- shift
- else
- install_prog=
- arg="$nonopt"
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog$arg"
-
- # 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) prev="-f" ;;
- -g) prev="-g" ;;
- -m) prev="-m" ;;
- -o) prev="-o" ;;
- -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.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog $arg"
- done
-
- if test -z "$install_prog"; then
- $echo "$modename: you must specify an install program" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- if test -n "$prev"; then
- $echo "$modename: the \`$prev' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- if test -z "$files"; then
- if test -z "$dest"; then
- $echo "$modename: no file or destination specified" 1>&2
- else
- $echo "$modename: you must specify a destination" 1>&2
- fi
- $echo "$help" 1>&2
- exit 1
- fi
-
- # Strip any trailing slash from the destination.
- dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
- test "X$destdir" = "X$dest" && destdir=.
- destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files
- if test $# -gt 2; then
- $echo "$modename: \`$dest' is not a directory" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- 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.
- if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- library_names=
- old_library=
- relink_command=
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # 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
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
- test "X$dir" = "X$file/" && dir=
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- $echo "$modename: warning: relinking \`$file'" 1>&2
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- continue
- fi
- fi
-
- # See the names of the shared library.
- set dummy $library_names
- if test -n "$2"; then
- realname="$2"
- shift
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- $show "$install_prog $dir/$srcname $destdir/$realname"
- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
- $show "$striplib $destdir/$realname"
- $run eval "$striplib $destdir/$realname" || exit $?
- fi
-
- if test $# -gt 0; then
- # Delete the old symlinks, and create new ones.
- for linkname
- do
- if test "$linkname" != "$realname"; then
- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
- fi
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- eval cmds=\"$postinstall_cmds\"
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run 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
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- esac
-
- # Install the libtool object if requested.
- if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run eval "$install_prog $file $destfile" || exit $?
- fi
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
- $show "$install_prog $staticobj $staticdest"
- $run eval "$install_prog \$staticobj \$staticdest" || exit $?
- fi
- exit 0
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin*|*mingw*)
- wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
- notinst_deplibs=
- relink_command=
-
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $wrapper ;;
- *) . ./$wrapper ;;
- esac
-
- # Check the variables that should have been set.
- if test -z "$notinst_deplibs"; then
- $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
- exit 1
- fi
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- # If there is no directory component, then add one.
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- fi
- libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- done
-
- relink_command=
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $wrapper ;;
- *) . ./$wrapper ;;
- esac
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
- else
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
- file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- ${rm}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- $echo "$modename: warning: cannot relink \`$file'" 1>&2
- fi
- else
- # Install the binary that we compiled earlier.
- file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyways
- case $install_prog,$host in
- /usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
- ;;
- esac
- ;;
- esac
- $show "$install_prog$stripme $file $destfile"
- $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
- test -n "$outputname" && ${rm}r "$tmpdir"
- ;;
- esac
- done
-
- for file in $staticlibs; do
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- $show "$install_prog $file $oldlib"
- $run eval "$install_prog \$file \$oldlib" || exit $?
-
- if test -n "$stripme" && test -n "$striplib"; then
- $show "$old_striplib $oldlib"
- $run eval "$old_striplib $oldlib" || exit $?
- fi
-
- # Do each command in the postinstall commands.
- eval cmds=\"$old_postinstall_cmds\"
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- done
-
- if test -n "$future_libdirs"; then
- $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
- fi
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $0 --finish$current_libdirs'
- else
- exit 0
- fi
- ;;
-
- # libtool finish mode
- finish)
- modename="$modename: finish"
- 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.
- eval cmds=\"$finish_cmds\"
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || admincmds="$admincmds
- $cmd"
- done
- IFS="$save_ifs"
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $run eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- test "$show" = ":" && exit 0
-
- echo "----------------------------------------------------------------------"
- 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"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
- exit 0
- ;;
-
- # libtool execute mode
- execute)
- modename="$modename: execute"
-
- # The first argument is the command name.
- cmd="$nonopt"
- if test -z "$cmd"; then
- $echo "$modename: you must specify a COMMAND" 1>&2
- $echo "$help"
- exit 1
- fi
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- if test ! -f "$file"; then
- $echo "$modename: \`$file' is not a file" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- # Read the libtool library.
- dlname=
- library_names=
-
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit 1
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
- ;;
-
- *)
- $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
- 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 (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
- args="$args \"$file\""
- done
-
- if test -z "$run"; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved enviroment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
-
- # 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 0
- fi
- ;;
-
- # libtool clean and uninstall mode
- clean | uninstall)
- modename="$modename: $mode"
- 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
-
- if test -z "$rm"; then
- $echo "$modename: you must specify an RM program" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- rmdirs=
-
- for file in $files; do
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$file"; then
- dir=.
- objdir="$objdir"
- else
- objdir="$dir/$objdir"
- fi
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- 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 (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- . $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"
- test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
-
- if test $mode = uninstall; then
- if test -n "$library_names"; then
- # Do each command in the postuninstall commands.
- eval cmds=\"$postuninstall_cmds\"
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd"
- if test $? != 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
- fi
-
- if test -n "$old_library"; then
- # Do each command in the old_postuninstall commands.
- eval cmds=\"$old_postuninstall_cmds\"
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd"
- if test $? != 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
- fi
- # FIXME: should reinstall the best remaining shared library.
- fi
- fi
- ;;
-
- *.lo)
- if test "$build_old_libs" = yes; then
- oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
- rmfiles="$rmfiles $dir/$oldobj"
- fi
- ;;
-
- *)
- # Do a test to see if this is a libtool program.
- if test $mode = clean &&
- (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- relink_command=
- . $dir/$file
-
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
- fi
- fi
- ;;
- esac
- $show "$rm $rmfiles"
- $run $rm $rmfiles || exit_status=1
- done
-
- # Try to remove the ${objdir}s in the directories where we deleted files
- for dir in $rmdirs; do
- if test -d "$dir"; then
- $show "rmdir $dir"
- $run rmdir $dir >/dev/null 2>&1
- fi
- done
-
- exit $exit_status
- ;;
-
- "")
- $echo "$modename: you must specify a MODE" 1>&2
- $echo "$generic_help" 1>&2
- exit 1
- ;;
- esac
-
- if test -z "$exec_cmd"; then
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$generic_help" 1>&2
- exit 1
- fi
-fi # test -z "$show_help"
-
-if test -n "$exec_cmd"; then
- eval exec $exec_cmd
- exit 1
-fi
-
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [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
- --finish same as \`--mode=finish'
- --help display this help message and exit
- --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
- --quiet same as \`--silent'
- --silent don't print informational messages
- --version print version information
-
-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 \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
- exit 0
- ;;
-
-clean)
- $echo \
-"Usage: $modename [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: $modename [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
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -static always 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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
-link)
- $echo \
-"Usage: $modename [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
- -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
- -static do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
-
-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: $modename [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."
- ;;
-
-*)
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
-esac
-
-echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/makecfg.c b/makecfg.c
deleted file mode 100644
index 787ea37..0000000
--- a/makecfg.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * makecfg.c
- *
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * For conditions of distribution and use, see copyright notice in jsimdext.inc
- * Last Modified : March 23, 2005
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-
-#ifndef offsetof /* defined in <stddef.h> */
-#define offsetof(type, mem) ((size_t) \
- ((char *)&((type *)0)->mem - (char *)(type *)0))
-#endif
-
-void
-print_structure_offset (void)
-{
- printf("\n");
- printf("; ---- macros for structure access -----------------------------------------\n");
- printf("\n");
-
- printf("; struct jpeg_compress_struct\n\n");
- printf("%%define jcstruct_image_width(b) ((b) + %3u) ; cinfo->image_width\n",
- (unsigned)offsetof(struct jpeg_compress_struct, image_width));
- printf("%%define jcstruct_max_v_samp_factor(b) ((b) + %3u) ; cinfo->max_v_samp_factor\n",
- (unsigned)offsetof(struct jpeg_compress_struct, max_v_samp_factor));
- printf("\n");
-
- printf("; struct jpeg_decompress_struct\n\n");
- printf("%%define jdstruct_output_width(b) ((b) + %3u) ; cinfo->output_width\n",
- (unsigned)offsetof(struct jpeg_decompress_struct, output_width));
- printf("%%define jdstruct_max_v_samp_factor(b) ((b) + %3u) ; cinfo->max_v_samp_factor\n",
- (unsigned)offsetof(struct jpeg_decompress_struct, max_v_samp_factor));
- printf("%%define jdstruct_sample_range_limit(b) ((b) + %3u) ; cinfo->sample_range_limit\n",
- (unsigned)offsetof(struct jpeg_decompress_struct, sample_range_limit));
- printf("\n");
-
- printf("; jpeg_component_info\n\n");
- printf("%%define jcompinfo_v_samp_factor(b) ((b) + %2u) ; compptr->v_samp_factor\n",
- (unsigned)offsetof(jpeg_component_info, v_samp_factor));
- printf("%%define jcompinfo_width_in_blocks(b) ((b) + %2u) ; compptr->width_in_blocks\n",
- (unsigned)offsetof(jpeg_component_info, width_in_blocks));
- printf("%%define jcompinfo_downsampled_width(b) ((b) + %2u) ; compptr->downsampled_width\n",
- (unsigned)offsetof(jpeg_component_info, downsampled_width));
- printf("%%define jcompinfo_dct_table(b) ((b) + %2u) ; compptr->dct_table\n",
- (unsigned)offsetof(jpeg_component_info, dct_table));
- printf("\n");
-}
-
-
-void
-print_jconfig_h_macro (void)
-{
- printf("\n");
- printf("; ---- macros from jconfig.h -----------------------------------------------\n");
- printf("\n");
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
- printf("%%define NEED_SHORT_EXTERNAL_NAMES\t; Use short forms of external names\n");
-#else
- printf("%%undef NEED_SHORT_EXTERNAL_NAMES\t; Use short forms of external names\n");
-#endif
- printf("\n");
-}
-
-
-void
-print_jmorecfg_h_macro (void)
-{
- printf("\n");
- printf("; ---- macros from jmorecfg.h ----------------------------------------------\n");
- printf("\n");
-
- printf("; Capability options common to encoder and decoder:\n");
- printf("\n");
-#ifdef DCT_ISLOW_SUPPORTED
- printf("%%define DCT_ISLOW_SUPPORTED\t; slow but accurate integer algorithm\n");
-#else
- printf("%%undef DCT_ISLOW_SUPPORTED\t; slow but accurate integer algorithm\n");
-#endif
-#ifdef DCT_IFAST_SUPPORTED
- printf("%%define DCT_IFAST_SUPPORTED\t; faster, less accurate integer method\n");
-#else
- printf("%%undef DCT_IFAST_SUPPORTED\t; faster, less accurate integer method\n");
-#endif
-#ifdef DCT_FLOAT_SUPPORTED
- printf("%%define DCT_FLOAT_SUPPORTED\t; floating-point: accurate, fast on fast HW\n");
-#else
- printf("%%undef DCT_FLOAT_SUPPORTED\t; floating-point: accurate, fast on fast HW\n");
-#endif
- printf("\n");
-
- printf("; Decoder capability options:\n");
- printf("\n");
-#ifdef IDCT_SCALING_SUPPORTED
- printf("%%define IDCT_SCALING_SUPPORTED\t\t; Output rescaling via IDCT?\n");
-#else
- printf("%%undef IDCT_SCALING_SUPPORTED\t\t; Output rescaling via IDCT?\n");
-#endif
-#ifdef UPSAMPLE_MERGING_SUPPORTED
- printf("%%define UPSAMPLE_MERGING_SUPPORTED\t; Fast path for sloppy upsampling?\n");
-#else
- printf("%%undef UPSAMPLE_MERGING_SUPPORTED\t; Fast path for sloppy upsampling?\n");
-#endif
-#ifdef UPSAMPLE_H1V2_SUPPORTED
- printf("%%define UPSAMPLE_H1V2_SUPPORTED\t\t; Fast/fancy processing for 1h2v?\n");
-#else
- printf("%%undef UPSAMPLE_H1V2_SUPPORTED\t\t; Fast/fancy processing for 1h2v?\n");
-#endif
- printf("\n");
-
-#if (RGB_PIXELSIZE == 3 || RGB_PIXELSIZE == 4) && \
- (RGB_RED < 0 || RGB_RED >= RGB_PIXELSIZE || RGB_GREEN < 0 || \
- RGB_GREEN >= RGB_PIXELSIZE || RGB_BLUE < 0 || RGB_BLUE >= RGB_PIXELSIZE || \
- RGB_RED == RGB_GREEN || RGB_GREEN == RGB_BLUE || RGB_RED == RGB_BLUE)
-#error "Incorrect RGB pixel offset."
-#endif
- printf("; Ordering of RGB data in scanlines passed to or from the application.\n");
- printf("\n");
- printf("%%define RGB_RED\t\t%u\t; Offset of Red in an RGB scanline element\n", RGB_RED);
- printf("%%define RGB_GREEN\t%u\t; Offset of Green\n", RGB_GREEN);
- printf("%%define RGB_BLUE\t%u\t; Offset of Blue\n", RGB_BLUE);
- printf("%%define RGB_PIXELSIZE\t%u\t; JSAMPLEs per RGB scanline element\n", RGB_PIXELSIZE);
- printf("\n");
-#ifdef RGBX_FILLER_0XFF
- printf("%%define RGBX_FILLER_0XFF\t; fill dummy bytes with 0xFF in RGBX format\n");
-#else
- printf("%%undef RGBX_FILLER_0XFF\t\t; fill dummy bytes with 0xFF in RGBX format\n");
-#endif
- printf("\n");
-
- printf("; SIMD support options (encoder):\n");
- printf("\n");
-#ifdef JCCOLOR_RGBYCC_MMX_SUPPORTED
- printf("%%define JCCOLOR_RGBYCC_MMX_SUPPORTED\t; RGB->YCC conversion with MMX\n");
-#else
- printf("%%undef JCCOLOR_RGBYCC_MMX_SUPPORTED\t; RGB->YCC conversion with MMX\n");
-#endif
-#ifdef JCCOLOR_RGBYCC_SSE2_SUPPORTED
- printf("%%define JCCOLOR_RGBYCC_SSE2_SUPPORTED\t; RGB->YCC conversion with SSE2\n");
-#else
- printf("%%undef JCCOLOR_RGBYCC_SSE2_SUPPORTED\t; RGB->YCC conversion with SSE2\n");
-#endif
-#ifdef JCSAMPLE_MMX_SUPPORTED
- printf("%%define JCSAMPLE_MMX_SUPPORTED\t\t; downsampling with MMX\n");
-#else
- printf("%%undef JCSAMPLE_MMX_SUPPORTED\t\t; downsampling with MMX\n");
-#endif
-#ifdef JCSAMPLE_SSE2_SUPPORTED
- printf("%%define JCSAMPLE_SSE2_SUPPORTED\t\t; downsampling with SSE2\n");
-#else
- printf("%%undef JCSAMPLE_SSE2_SUPPORTED\t\t; downsampling with SSE2\n");
-#endif
-#ifdef JFDCT_INT_MMX_SUPPORTED
- printf("%%define JFDCT_INT_MMX_SUPPORTED\t\t; forward DCT with MMX\n");
-#else
- printf("%%undef JFDCT_INT_MMX_SUPPORTED\t\t; forward DCT with MMX\n");
-#endif
-#ifdef JFDCT_INT_SSE2_SUPPORTED
- printf("%%define JFDCT_INT_SSE2_SUPPORTED\t; forward DCT with SSE2\n");
-#else
- printf("%%undef JFDCT_INT_SSE2_SUPPORTED\t\t; forward DCT with SSE2\n");
-#endif
-#ifdef JFDCT_FLT_3DNOW_MMX_SUPPORTED
- printf("%%define JFDCT_FLT_3DNOW_MMX_SUPPORTED\t; forward DCT with 3DNow!/MMX\n");
-#else
- printf("%%undef JFDCT_FLT_3DNOW_MMX_SUPPORTED\t; forward DCT with 3DNow!/MMX\n");
-#endif
-#ifdef JFDCT_FLT_SSE_MMX_SUPPORTED
- printf("%%define JFDCT_FLT_SSE_MMX_SUPPORTED\t; forward DCT with SSE/MMX\n");
-#else
- printf("%%undef JFDCT_FLT_SSE_MMX_SUPPORTED\t; forward DCT with SSE/MMX\n");
-#endif
-#ifdef JFDCT_FLT_SSE_SSE2_SUPPORTED
- printf("%%define JFDCT_FLT_SSE_SSE2_SUPPORTED\t; forward DCT with SSE/SSE2\n");
-#else
- printf("%%undef JFDCT_FLT_SSE_SSE2_SUPPORTED\t; forward DCT with SSE/SSE2\n");
-#endif
-#ifdef JFDCT_INT_QUANTIZE_WITH_DIVISION
- printf("%%define JFDCT_INT_QUANTIZE_WITH_DIVISION ; Use general quantization method\n");
-#else
- printf("%%undef JFDCT_INT_QUANTIZE_WITH_DIVISION ; Use general quantization method\n");
-#endif
- printf("\n");
-
- printf("; SIMD support options (decoder):\n");
- printf("\n");
-#ifdef JDCOLOR_YCCRGB_MMX_SUPPORTED
- printf("%%define JDCOLOR_YCCRGB_MMX_SUPPORTED\t; YCC->RGB conversion with MMX\n");
-#else
- printf("%%undef JDCOLOR_YCCRGB_MMX_SUPPORTED\t; YCC->RGB conversion with MMX\n");
-#endif
-#ifdef JDCOLOR_YCCRGB_SSE2_SUPPORTED
- printf("%%define JDCOLOR_YCCRGB_SSE2_SUPPORTED\t; YCC->RGB conversion with SSE2\n");
-#else
- printf("%%undef JDCOLOR_YCCRGB_SSE2_SUPPORTED\t; YCC->RGB conversion with SSE2\n");
-#endif
-#ifdef JDMERGE_MMX_SUPPORTED
- printf("%%define JDMERGE_MMX_SUPPORTED\t\t; merged upsampling with MMX\n");
-#else
- printf("%%undef JDMERGE_MMX_SUPPORTED\t\t; merged upsampling with MMX\n");
-#endif
-#ifdef JDMERGE_SSE2_SUPPORTED
- printf("%%define JDMERGE_SSE2_SUPPORTED\t\t; merged upsampling with SSE2\n");
-#else
- printf("%%undef JDMERGE_SSE2_SUPPORTED\t\t; merged upsampling with SSE2\n");
-#endif
-#ifdef JDSAMPLE_FANCY_MMX_SUPPORTED
- printf("%%define JDSAMPLE_FANCY_MMX_SUPPORTED\t; fancy upsampling with MMX\n");
-#else
- printf("%%undef JDSAMPLE_FANCY_MMX_SUPPORTED\t; fancy upsampling with MMX\n");
-#endif
-#ifdef JDSAMPLE_FANCY_SSE2_SUPPORTED
- printf("%%define JDSAMPLE_FANCY_SSE2_SUPPORTED\t; fancy upsampling with SSE2\n");
-#else
- printf("%%undef JDSAMPLE_FANCY_SSE2_SUPPORTED\t; fancy upsampling with SSE2\n");
-#endif
-#ifdef JDSAMPLE_SIMPLE_MMX_SUPPORTED
- printf("%%define JDSAMPLE_SIMPLE_MMX_SUPPORTED\t; sloppy upsampling with MMX\n");
-#else
- printf("%%undef JDSAMPLE_SIMPLE_MMX_SUPPORTED\t; sloppy upsampling with MMX\n");
-#endif
-#ifdef JDSAMPLE_SIMPLE_SSE2_SUPPORTED
- printf("%%define JDSAMPLE_SIMPLE_SSE2_SUPPORTED\t; sloppy upsampling with SSE2\n");
-#else
- printf("%%undef JDSAMPLE_SIMPLE_SSE2_SUPPORTED\t; sloppy upsampling with SSE2\n");
-#endif
-#ifdef JIDCT_INT_MMX_SUPPORTED
- printf("%%define JIDCT_INT_MMX_SUPPORTED\t\t; inverse DCT with MMX\n");
-#else
- printf("%%undef JIDCT_INT_MMX_SUPPORTED\t\t; inverse DCT with MMX\n");
-#endif
-#ifdef JIDCT_INT_SSE2_SUPPORTED
- printf("%%define JIDCT_INT_SSE2_SUPPORTED\t; inverse DCT with SSE2\n");
-#else
- printf("%%undef JIDCT_INT_SSE2_SUPPORTED\t\t; inverse DCT with SSE2\n");
-#endif
-#ifdef JIDCT_FLT_3DNOW_MMX_SUPPORTED
- printf("%%define JIDCT_FLT_3DNOW_MMX_SUPPORTED\t; inverse DCT with 3DNow!/MMX\n");
-#else
- printf("%%undef JIDCT_FLT_3DNOW_MMX_SUPPORTED\t; inverse DCT with 3DNow!/MMX\n");
-#endif
-#ifdef JIDCT_FLT_SSE_MMX_SUPPORTED
- printf("%%define JIDCT_FLT_SSE_MMX_SUPPORTED\t; inverse DCT with SSE/MMX\n");
-#else
- printf("%%undef JIDCT_FLT_SSE_MMX_SUPPORTED\t; inverse DCT with SSE/MMX\n");
-#endif
-#ifdef JIDCT_FLT_SSE_SSE2_SUPPORTED
- printf("%%define JIDCT_FLT_SSE_SSE2_SUPPORTED\t; inverse DCT with SSE/SSE2\n");
-#else
- printf("%%undef JIDCT_FLT_SSE_SSE2_SUPPORTED\t; inverse DCT with SSE/SSE2\n");
-#endif
- printf("\n");
-}
-
-
-void
-print_jpeglib_h_macro (void)
-{
- printf("\n");
- printf("; ---- macros from jpeglib.h ----------------------------------------------\n");
- printf("\n");
-
- printf("; Version ID for the JPEG library.\n");
- printf("; Might be useful for tests like \"#if JPEG_LIB_VERSION >= 60\".\n");
- printf("\n");
- printf("%%define JPEG_LIB_VERSION %d\n", JPEG_LIB_VERSION);
- printf("\n");
- printf("; SIMD Ext: Version ID for the SIMD extension.\n");
- printf("\n");
- printf("%%define JPEG_SIMDEXT_VERSION %d\n", JPEG_SIMDEXT_VERSION);
- printf("%%define JPEG_SIMDEXT_VER_STR \"%s\"\n", JPEG_SIMDEXT_VER_STR);
- printf("\n");
-}
-
-
-int
-main (void)
-{
- printf(";\n; jsimdcfg.inc --- generated by makecfg.c");
-#ifdef __DATE__
-#ifdef __TIME__
- printf(" (%s, %s)", __DATE__, __TIME__);
-#endif
-#endif
- printf("\n;\n\n");
- printf("%%define JSIMDCFG_INCLUDED\t; so that jsimdcfg.inc doesn't do it again\n\n");
-
- print_structure_offset();
- print_jconfig_h_macro();
- print_jmorecfg_h_macro();
- print_jpeglib_h_macro();
-
- exit(0);
- return 0; /* suppress no-return-value warnings */
-}
diff --git a/makefile.ansi b/makefile.ansi
deleted file mode 100644
index fb830fc..0000000
--- a/makefile.ansi
+++ /dev/null
@@ -1,285 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is suitable for Unix-like systems with ANSI-capable compilers.
-# If you have a non-ANSI compiler, makefile.unix is a better starting point.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-CFLAGS= -O
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# The executable name of NASM and its options:
-NASM= nasm
-NAFLAGS= $(NASM_OBJFMT) -I./
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -felf -DELF
-
-# Link-time cc options:
-LDFLAGS=
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.o
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.o (Win32) / jsimddjg.o (DJGPP V.2) / jsimdgcc.o (Unix/gcc)
-SYSDEPSIMDCHK= jsimdgcc.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= rm -f
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) jsimdcpu.o \
- $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jccolmmx.o jccolss2.o \
- jcsammmx.o jcsamss2.o jcqntint.o jcqntflt.o jcqntmmx.o jcqnt3dn.o \
- jcqnts2i.o jcqntsse.o jcqnts2f.o jfdctint.o jfdctfst.o jfdctflt.o \
- jfmmxint.o jfmmxfst.o jf3dnflt.o jfss2int.o jfss2fst.o jfsseflt.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jdsample.o jdcolor.o jquant1.o jquant2.o \
- jdmerge.o jidctint.o jidctfst.o jidctred.o jidctflt.o jimmxint.o \
- jimmxfst.o jimmxred.o ji3dnflt.o jiss2int.o jiss2fst.o jiss2red.o \
- jisseflt.o jiss2flt.o jdsammmx.o jdsamss2.o jdcolmmx.o jdcolss2.o \
- jdmermmx.o jdmerss2.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-libjpeg.a: $(LIBOBJECTS)
- $(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-cjpeg: $(COBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg: $(DOBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran: $(TROBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom
- $(RM) jsimdcfg.inc core testout*
-
-test: cjpeg djpeg jpegtran
- $(RM) testout*
- ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- ./jpegtran -outfile testoutt.jpg testprog.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.bmp testout.bmp
- cmp testimg.jpg testout.jpg
- cmp testimg.ppm testoutp.ppm
- cmp testimgp.jpg testoutp.jpg
- cmp testorig.jpg testoutt.jpg
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o makecfg ./makecfg.c $(LDLIBS)
- ./makecfg > jsimdcfg.inc
- $(RM) ./makecfg
-
-.asm.o:
- $(NASM) $(NAFLAGS) -o $@ $*.asm
-
-jsimdcpu.o: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.o: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.o: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.o: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.o: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.o: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.o: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.o: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.o: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.o: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.o: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.o: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.o: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.o: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.o: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.o: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.o: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.o: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.o: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.o: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.o: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.o: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.o: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.o: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.o: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.o: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.o: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.o: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.o: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.o: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.o: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.o: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.o: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.o: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.o: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.o: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.o: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.o: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.o: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.o: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.o: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.o: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.o: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/makefile.bc5 b/makefile.bc5
deleted file mode 100644
index f3f7df6..0000000
--- a/makefile.bc5
+++ /dev/null
@@ -1,320 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is suitable for Borland C++ Compiler 5.5 (win32)
-
-# Read installation instructions before saying "make" !!
-
-!ifndef srcdir
-srcdir = .
-!endif
-.path.c = $(srcdir)
-.path.h = $(srcdir)
-.path.asm = $(srcdir)
-.path.inc = $(srcdir);.
-.path.doc = $(srcdir)
-
-# The name of your C compiler:
-CC= bcc32
-
-# You may need to adjust these cc options:
-CFLAGS= -O2 -OS -Oc -d -ff -w-par -w-aus -w-ccc -w-rch -q -I$(srcdir)
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# The executable name of NASM and its options:
-NASM= nasmw
-NAFLAGS= $(NASM_OBJFMT) -I$(srcdir)/
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -fobj -DOBJ32
-
-# Link-time cc options:
-LDFLAGS= -tWC -q
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= noeh32.lib
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Win32, we recommend jmemnobs.c (flat memory!)
-# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
-SYSDEPMEM= jmemnobs.obj
-SYSDEPMEMLIB= +jmemnobs.obj
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.obj (Win32) / jsimddjg.obj (DJGPP V.2) / jsimdgcc.obj (Unix/gcc)
-SYSDEPSIMDCHK= jsimdw32.obj
-SYSDEPSIMDCHKLIB= +jsimdw32.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) \
- jsimdcpu.obj $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
- jcdctmgr.obj jccolmmx.obj jccolss2.obj jcsammmx.obj jcsamss2.obj \
- jcqntint.obj jcqntflt.obj jcqntmmx.obj jcqnt3dn.obj jcqnts2i.obj \
- jcqntsse.obj jcqnts2f.obj jfdctint.obj jfdctfst.obj jfdctflt.obj \
- jfmmxint.obj jfmmxfst.obj jf3dnflt.obj jfss2int.obj jfss2fst.obj \
- jfsseflt.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jdsample.obj \
- jdcolor.obj jquant1.obj jquant2.obj jdmerge.obj jidctint.obj \
- jidctfst.obj jidctred.obj jidctflt.obj jimmxint.obj jimmxfst.obj \
- jimmxred.obj ji3dnflt.obj jiss2int.obj jiss2fst.obj jiss2red.obj \
- jisseflt.obj jiss2flt.obj jdsammmx.obj jdsamss2.obj jdcolmmx.obj \
- jdcolss2.obj jdmermmx.obj jdmerss2.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
- - del libjpeg.lib
- tlib libjpeg.lib /E /C @&&|
-+jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj +jdatadst.obj &
-+jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj +jcprepct.obj &
-+jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj &
-+jcdctmgr.obj +jccolmmx.obj +jccolss2.obj +jcsammmx.obj +jcsamss2.obj &
-+jcqntint.obj +jcqntflt.obj +jcqntmmx.obj +jcqnt3dn.obj +jcqnts2i.obj &
-+jcqntsse.obj +jcqnts2f.obj +jfdctint.obj +jfdctfst.obj +jfdctflt.obj &
-+jfmmxint.obj +jfmmxfst.obj +jf3dnflt.obj +jfss2int.obj +jfss2fst.obj &
-+jfsseflt.obj +jdapimin.obj +jdapistd.obj +jdtrans.obj +jdatasrc.obj &
-+jdmaster.obj +jdinput.obj +jdmarker.obj +jdhuff.obj +jdphuff.obj &
-+jdmainct.obj +jdcoefct.obj +jdpostct.obj +jddctmgr.obj +jdsample.obj &
-+jdcolor.obj +jquant1.obj +jquant2.obj +jdmerge.obj +jidctint.obj &
-+jidctfst.obj +jidctred.obj +jidctflt.obj +jimmxint.obj +jimmxfst.obj &
-+jimmxred.obj +ji3dnflt.obj +jiss2int.obj +jiss2fst.obj +jiss2red.obj &
-+jisseflt.obj +jiss2flt.obj +jdsammmx.obj +jdsamss2.obj +jdcolmmx.obj &
-+jdcolss2.obj +jdmermmx.obj +jdmerss2.obj +jcomapi.obj +jutils.obj &
-+jerror.obj +jmemmgr.obj $(SYSDEPMEMLIB) +jsimdcpu.obj $(SYSDEPSIMDCHKLIB)
-|
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.obj
- $(CC) $(LDFLAGS) -erdjpgcom.exe rdjpgcom.obj $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.obj
- $(CC) $(LDFLAGS) -ewrjpgcom.exe wrjpgcom.obj $(LDLIBS)
-
-# This "{}" syntax allows Borland Make to "batch" source files.
-# In this way, each run of the compiler can build many modules.
-.c.obj:
- $(CC) $(CFLAGS) -c{ $<}
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- - del *.obj
- - del *.tds
- - del cjpeg.exe
- - del djpeg.exe
- - del jpegtran.exe
- - del rdjpgcom.exe
- - del wrjpgcom.exe
- - del jsimdcfg.inc
- - del libjpeg.lib
- - del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- - del testout*.*
- djpeg -dct int -ppm -outfile testout.ppm $(srcdir)\testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)\testorig.jpg
- cjpeg -dct int -outfile testout.jpg $(srcdir)\testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)\testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)\testimg.ppm
- jpegtran -outfile testoutt.jpg $(srcdir)\testprog.jpg
- fc /b $(srcdir)\testimg.ppm testout.ppm
- fc /b $(srcdir)\testimg.bmp testout.bmp
- fc /b $(srcdir)\testimg.jpg testout.jpg
- fc /b $(srcdir)\testimg.ppm testoutp.ppm
- fc /b $(srcdir)\testimgp.jpg testoutp.jpg
- fc /b $(srcdir)\testorig.jpg testoutt.jpg
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) $(srcdir)\makecfg.c
- $(CC) $(LDFLAGS) -emakecfg.exe makecfg.obj $(LDLIBS)
- .\makecfg.exe > jsimdcfg.inc
- - del makecfg.tds
- - del makecfg.obj
- - del makecfg.exe
-
-.asm.obj:
- $(NASM) $(NAFLAGS) -o $@ $<
-
-jsimdcpu.obj: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.obj: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.obj: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.obj: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.obj: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.obj: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.obj: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.obj: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.obj: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.obj: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.obj: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.obj: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.obj: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.obj: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.obj: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.obj: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.obj: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.obj: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.obj: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.obj: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.obj: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.obj: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.obj: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.obj: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.obj: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.obj: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.obj: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.obj: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.obj: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.obj: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.obj: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.obj: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.obj: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.obj: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.obj: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.obj: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.obj: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.obj: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.obj: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.obj: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.obj: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.obj: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.obj: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/makefile.cfg b/makefile.cfg
index c18b7e6..7bb3b9d 100644
--- a/makefile.cfg
+++ b/makefile.cfg
@@ -1,5 +1,4 @@
# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
# makefile.cfg is edited by configure to produce a custom Makefile.
@@ -17,9 +16,8 @@
includedir = $(prefix)/include
binprefix =
manprefix =
-manext = .1
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
+manext = 1
+mandir = $(prefix)/man/man$(manext)
# The name of your C compiler:
CC= @CC@
@@ -31,10 +29,6 @@
# However, any special defines for ansi2knr.c may be included here:
ANSI2KNRFLAGS= @ANSI2KNRFLAGS@
-# The executable name of NASM and its options:
-NASM= @NASM@
-NAFLAGS= @NAFLAGS@ @INCLUDEFLAGS@
-
# Link-time cc options:
LDFLAGS= @LDFLAGS@
@@ -43,7 +37,6 @@
# If using GNU libtool, LIBTOOL references it; if not, LIBTOOL is empty.
LIBTOOL = @LIBTOOL@
-top_builddir = .
# $(O) expands to "lo" if using libtool, plain "o" if not.
# Similarly, $(A) expands to "la" or "a".
O = @O@
@@ -58,12 +51,8 @@
# to use jmemansi.o or jmemname.o if you have limited swap space.
SYSDEPMEM= @MEMORYMGR@
-# OS-dependent SIMD instruction support checker
-# jsimdw32.$(O) (Win32) / jsimddjg.$(O) (DJGPP V.2) / jsimdgcc.$(O) (Unix/gcc)
-SYSDEPSIMDCHK= @SIMDCHECKER@
-
# miscellaneous OS-dependent stuff
-SHELL= @SHELL@
+SHELL= /bin/sh
# linker
LN= @LN@
# file deletion command
@@ -79,11 +68,6 @@
INSTALL_PROGRAM= @INSTALL_PROGRAM@
INSTALL_LIB= @INSTALL_LIB@
INSTALL_DATA= @INSTALL_DATA@
-# uninstallation program
-UNINSTALL= @UNINSTALL@
-# executable suffix. under cygwin,
-# 'rm' doesn't know that executables have .exe suffix.
-EXE = @EXEEXT@
# End of configurable options.
@@ -126,26 +110,19 @@
DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
$(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
# library object files common to compression and decompression
-COMOBJECTS= jcomapi.$(O) jutils.$(O) jerror.$(O) jmemmgr.$(O) $(SYSDEPMEM) \
- jsimdcpu.$(O) $(SYSDEPSIMDCHK)
+COMOBJECTS= jcomapi.$(O) jutils.$(O) jerror.$(O) jmemmgr.$(O) $(SYSDEPMEM)
# compression library object files
CLIBOBJECTS= jcapimin.$(O) jcapistd.$(O) jctrans.$(O) jcparam.$(O) \
jdatadst.$(O) jcinit.$(O) jcmaster.$(O) jcmarker.$(O) jcmainct.$(O) \
jcprepct.$(O) jccoefct.$(O) jccolor.$(O) jcsample.$(O) jchuff.$(O) \
- jcphuff.$(O) jcdctmgr.$(O) jccolmmx.$(O) jccolss2.$(O) jcsammmx.$(O) \
- jcsamss2.$(O) jcqntint.$(O) jcqntflt.$(O) jcqntmmx.$(O) jcqnt3dn.$(O) \
- jcqnts2i.$(O) jcqntsse.$(O) jcqnts2f.$(O) jfdctint.$(O) jfdctfst.$(O) \
- jfdctflt.$(O) jfmmxint.$(O) jfmmxfst.$(O) jf3dnflt.$(O) jfss2int.$(O) \
- jfss2fst.$(O) jfsseflt.$(O)
+ jcphuff.$(O) jcdctmgr.$(O) jfdctfst.$(O) jfdctflt.$(O) \
+ jfdctint.$(O)
# decompression library object files
DLIBOBJECTS= jdapimin.$(O) jdapistd.$(O) jdtrans.$(O) jdatasrc.$(O) \
jdmaster.$(O) jdinput.$(O) jdmarker.$(O) jdhuff.$(O) jdphuff.$(O) \
- jdmainct.$(O) jdcoefct.$(O) jdpostct.$(O) jddctmgr.$(O) jdsample.$(O) \
- jdcolor.$(O) jquant1.$(O) jquant2.$(O) jdmerge.$(O) jidctint.$(O) \
- jidctfst.$(O) jidctred.$(O) jidctflt.$(O) jimmxint.$(O) jimmxfst.$(O) \
- jimmxred.$(O) ji3dnflt.$(O) jiss2int.$(O) jiss2fst.$(O) jiss2red.$(O) \
- jisseflt.$(O) jiss2flt.$(O) jdsammmx.$(O) jdsamss2.$(O) jdcolmmx.$(O) \
- jdcolss2.$(O) jdmermmx.$(O) jdmerss2.$(O)
+ jdmainct.$(O) jdcoefct.$(O) jdpostct.$(O) jddctmgr.$(O) \
+ jidctfst.$(O) jidctflt.$(O) jidctint.$(O) jidctred.$(O) \
+ jdsample.$(O) jdcolor.$(O) jquant1.$(O) jquant2.$(O) jdmerge.$(O)
# These objectfiles are included in libjpeg.a
LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
# object files for sample applications (excluding library files)
@@ -156,22 +133,15 @@
TROBJECTS= jpegtran.$(O) rdswitch.$(O) cdjpeg.$(O) transupp.$(O)
-all: @A2K_DEPS@ libjpeg.$(A) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
+all: @A2K_DEPS@ libjpeg.$(A)
# Special compilation rules to support ansi2knr and libtool.
-.SUFFIXES: .lo .la .asm
-
-.asm.o:
- $(SHELL) $(srcdir)/nasm_lt.sh $(NASM) $(NAFLAGS) $(srcdir)/$*.asm
+.SUFFIXES: .lo .la
# How to compile with libtool.
@COM_LT@.c.lo:
@COM_LT@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c
-@COM_LT@.asm.lo:
-@COM_LT@ $(LIBTOOL) --mode=compile @TAGCC@ $(SHELL) $(srcdir)/nasm_lt.sh \
-@COM_LT@ $(NASM) $(NAFLAGS) $(srcdir)/$*.asm
-
# How to use ansi2knr, when not using libtool.
@COM_A2K@.c.o:
@COM_A2K@ ./ansi2knr $(srcdir)/$*.c knr/$*.c
@@ -199,7 +169,7 @@
# with libtool:
libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
$(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
- -no-undefined -rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
+ -rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
# sample programs:
@@ -221,62 +191,34 @@
# Installation rules:
install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom @FORCE_INSTALL_LIB@
- -@if [ ! -d $(bindir) ]; then mkdir -p $(bindir); fi
- -@if [ ! -d $(man1dir) ]; then mkdir -p $(man1dir); fi
$(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg
$(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg
$(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran
$(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom
$(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom
- $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(man1dir)/$(manprefix)cjpeg$(manext)
- $(INSTALL_DATA) $(srcdir)/djpeg.1 $(man1dir)/$(manprefix)djpeg$(manext)
- $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(man1dir)/$(manprefix)jpegtran$(manext)
- $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(man1dir)/$(manprefix)rdjpgcom$(manext)
- $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(man1dir)/$(manprefix)wrjpgcom$(manext)
+ $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext)
+ $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext)
+ $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext)
+ $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext)
+ $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext)
install-lib: libjpeg.$(A) install-headers
- -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
$(INSTALL_LIB) libjpeg.$(A) $(libdir)/$(binprefix)libjpeg.$(A)
install-headers: jconfig.h
- -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
$(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h
$(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h
$(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h
$(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h
-# Uninstallation rules:
-
-uninstall: @UNINSTALL_LIB@
- $(UNINSTALL) $(bindir)/$(binprefix)cjpeg$(EXE)
- $(UNINSTALL) $(bindir)/$(binprefix)djpeg$(EXE)
- $(UNINSTALL) $(bindir)/$(binprefix)jpegtran$(EXE)
- $(UNINSTALL) $(bindir)/$(binprefix)rdjpgcom$(EXE)
- $(UNINSTALL) $(bindir)/$(binprefix)wrjpgcom$(EXE)
- $(UNINSTALL) $(man1dir)/$(manprefix)cjpeg$(manext)
- $(UNINSTALL) $(man1dir)/$(manprefix)djpeg$(manext)
- $(UNINSTALL) $(man1dir)/$(manprefix)jpegtran$(manext)
- $(UNINSTALL) $(man1dir)/$(manprefix)rdjpgcom$(manext)
- $(UNINSTALL) $(man1dir)/$(manprefix)wrjpgcom$(manext)
-
-uninstall-lib: uninstall-headers
- $(UNINSTALL) $(libdir)/$(binprefix)libjpeg.$(A)
-
-uninstall-headers:
- $(UNINSTALL) $(includedir)/jconfig.h
- $(UNINSTALL) $(includedir)/jpeglib.h
- $(UNINSTALL) $(includedir)/jmorecfg.h
- $(UNINSTALL) $(includedir)/jerror.h
-
clean:
- $(RM) jsimdcfg.inc *.o *.lo libjpeg.a libjpeg.la
-# under cygwin, libtool will create wrapper scripts without suffix.
- $(RM) cjpeg djpeg jpegtran cjpeg$(EXE) djpeg$(EXE) jpegtran$(EXE)
- $(RM) rdjpgcom$(EXE) wrjpgcom$(EXE) ansi2knr$(EXE) core testout*
+ $(RM) *.o *.lo libjpeg.a libjpeg.la
+ $(RM) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
+ $(RM) ansi2knr core testout* config.log config.status
$(RM) -r knr .libs _libs
distclean: clean
- $(RM) Makefile jconfig.h libtool config.cache config.status config.log
+ $(RM) Makefile jconfig.h libtool config.cache
test: cjpeg djpeg jpegtran
$(RM) testout*
@@ -306,60 +248,10 @@
.PHONY: all install install-lib install-headers clean distclean test check
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o makecfg $(srcdir)/makecfg.c $(LDLIBS)
- ./makecfg > jsimdcfg.inc
- $(RM) makecfg$(EXE)
-
-jsimdcpu.$(O): jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.$(O): jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.$(O): jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.$(O): jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.$(O): jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.$(O): jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.$(O): jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.$(O): jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.$(O): jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.$(O): jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.$(O): jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.$(O): jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.$(O): jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.$(O): jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.$(O): jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.$(O): jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.$(O): jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.$(O): jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.$(O): jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.$(O): jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.$(O): jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.$(O): jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.$(O): jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.$(O): jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.$(O): jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.$(O): jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.$(O): jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.$(O): jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.$(O): jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.$(O): jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.$(O): jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.$(O): jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.$(O): jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.$(O): jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.$(O): jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.$(O): jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.$(O): ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.$(O): jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.$(O): jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.$(O): jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.$(O): jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.$(O): jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.$(O): jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
jcapimin.$(O): jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcapistd.$(O): jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jccoefct.$(O): jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.$(O): jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
+jccolor.$(O): jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcdctmgr.$(O): jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jchuff.$(O): jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcinit.$(O): jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
@@ -370,33 +262,33 @@
jcparam.$(O): jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jcphuff.$(O): jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
jcprepct.$(O): jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.$(O): jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
+jcsample.$(O): jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jctrans.$(O): jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapimin.$(O): jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdapistd.$(O): jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdatadst.$(O): jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdatasrc.$(O): jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
jdcoefct.$(O): jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.$(O): jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
+jdcolor.$(O): jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jddctmgr.$(O): jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jdhuff.$(O): jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdinput.$(O): jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmainct.$(O): jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmarker.$(O): jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdmaster.$(O): jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.$(O): jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
+jdmerge.$(O): jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdphuff.$(O): jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
jdpostct.$(O): jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.$(O): jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
+jdsample.$(O): jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jdtrans.$(O): jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jerror.$(O): jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.$(O): jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.$(O): jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.$(O): jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.$(O): jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.$(O): jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.$(O): jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.$(O): jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctflt.$(O): jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctfst.$(O): jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctint.$(O): jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctflt.$(O): jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctfst.$(O): jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctint.$(O): jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctred.$(O): jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
jquant1.$(O): jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jquant2.$(O): jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
jutils.$(O): jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
diff --git a/makefile.dj b/makefile.dj
deleted file mode 100644
index 2186468..0000000
--- a/makefile.dj
+++ /dev/null
@@ -1,300 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is for DJGPP (Delorie's GNU C port on MS-DOS), v2.0 or later.
-# Thanks to Frank J. Donahoe for this version.
-
-# Read installation instructions before saying "make" !!
-
-srcdir = .
-VPATH = $(srcdir)
-
-# The name of your C compiler:
-CC= gcc
-
-# You may need to adjust these cc options:
-# For gcc 3.4.x
-CFLAGS= -O2 -mtune=pentium2 -march=i386 -fomit-frame-pointer -fweb \
- -mpreferred-stack-boundary=2 -mno-align-stringops -I$(srcdir)
-# For gcc 3.3.x
-#CFLAGS= -O2 -mcpu=pentium2 -march=i386 -fomit-frame-pointer \
-# -mpreferred-stack-boundary=2 -mno-align-stringops -I$(srcdir)
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# The executable name of NASM and its options:
-NASM= nasm
-NAFLAGS= $(NASM_OBJFMT) -I$(srcdir)/
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -fcoff -DDJGPP
-
-# Link-time cc options:
-LDFLAGS= -s
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For DJGPP this is usually jmemnobs.o, but you could
-# use jmemname.o if you want to use named temp files instead of swap space.
-SYSDEPMEM= jmemnobs.o
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.o (Win32) / jsimddjg.o (DJGPP V.2) / jsimdgcc.o (Unix/gcc)
-SYSDEPSIMDCHK= jsimddjg.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= del
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) jsimdcpu.o \
- $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jccolmmx.o jccolss2.o \
- jcsammmx.o jcsamss2.o jcqntint.o jcqntflt.o jcqntmmx.o jcqnt3dn.o \
- jcqnts2i.o jcqntsse.o jcqnts2f.o jfdctint.o jfdctfst.o jfdctflt.o \
- jfmmxint.o jfmmxfst.o jf3dnflt.o jfss2int.o jfss2fst.o jfsseflt.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jdsample.o jdcolor.o jquant1.o jquant2.o \
- jdmerge.o jidctint.o jidctfst.o jidctred.o jidctflt.o jimmxint.o \
- jimmxfst.o jimmxred.o ji3dnflt.o jiss2int.o jiss2fst.o jiss2red.o \
- jisseflt.o jiss2flt.o jdsammmx.o jdsamss2.o jdcolmmx.o jdcolss2.o \
- jdmermmx.o jdmerss2.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.a cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.a: $(LIBOBJECTS)
- $(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-cjpeg.exe: $(COBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o cjpeg.exe $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o djpeg.exe $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o jpegtran.exe $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom.exe rdjpgcom.o $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- $(RM) *.o
- $(RM) cjpeg.exe
- $(RM) djpeg.exe
- $(RM) jpegtran.exe
- $(RM) rdjpgcom.exe
- $(RM) wrjpgcom.exe
- $(RM) jsimdcfg.inc
- $(RM) libjpeg.a
- $(RM) testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- $(RM) testout*.*
- ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)\testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)\testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg $(srcdir)\testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)\testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)\testimg.ppm
- ./jpegtran -outfile testoutt.jpg $(srcdir)\testprog.jpg
- fc /b $(srcdir)\testimg.ppm testout.ppm
- fc /b $(srcdir)\testimg.bmp testout.bmp
- fc /b $(srcdir)\testimg.jpg testout.jpg
- fc /b $(srcdir)\testimg.ppm testoutp.ppm
- fc /b $(srcdir)\testimgp.jpg testoutp.jpg
- fc /b $(srcdir)\testorig.jpg testoutt.jpg
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o makecfg.exe $(srcdir)/makecfg.c $(LDLIBS)
- .\makecfg.exe > jsimdcfg.inc
- $(RM) makecfg.exe
-
-%.o : %.asm
- $(NASM) $(NAFLAGS) -o $@ $<
-
-jsimdcpu.o: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.o: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.o: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.o: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.o: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.o: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.o: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.o: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.o: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.o: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.o: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.o: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.o: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.o: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.o: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.o: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.o: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.o: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.o: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.o: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.o: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.o: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.o: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.o: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.o: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.o: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.o: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.o: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.o: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.o: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.o: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.o: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.o: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.o: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.o: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.o: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.o: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.o: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.o: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.o: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.o: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.o: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.o: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/makefile.linux b/makefile.linux
deleted file mode 100644
index 54e1d65..0000000
--- a/makefile.linux
+++ /dev/null
@@ -1,449 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is for Linux ELF with gcc
-
-# Read installation instructions before saying "make" !!
-
-# For compiling with source and object files in different directories.
-srcdir = .
-VPATH = $(srcdir)
-
-# Where to install the programs and man pages.
-prefix = /usr/local
-exec_prefix = ${prefix}
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
-includedir = $(prefix)/include
-binprefix =
-manprefix =
-manext = 1
-mandir = $(prefix)/man/man$(manext)
-
-LNNAME = libjpeg.so
-SONAME = libjpeg.so.62
-LIBNAME = libjpeg.so.62.1.0
-
-# The name of your C compiler:
-CC= gcc
-
-# You may need to adjust these cc options:
-CFLAGS= -O2 -mcpu=i686 -march=i386 -I$(srcdir)
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# The executable name of NASM and its options:
-NASM= nasm
-NAFLAGS= $(NASM_OBJFMT) -I$(srcdir)/
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -felf -DELF
-
-# Link-time cc options:
-LDFLAGS=
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.o
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.o (Win32) / jsimddjg.o (DJGPP V.2) / jsimdgcc.o (Unix/gcc)
-SYSDEPSIMDCHK= jsimdgcc.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= rm -f
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-# installation program
-INSTALL= install -c
-INSTALL_PROGRAM= ${INSTALL} -s
-INSTALL_SHARED = ${INSTALL}
-INSTALL_LIB= ${INSTALL} -m 644
-INSTALL_DATA= ${INSTALL} -m 644
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) jsimdcpu.o \
- $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jccolmmx.o jccolss2.o \
- jcsammmx.o jcsamss2.o jcqntint.o jcqntflt.o jcqntmmx.o jcqnt3dn.o \
- jcqnts2i.o jcqntsse.o jcqnts2f.o jfdctint.o jfdctfst.o jfdctflt.o \
- jfmmxint.o jfmmxfst.o jf3dnflt.o jfss2int.o jfss2fst.o jfsseflt.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jdsample.o jdcolor.o jquant1.o jquant2.o \
- jdmerge.o jidctint.o jidctfst.o jidctred.o jidctflt.o jimmxint.o \
- jimmxfst.o jimmxred.o ji3dnflt.o jiss2int.o jiss2fst.o jiss2red.o \
- jisseflt.o jiss2flt.o jdsammmx.o jdsamss2.o jdcolmmx.o jdcolss2.o \
- jdmermmx.o jdmerss2.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# These objectfiles are included in libjpeg.so
-DLLOBJECTS= $(LIBOBJECTS:.o=.pic.o)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: static shared app
-app: cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-app-static: cjpeg-static djpeg-static jpegtran-static
-shared: $(LIBNAME)
-static: libjpeg.a
-
-libjpeg.a: $(LIBOBJECTS)
- $(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-$(LIBNAME): $(DLLOBJECTS)
- $(CC) -shared -Wl,-soname,$(SONAME) -o $(LIBNAME) $(DLLOBJECTS)
-
-$(SONAME): $(LIBNAME)
- ln -sf $(LIBNAME) $(SONAME)
-
-$(LNNAME): $(SONAME)
- ln -sf $(LIBNAME) $(LNNAME)
-
-cjpeg-static: $(COBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o cjpeg-static $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg-static: $(DOBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o djpeg-static $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran-static: $(TROBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o jpegtran-static $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-cjpeg-shared: $(COBJECTS) $(LNNAME)
- $(LN) $(LDFLAGS) -o cjpeg-shared $(COBJECTS) $(LNNAME) $(LDLIBS)
-
-djpeg-shared: $(DOBJECTS) $(LNNAME)
- $(LN) $(LDFLAGS) -o djpeg-shared $(DOBJECTS) $(LNNAME) $(LDLIBS)
-
-jpegtran-shared: $(TROBJECTS) $(LNNAME)
- $(LN) $(LDFLAGS) -o jpegtran-shared $(TROBJECTS) $(LNNAME) $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-cjpeg: cjpeg-shared
- echo '#!/bin/sh' > cjpeg
- echo export LD_LIBRARY_PATH=`pwd`:'$$LD_LIBRARY_PATH' >> cjpeg
- echo exec `pwd`/cjpeg-shared '"$$@"' >> cjpeg
- chmod +x cjpeg
-
-djpeg: djpeg-shared
- echo '#!/bin/sh' > djpeg
- echo export LD_LIBRARY_PATH=`pwd`:'$$LD_LIBRARY_PATH' >> djpeg
- echo exec `pwd`/djpeg-shared '"$$@"' >> djpeg
- chmod +x djpeg
-
-jpegtran: jpegtran-shared
- echo '#!/bin/sh' > jpegtran
- echo export LD_LIBRARY_PATH=`pwd`:'$$LD_LIBRARY_PATH' >> jpegtran
- echo exec `pwd`/jpegtran-shared '"$$@"' >> jpegtran
- chmod +x jpegtran
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- $(RM) *.o libjpeg.a $(LIBNAME) $(SONAME) $(LNNAME)
- $(RM) cjpeg djpeg jpegtran rdjpgcom wrjpgcom
- $(RM) cjpeg-shared djpeg-shared jpegtran-shared
- $(RM) cjpeg-static djpeg-static jpegtran-static
- $(RM) core testout*
- $(RM) jsimdcfg.inc
-
-test: cjpeg djpeg jpegtran
- $(RM) testout*
- ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm
- ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg
- cmp $(srcdir)/testimg.ppm testout.ppm
- cmp $(srcdir)/testimg.bmp testout.bmp
- cmp $(srcdir)/testimg.jpg testout.jpg
- cmp $(srcdir)/testimg.ppm testoutp.ppm
- cmp $(srcdir)/testimgp.jpg testoutp.jpg
- cmp $(srcdir)/testorig.jpg testoutt.jpg
-
-test-static: cjpeg-static djpeg-static jpegtran-static
- $(RM) testout*
- ./djpeg-static -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg
- ./djpeg-static -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
- ./cjpeg-static -dct int -outfile testout.jpg $(srcdir)/testimg.ppm
- ./djpeg-static -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg
- ./cjpeg-static -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm
- ./jpegtran-static -outfile testoutt.jpg $(srcdir)/testprog.jpg
- cmp $(srcdir)/testimg.ppm testout.ppm
- cmp $(srcdir)/testimg.bmp testout.bmp
- cmp $(srcdir)/testimg.jpg testout.jpg
- cmp $(srcdir)/testimg.ppm testoutp.ppm
- cmp $(srcdir)/testimgp.jpg testoutp.jpg
- cmp $(srcdir)/testorig.jpg testoutt.jpg
-
-
-install: install-lib install-app install-man
-
-install-app-static: cjpeg-static djpeg-static jpegtran-static
- -@if [ ! -d $(bindir) ]; then mkdir -p $(bindir); fi
- $(INSTALL_PROGRAM) cjpeg-static $(bindir)/$(binprefix)cjpeg-static
- $(INSTALL_PROGRAM) djpeg-static $(bindir)/$(binprefix)djpeg-static
- $(INSTALL_PROGRAM) jpegtran-static $(bindir)/$(binprefix)jpegtran-static
-
-install-app: install-lib cjpeg-shared djpeg-shared jpegtran-shared rdjpgcom wrjpgcom
- -@if [ ! -d $(bindir) ]; then mkdir -p $(bindir); fi
- $(INSTALL_PROGRAM) cjpeg-shared $(bindir)/$(binprefix)cjpeg
- $(INSTALL_PROGRAM) djpeg-shared $(bindir)/$(binprefix)djpeg
- $(INSTALL_PROGRAM) jpegtran-shared $(bindir)/$(binprefix)jpegtran
- $(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom
- $(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom
-
-install-man: cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
- -@if [ ! -d $(mandir) ]; then mkdir -p $(mandir); fi
- $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext)
- $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext)
- $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext)
- $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext)
- $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext)
-
-install-lib: install-headers libjpeg.a $(LIBNAME)
- -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
- $(INSTALL_LIB) libjpeg.a $(libdir)/libjpeg.a
- $(INSTALL_SHARED) $(LIBNAME) $(libdir)/$(LIBNAME)
- (cd $(libdir); ln -sf $(LIBNAME) $(SONAME); ln -sf $(LIBNAME) $(LNNAME))
-
-install-headers: jconfig.h jpeglib.h jmorecfg.h jerror.h
- -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
- $(INSTALL_DATA) $(srcdir)/jconfig.h $(includedir)/jconfig.h
- $(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h
- $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h
- $(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h
-
-uninstall: uninstall-lib uninstall-app uninstall-man
-
-uninstall-app-static:
- $(RM) $(bindir)/$(binprefix)cjpeg-static
- $(RM) $(bindir)/$(binprefix)djpeg-static
- $(RM) $(bindir)/$(binprefix)jpegtran-static
-
-uninstall-app: uninstall-lib
- $(RM) $(bindir)/$(binprefix)cjpeg
- $(RM) $(bindir)/$(binprefix)djpeg
- $(RM) $(bindir)/$(binprefix)jpegtran
- $(RM) $(bindir)/$(binprefix)rdjpgcom
- $(RM) $(bindir)/$(binprefix)wrjpgcom
-
-uninstall-man:
- $(RM) $(mandir)/$(manprefix)cjpeg.$(manext)
- $(RM) $(mandir)/$(manprefix)djpeg.$(manext)
- $(RM) $(mandir)/$(manprefix)jpegtran.$(manext)
- $(RM) $(mandir)/$(manprefix)rdjpgcom.$(manext)
- $(RM) $(mandir)/$(manprefix)wrjpgcom.$(manext)
-
-uninstall-lib: uninstall-headers
- $(RM) $(libdir)/libjpeg.a
- $(RM) $(libdir)/$(LIBNAME)
- $(RM) $(libdir)/$(SONAME)
- $(RM) $(libdir)/$(LNNAME)
-
-uninstall-headers:
- $(RM) $(includedir)/jconfig.h
- $(RM) $(includedir)/jpeglib.h
- $(RM) $(includedir)/jmorecfg.h
- $(RM) $(includedir)/jerror.h
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o makecfg $(srcdir)/makecfg.c $(LDLIBS)
- ./makecfg > jsimdcfg.inc
- $(RM) ./makecfg
-
-.SUFFIXES: .c .asm .o .pic.o
-
-%.pic.o : %.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $<
-
-%.pic.o : %.asm
- $(NASM) $(NAFLAGS) -DPIC -o $@ $<
-
-%.o : %.asm
- $(NASM) $(NAFLAGS) -o $@ $<
-
-jsimdcpu.o jsimdcpu.pic.o: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.o jsimdw32.pic.o: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.o jsimddjg.pic.o: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.o jccolmmx.pic.o: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.o jccolss2.pic.o: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.o jcsammmx.pic.o: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.o jcsamss2.pic.o: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.o jdcolmmx.pic.o: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.o jdcolss2.pic.o: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.o jdmermmx.pic.o: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.o jdmerss2.pic.o: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.o jdsammmx.pic.o: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.o jdsamss2.pic.o: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.o jcqntint.pic.o: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.o jcqntflt.pic.o: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.o jcqntmmx.pic.o: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.o jcqnt3dn.pic.o: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.o jcqnts2i.pic.o: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.o jcqntsse.pic.o: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.o jcqnts2f.pic.o: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.o jfdctint.pic.o: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.o jfdctfst.pic.o: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.o jfdctflt.pic.o: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.o jfmmxint.pic.o: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.o jfmmxfst.pic.o: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.o jf3dnflt.pic.o: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.o jfss2int.pic.o: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.o jfss2fst.pic.o: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.o jfsseflt.pic.o: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.o jidctint.pic.o: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.o jidctfst.pic.o: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.o jidctred.pic.o: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.o jidctflt.pic.o: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.o jimmxint.pic.o: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.o jimmxfst.pic.o: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.o jimmxred.pic.o: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.o ji3dnflt.pic.o: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.o jiss2int.pic.o: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.o jiss2fst.pic.o: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.o jiss2red.pic.o: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.o jisseflt.pic.o: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.o jiss2flt.pic.o: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.o jsimdgcc.pic.o: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.o jcapimin.pic.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o jcapistd.pic.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o jccoefct.pic.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o jccolor.pic.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.o jcdctmgr.pic.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o jchuff.pic.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o jcinit.pic.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o jcmainct.pic.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o jcmarker.pic.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o jcmaster.pic.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o jcomapi.pic.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o jcparam.pic.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o jcphuff.pic.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o jcprepct.pic.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o jcsample.pic.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.o jctrans.pic.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o jdapimin.pic.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o jdapistd.pic.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o jdatadst.pic.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o jdatasrc.pic.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o jdcoefct.pic.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o jdcolor.pic.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.o jddctmgr.pic.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o jdhuff.pic.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o jdinput.pic.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o jdmainct.pic.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o jdmarker.pic.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o jdmaster.pic.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o jdmerge.pic.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.o jdphuff.pic.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o jdpostct.pic.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o jdsample.pic.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.o jdtrans.pic.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o jerror.pic.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.o jfdctflt.pic.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.o jfdctfst.pic.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.o jfdctint.pic.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.o jidctflt.pic.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.o jidctfst.pic.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.o jidctint.pic.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.o jidctred.pic.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o jquant1.pic.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o jquant2.pic.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o jutils.pic.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o jmemmgr.pic.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o jmemansi.pic.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o jmemname.pic.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o jmemnobs.pic.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o jmemdos.pic.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o jmemmac.pic.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/makefile.mgw b/makefile.mgw
deleted file mode 100644
index 06f09e0..0000000
--- a/makefile.mgw
+++ /dev/null
@@ -1,298 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is for MinGW.
-
-# Read installation instructions before saying "make" !!
-
-srcdir = .
-VPATH = $(srcdir)
-
-# The name of your C compiler:
-CC= gcc
-
-# You may need to adjust these cc options:
-# For gcc 3.4.x
-CFLAGS= -O2 -mtune=pentium2 -march=i386 -fomit-frame-pointer -fweb \
- -mpreferred-stack-boundary=2 -mno-align-stringops -I$(srcdir)
-# For gcc 3.3.x
-#CFLAGS= -O2 -mcpu=pentium2 -march=i386 -fomit-frame-pointer \
-# -mpreferred-stack-boundary=2 -mno-align-stringops -I$(srcdir)
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# The executable name of NASM and its options:
-NASM= nasmw
-NAFLAGS= $(NASM_OBJFMT) -I$(srcdir)/
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -fwin32 -DWIN32
-
-# Link-time cc options:
-LDFLAGS= -s
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.
-SYSDEPMEM= jmemnobs.o
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.o (Win32) / jsimddjg.o (DJGPP V.2) / jsimdgcc.o (Unix/gcc)
-SYSDEPSIMDCHK= jsimdw32.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= del
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) jsimdcpu.o \
- $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jccolmmx.o jccolss2.o \
- jcsammmx.o jcsamss2.o jcqntint.o jcqntflt.o jcqntmmx.o jcqnt3dn.o \
- jcqnts2i.o jcqntsse.o jcqnts2f.o jfdctint.o jfdctfst.o jfdctflt.o \
- jfmmxint.o jfmmxfst.o jf3dnflt.o jfss2int.o jfss2fst.o jfsseflt.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jdsample.o jdcolor.o jquant1.o jquant2.o \
- jdmerge.o jidctint.o jidctfst.o jidctred.o jidctflt.o jimmxint.o \
- jimmxfst.o jimmxred.o ji3dnflt.o jiss2int.o jiss2fst.o jiss2red.o \
- jisseflt.o jiss2flt.o jdsammmx.o jdsamss2.o jdcolmmx.o jdcolss2.o \
- jdmermmx.o jdmerss2.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.a cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.a: $(LIBOBJECTS)
- -$(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-cjpeg.exe: $(COBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o cjpeg.exe $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o djpeg.exe $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o jpegtran.exe $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom.exe rdjpgcom.o $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- -$(RM) *.o
- -$(RM) cjpeg.exe
- -$(RM) djpeg.exe
- -$(RM) jpegtran.exe
- -$(RM) rdjpgcom.exe
- -$(RM) wrjpgcom.exe
- -$(RM) jsimdcfg.inc
- -$(RM) libjpeg.a
- -$(RM) testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- -$(RM) testout*.*
- ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)\testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)\testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg $(srcdir)\testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)\testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)\testimg.ppm
- ./jpegtran -outfile testoutt.jpg $(srcdir)\testprog.jpg
- fc /b $(srcdir)\testimg.ppm testout.ppm
- fc /b $(srcdir)\testimg.bmp testout.bmp
- fc /b $(srcdir)\testimg.jpg testout.jpg
- fc /b $(srcdir)\testimg.ppm testoutp.ppm
- fc /b $(srcdir)\testimgp.jpg testoutp.jpg
- fc /b $(srcdir)\testorig.jpg testoutt.jpg
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o makecfg.exe $(srcdir)/makecfg.c $(LDLIBS)
- .\makecfg.exe > jsimdcfg.inc
- $(RM) makecfg.exe
-
-%.o : %.asm
- $(NASM) $(NAFLAGS) -o $@ $<
-
-jsimdcpu.o: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.o: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.o: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.o: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.o: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.o: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.o: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.o: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.o: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.o: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.o: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.o: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.o: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.o: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.o: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.o: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.o: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.o: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.o: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.o: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.o: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.o: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.o: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.o: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.o: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.o: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.o: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.o: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.o: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.o: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.o: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.o: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.o: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.o: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.o: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.o: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.o: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.o: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.o: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.o: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.o: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.o: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.o: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/makefile.mgwdll b/makefile.mgwdll
deleted file mode 100644
index 08a3e69..0000000
--- a/makefile.mgwdll
+++ /dev/null
@@ -1,310 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is for MinGW.
-# It builds the IJG library as a dynamically linkable library (.DLL),
-# and builds the sample applications which are linked against the DLL.
-
-# Read installation instructions before saying "make" !!
-
-srcdir = .
-VPATH = $(srcdir)
-
-# The name of your C compiler:
-CC= gcc
-
-# You may need to adjust these cc options:
-# For gcc 3.4.x
-CFLAGS= -O2 -mtune=pentium2 -march=i386 -fomit-frame-pointer -fweb \
- -mpreferred-stack-boundary=2 -mno-align-stringops -I$(srcdir)
-# For gcc 3.3.x
-#CFLAGS= -O2 -mcpu=pentium2 -march=i386 -fomit-frame-pointer \
-# -mpreferred-stack-boundary=2 -mno-align-stringops -I$(srcdir)
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# The executable name of NASM and its options:
-NASM= nasmw
-NAFLAGS= $(NASM_OBJFMT) -I$(srcdir)/
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -fwin32 -DWIN32
-
-# Link-time cc options:
-LDFLAGS= -s
-LDFLAGS_DLL= $(LDFLAGS) -shared
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# DLL to build
-DLLNAME = jpeg62.dll
-# import library
-LIBNAME = libjpeg.dll.a
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.
-SYSDEPMEM= jmemnobs.o
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.o (Win32) / jsimddjg.o (DJGPP V.2) / jsimdgcc.o (Unix/gcc)
-SYSDEPSIMDCHK= jsimdw32.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= del
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) jsimdcpu.o \
- $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jccolmmx.o jccolss2.o \
- jcsammmx.o jcsamss2.o jcqntint.o jcqntflt.o jcqntmmx.o jcqnt3dn.o \
- jcqnts2i.o jcqntsse.o jcqnts2f.o jfdctint.o jfdctfst.o jfdctflt.o \
- jfmmxint.o jfmmxfst.o jf3dnflt.o jfss2int.o jfss2fst.o jfsseflt.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jdsample.o jdcolor.o jquant1.o jquant2.o \
- jdmerge.o jidctint.o jidctfst.o jidctred.o jidctflt.o jimmxint.o \
- jimmxfst.o jimmxred.o ji3dnflt.o jiss2int.o jiss2fst.o jiss2red.o \
- jisseflt.o jiss2flt.o jdsammmx.o jdsamss2.o jdcolmmx.o jdcolss2.o \
- jdmermmx.o jdmerss2.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: $(DLLNAME) cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-$(LIBNAME): $(DLLNAME)
-$(DLLNAME): $(LIBOBJECTS) jpegdll.o jpegdll.def
- $(LN) $(LDFLAGS_DLL) -o $(DLLNAME) -Wl,--out-implib,$(LIBNAME) \
- $(LIBOBJECTS) jpegdll.o jpegdll.def
-
-jpegdll.o: jpegdll.rc
- windres -O coff -o $@ $*.rc
-
-cjpeg.exe: $(COBJECTS) $(LIBNAME)
- $(LN) $(LDFLAGS) -o cjpeg.exe $(COBJECTS) $(LIBNAME) $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) $(LIBNAME)
- $(LN) $(LDFLAGS) -o djpeg.exe $(DOBJECTS) $(LIBNAME) $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) $(LIBNAME)
- $(LN) $(LDFLAGS) -o jpegtran.exe $(TROBJECTS) $(LIBNAME) $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom.exe rdjpgcom.o $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- -$(RM) *.o
- -$(RM) cjpeg.exe
- -$(RM) djpeg.exe
- -$(RM) jpegtran.exe
- -$(RM) rdjpgcom.exe
- -$(RM) wrjpgcom.exe
- -$(RM) jsimdcfg.inc
- -$(RM) $(DLLNAME)
- -$(RM) $(LIBNAME)
- -$(RM) testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- -$(RM) testout*.*
- ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)\testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)\testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg $(srcdir)\testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)\testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)\testimg.ppm
- ./jpegtran -outfile testoutt.jpg $(srcdir)\testprog.jpg
- fc /b $(srcdir)\testimg.ppm testout.ppm
- fc /b $(srcdir)\testimg.bmp testout.bmp
- fc /b $(srcdir)\testimg.jpg testout.jpg
- fc /b $(srcdir)\testimg.ppm testoutp.ppm
- fc /b $(srcdir)\testimgp.jpg testoutp.jpg
- fc /b $(srcdir)\testorig.jpg testoutt.jpg
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o makecfg.exe $(srcdir)/makecfg.c $(LDLIBS)
- .\makecfg.exe > jsimdcfg.inc
- $(RM) makecfg.exe
-
-%.o : %.asm
- $(NASM) $(NAFLAGS) -o $@ $<
-
-jsimdcpu.o: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.o: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.o: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.o: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.o: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.o: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.o: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.o: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.o: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.o: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.o: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.o: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.o: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.o: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.o: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.o: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.o: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.o: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.o: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.o: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.o: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.o: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.o: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.o: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.o: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.o: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.o: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.o: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.o: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.o: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.o: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.o: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.o: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.o: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.o: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.o: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.o: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.o: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.o: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.o: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.o: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.o: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.o: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/makefile.unix b/makefile.unix
deleted file mode 100644
index e05ecc0..0000000
--- a/makefile.unix
+++ /dev/null
@@ -1,299 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is suitable for Unix-like systems with non-ANSI compilers.
-# If you have an ANSI compiler, makefile.ansi is a better starting point.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-CFLAGS= -O
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-# However, any special defines for ansi2knr.c may be included here:
-ANSI2KNRFLAGS=
-
-# The executable name of NASM and its options:
-NASM= nasm
-NAFLAGS= $(NASM_OBJFMT) -I./
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -faout -DAOUT
-
-# Link-time cc options:
-LDFLAGS=
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.o
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.o (Win32) / jsimddjg.o (DJGPP V.2) / jsimdgcc.o (Unix/gcc)
-SYSDEPSIMDCHK= jsimdgcc.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= rm -f
-# file rename command
-MV= mv
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) jsimdcpu.o \
- $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jccolmmx.o jccolss2.o \
- jcsammmx.o jcsamss2.o jcqntint.o jcqntflt.o jcqntmmx.o jcqnt3dn.o \
- jcqnts2i.o jcqntsse.o jcqnts2f.o jfdctint.o jfdctfst.o jfdctflt.o \
- jfmmxint.o jfmmxfst.o jf3dnflt.o jfss2int.o jfss2fst.o jfsseflt.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jdsample.o jdcolor.o jquant1.o jquant2.o \
- jdmerge.o jidctint.o jidctfst.o jidctred.o jidctflt.o jimmxint.o \
- jimmxfst.o jimmxred.o ji3dnflt.o jiss2int.o jiss2fst.o jiss2red.o \
- jisseflt.o jiss2flt.o jdsammmx.o jdsamss2.o jdcolmmx.o jdcolss2.o \
- jdmermmx.o jdmerss2.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: ansi2knr libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-# This rule causes ansi2knr to be invoked.
-.c.o:
- ./ansi2knr $*.c T$*.c
- $(CC) $(CFLAGS) -c T$*.c
- $(RM) T$*.c $*.o
- $(MV) T$*.o $*.o
-
-ansi2knr: ansi2knr.c
- $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
-
-libjpeg.a: ansi2knr $(LIBOBJECTS)
- $(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-cjpeg: ansi2knr $(COBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg: ansi2knr $(DOBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran: ansi2knr $(TROBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom
- $(RM) jsimdcfg.inc ansi2knr core testout*
-
-test: cjpeg djpeg jpegtran
- $(RM) testout*
- ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- ./jpegtran -outfile testoutt.jpg testprog.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.bmp testout.bmp
- cmp testimg.jpg testout.jpg
- cmp testimg.ppm testoutp.ppm
- cmp testimgp.jpg testoutp.jpg
- cmp testorig.jpg testoutt.jpg
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o makecfg ./makecfg.c $(LDLIBS)
- ./makecfg > jsimdcfg.inc
- $(RM) ./makecfg
-
-.asm.o:
- $(NASM) $(NAFLAGS) -o $@ $*.asm
-
-jsimdcpu.o: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.o: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.o: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.o: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.o: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.o: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.o: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.o: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.o: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.o: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.o: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.o: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.o: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.o: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.o: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.o: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.o: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.o: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.o: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.o: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.o: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.o: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.o: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.o: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.o: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.o: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.o: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.o: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.o: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.o: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.o: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.o: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.o: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.o: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.o: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.o: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.o: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.o: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.o: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.o: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.o: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.o: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.o: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/makefile.vc b/makefile.vc
deleted file mode 100644
index 7cfeda3..0000000
--- a/makefile.vc
+++ /dev/null
@@ -1,301 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is for Microsoft Visual C++ on Windows NT (and 95?).
-# It builds the IJG library as a statically linkable library (.LIB),
-# and builds the sample applications as console-mode apps.
-
-# Read installation instructions before saying "nmake" !!
-
-# The name of your C compiler:
-CC= cl
-LD= link
-
-# You may want to adjust these compiler options:
-!ifdef crtdll
-# (DLL version of CRT)
-CFLAGS= -nologo -c -MD -W3 -O2 -GF -Gy -DNDEBUG -I.
-!else
-# (Single threaded static CRT)
-CFLAGS= -nologo -c -ML -W3 -O2 -GF -Gy -DNDEBUG -I.
-!endif
-
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# The executable name of NASM and its options:
-NASM= nasmw
-NAFLAGS= $(NASM_OBJFMT) -I./
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -fwin32 -DWIN32
-
-# Link-time options:
-LDFLAGS= -nologo -release -subsystem:console,4.0 -opt:nowin98
-
-# To link any special libraries, add the necessary commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For NT we suggest jmemnobs.obj, which expects the OS to
-# provide adequate virtual memory.
-SYSDEPMEM= jmemnobs.obj
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.obj (Win32) / jsimddjg.obj (DJGPP V.2) / jsimdgcc.obj (Unix/gcc)
-SYSDEPSIMDCHK= jsimdw32.obj
-
-# miscellaneous OS-dependent stuff
-# file deletion command
-RM= del
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) \
- jsimdcpu.obj $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
- jcdctmgr.obj jccolmmx.obj jccolss2.obj jcsammmx.obj jcsamss2.obj \
- jcqntint.obj jcqntflt.obj jcqntmmx.obj jcqnt3dn.obj jcqnts2i.obj \
- jcqntsse.obj jcqnts2f.obj jfdctint.obj jfdctfst.obj jfdctflt.obj \
- jfmmxint.obj jfmmxfst.obj jf3dnflt.obj jfss2int.obj jfss2fst.obj \
- jfsseflt.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jdsample.obj \
- jdcolor.obj jquant1.obj jquant2.obj jdmerge.obj jidctint.obj \
- jidctfst.obj jidctred.obj jidctflt.obj jimmxint.obj jimmxfst.obj \
- jimmxred.obj ji3dnflt.obj jiss2int.obj jiss2fst.obj jiss2red.obj \
- jisseflt.obj jiss2flt.obj jdsammmx.obj jdsamss2.obj jdcolmmx.obj \
- jdcolss2.obj jdmermmx.obj jdmerss2.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-# Template command for compiling .c to .obj
-.c.obj::
- $(CC) $(CFLAGS) $<
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
- -$(RM) libjpeg.lib
- lib -out:libjpeg.lib $(LIBOBJECTS)
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- $(LD) $(LDFLAGS) -out:cjpeg.exe $(COBJECTS) libjpeg.lib $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- $(LD) $(LDFLAGS) -out:djpeg.exe $(DOBJECTS) libjpeg.lib $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- $(LD) $(LDFLAGS) -out:jpegtran.exe $(TROBJECTS) libjpeg.lib $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.obj
- $(LD) $(LDFLAGS) -out:rdjpgcom.exe rdjpgcom.obj $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.obj
- $(LD) $(LDFLAGS) -out:wrjpgcom.exe wrjpgcom.obj $(LDLIBS)
-
-
-clean:
- -$(RM) *.obj
- -$(RM) cjpeg.exe
- -$(RM) djpeg.exe
- -$(RM) jpegtran.exe
- -$(RM) rdjpgcom.exe
- -$(RM) wrjpgcom.exe
- -$(RM) jsimdcfg.inc
- -$(RM) libjpeg.lib
- -if exist *.manifest $(RM) *.manifest
- -if exist testout* $(RM) testout*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- -if exist testout* $(RM) testout*
- .\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- .\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- .\cjpeg -dct int -outfile testout.jpg testimg.ppm
- .\djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- .\cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- .\jpegtran -outfile testoutt.jpg testprog.jpg
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) makecfg.c
- $(LD) $(LDFLAGS) -out:makecfg.exe makecfg.obj $(LDLIBS)
- .\makecfg.exe > jsimdcfg.inc
- $(RM) makecfg.obj
- $(RM) makecfg.exe
- if exist makecfg.exe.manifest $(RM) makecfg.exe.manifest
-
-.asm.obj:
- $(NASM) $(NAFLAGS) -o $@ $<
-
-jsimdcpu.obj: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.obj: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.obj: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.obj: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.obj: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.obj: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.obj: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.obj: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.obj: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.obj: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.obj: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.obj: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.obj: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.obj: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.obj: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.obj: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.obj: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.obj: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.obj: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.obj: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.obj: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.obj: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.obj: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.obj: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.obj: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.obj: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.obj: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.obj: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.obj: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.obj: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.obj: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.obj: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.obj: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.obj: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.obj: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.obj: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.obj: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.obj: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.obj: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.obj: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.obj: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.obj: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.obj: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/makefile.vcdll b/makefile.vcdll
deleted file mode 100644
index cd715eb..0000000
--- a/makefile.vcdll
+++ /dev/null
@@ -1,311 +0,0 @@
-# Makefile for Independent JPEG Group's software
-# Modified for x86 SIMD extension
-
-# This makefile is for Microsoft Visual C++ 6.0.
-# It builds the IJG library as a dynamically linkable library (.DLL),
-# and builds the sample applications which are linked against the DLL.
-
-# Read installation instructions before saying "nmake" !!
-
-# The name of your C compiler:
-CC= cl
-LD= link
-RC= rc
-
-# You may want to adjust these compiler options:
-# You have to use a DLL version of C Run-Time library for both
-# the JPEG DLL and any applications linked to the JPEG DLL.
-CFLAGS= -nologo -c -MD -W3 -O2 -GF -Gy -DNDEBUG -I.
-
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# The executable name of NASM and its options:
-NASM= nasmw
-NAFLAGS= $(NASM_OBJFMT) -I./
-# object file format specifier for NASM
-# see jsimdext.inc for more details.
-NASM_OBJFMT= -fwin32 -DWIN32
-
-# Link-time options:
-LDFLAGS= -nologo -release -subsystem:console,4.0 -opt:nowin98
-LDFLAGS_DLL= -nologo -release -dll -opt:nowin98
-
-# To link any special libraries, add the necessary commands here.
-LDLIBS=
-
-# DLL to build
-DLLNAME = jpeg62.dll
-# import library
-LIBNAME = jpeg62.lib
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For NT we suggest jmemnobs.obj, which expects the OS to
-# provide adequate virtual memory.
-SYSDEPMEM= jmemnobs.obj
-
-# OS-dependent SIMD instruction support checker
-# jsimdw32.obj (Win32) / jsimddjg.obj (DJGPP V.2) / jsimdgcc.obj (Unix/gcc)
-SYSDEPSIMDCHK= jsimdw32.obj
-
-# miscellaneous OS-dependent stuff
-# file deletion command
-RM= del
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) \
- jsimdcpu.obj $(SYSDEPSIMDCHK)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
- jcdctmgr.obj jccolmmx.obj jccolss2.obj jcsammmx.obj jcsamss2.obj \
- jcqntint.obj jcqntflt.obj jcqntmmx.obj jcqnt3dn.obj jcqnts2i.obj \
- jcqntsse.obj jcqnts2f.obj jfdctint.obj jfdctfst.obj jfdctflt.obj \
- jfmmxint.obj jfmmxfst.obj jf3dnflt.obj jfss2int.obj jfss2fst.obj \
- jfsseflt.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jdsample.obj \
- jdcolor.obj jquant1.obj jquant2.obj jdmerge.obj jidctint.obj \
- jidctfst.obj jidctred.obj jidctflt.obj jimmxint.obj jimmxfst.obj \
- jimmxred.obj ji3dnflt.obj jiss2int.obj jiss2fst.obj jiss2red.obj \
- jisseflt.obj jiss2flt.obj jdsammmx.obj jdsamss2.obj jdcolmmx.obj \
- jdcolss2.obj jdmermmx.obj jdmerss2.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-# Template command for compiling .c to .obj
-.c.obj::
- $(CC) $(CFLAGS) $<
-
-
-all: $(DLLNAME) cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-$(LIBNAME): $(DLLNAME)
-$(DLLNAME): $(LIBOBJECTS) jpegdll.res jpegdll.def
- $(LD) $(LDFLAGS_DLL) -out:$(DLLNAME) -implib:$(LIBNAME) \
- $(LIBOBJECTS) jpegdll.res -def:jpegdll.def
-
-jpegdll.res: jpegdll.rc
- $(RC) -fo $@ $*.rc
-
-cjpeg.exe: $(COBJECTS) $(LIBNAME)
- $(LD) $(LDFLAGS) -out:cjpeg.exe $(COBJECTS) $(LIBNAME) $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) $(LIBNAME)
- $(LD) $(LDFLAGS) -out:djpeg.exe $(DOBJECTS) $(LIBNAME) $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) $(LIBNAME)
- $(LD) $(LDFLAGS) -out:jpegtran.exe $(TROBJECTS) $(LIBNAME) $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.obj
- $(LD) $(LDFLAGS) -out:rdjpgcom.exe rdjpgcom.obj $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.obj
- $(LD) $(LDFLAGS) -out:wrjpgcom.exe wrjpgcom.obj $(LDLIBS)
-
-
-clean:
- -$(RM) *.obj
- -$(RM) cjpeg.exe
- -$(RM) djpeg.exe
- -$(RM) jpegtran.exe
- -$(RM) rdjpgcom.exe
- -$(RM) wrjpgcom.exe
- -$(RM) jsimdcfg.inc
- -$(RM) jpegdll.res
- -$(RM) $(DLLNAME)
- -$(RM) $(DLLNAME:.dll=.exp)
- -$(RM) $(LIBNAME)
- -if exist *.manifest $(RM) *.manifest
- -if exist testout* $(RM) testout*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- -if exist testout* $(RM) testout*
- .\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- .\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- .\cjpeg -dct int -outfile testout.jpg testimg.ppm
- .\djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- .\cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- .\jpegtran -outfile testoutt.jpg testprog.jpg
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-
-
-jsimdcfg.inc: makecfg.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
- $(CC) $(CFLAGS) makecfg.c
- $(LD) $(LDFLAGS) -out:makecfg.exe makecfg.obj $(LDLIBS)
- .\makecfg.exe > jsimdcfg.inc
- $(RM) makecfg.obj
- $(RM) makecfg.exe
- if exist makecfg.exe.manifest $(RM) makecfg.exe.manifest
-
-.asm.obj:
- $(NASM) $(NAFLAGS) -o $@ $<
-
-jsimdcpu.obj: jsimdcpu.asm jsimdcfg.inc jsimdext.inc
-jsimdw32.obj: jsimdw32.asm jsimdcfg.inc jsimdext.inc
-jsimddjg.obj: jsimddjg.asm jsimdcfg.inc jsimdext.inc
-jccolmmx.obj: jccolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jccolss2.obj: jccolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsammmx.obj: jcsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcsamss2.obj: jcsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolmmx.obj: jdcolmmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdcolss2.obj: jdcolss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmermmx.obj: jdmermmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdmerss2.obj: jdmerss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsammmx.obj: jdsammmx.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jdsamss2.obj: jdsamss2.asm jsimdcfg.inc jsimdext.inc jcolsamp.inc
-jcqntint.obj: jcqntint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntflt.obj: jcqntflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntmmx.obj: jcqntmmx.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnt3dn.obj: jcqnt3dn.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2i.obj: jcqnts2i.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqntsse.obj: jcqntsse.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jcqnts2f.obj: jcqnts2f.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctint.obj: jfdctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctfst.obj: jfdctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfdctflt.obj: jfdctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxint.obj: jfmmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfmmxfst.obj: jfmmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jf3dnflt.obj: jf3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2int.obj: jfss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfss2fst.obj: jfss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jfsseflt.obj: jfsseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctint.obj: jidctint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctfst.obj: jidctfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctred.obj: jidctred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jidctflt.obj: jidctflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxint.obj: jimmxint.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxfst.obj: jimmxfst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jimmxred.obj: jimmxred.asm jsimdcfg.inc jsimdext.inc jdct.inc
-ji3dnflt.obj: ji3dnflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2int.obj: jiss2int.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2fst.obj: jiss2fst.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2red.obj: jiss2red.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jisseflt.obj: jisseflt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-jiss2flt.obj: jiss2flt.asm jsimdcfg.inc jsimdext.inc jdct.inc
-
-jsimdgcc.obj: jsimdgcc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jcolsamp.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-# jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-# jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/nasm_lt.sh b/nasm_lt.sh
old mode 100644
new mode 100755
diff --git a/rdbmp.c b/rdbmp.c
deleted file mode 100644
index 2245847..0000000
--- a/rdbmp.c
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- * rdbmp.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified to improve performance.
- * Last Modified : October 19, 2004
- * ---------------------------------------------------------------------
- *
- * This file contains routines to read input images in Microsoft "BMP"
- * format (MS Windows 3.x, OS/2 1.x, and OS/2 2.x flavors).
- * Currently, only 8-bit and 24-bit images are supported, not 1-bit or
- * 4-bit (feeding such low-depth images into JPEG would be silly anyway).
- * Also, we don't support RLE-compressed files.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume input from
- * an ordinary stdio stream. They further assume that reading begins
- * at the start of the file; start_input may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed BMP format).
- *
- * This code contributed by James Arthur Boucher.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef BMP_SUPPORTED
-
-
-/* Macros to deal with unsigned chars as efficiently as compiler allows */
-
-#ifdef HAVE_UNSIGNED_CHAR
-typedef unsigned char U_CHAR;
-#define UCH(x) ((int) (x))
-#else /* !HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
-typedef char U_CHAR;
-#define UCH(x) ((int) (x))
-#else
-typedef char U_CHAR;
-#define UCH(x) ((int) (x) & 0xFF)
-#endif
-#endif /* HAVE_UNSIGNED_CHAR */
-
-
-#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len)))
-
-
-/* Private version of data source object */
-
-typedef struct _bmp_source_struct * bmp_source_ptr;
-
-typedef struct _bmp_source_struct {
- struct cjpeg_source_struct pub; /* public fields */
-
- j_compress_ptr cinfo; /* back link saves passing separate parm */
-
- JSAMPARRAY colormap; /* BMP colormap (converted to my format) */
-
- jvirt_sarray_ptr whole_image; /* Needed to reverse row order */
- JDIMENSION source_row; /* Current source row number */
- JDIMENSION row_width; /* Physical width of scanlines in file */
-
- int bits_per_pixel; /* remembers 8- or 24-bit format */
-} bmp_source_struct;
-
-
-LOCAL(int)
-read_byte (bmp_source_ptr sinfo)
-/* Read next byte from BMP file */
-{
- register FILE *infile = sinfo->pub.input_file;
- register int c;
-
- if ((c = getc(infile)) == EOF)
- ERREXIT(sinfo->cinfo, JERR_INPUT_EOF);
- return c;
-}
-
-
-LOCAL(void)
-read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize)
-/* Read the colormap from a BMP file */
-{
- int i;
-
- switch (mapentrysize) {
- case 3:
- /* BGR format (occurs in OS/2 files) */
- for (i = 0; i < cmaplen; i++) {
- sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
- sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
- sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
- }
- break;
- case 4:
- /* BGR0 format (occurs in MS Windows files) */
- for (i = 0; i < cmaplen; i++) {
- sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
- sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
- sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
- (void) read_byte(sinfo);
- }
- break;
- default:
- ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP);
- break;
- }
-}
-
-
-/*
- * Read one row of pixels.
- * The image has been read into the whole_image array, but is otherwise
- * unprocessed. We must read it out in top-to-bottom row order, and if
- * it is an 8-bit image, we must expand colormapped pixels to 24bit format.
- */
-
-METHODDEF(JDIMENSION)
-get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 8-bit colormap indexes */
-{
- bmp_source_ptr source = (bmp_source_ptr) sinfo;
- register JSAMPARRAY colormap = source->colormap;
- JSAMPARRAY image_ptr;
- register int t;
- register JSAMPROW inptr, outptr;
- register JDIMENSION col;
-
- /* Fetch next row from virtual array */
- source->source_row--;
- image_ptr = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->whole_image,
- source->source_row, (JDIMENSION) 1, FALSE);
-
- /* Expand the colormap indexes to real data */
- inptr = image_ptr[0];
- outptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- t = GETJSAMPLE(*inptr++);
- *outptr++ = colormap[0][t]; /* can omit GETJSAMPLE() safely */
- *outptr++ = colormap[1][t];
- *outptr++ = colormap[2][t];
- }
-
- return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 24-bit pixels */
-{
- bmp_source_ptr source = (bmp_source_ptr) sinfo;
- JSAMPARRAY image_ptr;
- register JSAMPROW inptr, outptr;
- register JDIMENSION col;
-
- /* Fetch next row from virtual array */
- source->source_row--;
- image_ptr = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->whole_image,
- source->source_row, (JDIMENSION) 1, FALSE);
-
- /* Transfer data. Note source values are in BGR order
- * (even though Microsoft's own documents say the opposite).
- */
- inptr = image_ptr[0];
- outptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */
- outptr[1] = *inptr++;
- outptr[0] = *inptr++;
- outptr += 3;
- }
-
- return 1;
-}
-
-
-/*
- * This method loads the image into whole_image during the first call on
- * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call
- * get_8bit_row or get_24bit_row on subsequent calls.
- */
-
-METHODDEF(JDIMENSION)
-preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- bmp_source_ptr source = (bmp_source_ptr) sinfo;
-#if (BITS_IN_JSAMPLE != 8) || defined(NEED_FAR_POINTERS)
- register FILE *infile = source->pub.input_file;
- register int c;
- register JSAMPROW out_ptr;
- JDIMENSION col;
-#endif
- JDIMENSION row;
- JSAMPARRAY image_ptr;
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-
- /* Read the data into a virtual array in input-file row order. */
- for (row = 0; row < cinfo->image_height; row++) {
- if (progress != NULL) {
- progress->pub.pass_counter = (long) row;
- progress->pub.pass_limit = (long) cinfo->image_height;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
- image_ptr = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->whole_image,
- row, (JDIMENSION) 1, TRUE);
-#if (BITS_IN_JSAMPLE == 8) && !defined(NEED_FAR_POINTERS)
- if (! ReadOK(source->pub.input_file, image_ptr[0], source->row_width))
- ERREXIT(cinfo, JERR_INPUT_EOF);
-#else
- out_ptr = image_ptr[0];
- for (col = source->row_width; col > 0; col--) {
- /* inline copy of read_byte() for speed */
- if ((c = getc(infile)) == EOF)
- ERREXIT(cinfo, JERR_INPUT_EOF);
- *out_ptr++ = (JSAMPLE) c;
- }
-#endif
- }
- if (progress != NULL)
- progress->completed_extra_passes++;
-
- /* Set up to read from the virtual array in top-to-bottom order */
- switch (source->bits_per_pixel) {
- case 8:
- source->pub.get_pixel_rows = get_8bit_row;
- break;
- case 24:
- source->pub.get_pixel_rows = get_24bit_row;
- break;
- default:
- ERREXIT(cinfo, JERR_BMP_BADDEPTH);
- }
- source->source_row = cinfo->image_height;
-
- /* And read the first row */
- return (*source->pub.get_pixel_rows) (cinfo, sinfo);
-}
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- bmp_source_ptr source = (bmp_source_ptr) sinfo;
- U_CHAR bmpfileheader[14];
- U_CHAR bmpinfoheader[64];
-#define GET_2B(array,offset) ((unsigned int) UCH(array[offset]) + \
- (((unsigned int) UCH(array[offset+1])) << 8))
-#define GET_4B(array,offset) ((INT32) UCH(array[offset]) + \
- (((INT32) UCH(array[offset+1])) << 8) + \
- (((INT32) UCH(array[offset+2])) << 16) + \
- (((INT32) UCH(array[offset+3])) << 24))
- INT32 bfOffBits;
- INT32 headerSize;
- INT32 biWidth = 0; /* initialize to avoid compiler warning */
- INT32 biHeight = 0;
- unsigned int biPlanes;
- INT32 biCompression;
- INT32 biXPelsPerMeter,biYPelsPerMeter;
- INT32 biClrUsed = 0;
- int mapentrysize = 0; /* 0 indicates no colormap */
- INT32 bPad;
- JDIMENSION row_width;
-
- /* Read and verify the bitmap file header */
- if (! ReadOK(source->pub.input_file, bmpfileheader, 14))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- if (GET_2B(bmpfileheader,0) != 0x4D42) /* 'BM' */
- ERREXIT(cinfo, JERR_BMP_NOT);
- bfOffBits = (INT32) GET_4B(bmpfileheader,10);
- /* We ignore the remaining fileheader fields */
-
- /* The infoheader might be 12 bytes (OS/2 1.x), 40 bytes (Windows),
- * or 64 bytes (OS/2 2.x). Check the first 4 bytes to find out which.
- */
- if (! ReadOK(source->pub.input_file, bmpinfoheader, 4))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- headerSize = (INT32) GET_4B(bmpinfoheader,0);
- if (headerSize < 12 || headerSize > 64)
- ERREXIT(cinfo, JERR_BMP_BADHEADER);
- if (! ReadOK(source->pub.input_file, bmpinfoheader+4, headerSize-4))
- ERREXIT(cinfo, JERR_INPUT_EOF);
-
- switch ((int) headerSize) {
- case 12:
- /* Decode OS/2 1.x header (Microsoft calls this a BITMAPCOREHEADER) */
- biWidth = (INT32) GET_2B(bmpinfoheader,4);
- biHeight = (INT32) GET_2B(bmpinfoheader,6);
- biPlanes = GET_2B(bmpinfoheader,8);
- source->bits_per_pixel = (int) GET_2B(bmpinfoheader,10);
-
- switch (source->bits_per_pixel) {
- case 8: /* colormapped image */
- mapentrysize = 3; /* OS/2 uses RGBTRIPLE colormap */
- TRACEMS2(cinfo, 1, JTRC_BMP_OS2_MAPPED, (int) biWidth, (int) biHeight);
- break;
- case 24: /* RGB image */
- TRACEMS2(cinfo, 1, JTRC_BMP_OS2, (int) biWidth, (int) biHeight);
- break;
- default:
- ERREXIT(cinfo, JERR_BMP_BADDEPTH);
- break;
- }
- if (biPlanes != 1)
- ERREXIT(cinfo, JERR_BMP_BADPLANES);
- break;
- case 40:
- case 64:
- /* Decode Windows 3.x header (Microsoft calls this a BITMAPINFOHEADER) */
- /* or OS/2 2.x header, which has additional fields that we ignore */
- biWidth = GET_4B(bmpinfoheader,4);
- biHeight = GET_4B(bmpinfoheader,8);
- biPlanes = GET_2B(bmpinfoheader,12);
- source->bits_per_pixel = (int) GET_2B(bmpinfoheader,14);
- biCompression = GET_4B(bmpinfoheader,16);
- biXPelsPerMeter = GET_4B(bmpinfoheader,24);
- biYPelsPerMeter = GET_4B(bmpinfoheader,28);
- biClrUsed = GET_4B(bmpinfoheader,32);
- /* biSizeImage, biClrImportant fields are ignored */
-
- switch (source->bits_per_pixel) {
- case 8: /* colormapped image */
- mapentrysize = 4; /* Windows uses RGBQUAD colormap */
- TRACEMS2(cinfo, 1, JTRC_BMP_MAPPED, (int) biWidth, (int) biHeight);
- break;
- case 24: /* RGB image */
- TRACEMS2(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight);
- break;
- default:
- ERREXIT(cinfo, JERR_BMP_BADDEPTH);
- break;
- }
- if (biPlanes != 1)
- ERREXIT(cinfo, JERR_BMP_BADPLANES);
- if (biCompression != 0)
- ERREXIT(cinfo, JERR_BMP_COMPRESSED);
-
- if (biXPelsPerMeter > 0 && biYPelsPerMeter > 0) {
- /* Set JFIF density parameters from the BMP data */
- cinfo->X_density = (UINT16) (biXPelsPerMeter/100); /* 100 cm per meter */
- cinfo->Y_density = (UINT16) (biYPelsPerMeter/100);
- cinfo->density_unit = 2; /* dots/cm */
- }
- break;
- default:
- ERREXIT(cinfo, JERR_BMP_BADHEADER);
- break;
- }
-
- /* Compute distance to bitmap data --- will adjust for colormap below */
- bPad = bfOffBits - (headerSize + 14);
-
- /* Read the colormap, if any */
- if (mapentrysize > 0) {
- if (biClrUsed <= 0)
- biClrUsed = 256; /* assume it's 256 */
- else if (biClrUsed > 256)
- ERREXIT(cinfo, JERR_BMP_BADCMAP);
- /* Allocate space to store the colormap */
- source->colormap = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) biClrUsed, (JDIMENSION) 3);
- /* and read it from the file */
- read_colormap(source, (int) biClrUsed, mapentrysize);
- /* account for size of colormap */
- bPad -= biClrUsed * mapentrysize;
- }
-
- /* Skip any remaining pad bytes */
- if (bPad < 0) /* incorrect bfOffBits value? */
- ERREXIT(cinfo, JERR_BMP_BADHEADER);
- while (--bPad >= 0) {
- (void) read_byte(source);
- }
-
- /* Compute row width in file, including padding to 4-byte boundary */
- if (source->bits_per_pixel == 24)
- row_width = (JDIMENSION) (biWidth * 3);
- else
- row_width = (JDIMENSION) biWidth;
- while ((row_width & 3) != 0) row_width++;
- source->row_width = row_width;
-
- /* Allocate space for inversion array, prepare for preload pass */
- source->whole_image = (*cinfo->mem->request_virt_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
- row_width, (JDIMENSION) biHeight, (JDIMENSION) 1);
- source->pub.get_pixel_rows = preload_image;
- if (cinfo->progress != NULL) {
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
- progress->total_extra_passes++; /* count file input as separate pass */
- }
-
- /* Allocate one-row buffer for returned data */
- source->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) (biWidth * 3), (JDIMENSION) 1);
- source->pub.buffer_height = 1;
-
- cinfo->in_color_space = JCS_RGB;
- cinfo->input_components = 3;
- cinfo->data_precision = 8;
- cinfo->image_width = (JDIMENSION) biWidth;
- cinfo->image_height = (JDIMENSION) biHeight;
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- /* no work */
-}
-
-
-/*
- * The module selection routine for BMP format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_bmp (j_compress_ptr cinfo)
-{
- bmp_source_ptr source;
-
- /* Create module interface object */
- source = (bmp_source_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(bmp_source_struct));
- source->cinfo = cinfo; /* make back link for subroutines */
- /* Fill in method ptrs, except get_pixel_rows which start_input sets */
- source->pub.start_input = start_input_bmp;
- source->pub.finish_input = finish_input_bmp;
-
- return (cjpeg_source_ptr) source;
-}
-
-#endif /* BMP_SUPPORTED */
diff --git a/rdcolmap.c b/rdcolmap.c
deleted file mode 100644
index 42b3437..0000000
--- a/rdcolmap.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * rdcolmap.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file implements djpeg's "-map file" switch. It reads a source image
- * and constructs a colormap to be supplied to the JPEG decompressor.
- *
- * Currently, these file formats are supported for the map file:
- * GIF: the contents of the GIF's global colormap are used.
- * PPM (either text or raw flavor): the entire file is read and
- * each unique pixel value is entered in the map.
- * Note that reading a large PPM file will be horrendously slow.
- * Typically, a PPM-format map file should contain just one pixel
- * of each desired color. Such a file can be extracted from an
- * ordinary image PPM file with ppmtomap(1).
- *
- * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not
- * currently implemented.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */
-
-/* Portions of this code are based on the PBMPLUS library, which is:
-**
-** Copyright (C) 1988 by Jef Poskanzer.
-**
-** Permission to use, copy, modify, and distribute this software and its
-** documentation for any purpose and without fee is hereby granted, provided
-** that the above copyright notice appear in all copies and that both that
-** copyright notice and this permission notice appear in supporting
-** documentation. This software is provided "as is" without express or
-** implied warranty.
-*/
-
-
-/*
- * Add a (potentially) new color to the color map.
- */
-
-LOCAL(void)
-add_map_entry (j_decompress_ptr cinfo, int R, int G, int B)
-{
- JSAMPROW colormap0 = cinfo->colormap[0];
- JSAMPROW colormap1 = cinfo->colormap[1];
- JSAMPROW colormap2 = cinfo->colormap[2];
- int ncolors = cinfo->actual_number_of_colors;
- int index;
-
- /* Check for duplicate color. */
- for (index = 0; index < ncolors; index++) {
- if (GETJSAMPLE(colormap0[index]) == R &&
- GETJSAMPLE(colormap1[index]) == G &&
- GETJSAMPLE(colormap2[index]) == B)
- return; /* color is already in map */
- }
-
- /* Check for map overflow. */
- if (ncolors >= (MAXJSAMPLE+1))
- ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1));
-
- /* OK, add color to map. */
- colormap0[ncolors] = (JSAMPLE) R;
- colormap1[ncolors] = (JSAMPLE) G;
- colormap2[ncolors] = (JSAMPLE) B;
- cinfo->actual_number_of_colors++;
-}
-
-
-/*
- * Extract color map from a GIF file.
- */
-
-LOCAL(void)
-read_gif_map (j_decompress_ptr cinfo, FILE * infile)
-{
- int header[13];
- int i, colormaplen;
- int R, G, B;
-
- /* Initial 'G' has already been read by read_color_map */
- /* Read the rest of the GIF header and logical screen descriptor */
- for (i = 1; i < 13; i++) {
- if ((header[i] = getc(infile)) == EOF)
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
- }
-
- /* Verify GIF Header */
- if (header[1] != 'I' || header[2] != 'F')
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
- /* There must be a global color map. */
- if ((header[10] & 0x80) == 0)
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
- /* OK, fetch it. */
- colormaplen = 2 << (header[10] & 0x07);
-
- for (i = 0; i < colormaplen; i++) {
- R = getc(infile);
- G = getc(infile);
- B = getc(infile);
- if (R == EOF || G == EOF || B == EOF)
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
- add_map_entry(cinfo,
- R << (BITS_IN_JSAMPLE-8),
- G << (BITS_IN_JSAMPLE-8),
- B << (BITS_IN_JSAMPLE-8));
- }
-}
-
-
-/* Support routines for reading PPM */
-
-
-LOCAL(int)
-pbm_getc (FILE * infile)
-/* Read next char, skipping over any comments */
-/* A comment/newline sequence is returned as a newline */
-{
- register int ch;
-
- ch = getc(infile);
- if (ch == '#') {
- do {
- ch = getc(infile);
- } while (ch != '\n' && ch != EOF);
- }
- return ch;
-}
-
-
-LOCAL(unsigned int)
-read_pbm_integer (j_decompress_ptr cinfo, FILE * infile)
-/* Read an unsigned decimal integer from the PPM file */
-/* Swallows one trailing character after the integer */
-/* Note that on a 16-bit-int machine, only values up to 64k can be read. */
-/* This should not be a problem in practice. */
-{
- register int ch;
- register unsigned int val;
-
- /* Skip any leading whitespace */
- do {
- ch = pbm_getc(infile);
- if (ch == EOF)
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
- } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
-
- if (ch < '0' || ch > '9')
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
- val = ch - '0';
- while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') {
- val *= 10;
- val += ch - '0';
- }
- return val;
-}
-
-
-/*
- * Extract color map from a PPM file.
- */
-
-LOCAL(void)
-read_ppm_map (j_decompress_ptr cinfo, FILE * infile)
-{
- int c;
- unsigned int w, h, maxval, row, col;
- int R, G, B;
-
- /* Initial 'P' has already been read by read_color_map */
- c = getc(infile); /* save format discriminator for a sec */
-
- /* while we fetch the remaining header info */
- w = read_pbm_integer(cinfo, infile);
- h = read_pbm_integer(cinfo, infile);
- maxval = read_pbm_integer(cinfo, infile);
-
- if (w <= 0 || h <= 0 || maxval <= 0) /* error check */
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
- /* For now, we don't support rescaling from an unusual maxval. */
- if (maxval != (unsigned int) MAXJSAMPLE)
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
-
- switch (c) {
- case '3': /* it's a text-format PPM file */
- for (row = 0; row < h; row++) {
- for (col = 0; col < w; col++) {
- R = read_pbm_integer(cinfo, infile);
- G = read_pbm_integer(cinfo, infile);
- B = read_pbm_integer(cinfo, infile);
- add_map_entry(cinfo, R, G, B);
- }
- }
- break;
-
- case '6': /* it's a raw-format PPM file */
- for (row = 0; row < h; row++) {
- for (col = 0; col < w; col++) {
- R = getc(infile);
- G = getc(infile);
- B = getc(infile);
- if (R == EOF || G == EOF || B == EOF)
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
- add_map_entry(cinfo, R, G, B);
- }
- }
- break;
-
- default:
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
- break;
- }
-}
-
-
-/*
- * Main entry point from djpeg.c.
- * Input: opened input file (from file name argument on command line).
- * Output: colormap and actual_number_of_colors fields are set in cinfo.
- */
-
-GLOBAL(void)
-read_color_map (j_decompress_ptr cinfo, FILE * infile)
-{
- /* Allocate space for a color map of maximum supported size. */
- cinfo->colormap = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3);
- cinfo->actual_number_of_colors = 0; /* initialize map to empty */
-
- /* Read first byte to determine file format */
- switch (getc(infile)) {
- case 'G':
- read_gif_map(cinfo, infile);
- break;
- case 'P':
- read_ppm_map(cinfo, infile);
- break;
- default:
- ERREXIT(cinfo, JERR_BAD_CMAP_FILE);
- break;
- }
-}
-
-#endif /* QUANT_2PASS_SUPPORTED */
diff --git a/rdgif.c b/rdgif.c
deleted file mode 100644
index 0da2515..0000000
--- a/rdgif.c
+++ /dev/null
@@ -1,683 +0,0 @@
-/*
- * rdgif.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- **************************************************************************
- * WARNING: You will need an LZW patent license from Unisys in order to *
- * use this file legally in any commercial or shareware application. *
- **************************************************************************
- *
- * This file contains routines to read input images in GIF format.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume input from
- * an ordinary stdio stream. They further assume that reading begins
- * at the start of the file; input_init may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed GIF format).
- */
-
-/*
- * This code is loosely based on giftoppm from the PBMPLUS distribution
- * of Feb. 1991. That file contains the following copyright notice:
- * +-------------------------------------------------------------------+
- * | Copyright 1990, David Koblas. |
- * | Permission to use, copy, modify, and distribute this software |
- * | and its documentation for any purpose and without fee is hereby |
- * | granted, provided that the above copyright notice appear in all |
- * | copies and that both that copyright notice and this permission |
- * | notice appear in supporting documentation. This software is |
- * | provided "as is" without express or implied warranty. |
- * +-------------------------------------------------------------------+
- *
- * We are also required to state that
- * "The Graphics Interchange Format(c) is the Copyright property of
- * CompuServe Incorporated. GIF(sm) is a Service Mark property of
- * CompuServe Incorporated."
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef GIF_SUPPORTED
-
-
-#define MAXCOLORMAPSIZE 256 /* max # of colors in a GIF colormap */
-#define NUMCOLORS 3 /* # of colors */
-#define CM_RED 0 /* color component numbers */
-#define CM_GREEN 1
-#define CM_BLUE 2
-
-#define MAX_LZW_BITS 12 /* maximum LZW code size */
-#define LZW_TABLE_SIZE (1<<MAX_LZW_BITS) /* # of possible LZW symbols */
-
-/* Macros for extracting header data --- note we assume chars may be signed */
-
-#define LM_to_uint(a,b) ((((b)&0xFF) << 8) | ((a)&0xFF))
-
-#define BitSet(byte, bit) ((byte) & (bit))
-#define INTERLACE 0x40 /* mask for bit signifying interlaced image */
-#define COLORMAPFLAG 0x80 /* mask for bit signifying colormap presence */
-
-#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len)))
-
-/* LZW decompression tables look like this:
- * symbol_head[K] = prefix symbol of any LZW symbol K (0..LZW_TABLE_SIZE-1)
- * symbol_tail[K] = suffix byte of any LZW symbol K (0..LZW_TABLE_SIZE-1)
- * Note that entries 0..end_code of the above tables are not used,
- * since those symbols represent raw bytes or special codes.
- *
- * The stack represents the not-yet-used expansion of the last LZW symbol.
- * In the worst case, a symbol could expand to as many bytes as there are
- * LZW symbols, so we allocate LZW_TABLE_SIZE bytes for the stack.
- * (This is conservative since that number includes the raw-byte symbols.)
- *
- * The tables are allocated from FAR heap space since they would use up
- * rather a lot of the near data space in a PC.
- */
-
-
-/* Private version of data source object */
-
-typedef struct {
- struct cjpeg_source_struct pub; /* public fields */
-
- j_compress_ptr cinfo; /* back link saves passing separate parm */
-
- JSAMPARRAY colormap; /* GIF colormap (converted to my format) */
-
- /* State for GetCode and LZWReadByte */
- char code_buf[256+4]; /* current input data block */
- int last_byte; /* # of bytes in code_buf */
- int last_bit; /* # of bits in code_buf */
- int cur_bit; /* next bit index to read */
- boolean out_of_blocks; /* TRUE if hit terminator data block */
-
- int input_code_size; /* codesize given in GIF file */
- int clear_code,end_code; /* values for Clear and End codes */
-
- int code_size; /* current actual code size */
- int limit_code; /* 2^code_size */
- int max_code; /* first unused code value */
- boolean first_time; /* flags first call to LZWReadByte */
-
- /* Private state for LZWReadByte */
- int oldcode; /* previous LZW symbol */
- int firstcode; /* first byte of oldcode's expansion */
-
- /* LZW symbol table and expansion stack */
- UINT16 FAR *symbol_head; /* => table of prefix symbols */
- UINT8 FAR *symbol_tail; /* => table of suffix bytes */
- UINT8 FAR *symbol_stack; /* => stack for symbol expansions */
- UINT8 FAR *sp; /* stack pointer */
-
- /* State for interlaced image processing */
- boolean is_interlaced; /* TRUE if have interlaced image */
- jvirt_sarray_ptr interlaced_image; /* full image in interlaced order */
- JDIMENSION cur_row_number; /* need to know actual row number */
- JDIMENSION pass2_offset; /* # of pixel rows in pass 1 */
- JDIMENSION pass3_offset; /* # of pixel rows in passes 1&2 */
- JDIMENSION pass4_offset; /* # of pixel rows in passes 1,2,3 */
-} gif_source_struct;
-
-typedef gif_source_struct * gif_source_ptr;
-
-
-/* Forward declarations */
-METHODDEF(JDIMENSION) get_pixel_rows
- JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo));
-METHODDEF(JDIMENSION) load_interlaced_image
- JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo));
-METHODDEF(JDIMENSION) get_interlaced_row
- JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo));
-
-
-LOCAL(int)
-ReadByte (gif_source_ptr sinfo)
-/* Read next byte from GIF file */
-{
- register FILE * infile = sinfo->pub.input_file;
- int c;
-
- if ((c = getc(infile)) == EOF)
- ERREXIT(sinfo->cinfo, JERR_INPUT_EOF);
- return c;
-}
-
-
-LOCAL(int)
-GetDataBlock (gif_source_ptr sinfo, char *buf)
-/* Read a GIF data block, which has a leading count byte */
-/* A zero-length block marks the end of a data block sequence */
-{
- int count;
-
- count = ReadByte(sinfo);
- if (count > 0) {
- if (! ReadOK(sinfo->pub.input_file, buf, count))
- ERREXIT(sinfo->cinfo, JERR_INPUT_EOF);
- }
- return count;
-}
-
-
-LOCAL(void)
-SkipDataBlocks (gif_source_ptr sinfo)
-/* Skip a series of data blocks, until a block terminator is found */
-{
- char buf[256];
-
- while (GetDataBlock(sinfo, buf) > 0)
- /* skip */;
-}
-
-
-LOCAL(void)
-ReInitLZW (gif_source_ptr sinfo)
-/* (Re)initialize LZW state; shared code for startup and Clear processing */
-{
- sinfo->code_size = sinfo->input_code_size + 1;
- sinfo->limit_code = sinfo->clear_code << 1; /* 2^code_size */
- sinfo->max_code = sinfo->clear_code + 2; /* first unused code value */
- sinfo->sp = sinfo->symbol_stack; /* init stack to empty */
-}
-
-
-LOCAL(void)
-InitLZWCode (gif_source_ptr sinfo)
-/* Initialize for a series of LZWReadByte (and hence GetCode) calls */
-{
- /* GetCode initialization */
- sinfo->last_byte = 2; /* make safe to "recopy last two bytes" */
- sinfo->last_bit = 0; /* nothing in the buffer */
- sinfo->cur_bit = 0; /* force buffer load on first call */
- sinfo->out_of_blocks = FALSE;
-
- /* LZWReadByte initialization: */
- /* compute special code values (note that these do not change later) */
- sinfo->clear_code = 1 << sinfo->input_code_size;
- sinfo->end_code = sinfo->clear_code + 1;
- sinfo->first_time = TRUE;
- ReInitLZW(sinfo);
-}
-
-
-LOCAL(int)
-GetCode (gif_source_ptr sinfo)
-/* Fetch the next code_size bits from the GIF data */
-/* We assume code_size is less than 16 */
-{
- register INT32 accum;
- int offs, ret, count;
-
- while ( (sinfo->cur_bit + sinfo->code_size) > sinfo->last_bit) {
- /* Time to reload the buffer */
- if (sinfo->out_of_blocks) {
- WARNMS(sinfo->cinfo, JWRN_GIF_NOMOREDATA);
- return sinfo->end_code; /* fake something useful */
- }
- /* preserve last two bytes of what we have -- assume code_size <= 16 */
- sinfo->code_buf[0] = sinfo->code_buf[sinfo->last_byte-2];
- sinfo->code_buf[1] = sinfo->code_buf[sinfo->last_byte-1];
- /* Load more bytes; set flag if we reach the terminator block */
- if ((count = GetDataBlock(sinfo, &sinfo->code_buf[2])) == 0) {
- sinfo->out_of_blocks = TRUE;
- WARNMS(sinfo->cinfo, JWRN_GIF_NOMOREDATA);
- return sinfo->end_code; /* fake something useful */
- }
- /* Reset counters */
- sinfo->cur_bit = (sinfo->cur_bit - sinfo->last_bit) + 16;
- sinfo->last_byte = 2 + count;
- sinfo->last_bit = sinfo->last_byte * 8;
- }
-
- /* Form up next 24 bits in accum */
- offs = sinfo->cur_bit >> 3; /* byte containing cur_bit */
-#ifdef CHAR_IS_UNSIGNED
- accum = sinfo->code_buf[offs+2];
- accum <<= 8;
- accum |= sinfo->code_buf[offs+1];
- accum <<= 8;
- accum |= sinfo->code_buf[offs];
-#else
- accum = sinfo->code_buf[offs+2] & 0xFF;
- accum <<= 8;
- accum |= sinfo->code_buf[offs+1] & 0xFF;
- accum <<= 8;
- accum |= sinfo->code_buf[offs] & 0xFF;
-#endif
-
- /* Right-align cur_bit in accum, then mask off desired number of bits */
- accum >>= (sinfo->cur_bit & 7);
- ret = ((int) accum) & ((1 << sinfo->code_size) - 1);
-
- sinfo->cur_bit += sinfo->code_size;
- return ret;
-}
-
-
-LOCAL(int)
-LZWReadByte (gif_source_ptr sinfo)
-/* Read an LZW-compressed byte */
-{
- register int code; /* current working code */
- int incode; /* saves actual input code */
-
- /* First time, just eat the expected Clear code(s) and return next code, */
- /* which is expected to be a raw byte. */
- if (sinfo->first_time) {
- sinfo->first_time = FALSE;
- code = sinfo->clear_code; /* enables sharing code with Clear case */
- } else {
-
- /* If any codes are stacked from a previously read symbol, return them */
- if (sinfo->sp > sinfo->symbol_stack)
- return (int) *(-- sinfo->sp);
-
- /* Time to read a new symbol */
- code = GetCode(sinfo);
-
- }
-
- if (code == sinfo->clear_code) {
- /* Reinit state, swallow any extra Clear codes, and */
- /* return next code, which is expected to be a raw byte. */
- ReInitLZW(sinfo);
- do {
- code = GetCode(sinfo);
- } while (code == sinfo->clear_code);
- if (code > sinfo->clear_code) { /* make sure it is a raw byte */
- WARNMS(sinfo->cinfo, JWRN_GIF_BADDATA);
- code = 0; /* use something valid */
- }
- /* make firstcode, oldcode valid! */
- sinfo->firstcode = sinfo->oldcode = code;
- return code;
- }
-
- if (code == sinfo->end_code) {
- /* Skip the rest of the image, unless GetCode already read terminator */
- if (! sinfo->out_of_blocks) {
- SkipDataBlocks(sinfo);
- sinfo->out_of_blocks = TRUE;
- }
- /* Complain that there's not enough data */
- WARNMS(sinfo->cinfo, JWRN_GIF_ENDCODE);
- /* Pad data with 0's */
- return 0; /* fake something usable */
- }
-
- /* Got normal raw byte or LZW symbol */
- incode = code; /* save for a moment */
-
- if (code >= sinfo->max_code) { /* special case for not-yet-defined symbol */
- /* code == max_code is OK; anything bigger is bad data */
- if (code > sinfo->max_code) {
- WARNMS(sinfo->cinfo, JWRN_GIF_BADDATA);
- incode = 0; /* prevent creation of loops in symbol table */
- }
- /* this symbol will be defined as oldcode/firstcode */
- *(sinfo->sp++) = (UINT8) sinfo->firstcode;
- code = sinfo->oldcode;
- }
-
- /* If it's a symbol, expand it into the stack */
- while (code >= sinfo->clear_code) {
- *(sinfo->sp++) = sinfo->symbol_tail[code]; /* tail is a byte value */
- code = sinfo->symbol_head[code]; /* head is another LZW symbol */
- }
- /* At this point code just represents a raw byte */
- sinfo->firstcode = code; /* save for possible future use */
-
- /* If there's room in table, */
- if ((code = sinfo->max_code) < LZW_TABLE_SIZE) {
- /* Define a new symbol = prev sym + head of this sym's expansion */
- sinfo->symbol_head[code] = sinfo->oldcode;
- sinfo->symbol_tail[code] = (UINT8) sinfo->firstcode;
- sinfo->max_code++;
- /* Is it time to increase code_size? */
- if ((sinfo->max_code >= sinfo->limit_code) &&
- (sinfo->code_size < MAX_LZW_BITS)) {
- sinfo->code_size++;
- sinfo->limit_code <<= 1; /* keep equal to 2^code_size */
- }
- }
-
- sinfo->oldcode = incode; /* save last input symbol for future use */
- return sinfo->firstcode; /* return first byte of symbol's expansion */
-}
-
-
-LOCAL(void)
-ReadColorMap (gif_source_ptr sinfo, int cmaplen, JSAMPARRAY cmap)
-/* Read a GIF colormap */
-{
- int i;
-
- for (i = 0; i < cmaplen; i++) {
-#if BITS_IN_JSAMPLE == 8
-#define UPSCALE(x) (x)
-#else
-#define UPSCALE(x) ((x) << (BITS_IN_JSAMPLE-8))
-#endif
- cmap[CM_RED][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo));
- cmap[CM_GREEN][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo));
- cmap[CM_BLUE][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo));
- }
-}
-
-
-LOCAL(void)
-DoExtension (gif_source_ptr sinfo)
-/* Process an extension block */
-/* Currently we ignore 'em all */
-{
- int extlabel;
-
- /* Read extension label byte */
- extlabel = ReadByte(sinfo);
- TRACEMS1(sinfo->cinfo, 1, JTRC_GIF_EXTENSION, extlabel);
- /* Skip the data block(s) associated with the extension */
- SkipDataBlocks(sinfo);
-}
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_gif (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- gif_source_ptr source = (gif_source_ptr) sinfo;
- char hdrbuf[10]; /* workspace for reading control blocks */
- unsigned int width, height; /* image dimensions */
- int colormaplen, aspectRatio;
- int c;
-
- /* Allocate space to store the colormap */
- source->colormap = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) MAXCOLORMAPSIZE, (JDIMENSION) NUMCOLORS);
-
- /* Read and verify GIF Header */
- if (! ReadOK(source->pub.input_file, hdrbuf, 6))
- ERREXIT(cinfo, JERR_GIF_NOT);
- if (hdrbuf[0] != 'G' || hdrbuf[1] != 'I' || hdrbuf[2] != 'F')
- ERREXIT(cinfo, JERR_GIF_NOT);
- /* Check for expected version numbers.
- * If unknown version, give warning and try to process anyway;
- * this is per recommendation in GIF89a standard.
- */
- if ((hdrbuf[3] != '8' || hdrbuf[4] != '7' || hdrbuf[5] != 'a') &&
- (hdrbuf[3] != '8' || hdrbuf[4] != '9' || hdrbuf[5] != 'a'))
- TRACEMS3(cinfo, 1, JTRC_GIF_BADVERSION, hdrbuf[3], hdrbuf[4], hdrbuf[5]);
-
- /* Read and decipher Logical Screen Descriptor */
- if (! ReadOK(source->pub.input_file, hdrbuf, 7))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- width = LM_to_uint(hdrbuf[0],hdrbuf[1]);
- height = LM_to_uint(hdrbuf[2],hdrbuf[3]);
- colormaplen = 2 << (hdrbuf[4] & 0x07);
- /* we ignore the color resolution, sort flag, and background color index */
- aspectRatio = hdrbuf[6] & 0xFF;
- if (aspectRatio != 0 && aspectRatio != 49)
- TRACEMS(cinfo, 1, JTRC_GIF_NONSQUARE);
-
- /* Read global colormap if header indicates it is present */
- if (BitSet(hdrbuf[4], COLORMAPFLAG))
- ReadColorMap(source, colormaplen, source->colormap);
-
- /* Scan until we reach start of desired image.
- * We don't currently support skipping images, but could add it easily.
- */
- for (;;) {
- c = ReadByte(source);
-
- if (c == ';') /* GIF terminator?? */
- ERREXIT(cinfo, JERR_GIF_IMAGENOTFOUND);
-
- if (c == '!') { /* Extension */
- DoExtension(source);
- continue;
- }
-
- if (c != ',') { /* Not an image separator? */
- WARNMS1(cinfo, JWRN_GIF_CHAR, c);
- continue;
- }
-
- /* Read and decipher Local Image Descriptor */
- if (! ReadOK(source->pub.input_file, hdrbuf, 9))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- /* we ignore top/left position info, also sort flag */
- width = LM_to_uint(hdrbuf[4],hdrbuf[5]);
- height = LM_to_uint(hdrbuf[6],hdrbuf[7]);
- source->is_interlaced = BitSet(hdrbuf[8], INTERLACE);
-
- /* Read local colormap if header indicates it is present */
- /* Note: if we wanted to support skipping images, */
- /* we'd need to skip rather than read colormap for ignored images */
- if (BitSet(hdrbuf[8], COLORMAPFLAG)) {
- colormaplen = 2 << (hdrbuf[8] & 0x07);
- ReadColorMap(source, colormaplen, source->colormap);
- }
-
- source->input_code_size = ReadByte(source); /* get min-code-size byte */
- if (source->input_code_size < 2 || source->input_code_size >= MAX_LZW_BITS)
- ERREXIT1(cinfo, JERR_GIF_CODESIZE, source->input_code_size);
-
- /* Reached desired image, so break out of loop */
- /* If we wanted to skip this image, */
- /* we'd call SkipDataBlocks and then continue the loop */
- break;
- }
-
- /* Prepare to read selected image: first initialize LZW decompressor */
- source->symbol_head = (UINT16 FAR *)
- (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- LZW_TABLE_SIZE * SIZEOF(UINT16));
- source->symbol_tail = (UINT8 FAR *)
- (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- LZW_TABLE_SIZE * SIZEOF(UINT8));
- source->symbol_stack = (UINT8 FAR *)
- (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- LZW_TABLE_SIZE * SIZEOF(UINT8));
- InitLZWCode(source);
-
- /*
- * If image is interlaced, we read it into a full-size sample array,
- * decompressing as we go; then get_interlaced_row selects rows from the
- * sample array in the proper order.
- */
- if (source->is_interlaced) {
- /* We request the virtual array now, but can't access it until virtual
- * arrays have been allocated. Hence, the actual work of reading the
- * image is postponed until the first call to get_pixel_rows.
- */
- source->interlaced_image = (*cinfo->mem->request_virt_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
- (JDIMENSION) width, (JDIMENSION) height, (JDIMENSION) 1);
- if (cinfo->progress != NULL) {
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
- progress->total_extra_passes++; /* count file input as separate pass */
- }
- source->pub.get_pixel_rows = load_interlaced_image;
- } else {
- source->pub.get_pixel_rows = get_pixel_rows;
- }
-
- /* Create compressor input buffer. */
- source->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) width * NUMCOLORS, (JDIMENSION) 1);
- source->pub.buffer_height = 1;
-
- /* Return info about the image. */
- cinfo->in_color_space = JCS_RGB;
- cinfo->input_components = NUMCOLORS;
- cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */
- cinfo->image_width = width;
- cinfo->image_height = height;
-
- TRACEMS3(cinfo, 1, JTRC_GIF, width, height, colormaplen);
-}
-
-
-/*
- * Read one row of pixels.
- * This version is used for noninterlaced GIF images:
- * we read directly from the GIF file.
- */
-
-METHODDEF(JDIMENSION)
-get_pixel_rows (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- gif_source_ptr source = (gif_source_ptr) sinfo;
- register int c;
- register JSAMPROW ptr;
- register JDIMENSION col;
- register JSAMPARRAY colormap = source->colormap;
-
- ptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- c = LZWReadByte(source);
- *ptr++ = colormap[CM_RED][c];
- *ptr++ = colormap[CM_GREEN][c];
- *ptr++ = colormap[CM_BLUE][c];
- }
- return 1;
-}
-
-
-/*
- * Read one row of pixels.
- * This version is used for the first call on get_pixel_rows when
- * reading an interlaced GIF file: we read the whole image into memory.
- */
-
-METHODDEF(JDIMENSION)
-load_interlaced_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- gif_source_ptr source = (gif_source_ptr) sinfo;
- JSAMPARRAY image_ptr;
- register JSAMPROW sptr;
- register JDIMENSION col;
- JDIMENSION row;
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-
- /* Read the interlaced image into the virtual array we've created. */
- for (row = 0; row < cinfo->image_height; row++) {
- if (progress != NULL) {
- progress->pub.pass_counter = (long) row;
- progress->pub.pass_limit = (long) cinfo->image_height;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
- image_ptr = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->interlaced_image,
- row, (JDIMENSION) 1, TRUE);
- sptr = image_ptr[0];
- for (col = cinfo->image_width; col > 0; col--) {
- *sptr++ = (JSAMPLE) LZWReadByte(source);
- }
- }
- if (progress != NULL)
- progress->completed_extra_passes++;
-
- /* Replace method pointer so subsequent calls don't come here. */
- source->pub.get_pixel_rows = get_interlaced_row;
- /* Initialize for get_interlaced_row, and perform first call on it. */
- source->cur_row_number = 0;
- source->pass2_offset = (cinfo->image_height + 7) / 8;
- source->pass3_offset = source->pass2_offset + (cinfo->image_height + 3) / 8;
- source->pass4_offset = source->pass3_offset + (cinfo->image_height + 1) / 4;
-
- return get_interlaced_row(cinfo, sinfo);
-}
-
-
-/*
- * Read one row of pixels.
- * This version is used for interlaced GIF images:
- * we read from the virtual array.
- */
-
-METHODDEF(JDIMENSION)
-get_interlaced_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- gif_source_ptr source = (gif_source_ptr) sinfo;
- JSAMPARRAY image_ptr;
- register int c;
- register JSAMPROW sptr, ptr;
- register JDIMENSION col;
- register JSAMPARRAY colormap = source->colormap;
- JDIMENSION irow;
-
- /* Figure out which row of interlaced image is needed, and access it. */
- switch ((int) (source->cur_row_number & 7)) {
- case 0: /* first-pass row */
- irow = source->cur_row_number >> 3;
- break;
- case 4: /* second-pass row */
- irow = (source->cur_row_number >> 3) + source->pass2_offset;
- break;
- case 2: /* third-pass row */
- case 6:
- irow = (source->cur_row_number >> 2) + source->pass3_offset;
- break;
- default: /* fourth-pass row */
- irow = (source->cur_row_number >> 1) + source->pass4_offset;
- break;
- }
- image_ptr = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->interlaced_image,
- irow, (JDIMENSION) 1, FALSE);
- /* Scan the row, expand colormap, and output */
- sptr = image_ptr[0];
- ptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- c = GETJSAMPLE(*sptr++);
- *ptr++ = colormap[CM_RED][c];
- *ptr++ = colormap[CM_GREEN][c];
- *ptr++ = colormap[CM_BLUE][c];
- }
- source->cur_row_number++; /* for next time */
- return 1;
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_gif (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- /* no work */
-}
-
-
-/*
- * The module selection routine for GIF format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_gif (j_compress_ptr cinfo)
-{
- gif_source_ptr source;
-
- /* Create module interface object */
- source = (gif_source_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(gif_source_struct));
- source->cinfo = cinfo; /* make back link for subroutines */
- /* Fill in method ptrs, except get_pixel_rows which start_input sets */
- source->pub.start_input = start_input_gif;
- source->pub.finish_input = finish_input_gif;
-
- return (cjpeg_source_ptr) source;
-}
-
-#endif /* GIF_SUPPORTED */
diff --git a/rdjpgcom.1 b/rdjpgcom.1
deleted file mode 100644
index 2bba04e..0000000
--- a/rdjpgcom.1
+++ /dev/null
@@ -1,54 +0,0 @@
-.TH RDJPGCOM 1 "11 October 1997"
-.SH NAME
-rdjpgcom \- display text comments from a JPEG file
-.SH SYNOPSIS
-.B rdjpgcom
-[
-.B \-verbose
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B rdjpgcom
-reads the named JPEG/JFIF file, or the standard input if no file is named,
-and prints any text comments found in the file on the standard output.
-.PP
-The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
-Although the standard doesn't actually define what COM blocks are for, they
-are widely used to hold user-supplied text strings. This lets you add
-annotations, titles, index terms, etc to your JPEG files, and later retrieve
-them as text. COM blocks do not interfere with the image stored in the JPEG
-file. The maximum size of a COM block is 64K, but you can have as many of
-them as you like in one JPEG file.
-.SH OPTIONS
-.TP
-.B \-verbose
-Causes
-.B rdjpgcom
-to also display the JPEG image dimensions.
-.PP
-Switch names may be abbreviated, and are not case sensitive.
-.SH HINTS
-.B rdjpgcom
-does not depend on the IJG JPEG library. Its source code is intended as an
-illustration of the minimum amount of code required to parse a JPEG file
-header correctly.
-.PP
-In
-.B \-verbose
-mode,
-.B rdjpgcom
-will also attempt to print the contents of any "APP12" markers as text.
-Some digital cameras produce APP12 markers containing useful textual
-information. If you like, you can modify the source code to print
-other APPn marker types as well.
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR djpeg (1),
-.BR jpegtran (1),
-.BR wrjpgcom (1)
-.SH AUTHOR
-Independent JPEG Group
diff --git a/rdjpgcom.c b/rdjpgcom.c
deleted file mode 100644
index ffe6fc6..0000000
--- a/rdjpgcom.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * rdjpgcom.c
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a very simple stand-alone application that displays
- * the text in COM (comment) markers in a JFIF file.
- * This may be useful as an example of the minimum logic needed to parse
- * JPEG markers.
- */
-
-#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */
-#include "jinclude.h" /* get auto-config symbols, <stdio.h> */
-
-#include <ctype.h> /* to declare isupper(), tolower() */
-#ifdef USE_SETMODE
-#include <fcntl.h> /* to declare setmode()'s parameter macros */
-/* If you have setmode() but not <io.h>, just delete this line: */
-#include <io.h> /* to declare setmode() */
-#endif
-
-#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h> /* Metrowerks needs this */
-#include <console.h> /* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h> /* Think declares it here */
-#endif
-#endif
-
-#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
-#define READ_BINARY "r"
-#else
-#ifdef VMS /* VMS is very nonstandard */
-#define READ_BINARY "rb", "ctx=stm"
-#else /* standard ANSI-compliant case */
-#define READ_BINARY "rb"
-#endif
-#endif
-
-#ifndef EXIT_FAILURE /* define exit() codes if not provided */
-#define EXIT_FAILURE 1
-#endif
-#ifndef EXIT_SUCCESS
-#ifdef VMS
-#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
-#else
-#define EXIT_SUCCESS 0
-#endif
-#endif
-
-
-/*
- * These macros are used to read the input file.
- * To reuse this code in another application, you might need to change these.
- */
-
-static FILE * infile; /* input JPEG file */
-
-/* Return next input byte, or EOF if no more */
-#define NEXTBYTE() getc(infile)
-
-
-/* Error exit handler */
-#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE))
-
-
-/* Read one byte, testing for EOF */
-static int
-read_1_byte (void)
-{
- int c;
-
- c = NEXTBYTE();
- if (c == EOF)
- ERREXIT("Premature EOF in JPEG file");
- return c;
-}
-
-/* Read 2 bytes, convert to unsigned int */
-/* All 2-byte quantities in JPEG markers are MSB first */
-static unsigned int
-read_2_bytes (void)
-{
- int c1, c2;
-
- c1 = NEXTBYTE();
- if (c1 == EOF)
- ERREXIT("Premature EOF in JPEG file");
- c2 = NEXTBYTE();
- if (c2 == EOF)
- ERREXIT("Premature EOF in JPEG file");
- return (((unsigned int) c1) << 8) + ((unsigned int) c2);
-}
-
-
-/*
- * JPEG markers consist of one or more 0xFF bytes, followed by a marker
- * code byte (which is not an FF). Here are the marker codes of interest
- * in this program. (See jdmarker.c for a more complete list.)
- */
-
-#define M_SOF0 0xC0 /* Start Of Frame N */
-#define M_SOF1 0xC1 /* N indicates which compression process */
-#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */
-#define M_SOF3 0xC3
-#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */
-#define M_SOF6 0xC6
-#define M_SOF7 0xC7
-#define M_SOF9 0xC9
-#define M_SOF10 0xCA
-#define M_SOF11 0xCB
-#define M_SOF13 0xCD
-#define M_SOF14 0xCE
-#define M_SOF15 0xCF
-#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */
-#define M_EOI 0xD9 /* End Of Image (end of datastream) */
-#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */
-#define M_APP0 0xE0 /* Application-specific marker, type N */
-#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */
-#define M_COM 0xFE /* COMment */
-
-
-/*
- * Find the next JPEG marker and return its marker code.
- * We expect at least one FF byte, possibly more if the compressor used FFs
- * to pad the file.
- * There could also be non-FF garbage between markers. The treatment of such
- * garbage is unspecified; we choose to skip over it but emit a warning msg.
- * NB: this routine must not be used after seeing SOS marker, since it will
- * not deal correctly with FF/00 sequences in the compressed image data...
- */
-
-static int
-next_marker (void)
-{
- int c;
- int discarded_bytes = 0;
-
- /* Find 0xFF byte; count and skip any non-FFs. */
- c = read_1_byte();
- while (c != 0xFF) {
- discarded_bytes++;
- c = read_1_byte();
- }
- /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs
- * are legal as pad bytes, so don't count them in discarded_bytes.
- */
- do {
- c = read_1_byte();
- } while (c == 0xFF);
-
- if (discarded_bytes != 0) {
- fprintf(stderr, "Warning: garbage data found in JPEG file\n");
- }
-
- return c;
-}
-
-
-/*
- * Read the initial marker, which should be SOI.
- * For a JFIF file, the first two bytes of the file should be literally
- * 0xFF M_SOI. To be more general, we could use next_marker, but if the
- * input file weren't actually JPEG at all, next_marker might read the whole
- * file and then return a misleading error message...
- */
-
-static int
-first_marker (void)
-{
- int c1, c2;
-
- c1 = NEXTBYTE();
- c2 = NEXTBYTE();
- if (c1 != 0xFF || c2 != M_SOI)
- ERREXIT("Not a JPEG file");
- return c2;
-}
-
-
-/*
- * Most types of marker are followed by a variable-length parameter segment.
- * This routine skips over the parameters for any marker we don't otherwise
- * want to process.
- * Note that we MUST skip the parameter segment explicitly in order not to
- * be fooled by 0xFF bytes that might appear within the parameter segment;
- * such bytes do NOT introduce new markers.
- */
-
-static void
-skip_variable (void)
-/* Skip over an unknown or uninteresting variable-length marker */
-{
- unsigned int length;
-
- /* Get the marker parameter length count */
- length = read_2_bytes();
- /* Length includes itself, so must be at least 2 */
- if (length < 2)
- ERREXIT("Erroneous JPEG marker length");
- length -= 2;
- /* Skip over the remaining bytes */
- while (length > 0) {
- (void) read_1_byte();
- length--;
- }
-}
-
-
-/*
- * Process a COM marker.
- * We want to print out the marker contents as legible text;
- * we must guard against non-text junk and varying newline representations.
- */
-
-static void
-process_COM (void)
-{
- unsigned int length;
- int ch;
- int lastch = 0;
-
- /* Get the marker parameter length count */
- length = read_2_bytes();
- /* Length includes itself, so must be at least 2 */
- if (length < 2)
- ERREXIT("Erroneous JPEG marker length");
- length -= 2;
-
- while (length > 0) {
- ch = read_1_byte();
- /* Emit the character in a readable form.
- * Nonprintables are converted to \nnn form,
- * while \ is converted to \\.
- * Newlines in CR, CR/LF, or LF form will be printed as one newline.
- */
- if (ch == '\r') {
- printf("\n");
- } else if (ch == '\n') {
- if (lastch != '\r')
- printf("\n");
- } else if (ch == '\\') {
- printf("\\\\");
- } else if (isprint(ch)) {
- putc(ch, stdout);
- } else {
- printf("\\%03o", ch);
- }
- lastch = ch;
- length--;
- }
- printf("\n");
-}
-
-
-/*
- * Process a SOFn marker.
- * This code is only needed if you want to know the image dimensions...
- */
-
-static void
-process_SOFn (int marker)
-{
- unsigned int length;
- unsigned int image_height, image_width;
- int data_precision, num_components;
- const char * process;
- int ci;
-
- length = read_2_bytes(); /* usual parameter length count */
-
- data_precision = read_1_byte();
- image_height = read_2_bytes();
- image_width = read_2_bytes();
- num_components = read_1_byte();
-
- switch (marker) {
- case M_SOF0: process = "Baseline"; break;
- case M_SOF1: process = "Extended sequential"; break;
- case M_SOF2: process = "Progressive"; break;
- case M_SOF3: process = "Lossless"; break;
- case M_SOF5: process = "Differential sequential"; break;
- case M_SOF6: process = "Differential progressive"; break;
- case M_SOF7: process = "Differential lossless"; break;
- case M_SOF9: process = "Extended sequential, arithmetic coding"; break;
- case M_SOF10: process = "Progressive, arithmetic coding"; break;
- case M_SOF11: process = "Lossless, arithmetic coding"; break;
- case M_SOF13: process = "Differential sequential, arithmetic coding"; break;
- case M_SOF14: process = "Differential progressive, arithmetic coding"; break;
- case M_SOF15: process = "Differential lossless, arithmetic coding"; break;
- default: process = "Unknown"; break;
- }
-
- printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n",
- image_width, image_height, num_components, data_precision);
- printf("JPEG process: %s\n", process);
-
- if (length != (unsigned int) (8 + num_components * 3))
- ERREXIT("Bogus SOF marker length");
-
- for (ci = 0; ci < num_components; ci++) {
- (void) read_1_byte(); /* Component ID code */
- (void) read_1_byte(); /* H, V sampling factors */
- (void) read_1_byte(); /* Quantization table number */
- }
-}
-
-
-/*
- * Parse the marker stream until SOS or EOI is seen;
- * display any COM markers.
- * While the companion program wrjpgcom will always insert COM markers before
- * SOFn, other implementations might not, so we scan to SOS before stopping.
- * If we were only interested in the image dimensions, we would stop at SOFn.
- * (Conversely, if we only cared about COM markers, there would be no need
- * for special code to handle SOFn; we could treat it like other markers.)
- */
-
-static int
-scan_JPEG_header (int verbose)
-{
- int marker;
-
- /* Expect SOI at start of file */
- if (first_marker() != M_SOI)
- ERREXIT("Expected SOI marker first");
-
- /* Scan miscellaneous markers until we reach SOS. */
- for (;;) {
- marker = next_marker();
- switch (marker) {
- /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be,
- * treated as SOFn. C4 in particular is actually DHT.
- */
- case M_SOF0: /* Baseline */
- case M_SOF1: /* Extended sequential, Huffman */
- case M_SOF2: /* Progressive, Huffman */
- case M_SOF3: /* Lossless, Huffman */
- case M_SOF5: /* Differential sequential, Huffman */
- case M_SOF6: /* Differential progressive, Huffman */
- case M_SOF7: /* Differential lossless, Huffman */
- case M_SOF9: /* Extended sequential, arithmetic */
- case M_SOF10: /* Progressive, arithmetic */
- case M_SOF11: /* Lossless, arithmetic */
- case M_SOF13: /* Differential sequential, arithmetic */
- case M_SOF14: /* Differential progressive, arithmetic */
- case M_SOF15: /* Differential lossless, arithmetic */
- if (verbose)
- process_SOFn(marker);
- else
- skip_variable();
- break;
-
- case M_SOS: /* stop before hitting compressed data */
- return marker;
-
- case M_EOI: /* in case it's a tables-only JPEG stream */
- return marker;
-
- case M_COM:
- process_COM();
- break;
-
- case M_APP12:
- /* Some digital camera makers put useful textual information into
- * APP12 markers, so we print those out too when in -verbose mode.
- */
- if (verbose) {
- printf("APP12 contains:\n");
- process_COM();
- } else
- skip_variable();
- break;
-
- default: /* Anything else just gets skipped */
- skip_variable(); /* we assume it has a parameter count... */
- break;
- }
- } /* end loop */
-}
-
-
-/* Command line parsing code */
-
-static const char * progname; /* program name for error messages */
-
-
-static void
-usage (void)
-/* complain about bad command line */
-{
- fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n");
-
- fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname);
-
- fprintf(stderr, "Switches (names may be abbreviated):\n");
- fprintf(stderr, " -verbose Also display dimensions of JPEG image\n");
-
- exit(EXIT_FAILURE);
-}
-
-
-static int
-keymatch (char * arg, const char * keyword, int minchars)
-/* Case-insensitive matching of (possibly abbreviated) keyword switches. */
-/* keyword is the constant keyword (must be lower case already), */
-/* minchars is length of minimum legal abbreviation. */
-{
- register int ca, ck;
- register int nmatched = 0;
-
- while ((ca = *arg++) != '\0') {
- if ((ck = *keyword++) == '\0')
- return 0; /* arg longer than keyword, no good */
- if (isupper(ca)) /* force arg to lcase (assume ck is already) */
- ca = tolower(ca);
- if (ca != ck)
- return 0; /* no good */
- nmatched++; /* count matched characters */
- }
- /* reached end of argument; fail if it's too short for unique abbrev */
- if (nmatched < minchars)
- return 0;
- return 1; /* A-OK */
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
- int argn;
- char * arg;
- int verbose = 0;
-
- /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
- argc = ccommand(&argv);
-#endif
-
- progname = argv[0];
- if (progname == NULL || progname[0] == 0)
- progname = "rdjpgcom"; /* in case C library doesn't provide it */
-
- /* Parse switches, if any */
- for (argn = 1; argn < argc; argn++) {
- arg = argv[argn];
- if (arg[0] != '-')
- break; /* not switch, must be file name */
- arg++; /* advance over '-' */
- if (keymatch(arg, "verbose", 1)) {
- verbose++;
- } else
- usage();
- }
-
- /* Open the input file. */
- /* Unix style: expect zero or one file name */
- if (argn < argc-1) {
- fprintf(stderr, "%s: only one input file\n", progname);
- usage();
- }
- if (argn < argc) {
- if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
- exit(EXIT_FAILURE);
- }
- } else {
- /* default input file is stdin */
-#ifdef USE_SETMODE /* need to hack file mode? */
- setmode(fileno(stdin), O_BINARY);
-#endif
-#ifdef USE_FDOPEN /* need to re-open in binary mode? */
- if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open stdin\n", progname);
- exit(EXIT_FAILURE);
- }
-#else
- infile = stdin;
-#endif
- }
-
- /* Scan the JPEG headers. */
- (void) scan_JPEG_header(verbose);
-
- /* All done. */
- exit(EXIT_SUCCESS);
- return 0; /* suppress no-return-value warnings */
-}
diff --git a/rdppm.c b/rdppm.c
deleted file mode 100644
index 1df35c1..0000000
--- a/rdppm.c
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * rdppm.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in PPM/PGM format.
- * The extended 2-byte-per-sample raw PPM/PGM formats are supported.
- * The PBMPLUS library is NOT required to compile this software
- * (but it is highly useful as a set of PPM image manipulation programs).
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume input from
- * an ordinary stdio stream. They further assume that reading begins
- * at the start of the file; start_input may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed PPM format).
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef PPM_SUPPORTED
-
-
-/* Portions of this code are based on the PBMPLUS library, which is:
-**
-** Copyright (C) 1988 by Jef Poskanzer.
-**
-** Permission to use, copy, modify, and distribute this software and its
-** documentation for any purpose and without fee is hereby granted, provided
-** that the above copyright notice appear in all copies and that both that
-** copyright notice and this permission notice appear in supporting
-** documentation. This software is provided "as is" without express or
-** implied warranty.
-*/
-
-
-/* Macros to deal with unsigned chars as efficiently as compiler allows */
-
-#ifdef HAVE_UNSIGNED_CHAR
-typedef unsigned char U_CHAR;
-#define UCH(x) ((int) (x))
-#else /* !HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
-typedef char U_CHAR;
-#define UCH(x) ((int) (x))
-#else
-typedef char U_CHAR;
-#define UCH(x) ((int) (x) & 0xFF)
-#endif
-#endif /* HAVE_UNSIGNED_CHAR */
-
-
-#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len)))
-
-
-/*
- * On most systems, reading individual bytes with getc() is drastically less
- * efficient than buffering a row at a time with fread(). On PCs, we must
- * allocate the buffer in near data space, because we are assuming small-data
- * memory model, wherein fread() can't reach far memory. If you need to
- * process very wide images on a PC, you might have to compile in large-memory
- * model, or else replace fread() with a getc() loop --- which will be much
- * slower.
- */
-
-
-/* Private version of data source object */
-
-typedef struct {
- struct cjpeg_source_struct pub; /* public fields */
-
- U_CHAR *iobuffer; /* non-FAR pointer to I/O buffer */
- JSAMPROW pixrow; /* FAR pointer to same */
- size_t buffer_width; /* width of I/O buffer */
- JSAMPLE *rescale; /* => maxval-remapping array, or NULL */
-} ppm_source_struct;
-
-typedef ppm_source_struct * ppm_source_ptr;
-
-
-LOCAL(int)
-pbm_getc (FILE * infile)
-/* Read next char, skipping over any comments */
-/* A comment/newline sequence is returned as a newline */
-{
- register int ch;
-
- ch = getc(infile);
- if (ch == '#') {
- do {
- ch = getc(infile);
- } while (ch != '\n' && ch != EOF);
- }
- return ch;
-}
-
-
-LOCAL(unsigned int)
-read_pbm_integer (j_compress_ptr cinfo, FILE * infile)
-/* Read an unsigned decimal integer from the PPM file */
-/* Swallows one trailing character after the integer */
-/* Note that on a 16-bit-int machine, only values up to 64k can be read. */
-/* This should not be a problem in practice. */
-{
- register int ch;
- register unsigned int val;
-
- /* Skip any leading whitespace */
- do {
- ch = pbm_getc(infile);
- if (ch == EOF)
- ERREXIT(cinfo, JERR_INPUT_EOF);
- } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
-
- if (ch < '0' || ch > '9')
- ERREXIT(cinfo, JERR_PPM_NONNUMERIC);
-
- val = ch - '0';
- while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') {
- val *= 10;
- val += ch - '0';
- }
- return val;
-}
-
-
-/*
- * Read one row of pixels.
- *
- * We provide several different versions depending on input file format.
- * In all cases, input is scaled to the size of JSAMPLE.
- *
- * A really fast path is provided for reading byte/sample raw files with
- * maxval = MAXJSAMPLE, which is the normal case for 8-bit data.
- */
-
-
-METHODDEF(JDIMENSION)
-get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading text-format PGM files with any maxval */
-{
- ppm_source_ptr source = (ppm_source_ptr) sinfo;
- FILE * infile = source->pub.input_file;
- register JSAMPROW ptr;
- register JSAMPLE *rescale = source->rescale;
- JDIMENSION col;
-
- ptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
- }
- return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading text-format PPM files with any maxval */
-{
- ppm_source_ptr source = (ppm_source_ptr) sinfo;
- FILE * infile = source->pub.input_file;
- register JSAMPROW ptr;
- register JSAMPLE *rescale = source->rescale;
- JDIMENSION col;
-
- ptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
- *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
- *ptr++ = rescale[read_pbm_integer(cinfo, infile)];
- }
- return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-byte-format PGM files with any maxval */
-{
- ppm_source_ptr source = (ppm_source_ptr) sinfo;
- register JSAMPROW ptr;
- register U_CHAR * bufferptr;
- register JSAMPLE *rescale = source->rescale;
- JDIMENSION col;
-
- if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- ptr = source->pub.buffer[0];
- bufferptr = source->iobuffer;
- for (col = cinfo->image_width; col > 0; col--) {
- *ptr++ = rescale[UCH(*bufferptr++)];
- }
- return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-byte-format PPM files with any maxval */
-{
- ppm_source_ptr source = (ppm_source_ptr) sinfo;
- register JSAMPROW ptr;
- register U_CHAR * bufferptr;
- register JSAMPLE *rescale = source->rescale;
- JDIMENSION col;
-
- if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- ptr = source->pub.buffer[0];
- bufferptr = source->iobuffer;
- for (col = cinfo->image_width; col > 0; col--) {
- *ptr++ = rescale[UCH(*bufferptr++)];
- *ptr++ = rescale[UCH(*bufferptr++)];
- *ptr++ = rescale[UCH(*bufferptr++)];
- }
- return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE.
- * In this case we just read right into the JSAMPLE buffer!
- * Note that same code works for PPM and PGM files.
- */
-{
- ppm_source_ptr source = (ppm_source_ptr) sinfo;
-
- if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-word-format PGM files with any maxval */
-{
- ppm_source_ptr source = (ppm_source_ptr) sinfo;
- register JSAMPROW ptr;
- register U_CHAR * bufferptr;
- register JSAMPLE *rescale = source->rescale;
- JDIMENSION col;
-
- if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- ptr = source->pub.buffer[0];
- bufferptr = source->iobuffer;
- for (col = cinfo->image_width; col > 0; col--) {
- register int temp;
- temp = UCH(*bufferptr++);
- temp |= UCH(*bufferptr++) << 8;
- *ptr++ = rescale[temp];
- }
- return 1;
-}
-
-
-METHODDEF(JDIMENSION)
-get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading raw-word-format PPM files with any maxval */
-{
- ppm_source_ptr source = (ppm_source_ptr) sinfo;
- register JSAMPROW ptr;
- register U_CHAR * bufferptr;
- register JSAMPLE *rescale = source->rescale;
- JDIMENSION col;
-
- if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width))
- ERREXIT(cinfo, JERR_INPUT_EOF);
- ptr = source->pub.buffer[0];
- bufferptr = source->iobuffer;
- for (col = cinfo->image_width; col > 0; col--) {
- register int temp;
- temp = UCH(*bufferptr++);
- temp |= UCH(*bufferptr++) << 8;
- *ptr++ = rescale[temp];
- temp = UCH(*bufferptr++);
- temp |= UCH(*bufferptr++) << 8;
- *ptr++ = rescale[temp];
- temp = UCH(*bufferptr++);
- temp |= UCH(*bufferptr++) << 8;
- *ptr++ = rescale[temp];
- }
- return 1;
-}
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- ppm_source_ptr source = (ppm_source_ptr) sinfo;
- int c;
- unsigned int w, h, maxval;
- boolean need_iobuffer, use_raw_buffer, need_rescale;
-
- if (getc(source->pub.input_file) != 'P')
- ERREXIT(cinfo, JERR_PPM_NOT);
-
- c = getc(source->pub.input_file); /* subformat discriminator character */
-
- /* detect unsupported variants (ie, PBM) before trying to read header */
- switch (c) {
- case '2': /* it's a text-format PGM file */
- case '3': /* it's a text-format PPM file */
- case '5': /* it's a raw-format PGM file */
- case '6': /* it's a raw-format PPM file */
- break;
- default:
- ERREXIT(cinfo, JERR_PPM_NOT);
- break;
- }
-
- /* fetch the remaining header info */
- w = read_pbm_integer(cinfo, source->pub.input_file);
- h = read_pbm_integer(cinfo, source->pub.input_file);
- maxval = read_pbm_integer(cinfo, source->pub.input_file);
-
- if (w <= 0 || h <= 0 || maxval <= 0) /* error check */
- ERREXIT(cinfo, JERR_PPM_NOT);
-
- cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */
- cinfo->image_width = (JDIMENSION) w;
- cinfo->image_height = (JDIMENSION) h;
-
- /* initialize flags to most common settings */
- need_iobuffer = TRUE; /* do we need an I/O buffer? */
- use_raw_buffer = FALSE; /* do we map input buffer onto I/O buffer? */
- need_rescale = TRUE; /* do we need a rescale array? */
-
- switch (c) {
- case '2': /* it's a text-format PGM file */
- cinfo->input_components = 1;
- cinfo->in_color_space = JCS_GRAYSCALE;
- TRACEMS2(cinfo, 1, JTRC_PGM_TEXT, w, h);
- source->pub.get_pixel_rows = get_text_gray_row;
- need_iobuffer = FALSE;
- break;
-
- case '3': /* it's a text-format PPM file */
- cinfo->input_components = 3;
- cinfo->in_color_space = JCS_RGB;
- TRACEMS2(cinfo, 1, JTRC_PPM_TEXT, w, h);
- source->pub.get_pixel_rows = get_text_rgb_row;
- need_iobuffer = FALSE;
- break;
-
- case '5': /* it's a raw-format PGM file */
- cinfo->input_components = 1;
- cinfo->in_color_space = JCS_GRAYSCALE;
- TRACEMS2(cinfo, 1, JTRC_PGM, w, h);
- if (maxval > 255) {
- source->pub.get_pixel_rows = get_word_gray_row;
- } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) {
- source->pub.get_pixel_rows = get_raw_row;
- use_raw_buffer = TRUE;
- need_rescale = FALSE;
- } else {
- source->pub.get_pixel_rows = get_scaled_gray_row;
- }
- break;
-
- case '6': /* it's a raw-format PPM file */
- cinfo->input_components = 3;
- cinfo->in_color_space = JCS_RGB;
- TRACEMS2(cinfo, 1, JTRC_PPM, w, h);
- if (maxval > 255) {
- source->pub.get_pixel_rows = get_word_rgb_row;
- } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) {
- source->pub.get_pixel_rows = get_raw_row;
- use_raw_buffer = TRUE;
- need_rescale = FALSE;
- } else {
- source->pub.get_pixel_rows = get_scaled_rgb_row;
- }
- break;
- }
-
- /* Allocate space for I/O buffer: 1 or 3 bytes or words/pixel. */
- if (need_iobuffer) {
- source->buffer_width = (size_t) w * cinfo->input_components *
- ((maxval<=255) ? SIZEOF(U_CHAR) : (2*SIZEOF(U_CHAR)));
- source->iobuffer = (U_CHAR *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- source->buffer_width);
- }
-
- /* Create compressor input buffer. */
- if (use_raw_buffer) {
- /* For unscaled raw-input case, we can just map it onto the I/O buffer. */
- /* Synthesize a JSAMPARRAY pointer structure */
- /* Cast here implies near->far pointer conversion on PCs */
- source->pixrow = (JSAMPROW) source->iobuffer;
- source->pub.buffer = & source->pixrow;
- source->pub.buffer_height = 1;
- } else {
- /* Need to translate anyway, so make a separate sample buffer. */
- source->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) w * cinfo->input_components, (JDIMENSION) 1);
- source->pub.buffer_height = 1;
- }
-
- /* Compute the rescaling array if required. */
- if (need_rescale) {
- INT32 val, half_maxval;
-
- /* On 16-bit-int machines we have to be careful of maxval = 65535 */
- source->rescale = (JSAMPLE *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (size_t) (((long) maxval + 1L) * SIZEOF(JSAMPLE)));
- half_maxval = maxval / 2;
- for (val = 0; val <= (INT32) maxval; val++) {
- /* The multiplication here must be done in 32 bits to avoid overflow */
- source->rescale[val] = (JSAMPLE) ((val*MAXJSAMPLE + half_maxval)/maxval);
- }
- }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- /* no work */
-}
-
-
-/*
- * The module selection routine for PPM format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_ppm (j_compress_ptr cinfo)
-{
- ppm_source_ptr source;
-
- /* Create module interface object */
- source = (ppm_source_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(ppm_source_struct));
- /* Fill in method ptrs, except get_pixel_rows which start_input sets */
- source->pub.start_input = start_input_ppm;
- source->pub.finish_input = finish_input_ppm;
-
- return (cjpeg_source_ptr) source;
-}
-
-#endif /* PPM_SUPPORTED */
diff --git a/rdrle.c b/rdrle.c
deleted file mode 100644
index 542bc37..0000000
--- a/rdrle.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * rdrle.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in Utah RLE format.
- * The Utah Raster Toolkit library is required (version 3.1 or later).
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume input from
- * an ordinary stdio stream. They further assume that reading begins
- * at the start of the file; start_input may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed RLE format).
- *
- * Based on code contributed by Mike Lijewski,
- * with updates from Robert Hutchinson.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef RLE_SUPPORTED
-
-/* rle.h is provided by the Utah Raster Toolkit. */
-
-#include <rle.h>
-
-/*
- * We assume that JSAMPLE has the same representation as rle_pixel,
- * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples.
- */
-
-#if BITS_IN_JSAMPLE != 8
- Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
-#endif
-
-/*
- * We support the following types of RLE files:
- *
- * GRAYSCALE - 8 bits, no colormap
- * MAPPEDGRAY - 8 bits, 1 channel colomap
- * PSEUDOCOLOR - 8 bits, 3 channel colormap
- * TRUECOLOR - 24 bits, 3 channel colormap
- * DIRECTCOLOR - 24 bits, no colormap
- *
- * For now, we ignore any alpha channel in the image.
- */
-
-typedef enum
- { GRAYSCALE, MAPPEDGRAY, PSEUDOCOLOR, TRUECOLOR, DIRECTCOLOR } rle_kind;
-
-
-/*
- * Since RLE stores scanlines bottom-to-top, we have to invert the image
- * to conform to JPEG's top-to-bottom order. To do this, we read the
- * incoming image into a virtual array on the first get_pixel_rows call,
- * then fetch the required row from the virtual array on subsequent calls.
- */
-
-typedef struct _rle_source_struct * rle_source_ptr;
-
-typedef struct _rle_source_struct {
- struct cjpeg_source_struct pub; /* public fields */
-
- rle_kind visual; /* actual type of input file */
- jvirt_sarray_ptr image; /* virtual array to hold the image */
- JDIMENSION row; /* current row # in the virtual array */
- rle_hdr header; /* Input file information */
- rle_pixel** rle_row; /* holds a row returned by rle_getrow() */
-
-} rle_source_struct;
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- rle_source_ptr source = (rle_source_ptr) sinfo;
- JDIMENSION width, height;
-#ifdef PROGRESS_REPORT
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-#endif
-
- /* Use RLE library routine to get the header info */
- source->header = *rle_hdr_init(NULL);
- source->header.rle_file = source->pub.input_file;
- switch (rle_get_setup(&(source->header))) {
- case RLE_SUCCESS:
- /* A-OK */
- break;
- case RLE_NOT_RLE:
- ERREXIT(cinfo, JERR_RLE_NOT);
- break;
- case RLE_NO_SPACE:
- ERREXIT(cinfo, JERR_RLE_MEM);
- break;
- case RLE_EMPTY:
- ERREXIT(cinfo, JERR_RLE_EMPTY);
- break;
- case RLE_EOF:
- ERREXIT(cinfo, JERR_RLE_EOF);
- break;
- default:
- ERREXIT(cinfo, JERR_RLE_BADERROR);
- break;
- }
-
- /* Figure out what we have, set private vars and return values accordingly */
-
- width = source->header.xmax - source->header.xmin + 1;
- height = source->header.ymax - source->header.ymin + 1;
- source->header.xmin = 0; /* realign horizontally */
- source->header.xmax = width-1;
-
- cinfo->image_width = width;
- cinfo->image_height = height;
- cinfo->data_precision = 8; /* we can only handle 8 bit data */
-
- if (source->header.ncolors == 1 && source->header.ncmap == 0) {
- source->visual = GRAYSCALE;
- TRACEMS2(cinfo, 1, JTRC_RLE_GRAY, width, height);
- } else if (source->header.ncolors == 1 && source->header.ncmap == 1) {
- source->visual = MAPPEDGRAY;
- TRACEMS3(cinfo, 1, JTRC_RLE_MAPGRAY, width, height,
- 1 << source->header.cmaplen);
- } else if (source->header.ncolors == 1 && source->header.ncmap == 3) {
- source->visual = PSEUDOCOLOR;
- TRACEMS3(cinfo, 1, JTRC_RLE_MAPPED, width, height,
- 1 << source->header.cmaplen);
- } else if (source->header.ncolors == 3 && source->header.ncmap == 3) {
- source->visual = TRUECOLOR;
- TRACEMS3(cinfo, 1, JTRC_RLE_FULLMAP, width, height,
- 1 << source->header.cmaplen);
- } else if (source->header.ncolors == 3 && source->header.ncmap == 0) {
- source->visual = DIRECTCOLOR;
- TRACEMS2(cinfo, 1, JTRC_RLE, width, height);
- } else
- ERREXIT(cinfo, JERR_RLE_UNSUPPORTED);
-
- if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) {
- cinfo->in_color_space = JCS_GRAYSCALE;
- cinfo->input_components = 1;
- } else {
- cinfo->in_color_space = JCS_RGB;
- cinfo->input_components = 3;
- }
-
- /*
- * A place to hold each scanline while it's converted.
- * (GRAYSCALE scanlines don't need converting)
- */
- if (source->visual != GRAYSCALE) {
- source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) width, (JDIMENSION) cinfo->input_components);
- }
-
- /* request a virtual array to hold the image */
- source->image = (*cinfo->mem->request_virt_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
- (JDIMENSION) (width * source->header.ncolors),
- (JDIMENSION) height, (JDIMENSION) 1);
-
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- /* count file input as separate pass */
- progress->total_extra_passes++;
- }
-#endif
-
- source->pub.buffer_height = 1;
-}
-
-
-/*
- * Read one row of pixels.
- * Called only after load_image has read the image into the virtual array.
- * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images.
- */
-
-METHODDEF(JDIMENSION)
-get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- rle_source_ptr source = (rle_source_ptr) sinfo;
-
- source->row--;
- source->pub.buffer = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE);
-
- return 1;
-}
-
-/*
- * Read one row of pixels.
- * Called only after load_image has read the image into the virtual array.
- * Used for PSEUDOCOLOR images.
- */
-
-METHODDEF(JDIMENSION)
-get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- rle_source_ptr source = (rle_source_ptr) sinfo;
- JSAMPROW src_row, dest_row;
- JDIMENSION col;
- rle_map *colormap;
- int val;
-
- colormap = source->header.cmap;
- dest_row = source->pub.buffer[0];
- source->row--;
- src_row = * (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE);
-
- for (col = cinfo->image_width; col > 0; col--) {
- val = GETJSAMPLE(*src_row++);
- *dest_row++ = (JSAMPLE) (colormap[val ] >> 8);
- *dest_row++ = (JSAMPLE) (colormap[val + 256] >> 8);
- *dest_row++ = (JSAMPLE) (colormap[val + 512] >> 8);
- }
-
- return 1;
-}
-
-
-/*
- * Load the image into a virtual array. We have to do this because RLE
- * files start at the lower left while the JPEG standard has them starting
- * in the upper left. This is called the first time we want to get a row
- * of input. What we do is load the RLE data into the array and then call
- * the appropriate routine to read one row from the array. Before returning,
- * we set source->pub.get_pixel_rows so that subsequent calls go straight to
- * the appropriate row-reading routine.
- */
-
-METHODDEF(JDIMENSION)
-load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- rle_source_ptr source = (rle_source_ptr) sinfo;
- JDIMENSION row, col;
- JSAMPROW scanline, red_ptr, green_ptr, blue_ptr;
- rle_pixel **rle_row;
- rle_map *colormap;
- char channel;
-#ifdef PROGRESS_REPORT
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-#endif
-
- colormap = source->header.cmap;
- rle_row = source->rle_row;
-
- /* Read the RLE data into our virtual array.
- * We assume here that (a) rle_pixel is represented the same as JSAMPLE,
- * and (b) we are not on a machine where FAR pointers differ from regular.
- */
- RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */
-
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- progress->pub.pass_limit = cinfo->image_height;
- progress->pub.pass_counter = 0;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
-#endif
-
- switch (source->visual) {
-
- case GRAYSCALE:
- case PSEUDOCOLOR:
- for (row = 0; row < cinfo->image_height; row++) {
- rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
- rle_getrow(&source->header, rle_row);
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- progress->pub.pass_counter++;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
-#endif
- }
- break;
-
- case MAPPEDGRAY:
- case TRUECOLOR:
- for (row = 0; row < cinfo->image_height; row++) {
- scanline = * (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
- rle_row = source->rle_row;
- rle_getrow(&source->header, rle_row);
-
- for (col = 0; col < cinfo->image_width; col++) {
- for (channel = 0; channel < source->header.ncolors; channel++) {
- *scanline++ = (JSAMPLE)
- (colormap[GETJSAMPLE(rle_row[channel][col]) + 256 * channel] >> 8);
- }
- }
-
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- progress->pub.pass_counter++;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
-#endif
- }
- break;
-
- case DIRECTCOLOR:
- for (row = 0; row < cinfo->image_height; row++) {
- scanline = * (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE);
- rle_getrow(&source->header, rle_row);
-
- red_ptr = rle_row[0];
- green_ptr = rle_row[1];
- blue_ptr = rle_row[2];
-
- for (col = cinfo->image_width; col > 0; col--) {
- *scanline++ = *red_ptr++;
- *scanline++ = *green_ptr++;
- *scanline++ = *blue_ptr++;
- }
-
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- progress->pub.pass_counter++;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
-#endif
- }
- }
-
-#ifdef PROGRESS_REPORT
- if (progress != NULL)
- progress->completed_extra_passes++;
-#endif
-
- /* Set up to call proper row-extraction routine in future */
- if (source->visual == PSEUDOCOLOR) {
- source->pub.buffer = source->rle_row;
- source->pub.get_pixel_rows = get_pseudocolor_row;
- } else {
- source->pub.get_pixel_rows = get_rle_row;
- }
- source->row = cinfo->image_height;
-
- /* And fetch the topmost (bottommost) row */
- return (*source->pub.get_pixel_rows) (cinfo, sinfo);
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- /* no work */
-}
-
-
-/*
- * The module selection routine for RLE format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_rle (j_compress_ptr cinfo)
-{
- rle_source_ptr source;
-
- /* Create module interface object */
- source = (rle_source_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(rle_source_struct));
- /* Fill in method ptrs */
- source->pub.start_input = start_input_rle;
- source->pub.finish_input = finish_input_rle;
- source->pub.get_pixel_rows = load_image;
-
- return (cjpeg_source_ptr) source;
-}
-
-#endif /* RLE_SUPPORTED */
diff --git a/rdswitch.c b/rdswitch.c
deleted file mode 100644
index 4f4bb4f..0000000
--- a/rdswitch.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * rdswitch.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to process some of cjpeg's more complicated
- * command-line switches. Switches processed here are:
- * -qtables file Read quantization tables from text file
- * -scans file Read scan script from text file
- * -qslots N[,N,...] Set component quantization table selectors
- * -sample HxV[,HxV,...] Set component sampling factors
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-#include <ctype.h> /* to declare isdigit(), isspace() */
-
-
-LOCAL(int)
-text_getc (FILE * file)
-/* Read next char, skipping over any comments (# to end of line) */
-/* A comment/newline sequence is returned as a newline */
-{
- register int ch;
-
- ch = getc(file);
- if (ch == '#') {
- do {
- ch = getc(file);
- } while (ch != '\n' && ch != EOF);
- }
- return ch;
-}
-
-
-LOCAL(boolean)
-read_text_integer (FILE * file, long * result, int * termchar)
-/* Read an unsigned decimal integer from a file, store it in result */
-/* Reads one trailing character after the integer; returns it in termchar */
-{
- register int ch;
- register long val;
-
- /* Skip any leading whitespace, detect EOF */
- do {
- ch = text_getc(file);
- if (ch == EOF) {
- *termchar = ch;
- return FALSE;
- }
- } while (isspace(ch));
-
- if (! isdigit(ch)) {
- *termchar = ch;
- return FALSE;
- }
-
- val = ch - '0';
- while ((ch = text_getc(file)) != EOF) {
- if (! isdigit(ch))
- break;
- val *= 10;
- val += ch - '0';
- }
- *result = val;
- *termchar = ch;
- return TRUE;
-}
-
-
-GLOBAL(boolean)
-read_quant_tables (j_compress_ptr cinfo, char * filename,
- int scale_factor, boolean force_baseline)
-/* Read a set of quantization tables from the specified file.
- * The file is plain ASCII text: decimal numbers with whitespace between.
- * Comments preceded by '#' may be included in the file.
- * There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values.
- * The tables are implicitly numbered 0,1,etc.
- * NOTE: does not affect the qslots mapping, which will default to selecting
- * table 0 for luminance (or primary) components, 1 for chrominance components.
- * You must use -qslots if you want a different component->table mapping.
- */
-{
- FILE * fp;
- int tblno, i, termchar;
- long val;
- unsigned int table[DCTSIZE2];
-
- if ((fp = fopen(filename, "r")) == NULL) {
- fprintf(stderr, "Can't open table file %s\n", filename);
- return FALSE;
- }
- tblno = 0;
-
- while (read_text_integer(fp, &val, &termchar)) { /* read 1st element of table */
- if (tblno >= NUM_QUANT_TBLS) {
- fprintf(stderr, "Too many tables in file %s\n", filename);
- fclose(fp);
- return FALSE;
- }
- table[0] = (unsigned int) val;
- for (i = 1; i < DCTSIZE2; i++) {
- if (! read_text_integer(fp, &val, &termchar)) {
- fprintf(stderr, "Invalid table data in file %s\n", filename);
- fclose(fp);
- return FALSE;
- }
- table[i] = (unsigned int) val;
- }
- jpeg_add_quant_table(cinfo, tblno, table, scale_factor, force_baseline);
- tblno++;
- }
-
- if (termchar != EOF) {
- fprintf(stderr, "Non-numeric data in file %s\n", filename);
- fclose(fp);
- return FALSE;
- }
-
- fclose(fp);
- return TRUE;
-}
-
-
-#ifdef C_MULTISCAN_FILES_SUPPORTED
-
-LOCAL(boolean)
-read_scan_integer (FILE * file, long * result, int * termchar)
-/* Variant of read_text_integer that always looks for a non-space termchar;
- * this simplifies parsing of punctuation in scan scripts.
- */
-{
- register int ch;
-
- if (! read_text_integer(file, result, termchar))
- return FALSE;
- ch = *termchar;
- while (ch != EOF && isspace(ch))
- ch = text_getc(file);
- if (isdigit(ch)) { /* oops, put it back */
- if (ungetc(ch, file) == EOF)
- return FALSE;
- ch = ' ';
- } else {
- /* Any separators other than ';' and ':' are ignored;
- * this allows user to insert commas, etc, if desired.
- */
- if (ch != EOF && ch != ';' && ch != ':')
- ch = ' ';
- }
- *termchar = ch;
- return TRUE;
-}
-
-
-GLOBAL(boolean)
-read_scan_script (j_compress_ptr cinfo, char * filename)
-/* Read a scan script from the specified text file.
- * Each entry in the file defines one scan to be emitted.
- * Entries are separated by semicolons ';'.
- * An entry contains one to four component indexes,
- * optionally followed by a colon ':' and four progressive-JPEG parameters.
- * The component indexes denote which component(s) are to be transmitted
- * in the current scan. The first component has index 0.
- * Sequential JPEG is used if the progressive-JPEG parameters are omitted.
- * The file is free format text: any whitespace may appear between numbers
- * and the ':' and ';' punctuation marks. Also, other punctuation (such
- * as commas or dashes) can be placed between numbers if desired.
- * Comments preceded by '#' may be included in the file.
- * Note: we do very little validity checking here;
- * jcmaster.c will validate the script parameters.
- */
-{
- FILE * fp;
- int scanno, ncomps, termchar;
- long val;
- jpeg_scan_info * scanptr;
-#define MAX_SCANS 100 /* quite arbitrary limit */
- jpeg_scan_info scans[MAX_SCANS];
-
- if ((fp = fopen(filename, "r")) == NULL) {
- fprintf(stderr, "Can't open scan definition file %s\n", filename);
- return FALSE;
- }
- scanptr = scans;
- scanno = 0;
-
- while (read_scan_integer(fp, &val, &termchar)) {
- if (scanno >= MAX_SCANS) {
- fprintf(stderr, "Too many scans defined in file %s\n", filename);
- fclose(fp);
- return FALSE;
- }
- scanptr->component_index[0] = (int) val;
- ncomps = 1;
- while (termchar == ' ') {
- if (ncomps >= MAX_COMPS_IN_SCAN) {
- fprintf(stderr, "Too many components in one scan in file %s\n",
- filename);
- fclose(fp);
- return FALSE;
- }
- if (! read_scan_integer(fp, &val, &termchar))
- goto bogus;
- scanptr->component_index[ncomps] = (int) val;
- ncomps++;
- }
- scanptr->comps_in_scan = ncomps;
- if (termchar == ':') {
- if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
- goto bogus;
- scanptr->Ss = (int) val;
- if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
- goto bogus;
- scanptr->Se = (int) val;
- if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ')
- goto bogus;
- scanptr->Ah = (int) val;
- if (! read_scan_integer(fp, &val, &termchar))
- goto bogus;
- scanptr->Al = (int) val;
- } else {
- /* set non-progressive parameters */
- scanptr->Ss = 0;
- scanptr->Se = DCTSIZE2-1;
- scanptr->Ah = 0;
- scanptr->Al = 0;
- }
- if (termchar != ';' && termchar != EOF) {
-bogus:
- fprintf(stderr, "Invalid scan entry format in file %s\n", filename);
- fclose(fp);
- return FALSE;
- }
- scanptr++, scanno++;
- }
-
- if (termchar != EOF) {
- fprintf(stderr, "Non-numeric data in file %s\n", filename);
- fclose(fp);
- return FALSE;
- }
-
- if (scanno > 0) {
- /* Stash completed scan list in cinfo structure.
- * NOTE: for cjpeg's use, JPOOL_IMAGE is the right lifetime for this data,
- * but if you want to compress multiple images you'd want JPOOL_PERMANENT.
- */
- scanptr = (jpeg_scan_info *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- scanno * SIZEOF(jpeg_scan_info));
- MEMCOPY(scanptr, scans, scanno * SIZEOF(jpeg_scan_info));
- cinfo->scan_info = scanptr;
- cinfo->num_scans = scanno;
- }
-
- fclose(fp);
- return TRUE;
-}
-
-#endif /* C_MULTISCAN_FILES_SUPPORTED */
-
-
-GLOBAL(boolean)
-set_quant_slots (j_compress_ptr cinfo, char *arg)
-/* Process a quantization-table-selectors parameter string, of the form
- * N[,N,...]
- * If there are more components than parameters, the last value is replicated.
- */
-{
- int val = 0; /* default table # */
- int ci;
- char ch;
-
- for (ci = 0; ci < MAX_COMPONENTS; ci++) {
- if (*arg) {
- ch = ','; /* if not set by sscanf, will be ',' */
- if (sscanf(arg, "%d%c", &val, &ch) < 1)
- return FALSE;
- if (ch != ',') /* syntax check */
- return FALSE;
- if (val < 0 || val >= NUM_QUANT_TBLS) {
- fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n",
- NUM_QUANT_TBLS-1);
- return FALSE;
- }
- cinfo->comp_info[ci].quant_tbl_no = val;
- while (*arg && *arg++ != ',') /* advance to next segment of arg string */
- ;
- } else {
- /* reached end of parameter, set remaining components to last table */
- cinfo->comp_info[ci].quant_tbl_no = val;
- }
- }
- return TRUE;
-}
-
-
-GLOBAL(boolean)
-set_sample_factors (j_compress_ptr cinfo, char *arg)
-/* Process a sample-factors parameter string, of the form
- * HxV[,HxV,...]
- * If there are more components than parameters, "1x1" is assumed for the rest.
- */
-{
- int ci, val1, val2;
- char ch1, ch2;
-
- for (ci = 0; ci < MAX_COMPONENTS; ci++) {
- if (*arg) {
- ch2 = ','; /* if not set by sscanf, will be ',' */
- if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3)
- return FALSE;
- if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */
- return FALSE;
- if (val1 <= 0 || val1 > 4 || val2 <= 0 || val2 > 4) {
- fprintf(stderr, "JPEG sampling factors must be 1..4\n");
- return FALSE;
- }
- cinfo->comp_info[ci].h_samp_factor = val1;
- cinfo->comp_info[ci].v_samp_factor = val2;
- while (*arg && *arg++ != ',') /* advance to next segment of arg string */
- ;
- } else {
- /* reached end of parameter, set remaining components to 1x1 sampling */
- cinfo->comp_info[ci].h_samp_factor = 1;
- cinfo->comp_info[ci].v_samp_factor = 1;
- }
- }
- return TRUE;
-}
diff --git a/rdtarga.c b/rdtarga.c
deleted file mode 100644
index 4c2cd26..0000000
--- a/rdtarga.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- * rdtarga.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in Targa format.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume input from
- * an ordinary stdio stream. They further assume that reading begins
- * at the start of the file; start_input may need work if the
- * user interface has already read some data (e.g., to determine that
- * the file is indeed Targa format).
- *
- * Based on code contributed by Lee Daniel Crocker.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef TARGA_SUPPORTED
-
-
-/* Macros to deal with unsigned chars as efficiently as compiler allows */
-
-#ifdef HAVE_UNSIGNED_CHAR
-typedef unsigned char U_CHAR;
-#define UCH(x) ((int) (x))
-#else /* !HAVE_UNSIGNED_CHAR */
-#ifdef CHAR_IS_UNSIGNED
-typedef char U_CHAR;
-#define UCH(x) ((int) (x))
-#else
-typedef char U_CHAR;
-#define UCH(x) ((int) (x) & 0xFF)
-#endif
-#endif /* HAVE_UNSIGNED_CHAR */
-
-
-#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len)))
-
-
-/* Private version of data source object */
-
-typedef struct _tga_source_struct * tga_source_ptr;
-
-typedef struct _tga_source_struct {
- struct cjpeg_source_struct pub; /* public fields */
-
- j_compress_ptr cinfo; /* back link saves passing separate parm */
-
- JSAMPARRAY colormap; /* Targa colormap (converted to my format) */
-
- jvirt_sarray_ptr whole_image; /* Needed if funny input row order */
- JDIMENSION current_row; /* Current logical row number to read */
-
- /* Pointer to routine to extract next Targa pixel from input file */
- JMETHOD(void, read_pixel, (tga_source_ptr sinfo));
-
- /* Result of read_pixel is delivered here: */
- U_CHAR tga_pixel[4];
-
- int pixel_size; /* Bytes per Targa pixel (1 to 4) */
-
- /* State info for reading RLE-coded pixels; both counts must be init to 0 */
- int block_count; /* # of pixels remaining in RLE block */
- int dup_pixel_count; /* # of times to duplicate previous pixel */
-
- /* This saves the correct pixel-row-expansion method for preload_image */
- JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
- cjpeg_source_ptr sinfo));
-} tga_source_struct;
-
-
-/* For expanding 5-bit pixel values to 8-bit with best rounding */
-
-static const UINT8 c5to8bits[32] = {
- 0, 8, 16, 25, 33, 41, 49, 58,
- 66, 74, 82, 90, 99, 107, 115, 123,
- 132, 140, 148, 156, 165, 173, 181, 189,
- 197, 206, 214, 222, 230, 239, 247, 255
-};
-
-
-
-LOCAL(int)
-read_byte (tga_source_ptr sinfo)
-/* Read next byte from Targa file */
-{
- register FILE *infile = sinfo->pub.input_file;
- register int c;
-
- if ((c = getc(infile)) == EOF)
- ERREXIT(sinfo->cinfo, JERR_INPUT_EOF);
- return c;
-}
-
-
-LOCAL(void)
-read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize)
-/* Read the colormap from a Targa file */
-{
- int i;
-
- /* Presently only handles 24-bit BGR format */
- if (mapentrysize != 24)
- ERREXIT(sinfo->cinfo, JERR_TGA_BADCMAP);
-
- for (i = 0; i < cmaplen; i++) {
- sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo);
- sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo);
- sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo);
- }
-}
-
-
-/*
- * read_pixel methods: get a single pixel from Targa file into tga_pixel[]
- */
-
-METHODDEF(void)
-read_non_rle_pixel (tga_source_ptr sinfo)
-/* Read one Targa pixel from the input file; no RLE expansion */
-{
- register FILE *infile = sinfo->pub.input_file;
- register int i;
-
- for (i = 0; i < sinfo->pixel_size; i++) {
- sinfo->tga_pixel[i] = (U_CHAR) getc(infile);
- }
-}
-
-
-METHODDEF(void)
-read_rle_pixel (tga_source_ptr sinfo)
-/* Read one Targa pixel from the input file, expanding RLE data as needed */
-{
- register FILE *infile = sinfo->pub.input_file;
- register int i;
-
- /* Duplicate previously read pixel? */
- if (sinfo->dup_pixel_count > 0) {
- sinfo->dup_pixel_count--;
- return;
- }
-
- /* Time to read RLE block header? */
- if (--sinfo->block_count < 0) { /* decrement pixels remaining in block */
- i = read_byte(sinfo);
- if (i & 0x80) { /* Start of duplicate-pixel block? */
- sinfo->dup_pixel_count = i & 0x7F; /* number of dups after this one */
- sinfo->block_count = 0; /* then read new block header */
- } else {
- sinfo->block_count = i & 0x7F; /* number of pixels after this one */
- }
- }
-
- /* Read next pixel */
- for (i = 0; i < sinfo->pixel_size; i++) {
- sinfo->tga_pixel[i] = (U_CHAR) getc(infile);
- }
-}
-
-
-/*
- * Read one row of pixels.
- *
- * We provide several different versions depending on input file format.
- */
-
-
-METHODDEF(JDIMENSION)
-get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 8-bit grayscale pixels */
-{
- tga_source_ptr source = (tga_source_ptr) sinfo;
- register JSAMPROW ptr;
- register JDIMENSION col;
-
- ptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
- *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
- }
- return 1;
-}
-
-METHODDEF(JDIMENSION)
-get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 8-bit colormap indexes */
-{
- tga_source_ptr source = (tga_source_ptr) sinfo;
- register int t;
- register JSAMPROW ptr;
- register JDIMENSION col;
- register JSAMPARRAY colormap = source->colormap;
-
- ptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
- t = UCH(source->tga_pixel[0]);
- *ptr++ = colormap[0][t];
- *ptr++ = colormap[1][t];
- *ptr++ = colormap[2][t];
- }
- return 1;
-}
-
-METHODDEF(JDIMENSION)
-get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 16-bit pixels */
-{
- tga_source_ptr source = (tga_source_ptr) sinfo;
- register int t;
- register JSAMPROW ptr;
- register JDIMENSION col;
-
- ptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
- t = UCH(source->tga_pixel[0]);
- t += UCH(source->tga_pixel[1]) << 8;
- /* We expand 5 bit data to 8 bit sample width.
- * The format of the 16-bit (LSB first) input word is
- * xRRRRRGGGGGBBBBB
- */
- ptr[2] = (JSAMPLE) c5to8bits[t & 0x1F];
- t >>= 5;
- ptr[1] = (JSAMPLE) c5to8bits[t & 0x1F];
- t >>= 5;
- ptr[0] = (JSAMPLE) c5to8bits[t & 0x1F];
- ptr += 3;
- }
- return 1;
-}
-
-METHODDEF(JDIMENSION)
-get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-/* This version is for reading 24-bit pixels */
-{
- tga_source_ptr source = (tga_source_ptr) sinfo;
- register JSAMPROW ptr;
- register JDIMENSION col;
-
- ptr = source->pub.buffer[0];
- for (col = cinfo->image_width; col > 0; col--) {
- (*source->read_pixel) (source); /* Load next pixel into tga_pixel */
- *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */
- *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]);
- *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]);
- }
- return 1;
-}
-
-/*
- * Targa also defines a 32-bit pixel format with order B,G,R,A.
- * We presently ignore the attribute byte, so the code for reading
- * these pixels is identical to the 24-bit routine above.
- * This works because the actual pixel length is only known to read_pixel.
- */
-
-#define get_32bit_row get_24bit_row
-
-
-/*
- * This method is for re-reading the input data in standard top-down
- * row order. The entire image has already been read into whole_image
- * with proper conversion of pixel format, but it's in a funny row order.
- */
-
-METHODDEF(JDIMENSION)
-get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- tga_source_ptr source = (tga_source_ptr) sinfo;
- JDIMENSION source_row;
-
- /* Compute row of source that maps to current_row of normal order */
- /* For now, assume image is bottom-up and not interlaced. */
- /* NEEDS WORK to support interlaced images! */
- source_row = cinfo->image_height - source->current_row - 1;
-
- /* Fetch that row from virtual array */
- source->pub.buffer = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->whole_image,
- source_row, (JDIMENSION) 1, FALSE);
-
- source->current_row++;
- return 1;
-}
-
-
-/*
- * This method loads the image into whole_image during the first call on
- * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call
- * get_memory_row on subsequent calls.
- */
-
-METHODDEF(JDIMENSION)
-preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- tga_source_ptr source = (tga_source_ptr) sinfo;
- JDIMENSION row;
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-
- /* Read the data into a virtual array in input-file row order. */
- for (row = 0; row < cinfo->image_height; row++) {
- if (progress != NULL) {
- progress->pub.pass_counter = (long) row;
- progress->pub.pass_limit = (long) cinfo->image_height;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
- source->pub.buffer = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE);
- (*source->get_pixel_rows) (cinfo, sinfo);
- }
- if (progress != NULL)
- progress->completed_extra_passes++;
-
- /* Set up to read from the virtual array in unscrambled order */
- source->pub.get_pixel_rows = get_memory_row;
- source->current_row = 0;
- /* And read the first row */
- return get_memory_row(cinfo, sinfo);
-}
-
-
-/*
- * Read the file header; return image size and component count.
- */
-
-METHODDEF(void)
-start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- tga_source_ptr source = (tga_source_ptr) sinfo;
- U_CHAR targaheader[18];
- int idlen, cmaptype, subtype, flags, interlace_type, components;
- unsigned int width, height, maplen;
- boolean is_bottom_up;
-
-#define GET_2B(offset) ((unsigned int) UCH(targaheader[offset]) + \
- (((unsigned int) UCH(targaheader[offset+1])) << 8))
-
- if (! ReadOK(source->pub.input_file, targaheader, 18))
- ERREXIT(cinfo, JERR_INPUT_EOF);
-
- /* Pretend "15-bit" pixels are 16-bit --- we ignore attribute bit anyway */
- if (targaheader[16] == 15)
- targaheader[16] = 16;
-
- idlen = UCH(targaheader[0]);
- cmaptype = UCH(targaheader[1]);
- subtype = UCH(targaheader[2]);
- maplen = GET_2B(5);
- width = GET_2B(12);
- height = GET_2B(14);
- source->pixel_size = UCH(targaheader[16]) >> 3;
- flags = UCH(targaheader[17]); /* Image Descriptor byte */
-
- is_bottom_up = ((flags & 0x20) == 0); /* bit 5 set => top-down */
- interlace_type = flags >> 6; /* bits 6/7 are interlace code */
-
- if (cmaptype > 1 || /* cmaptype must be 0 or 1 */
- source->pixel_size < 1 || source->pixel_size > 4 ||
- (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */
- interlace_type != 0) /* currently don't allow interlaced image */
- ERREXIT(cinfo, JERR_TGA_BADPARMS);
-
- if (subtype > 8) {
- /* It's an RLE-coded file */
- source->read_pixel = read_rle_pixel;
- source->block_count = source->dup_pixel_count = 0;
- subtype -= 8;
- } else {
- /* Non-RLE file */
- source->read_pixel = read_non_rle_pixel;
- }
-
- /* Now should have subtype 1, 2, or 3 */
- components = 3; /* until proven different */
- cinfo->in_color_space = JCS_RGB;
-
- switch (subtype) {
- case 1: /* Colormapped image */
- if (source->pixel_size == 1 && cmaptype == 1)
- source->get_pixel_rows = get_8bit_row;
- else
- ERREXIT(cinfo, JERR_TGA_BADPARMS);
- TRACEMS2(cinfo, 1, JTRC_TGA_MAPPED, width, height);
- break;
- case 2: /* RGB image */
- switch (source->pixel_size) {
- case 2:
- source->get_pixel_rows = get_16bit_row;
- break;
- case 3:
- source->get_pixel_rows = get_24bit_row;
- break;
- case 4:
- source->get_pixel_rows = get_32bit_row;
- break;
- default:
- ERREXIT(cinfo, JERR_TGA_BADPARMS);
- break;
- }
- TRACEMS2(cinfo, 1, JTRC_TGA, width, height);
- break;
- case 3: /* Grayscale image */
- components = 1;
- cinfo->in_color_space = JCS_GRAYSCALE;
- if (source->pixel_size == 1)
- source->get_pixel_rows = get_8bit_gray_row;
- else
- ERREXIT(cinfo, JERR_TGA_BADPARMS);
- TRACEMS2(cinfo, 1, JTRC_TGA_GRAY, width, height);
- break;
- default:
- ERREXIT(cinfo, JERR_TGA_BADPARMS);
- break;
- }
-
- if (is_bottom_up) {
- /* Create a virtual array to buffer the upside-down image. */
- source->whole_image = (*cinfo->mem->request_virt_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
- (JDIMENSION) width * components, (JDIMENSION) height, (JDIMENSION) 1);
- if (cinfo->progress != NULL) {
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
- progress->total_extra_passes++; /* count file input as separate pass */
- }
- /* source->pub.buffer will point to the virtual array. */
- source->pub.buffer_height = 1; /* in case anyone looks at it */
- source->pub.get_pixel_rows = preload_image;
- } else {
- /* Don't need a virtual array, but do need a one-row input buffer. */
- source->whole_image = NULL;
- source->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (JDIMENSION) width * components, (JDIMENSION) 1);
- source->pub.buffer_height = 1;
- source->pub.get_pixel_rows = source->get_pixel_rows;
- }
-
- while (idlen--) /* Throw away ID field */
- (void) read_byte(source);
-
- if (maplen > 0) {
- if (maplen > 256 || GET_2B(3) != 0)
- ERREXIT(cinfo, JERR_TGA_BADCMAP);
- /* Allocate space to store the colormap */
- source->colormap = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, (JDIMENSION) maplen, (JDIMENSION) 3);
- /* and read it from the file */
- read_colormap(source, (int) maplen, UCH(targaheader[7]));
- } else {
- if (cmaptype) /* but you promised a cmap! */
- ERREXIT(cinfo, JERR_TGA_BADPARMS);
- source->colormap = NULL;
- }
-
- cinfo->input_components = components;
- cinfo->data_precision = 8;
- cinfo->image_width = width;
- cinfo->image_height = height;
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
-{
- /* no work */
-}
-
-
-/*
- * The module selection routine for Targa format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_targa (j_compress_ptr cinfo)
-{
- tga_source_ptr source;
-
- /* Create module interface object */
- source = (tga_source_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(tga_source_struct));
- source->cinfo = cinfo; /* make back link for subroutines */
- /* Fill in method ptrs, except get_pixel_rows which start_input sets */
- source->pub.start_input = start_input_tga;
- source->pub.finish_input = finish_input_tga;
-
- return (cjpeg_source_ptr) source;
-}
-
-#endif /* TARGA_SUPPORTED */
diff --git a/simd/jsimd.h b/simd/jsimd.h
new file mode 100644
index 0000000..09ec46d
--- /dev/null
+++ b/simd/jsimd.h
@@ -0,0 +1,23 @@
+/*
+ * simd/jsimd.h
+ *
+ * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+ *
+ * Based on the x86 SIMD extension for IJG JPEG library,
+ * Copyright (C) 1999-2006, MIYASAKA Masaru.
+ *
+ */
+
+/* Bitmask for supported acceleration methods */
+
+#define JSIMD_NONE 0x00
+
+/* Short forms of external names for systems with brain-damaged linkers. */
+
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+#define jpeg_simd_cpu_support jSiCpuSupport
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
+/* SIMD Ext: retrieve SIMD/CPU information */
+EXTERN(unsigned int) jpeg_simd_cpu_support JPP((void));
+
diff --git a/simd/jsimdcfg.inc.h b/simd/jsimdcfg.inc.h
new file mode 100644
index 0000000..bc2ff9f
--- /dev/null
+++ b/simd/jsimdcfg.inc.h
@@ -0,0 +1,29 @@
+// This file generates the include file for the assembly
+// implementations by abusing the C preprocessor.
+
+;
+; Automatically generated include file from jsimdcfg.inc.h
+;
+
+#define JPEG_INTERNALS
+
+#include "../jpeglib.h"
+#include "../jconfig.h"
+#include "../jmorecfg.h"
+#include "jsimd.h"
+
+#define define(var) %define _cpp_protection_##var
+#define definev(var) %define _cpp_protection_##var var
+
+;
+; -- jsimd.h
+;
+
+definev(JSIMD_NONE)
+
+; Short forms of external names for systems with brain-damaged linkers.
+;
+#ifdef NEED_SHORT_EXTERNAL_NAMES
+definev(jpeg_simd_cpu_support)
+#endif /* NEED_SHORT_EXTERNAL_NAMES */
+
diff --git a/simd/jsimdcpu.asm b/simd/jsimdcpu.asm
new file mode 100644
index 0000000..6bb4e32
--- /dev/null
+++ b/simd/jsimdcpu.asm
@@ -0,0 +1,63 @@
+;
+; jsimdcpu.asm - SIMD instruction support check
+;
+; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+;
+; Based on
+; x86 SIMD extension for IJG JPEG library
+; Copyright (C) 1999-2006, MIYASAKA Masaru.
+; For conditions of distribution and use, see copyright notice in jsimdext.inc
+;
+; This file should be assembled with NASM (Netwide Assembler),
+; can *not* be assembled with Microsoft's MASM or any compatible
+; assembler (including Borland's Turbo Assembler).
+; NASM is available from http://nasm.sourceforge.net/ or
+; http://sourceforge.net/project/showfiles.php?group_id=6208
+;
+; [TAB8]
+
+%include "simd/jsimdext.inc"
+
+; --------------------------------------------------------------------------
+ SECTION SEG_TEXT
+ BITS 32
+;
+; Check if the CPU supports SIMD instructions
+;
+; GLOBAL(unsigned int)
+; jpeg_simd_cpu_support (void)
+;
+
+ align 16
+ global EXTN(jpeg_simd_cpu_support)
+
+EXTN(jpeg_simd_cpu_support):
+ push ebx
+; push ecx ; need not be preserved
+; push edx ; need not be preserved
+; push esi ; unused
+ push edi
+
+ xor edi,edi ; simd support flag
+
+ pushfd
+ pop eax
+ mov edx,eax
+ xor eax, 1<<21 ; flip ID bit in EFLAGS
+ push eax
+ popfd
+ pushfd
+ pop eax
+ xor eax,edx
+ jz short .return ; CPUID is not supported
+
+.return:
+ mov eax,edi
+
+ pop edi
+; pop esi ; unused
+; pop edx ; need not be preserved
+; pop ecx ; need not be preserved
+ pop ebx
+ ret
+
diff --git a/jsimdext.inc b/simd/jsimdext.inc
similarity index 61%
rename from jsimdext.inc
rename to simd/jsimdext.inc
index a502c07..c0bd54c 100644
--- a/jsimdext.inc
+++ b/simd/jsimdext.inc
@@ -1,6 +1,9 @@
;
; jsimdext.inc - common declarations
;
+; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+;
+; Based on
; x86 SIMD extension for IJG JPEG library - version 1.02
;
; Copyright (C) 1999-2006, MIYASAKA Masaru.
@@ -21,14 +24,8 @@
; misrepresented as being the original software.
; 3. This notice may not be removed or altered from any source distribution.
;
-; Last Modified : February 4, 2006
-;
; [TAB8]
-%ifndef JSIMDCFG_INCLUDED ; in case jsimdcfg.inc already did
-%include "jsimdcfg.inc" ; configuration declarations
-%endif
-
; ==========================================================================
; System-dependent configurations
@@ -103,119 +100,12 @@
; ==========================================================================
-; ---- jpeglib.h -----------------------------------------------------------
-
-%define DCTSIZE 8 ; The basic DCT block is 8x8 samples
-%define DCTSIZE2 64 ; DCTSIZE squared; # of elements in a block
-
-%define JSIMD_NONE 0x00 ; bitflags for jpeg_simd_*_support()
-%define JSIMD_MMX 0x01
-%define JSIMD_3DNOW 0x02
-%define JSIMD_SSE 0x04
-%define JSIMD_SSE2 0x08
-%define JSIMD_ALL (JSIMD_MMX | JSIMD_3DNOW | JSIMD_SSE | JSIMD_SSE2)
-
-; ---- jpegint.h -----------------------------------------------------------
-
-; Short forms of external names for systems with brain-damaged linkers.
-;
-%ifdef NEED_SHORT_EXTERNAL_NAMES
-%define jpeg_simd_cpu_support jSiCpuSupport
-%define jpeg_simd_os_support jSiOsSupport
-%endif ; NEED_SHORT_EXTERNAL_NAMES
-
-; ---- jmorecfg.h ----------------------------------------------------------
-;
-; BITS_IN_JSAMPLE==8 (8-bit sample values) is the only valid setting
-; on this SIMD implementation.
-;
-%define BITS_IN_JSAMPLE 8 ; Caution: Cannot be changed
-
-; Representation of a single sample (pixel element value).
-; On this SIMD implementation, this must be 'unsigned char'.
-;
-%define JSAMPLE byte ; unsigned char
-%define SIZEOF_JSAMPLE SIZEOF_BYTE ; sizeof(JSAMPLE)
-%define MAXJSAMPLE 255
-%define CENTERJSAMPLE 128
-
-; Representation of a DCT frequency coefficient.
-; On this SIMD implementation, this must be 'short'.
-;
-%define JCOEF word ; short
-%define SIZEOF_JCOEF SIZEOF_WORD ; sizeof(JCOEF)
-
-; INT32 must hold at least signed 32-bit values.
-; On this SIMD implementation, this must be 'long'.
-;
-%define INT32 dword ; long
-%define SIZEOF_INT32 SIZEOF_DWORD ; sizeof(INT32)
-
-; Datatype used for image dimensions.
-; On this SIMD implementation, this must be 'unsigned int'.
-;
-%define JDIMENSION dword ; unsigned int
-%define SIZEOF_JDIMENSION SIZEOF_DWORD ; sizeof(JDIMENSION)
-
; --------------------------------------------------------------------------
-
-%define JSAMPROW POINTER ; JSAMPLE FAR * (jpeglib.h)
-%define JSAMPARRAY POINTER ; JSAMPROW * (jpeglib.h)
-%define JSAMPIMAGE POINTER ; JSAMPARRAY * (jpeglib.h)
-%define JCOEFPTR POINTER ; JCOEF FAR * (jpeglib.h)
-%define SIZEOF_JSAMPROW SIZEOF_POINTER ; sizeof(JSAMPROW)
-%define SIZEOF_JSAMPARRAY SIZEOF_POINTER ; sizeof(JSAMPARRAY)
-%define SIZEOF_JSAMPIMAGE SIZEOF_POINTER ; sizeof(JSAMPIMAGE)
-%define SIZEOF_JCOEFPTR SIZEOF_POINTER ; sizeof(JCOEFPTR)
-
-%define POINTER dword ; general pointer type
-%define SIZEOF_POINTER SIZEOF_DWORD ; sizeof(POINTER)
-%define POINTER_BIT DWORD_BIT ; sizeof(POINTER)*BYTE_BIT
-
-%define INT dword ; signed integer type
-%define SIZEOF_INT SIZEOF_DWORD ; sizeof(INT)
-%define INT_BIT DWORD_BIT ; sizeof(INT)*BYTE_BIT
-
-%define FP32 dword ; IEEE754 single
-%define SIZEOF_FP32 SIZEOF_DWORD ; sizeof(FP32)
-%define FP32_BIT DWORD_BIT ; sizeof(FP32)*BYTE_BIT
-
-%define FP64 qword ; IEEE754 double
-%define SIZEOF_FP64 SIZEOF_QWORD ; sizeof(FP64)
-%define FP64_BIT QWORD_BIT ; sizeof(FP64)*BYTE_BIT
-
-%define FP80 tword ; IEEE754 double-extended(x86)
-%define SIZEOF_FP80 SIZEOF_TWORD ; sizeof(FP80)
-%define FP80_BIT TWORD_BIT ; sizeof(FP80)*BYTE_BIT
-
-%define MMWORD qword ; int64 (MMX register)
-%define SIZEOF_MMWORD SIZEOF_QWORD ; sizeof(MMWORD)
-%define MMWORD_BIT QWORD_BIT ; sizeof(MMWORD)*BYTE_BIT
-
-%define XMMWORD dqword ; int128 (SSE register)
-%define SIZEOF_XMMWORD SIZEOF_DQWORD ; sizeof(XMMWORD)
-%define XMMWORD_BIT DQWORD_BIT ; sizeof(XMMWORD)*BYTE_BIT
-
-%define SIZEOF_BYTE 1 ; sizeof(BYTE)
-%define SIZEOF_WORD 2 ; sizeof(WORD)
-%define SIZEOF_DWORD 4 ; sizeof(DWORD)
-%define SIZEOF_QWORD 8 ; sizeof(QWORD)
-%define SIZEOF_TBYTE 10 ; sizeof(TBYTE)
-%define SIZEOF_TWORD 10 ; sizeof(TWORD)
-%define SIZEOF_DQWORD 16 ; sizeof(DQWORD)
-
-%define BYTE_BIT 8 ; CHAR_BIT in C
-%define WORD_BIT 16 ; sizeof(WORD)*BYTE_BIT
-%define DWORD_BIT 32 ; sizeof(DWORD)*BYTE_BIT
-%define QWORD_BIT 64 ; sizeof(QWORD)*BYTE_BIT
-%define TBYTE_BIT 80 ; sizeof(TBYTE)*BYTE_BIT
-%define TWORD_BIT 80 ; sizeof(TWORD)*BYTE_BIT
-%define DQWORD_BIT 128 ; sizeof(DQWORD)*BYTE_BIT
-
-%idefine TBYTE TWORD ; NASM uses the keyword 'TWORD' instead of 'TBYTE'
-%idefine DQWORD ; currently not supported by NASM
-%idefine _MMWORD ;
-%idefine _DWORD ;
+; Common types
+;
+%define POINTER dword ; general pointer type
+%define SIZEOF_POINTER SIZEOF_DWORD ; sizeof(POINTER)
+%define POINTER_BIT DWORD_BIT ; sizeof(POINTER)*BYTE_BIT
; --------------------------------------------------------------------------
; External Symbol Name
@@ -344,4 +234,10 @@
align %1, db 0 ; filling zeros
%endmacro
+
+; --------------------------------------------------------------------------
+; Defines picked up from the C headers
+;
+%include "simd/jsimdcfg.inc"
+
; --------------------------------------------------------------------------
diff --git a/simd_README.ja.txt b/simd_README.ja.txt
deleted file mode 100644
index bc10b63..0000000
--- a/simd_README.ja.txt
+++ /dev/null
@@ -1,145 +0,0 @@
-Independent JPEG Group's JPEG software release 6b
- with x86 SIMD extension for IJG JPEG library version 1.02
- == README ==
------------------------------------------------------------
-
- ** Note **
-The accompanying documents related to x86 SIMD extension are written in
-Japanese. The English version of these documents is currently unavailable.
-I apologize for this inconvenience to international programmers.
-
-Most of the source code of the extension part is written in assembly
-language. To compile the source, you need NASM (netwide assembler).
-NASM is available from http://nasm.sourceforge.net/ or
-http://sourceforge.net/project/showfiles.php?group_id=6208 .
-
-At present, the x86 SIMD extension doesn't support 64-bit mode of
-AMD64 (x86_64).
-
-The x86 SIMD extension is an unofficial extension to the IJG JPEG
-software. Please do not send any questions about this distribution
-to the Independent JPEG Group.
-
-For conditions of distribution and use, see the IJG's README file.
-The same conditions apply to this SIMD-extended JPEG software.
-
-
-
-¢£¤³¤Î¥½¥Õ¥È¤Ï
-
- JPEG ¤Î¥µ¥Ý¡¼¥È¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¹¤¯»È¤ï¤ì¤Æ¤¤¤ë Independent JPEG Group's
- JPEG library (libjpeg ¥é¥¤¥Ö¥é¥ê) ¤Ë¡¢Intel x86 ·Ï CPU ¤Î»ý¤Ä SIMD Ì¿Îá¤ò
- ÍøÍѤ·¤¿¥³¡¼¥É(¥ë¡¼¥Á¥ó)¤ò¿·¤¿¤ËÄɲä·¡¢¹â®²½²þ¤¤·¤¿¤â¤Î¤Ç¤¹¡£
- MMX ¤ä SSE ¤Ê¤É¤Î SIMD ±é»»µ¡Ç½¤òÁõÈ÷¤·¤Æ¤¤¤ë¥×¥í¥»¥Ã¥µ¾å¤ÇÆ°ºî¤µ¤»¤ë¤È¡¢
- ¥ª¥ê¥¸¥Ê¥ëÈǤΠlibjpeg ¥é¥¤¥Ö¥é¥ê¤ÈÈæ³Ó¤·¤Æ 2¡Á3 ÇÜÄøÅ٤ήÅÙ¤ÇÆ°ºî¤·¤Þ¤¹¡£
- ¤Þ¤¿¡¢SIMD ²½¤Ë°Í¤é¤Ê¤¤¹â®²½²þ¤¤â¤¤¤¯¤Ä¤«»Ü¤µ¤ì¤Æ¤ª¤ê¡¢SIMD ±é»»¤Î»È¤¨
- ¤Ê¤¤µì·¿CPU¤Ë¤ª¤¤¤Æ¤â¡¢¥ª¥ê¥¸¥Ê¥ëÈǤÈÈæ³Ó¤·¤Æ½½¿ô¡óÄøÅٹ⮤ËÆ°ºî¤·¤Þ¤¹¡£
-
- JPEG °µ½Ì¡¿Å¸³«½èÍý¤Î¹â®²½¤òÌÜŪ¤È¤·¤Æ¤¤¤Þ¤¹¤¬¡¢Æ°ºî®ÅÙºÇÍ¥Àè¤Ç¤Ï¤Ê¤¯¡¢
- ¥ª¥ê¥¸¥Ê¥ëÈǤÈƱÅù°Ê¾å¤Î·×»»ÀºÅÙ¤ò»ý¤Ä¤³¤È¤òºÇÍ¥Àè¤Ë¹Í¤¨¤¿¥³¡¼¥É¤òºÎÍÑ
- ¤·¤Æ¤¤¤Þ¤¹¡£¼ÂºÝ¡¢DCT±é»»¤ËÉâÆ°¾®¿ôÅÀDCT¤ò»È¤Ã¤¿¾ì¹ç¡¢¤ª¤è¤Ó¡¢¤ä¤äÆüì¤Ê
- ¥µ¥ó¥×¥ê¥ó¥°Èæ(h1v2)¤ò»ý¤ÄJPEG¥Õ¥¡¥¤¥ë¤òŸ³«¤¹¤ë¾ì¹ç¤ò½ü¤¤¤Æ¤Ï¡¢
- ¥ª¥ê¥¸¥Ê¥ëÈǤȣ±¥Ó¥Ã¥È¤â°ã¤ï¤Ê¤¤·ë²Ì¤ò½Ð¤·¤Þ¤¹¡£¾åµ¤Î£²¤Ä¤ÎÎã³°¤Î¾ì¹ç¤â
- ¥ª¥ê¥¸¥Ê¥ëÈǤè¤ê¤Ï¹â²è¼Á²½(¹âÀºÅÙ²½)¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-
- SIMD Âбþ²½¤ËºÝ¤·¤Æ¤Ï¡¢²Äǽ¤Ê¸Â¤ê¡¢¥ª¥ê¥¸¥Ê¥ëÈǤΠlibjpeg ¥é¥¤¥Ö¥é¥ê¤È¤Î
- ¸ß´¹À¤¬¼º¤ï¤ì¤Ê¤¤¤è¤¦¤Ë¹Í褵¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤Û¤È¤ó¤É¤Î¾ì¹ç¡¢¥ª¥ê¥¸¥Ê¥ë
- ÈǤò¤½¤Î¤Þ¤ÞÃÖ¤´¹¤¨¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£Æäˡ¢¶¦Í¥é¥¤¥Ö¥é¥ê¤Ë´Ø¤·¤Æ¸À¤¨¤Ð¡¢
- °ìÉô¤ÎÎã³°(cygwin ¤Î¾ì¹ç)¤ò½ü¤¡¢¤½¤ì¤Ï¥ª¥ê¥¸¥Ê¥ëÈǤȥХ¤¥Ê¥ê¥ì¥Ù¥ë¤Ç¤Î
- ¾å°Ì¸ß´¹À¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤½¤Î¤Þ¤Þ¥ª¥ê¥¸¥Ê¥ëÈǤòÃÖ¤´¹¤¨¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
-
- SIMD Âбþ²½¤µ¤ì¤Æ¤¤¤ëÉôʬ¤Ï¡¢°Ê²¼¤Î¤È¤ª¤ê¡§
-
- °µ½Ì½èÍý¡§
- ¿§¶õ´ÖÊÑ´¹(RGB->YCbCr) : MMX or SSE2
- ¥À¥¦¥ó¥µ¥ó¥×¥ê¥ó¥° : MMX or SSE2
- DCT½çÊÑ´¹(¹âÀºÅÙÀ°¿ô) : MMX or SSE2
- DCT½çÊÑ´¹(¹â®À°¿ô) : MMX or SSE2
- DCT½çÊÑ´¹(ÉâÆ°¾®¿ô) : 3DNow! or SSE (À°¿ô±é»»Éô: MMX or SSE2)
- DCT·¸¿ôÎ̻Ҳ½(À°¿ô) : MMX or SSE2
- DCT·¸¿ôÎ̻Ҳ½(ÉâÆ°¾®¿ô) : 3DNow! or SSE (À°¿ô±é»»Éô: MMX or SSE2)
-
- Ÿ³«½èÍý¡§
- ¿§¶õ´ÖÊÑ´¹(YCbCr->RGB) : MMX or SSE2
- ¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥° : MMX or SSE2
- DCTµÕÊÑ´¹(¹âÀºÅÙÀ°¿ô) : MMX or SSE2
- DCTµÕÊÑ´¹(¹â®À°¿ô) : MMX or SSE2
- DCTµÕÊÑ´¹(ÉâÆ°¾®¿ô) : 3DNow! or SSE (À°¿ô±é»»Éô: MMX or SSE2)
- DCTµÕÊÑ´¹(½Ì¾®Å¸³«) : MMX or SSE2
-
- Ãí¡ËSSE2 ¤Ë¤Ä¤¤¤Æ¤Ï¡¢SIMD À°¿ô±é»»¤Î¤ß¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¡£SIMD ÇÜÀºÅÙ
- ÉâÆ°¾®¿ôÅÀ±é»»¤ÏÍøÍѤ·¤Æ¤¤¤Þ¤»¤ó¡£¤Þ¤¿¡¢SSE3 ¤Ï»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤»¤ó¡£
- ¤³¤Î JPEG ¥é¥¤¥Ö¥é¥ê¤Ë¤ª¤¤¤Æ¤Ï¡¢SSE3 ¤ò»ÈÍѤ·¤Æ¤âÆ°ºî®ÅÙ¸þ¾å¤Î
- ¸«¹þ¤ß¤¬¤Û¤È¤ó¤É¤Ê¤¤¤¿¤á¤Ç¡¢SSE3 ¤ò¥µ¥Ý¡¼¥È¤¹¤ëͽÄê¤Ï¤¢¤ê¤Þ¤»¤ó¡£
-
- ¤³¤Î¤Û¤«¤Ë¡¢¥¢¥»¥ó¥Ö¥ê¸À¸ìÈÇDCT¥ë¡¼¥Á¥ó(ÈóSIMD; ½çÊÑ´¹£³¼ï¡¿µÕÊÑ´¹£´¼ï)
- ¤Ë¤è¤ê¡¢SIMDÌ¿Îá¤Î»È¤¨¤Ê¤¤µì·¿CPU¤Ç¤â½½¿ô¡óÄøÅ٤ι⮲½¤¬´üÂԤǤ¤Þ¤¹¡£
- ¤µ¤é¤Ë¡¢Å¸³«½èÍý¤Ç¤Î¥Ï¥Õ¥Þ¥ó¥Ç¥³¡¼¥É¥ë¡¼¥Á¥ó¤Ï¡¢SIMD ²½¤Ë°Í¤é¤Ê¤¤ÊýË¡¤Ç
- ¹â®²½²þ¤¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-
-
-¢£Âбþ¤·¤Æ¤¤¤ë¥×¥é¥Ã¥È¥Õ¥©¡¼¥à
-
- Intel x86 CPU ¤Ë¸Çͤε¡Ç½¤òÍøÍѤ·¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¥ª¥ê¥¸¥Ê¥ëÈǤȤϰۤʤꡢ
- Intel x86 CPU ¤ª¤è¤Ó¤½¤Î¸ß´¹ CPU ¤òºÎÍѤ·¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤Ë¸Â¤é¤ì¤Þ¤¹¡£
- PowerPC ¤Ê¤É¤Î Intel x86 ·Ï°Ê³°¤Î¥·¥¹¥Æ¥à¤Ë¤ÏÂбþ¤·¤Æ¤¤¤Þ¤»¤ó¡£
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ¶ñÂÎŪ¤Ë¤Ï¡¢80386 °Ê¹ß¤Î Intel x86 CPU ¤ª¤è¤Ó¤½¤Î¸ß´¹ CPU ¤òºÎÍѤ·¤Æ¤¤¤ë
- ¥Ï¡¼¥É¥¦¥§¥¢¤Ç¡¢¤«¤Ä¡¢32bit¥Õ¥é¥Ã¥È¥¢¥É¥ì¥¹¥â¡¼¥É(Êݸî¥â¡¼¥É)¤ò»ÈÍѤ·¤Æ
- ¤¤¤ë¥×¥é¥Ã¥È¥Õ¥©¡¼¥à(OS)¤¬ÂоݤǤ¹¡£¤³¤ì¤Ë¤Ï¡¢Win32 (Windows 9x·Ï/NT·Ï)
- ¤ä³Æ¼ï PC-UNIX (linux ¤ä xBSD ¥Õ¥¡¥ß¥ê¤Ê¤É) ¤Ê¤É¤¬³ºÅö¤·¤Þ¤¹¡£¤Ê¤ª¡¢
- AMD64 (EM64T) ¤Î64bit¥â¡¼¥É´Ä¶¤Ë¤ÏÂбþ¤·¤Æ¤¤¤Þ¤»¤ó¡£¤´Ãí°Õ¤¯¤À¤µ¤¤¡£
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-¢£¤³¤Î SIMD ³ÈÄ¥ÈÇ IJG JPEG library ¸ÇͤÎÀ©¸Â
-
- ¥ª¥ê¥¸¥Ê¥ëÈǤΠIJG JPEG library ¤Ç¤Ï¡¢¥³¥ó¥Ñ¥¤¥ë»þ¤Î¥ª¥×¥·¥ç¥ó¤Ç¡¢
- 8bitÀºÅÙJPEG ¤È 12bitÀºÅÙJPEG ¤ÎξÊý¤ËÂбþ¤·¤Þ¤¹¤¬¡¢¤³¤Î SIMD ³ÈÄ¥ÈǤÏ
- 8bitÀºÅÙJPEG ¤Î¤ß¤ÎÂбþ¤Ç¡¢12bitÀºÅÙJPEG ¤Ë¤ÏÂбþ¤·¤Þ¤»¤ó¡£¤È¤Ï¤¤¤¨¡¢
- 12bitÀºÅÙJPEG ¤Ï°åÎÅÍѤʤɤÎÆüìʬÌî¤ò½ü¤¤¤ÆËؤɻȤï¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢
- ÌäÂê¤Ï¾¯¤Ê¤¤¤È»×¤¤¤Þ¤¹¡£
-
-
-¢£»È¤¤Êý
-
- ¥Þ¥Ë¥å¥¢¥ë¤Ï¡¢°Ê²¼¤Î¥Õ¥¡¥¤¥ë¤Ëʬ¤«¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¼ÂºÝ¤Î»È¤¤Êý¤Ê¤É¤Ë
- ¤Ä¤¤¤Æ¤Ï¡¢¤½¤Á¤é¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- simd_README.ja.txt - ¤³¤Î¥Õ¥¡¥¤¥ë
- simd_filelist.ja.txt - ¼ýÏ¿¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë¥ê¥¹¥È
- simd_install.ja.txt - ¥³¥ó¥Ñ¥¤¥ë¤Î»ÅÊý
- simd_internal.ja.txt - SIMD ³ÈÄ¥Éôʬ¤Î¾ÜºÙ
- simd_cdjpeg.ja.txt - SIMD ÈÇ cjpeg/djpeg ¤Ë¸Çͤε¡Ç½¤Î²òÀâ
- simd_changes.ja.txt - SIMD ³ÈÄ¥Éôʬ¤Î²þÈÇÍúÎò
-
-
-¢£»ÈÍѾò·ï¡¦¥µ¥Ý¡¼¥È
-
- ¤³¤Î SIMD ³ÈÄ¥ÈÇ IJG JPEG software ¤Î»ÈÍѾò·ï¤Ë¤Ä¤¤¤Æ¤Ï¡¢¥ª¥ê¥¸¥Ê¥ëÈǤÎ
- IJG JPEG software ¤Î»ÈÍѾò·ï¤¬Å¬ÍѤµ¤ì¤Þ¤¹¡£¾Ü¤·¤¯¤Ï¡¢Æ±º¤Î README
- ¥Õ¥¡¥¤¥ë(±Ñʸ)¤Î LEGAL ISSUES ¤Î¹à¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- ¾åµ¤Î»ÈÍѾò·ï¤ÎÆâÍƤ竤êÊÖ¤·¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢¤³¤Î¥½¥Õ¥È¥¦¥§¥¢¤Ï¡Ö¸½¾õ¤Î
- ¤Þ¤Þ¤Ç¡×Ä󶡤µ¤ì¤Æ¤¤¤ë¤â¤Î¤Ç¡¢¾¦¶ÈŪ¤Ê»ÈÍѲÄǽÀ¡¢¤ª¤è¤ÓÆÃÄê¤ÎÌÜŪ¤Ë
- ÂФ¹¤ëŬ¹çÀ¤Ê¤É¤â´Þ¤á¡¢¤¤¤«¤Ê¤ëÊݾڤ⤢¤ê¤Þ¤»¤ó¡£
- ¤Þ¤¿¡¢¸¶ºî¼Ô(The Independent JPEG Group)¤â²þ¤¼Ô(MIYASAKA Masaru)¤â¡¢
- »öͳ¤Î¤¤¤«¤ó¤òÌä¤ï¤º¡¢ËÜ¥½¥Õ¥È¥¦¥§¥¢¤Î»ÈÍѤˤè¤Ã¤ÆȯÀ¸¤·¤¿Ç¡²¿¤Ê¤ë»³²¤Ë
- ¤Ä¤¤¤Æ¤â¡¢°ìÀÚ¤½¤ÎÀÕǤ¤òÉé¤ï¤Ê¤¤¤â¤Î¤È¤·¤Þ¤¹¡£
-
- ¤³¤Î SIMD ³ÈÄ¥ÈÇ IJG JPEG software ¤Ï¡¢¥ª¥ê¥¸¥Ê¥ë³«È¯¸µ¤Î IJG ¤È¤Ï´Ø·¸
- ¤Ê¤¯¡¢Æȼ«¤Ë³ÈÄ¥¤ò¹Ô¤Ê¤Ã¤¿¤â¤Î¤Ç¤¹¡£¤Ç¤¹¤Î¤Ç¡¢¤³¤Î SIMD ³ÈÄ¥ÈÇ IJG JPEG
- software ¤Ë´Ø¤¹¤ë¼ÁÌä¤ò¡¢¥ª¥ê¥¸¥Ê¥ë³«È¯¸µ (The Independent JPEG Group)
- ¤ËÁ÷¤é¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£
-
- ¤³¤Î SIMD ³ÈÄ¥ÈÇ IJG JPEG software ¤Ë´Ø¤·¤Æ¤Ï¡¢¸¶Â§¤È¤·¤Æ¥Î¡¼¥µ¥Ý¡¼¥È¤È
- ¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹¡£¥á¡¼¥ë¤Ê¤É¤Ç¤´¼ÁÌä¤Ê¤É¤ò¤¤¤¿¤À¤¤Þ¤·¤Æ¤â¡¢¾ï¤Ë²¿¤é¤«
- ¤ÎÊÖÅú¤¬¤Ç¤¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤Î¤Ç¡¢¤´¾µÃΤª¤¤¯¤À¤µ¤¤¡£
- Æäˡ¢¡Ê¥ª¥ê¥¸¥Ê¥ë¤Î±Ñʸ¥Þ¥Ë¥å¥¢¥ë¤ò´Þ¤á¡ËƱº¤Î¥Þ¥Ë¥å¥¢¥ëÎà¤Ë²óÅú¤¬
- ½ñ¤¤¤Æ¤¢¤ë¼ÁÌä¤ä¡¢»ÈÍѼԤΥ½¥Õ¥È¥¦¥§¥¢µ»½Ñ¼Ô¤È¤·¤Æ¤Îµ»ÎÌÉÔ¡¦·Ð¸³ÉÔ¤Ë
- ´Ø¤ï¤ë¼ÁÌä¡¢¼ÁÌä¤ÎÍ×ÎΤòÆÀ¤Ê¤¤¼ÁÌä¤Ê¤É¤Ë¤Ä¤¤¤Æ¤Ï¡¢²óÅú¤ò¤¤¤¿¤·¤Þ¤»¤ó¤Î¤Ç¡¢
- ¤¢¤·¤«¤é¤º¤´Î»¾µ¤¯¤À¤µ¤¤¡£
-
-
-
- E-Mail Address : alkaid@coral.ocn.ne.jp (µÜºä ¸/MIYASAKA Masaru)
-[EOF]
diff --git a/simd_cdjpeg.ja.txt b/simd_cdjpeg.ja.txt
deleted file mode 100644
index 941a15a..0000000
--- a/simd_cdjpeg.ja.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-Independent JPEG Group's JPEG software release 6b
- with x86 SIMD extension for IJG JPEG library version 1.02
- == CDJPEG ==
------------------------------------------------------------
-
-¢£¤³¤Î¥Õ¥¡¥¤¥ë¤Ï
-
- ¤³¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢SIMD ÈǤΠcjpeg / djpeg ¤Ë¸Çͤε¡Ç½¤ò²òÀ⤷¤Þ¤¹¡£
-
- ¢£ SIMD Æ°ºî¥â¡¼¥É¾ðÊó (-v ¥ª¥×¥·¥ç¥ó)
- ¢£ ÆÃÄê¤Î SIMD ±é»»¤ò»ÈÍѤ·¤Ê¤¤¤è¤¦¤Ë¤¹¤ë (-noXXX ¥ª¥×¥·¥ç¥ó)
- ¢£ GIF ·Á¼°¤ÎÆɤ߹þ¤ß¡¿½ñ¤½Ð¤· (djpeg ¤Î -gif ¥ª¥×¥·¥ç¥ó)
-
-
-¢£ SIMD Æ°ºî¥â¡¼¥É¾ðÊó (-v ¥ª¥×¥·¥ç¥ó)
-
- ¤³¤Î SIMD ÈÇ cjpeg / djpeg ¤Ç¤Ï¡¢-v ¥ª¥×¥·¥ç¥ó¤ò¤Ä¤±¤Æµ¯Æ°¤¹¤ë¤È¡¢°Ê²¼
- ¤Î¤è¤¦¤Ê SIMD Æ°ºî¥â¡¼¥É¾ðÊ󤬥С¼¥¸¥ç¥ó¾ðÊó¤È¶¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£
-
- Independent JPEG Group's DJPEG, version 6b 27-Mar-1998
- Copyright (C) 1998, Thomas G. Lane
-
- x86 SIMD extension for IJG JPEG library, version 1.02
-
- SIMD instructions supported by the system : MMX 3DNow! SSE SSE2
-
- === SIMD Operation Modes ===
- Accurate integer DCT (-dct int) : SSE2
- Fast integer DCT (-dct fast) : SSE2
- Floating-point DCT (-dct float) : SSE
- Reduced-size DCT (-scale M/N) : SSE2
- High-quality upsampling (default) : SSE2
- Low-quality upsampling (-nosmooth) : SSE2
- Colorspace conversion (YCbCr->RGB) : SSE2
-
- "SIMD instructions supported by the system" ¤Î¹àÌܤÇÎóµó¤µ¤ì¤ë¤Î¤Ï¡¢
- ¥·¥¹¥Æ¥à(CPU/OS)¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë SIMD ±é»»¤Î¼ïÎà¤Ç¤¹¡£¤Ê¤ª¡¢¤³¤Î
- ¥½¥Õ¥È¤Ç¤Ï SSE3 ¤Ï»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤»¤ó¤· SSE3 ¤Î¥µ¥Ý¡¼¥È¤Î¸¡½Ð¤â¹Ô¤Ê¤ï¤ì
- ¤Þ¤»¤ó¤Î¤Ç¡¢SSE3 ¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Æ¤â¤³¤Î¹àÌܤˤϸ½¤ì¤Þ¤»¤ó¡£
-
- ¤½¤Î²¼¤Î "SIMD Operation Modes" ¤Ï¡¢³Æ½èÍýÃʳ¬¤Ç»ÈÍѤµ¤ì¤ë SIMD ±é»»¤Î
- ¼ïÎà¤Ç¤¹¡£Floating-point DCT ¤Ç¤Ï 3DNow! ¤« SSE ¡¢¤½¤ì°Ê³°¤Î¤È¤³¤í¤Ç¤Ï
- MMX ¤« SSE2 ¤¬ÁªÂò¤µ¤ì¤Þ¤¹¡£°ìÈ̤ˡ¢SSE/SSE2 ¤ÎÊý¤¬ MMX/3DNow! ¤è¤ê¤â
- ¹âÀǽ¤È¤µ¤ì¤ë¤Î¤Ç¡¢¤³¤ÎÁÐÊý¤¬ÍøÍѲÄǽ¤Ê¾ì¹ç¤Ï SSE/SSE2 ¤¬Í¥ÀèŪ¤ËÁªÂò
- ¤µ¤ì¤Þ¤¹¡£
-
-
-¢£ ÆÃÄê¤Î SIMD ±é»»¤ò»ÈÍѤ·¤Ê¤¤¤è¤¦¤Ë¤¹¤ë (-noXXX ¥ª¥×¥·¥ç¥ó)
-
- ¤³¤Î SIMD ÈÇ cjpeg / djpeg ¤Ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ê¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤³¤È¤Ç¡¢
- ÆÃÄê¤Î SIMD ±é»»¤ò»ÈÍѤ·¤Ê¤¤¤è¤¦¤Ë¤Ç¤¤Þ¤¹¡£
-
- -nommx MMX ¤ò»ÈÍѤ·¤Ê¤¤
- -no3dnow 3DNow! ¤ò»ÈÍѤ·¤Ê¤¤
- -nosse SSE ¤ò»ÈÍѤ·¤Ê¤¤
- -nosse2 SSE2 ¤ò»ÈÍѤ·¤Ê¤¤
- -nosimd ¤¹¤Ù¤Æ¤Î SIMD ±é»»¤ò»ÈÍѤ·¤Ê¤¤
-
- ¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢cjpeg/djpeg ¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó¤ÎÀèƬ¤Ë»ØÄꤹ¤ë¤è¤¦
- ¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
-
-
-¢£ GIF ·Á¼°¤ÎÆɤ߹þ¤ß¡¿½ñ¤½Ð¤· (djpeg ¤Î -gif ¥ª¥×¥·¥ç¥ó)
-
- ¥ª¥ê¥¸¥Ê¥ëÈÇ cjpeg/djpeg ¤Î version 6b ¤Ç¤Ï¡¢Æõö¾å¤ÎÌäÂ꤫¤é¡¢GIF ·Á¼°
- ²èÁü¤ÎÆɤ߹þ¤ß¡¿½ñ¤½Ð¤·¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Ê¤¯¤Ê¤Ã¤Æ¤¤¤Þ¤·¤¿¡£¤Ç¤¹¤¬¡¢
- GIF ¤Ë´Ø¤¹¤ëÆõö¤¬ 2003¡Á2004 ǯ¤Ë¤«¤±¤ÆÀ¤³¦Åª¤Ë´ü¸ÂÀÚ¤ì¤Ë¤Ê¤Ã¤¿¤¿¤á¡¢
- Åö SIMD ÈÇ¤Ç¤Ï GIF ·Á¼°¤ÎÆɤ߹þ¤ß¡¿½ñ¤½Ð¤·¤òÉü³è¤µ¤»¤Æ¤¢¤ê¤Þ¤¹¡£
-
- ;Ã̤Ǥ¹¤¬¡¢Åö SIMD ÈÇ¤Ç GIF ·Á¼°¤ÎÆɤ߹þ¤ß¡¿½ñ¤½Ð¤·¤Ë»ÈÍѤ·¤Æ¤¤¤ë
- ¥â¥¸¥å¡¼¥ë¤Ï¡¢µìÈǤǤ¢¤ë version 6a ¤Î¤â¤Î¤òήÍѤ·¤Æ¤¤¤Þ¤¹¡£
-
-
-
-[EOF]
diff --git a/simd_changes.ja.txt b/simd_changes.ja.txt
deleted file mode 100644
index b256002..0000000
--- a/simd_changes.ja.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Independent JPEG Group's JPEG software release 6b
- with x86 SIMD extension for IJG JPEG library version 1.02
- == CHANGES ==
------------------------------------------------------------
-
-IJG R6b with x86SIMD V1.02 (2006-02-04)
----------------------------------------
-* x86 ÈÇ Darwin ¤ËÂбþ¤·¤Þ¤·¤¿¡£Æ°ºî³Îǧ¤Ï Darwin 8.0.1 for x86 ¤Ë¤Æ
- ¹Ô¤Ê¤¤¤Þ¤·¤¿¡£x86 ÈÇ Mac OS X ¤Ç¤â¡¢Æ°ºî¤¹¤ë¤â¤Î¤È»×¤ï¤ì¤Þ¤¹¡£
- ¤Þ¤¿¡¢Solaris 10 ¤Ç¤ÎÆ°ºî³Îǧ¤â¹Ô¤Ê¤¤¤Þ¤·¤¿¡£
-
-IJG R6b with x86SIMD V1.01 (2006-01-26)
----------------------------------------
-* jsimdgcc.c ¤ò»È¤Ã¤¿¤È¤¡¢NEED_SHORT_EXTERNAL_NAMES ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤È
- Àµ¾ï¤Ë¥ê¥ó¥¯¤Ç¤¤Ê¤¤¥Ð¥°¤ò½¤Àµ¤·¤Þ¤·¤¿¡£
-* °µ½Ì¦¤Î¥³¡¼¥É¤Î°ìÉô(jcsammmx.asm, jcsamss2.asm, jcqnt3dn.asm)¤Ë¤ä¤ä
- ¾éĹ¤Ê²Õ½ê¤¬¤¢¤Ã¤¿¤Î¤Ç¡¢¤³¤ì¤ò½¤Àµ¤·¤Þ¤·¤¿¡£
-
-IJG R6b with x86SIMD V1.0 (2006-01-10)
---------------------------------------
-* ºÇ½é¤Î¸ø³«ÈÇ¡£
-
-
-[EOF]
diff --git a/simd_filelist.ja.txt b/simd_filelist.ja.txt
deleted file mode 100644
index 4bee431..0000000
--- a/simd_filelist.ja.txt
+++ /dev/null
@@ -1,261 +0,0 @@
-Independent JPEG Group's JPEG software release 6b
- with x86 SIMD extension for IJG JPEG library version 1.02
- == FILELIST ==
------------------------------------------------------------
-
-¢£¤³¤Î¥Õ¥¡¥¤¥ë¤Ï
-
- ¤³¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢SIMD ÈÇ IJG JPEG software ¤ÎÇÛÉÛ¥¢¡¼¥«¥¤¥Ö¤Ë¼ý¤á¤é¤ì¤Æ
- ¤¤¤ë³Æ¥Õ¥¡¥¤¥ë¤Î³µÍפò²òÀ⤷¤Þ¤¹¡£¤Ê¤ª¡¢¤³¤³¤Ç¤Ï x86 SIMD extension ¤Ç
- ¿·¤¿¤ËÄɲ䵤줿¥Õ¥¡¥¤¥ë¤È¡¢x86 SIMD extension ¤Ç²þÊѤ¬²Ã¤¨¤é¤ì¤Æµ¡Ç½¡¿
- Ìò³ä¤¬¥ª¥ê¥¸¥Ê¥ëÈǤȤϰۤʤë¥Õ¥¡¥¤¥ë¤Î¤ß¤ò²òÀ⤷¤Þ¤¹¡£¤½¤ì°Ê³°¤Î¥Õ¥¡¥¤¥ë
- ¤Ë¤Ä¤¤¤Æ¤Ï¡¢¥ª¥ê¥¸¥Ê¥ëÈǤΠfilelist.doc (±Ñʸ) ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- ¢£¥Þ¥Ë¥å¥¢¥ëÎà
- ¢£configure ¥¹¥¯¥ê¥×¥È¤Ë´Ø·¸¤¹¤ë¥Õ¥¡¥¤¥ë
- ¢£Microsoft Visual C++ 6.0 ÍÑ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë·² (vc6proj/)
- ¢£ÆÃÄê¤Î¥³¥ó¥Ñ¥¤¥éÍѤΠjconfig.h ¤È Makefile
- ¢£¥½¡¼¥¹¥Õ¥¡¥¤¥ë
- ¡ü x86 SIMD extension ¤Ç¿·¤¿¤ËÄɲ䵤줿¥Õ¥¡¥¤¥ë
- ¡ü x86 SIMD extension ¤Ç²þÊѤ¬²Ã¤¨¤é¤ì¤¿¥Õ¥¡¥¤¥ë
- ¢£Ê£¿ô¥Õ¥¡¥¤¥ëÂбþÈǤΠcjpeg/djpeg (altui/)
- ¢£SIMD ÈǤǤϻȤï¤ì¤Ê¤¤¥Õ¥¡¥¤¥ë·² (unused/)
-
-
-¢£¥Þ¥Ë¥å¥¢¥ëÎà
-
- °Ê²¼¤Î SIMD ÈǤΥޥ˥奢¥ë¤Î¾¤Ë¡¢¥ª¥ê¥¸¥Ê¥ëÈǤαÑʸ¥Þ¥Ë¥å¥¢¥ë¤â
- ¤½¤Î¤Þ¤Þ¼ýÏ¿¤·¤Æ¤¢¤ê¤Þ¤¹¡£Ê»¤»¤Æ»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- simd_README.ja.txt ¼ç¥Þ¥Ë¥å¥¢¥ë(x86 SIMD extension ¤Î³µÍפʤÉ)
- simd_filelist.ja.txt SIMD ÈÇ IJG JPEG software ¤Î¥Õ¥¡¥¤¥ë¥ê¥¹¥È
- simd_install.ja.txt SIMD ÈÇ libjpeg ¥é¥¤¥Ö¥é¥ê¤Î¥³¥ó¥Ñ¥¤¥ë¤Î»ÅÊý
- simd_internal.ja.txt SIMD ÈÇ libjpeg ¥é¥¤¥Ö¥é¥ê¤Î¡¢SIMD ³ÈÄ¥Éôʬ¤Î¾ÜºÙ
- simd_cdjpeg.ja.txt SIMD ÈǤΠcjpeg / djpeg ¤Ë¸Çͤε¡Ç½¤Î²òÀâ
- simd_changes.ja.txt SIMD ÈÇ libjpeg ¥é¥¤¥Ö¥é¥ê¤Î²þÈÇÍúÎò
-
-
-¢£ configure ¥¹¥¯¥ê¥×¥È¤Ë´Ø·¸¤¹¤ë¥Õ¥¡¥¤¥ë
-
- UNIX ´Ä¶¤Ç configure ¥¹¥¯¥ê¥×¥È¤òÁö¤é¤»¤ë¾ì¹ç¤ËɬÍפȤʤë¥Õ¥¡¥¤¥ë·²
- ¤Ç¤¹¡£Èó UNIX ´Ä¶¤Ç¤Ï¡¢ºï½ü¤·¤Æ¤â¤«¤Þ¤¤¤Þ¤»¤ó¡£
-
- configure configure ¥¹¥¯¥ê¥×¥ÈËÜÂÎ
- config.ver configure ¤«¤é¸Æ¤Ó½Ð¤µ¤ì¤ë¥¹¥¯¥ê¥×¥È¤Ç¡¢¶¦Í¥é¥¤¥Ö¥é¥ê¤Î
- ¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÄêµÁ¤·¤Æ¤¤¤Þ¤¹
- ltmain.sh configure ¤Î¥µ¥Ý¡¼¥È¥¹¥¯¥ê¥×¥È (from GNU libtool)
- config.guess ¡·
- config.sub ¡·
- install-sh install ¥³¥Þ¥ó¥É¤¬¤Ê¤¤¾ì¹ç¤ÎÂåÍÑ¥¹¥¯¥ê¥×¥È
- nasm_lt.sh nasm ¤ò GNU libtool ¤Ç»È¤¦¾ì¹ç¤Î¥é¥Ã¥Ñ¡¦¥¹¥¯¥ê¥×¥È
- jconfig.cfg configure ¤¬À¸À®¤¹¤ë jconfig.h ¤Î¿÷·¿¥Õ¥¡¥¤¥ë
- makefile.cfg configure ¤¬À¸À®¤¹¤ë Makefile ¤Î¿÷·¿¥Õ¥¡¥¤¥ë
- configure.in configure ¥¹¥¯¥ê¥×¥È¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë (for GNU autoconf)
- aclocal.m4 ¡·
- libjpeg.spec RPM ¤òºÎÍѤ·¤Æ¤¤¤ë linux ¥·¥¹¥Æ¥à¸þ¤±¤Î spec ¥Õ¥¡¥¤¥ë
-
-
-¢£ Microsoft Visual C++ 6.0 ÍÑ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë·² (vc6proj/)
-
- ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ò»È¤¦¾ì¹ç¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬¤¢¤ë°ì¤Ä¾å¤Î¥Õ¥©¥ë¥À¤Ë
- ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ò¤¹¤Ù¤Æ°ÜÆ°¤·¤Æ¤¯¤À¤µ¤¤¡£¾Ü¤·¤¯¤Ï¡¢simd_install.ja.txt
- ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- Visual C++ 6.0 °Ê¹ß¤ÎÅý¹ç³«È¯´Ä¶(DevStudio)¤Î¾ì¹ç¤Ï¡¢¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë
- ¤òÊÑ´¹(¥¤¥ó¥Ý¡¼¥È)¤·¤Æ»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
-
- vc6proj/libjpeg.dsw ¥×¥í¥¸¥§¥¯¥È¡¦¥ï¡¼¥¯¥¹¥Ú¡¼¥¹
- vc6proj/makecfg.dsp libjpeg.dsp (libjpeg.lib) ¤Î¥Ó¥ë¥É¤ËɬÍפÊ
- ÀßÄê¥Õ¥¡¥¤¥ë jsimdcfg.inc ¤òºî¤ë
- vc6proj/libjpeg.dsp libjpeg.lib ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
- vc6proj/cjpeg.dsp cjpeg.exe ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
- vc6proj/djpeg.dsp djpeg.exe ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
- vc6proj/jpegtran.dsp jpegtran.exe ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
- vc6proj/rdjpgcom.dsp rdjpgcom.exe ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
- vc6proj/wrjpgcom.dsp wrjpgcom.exe ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
- vc6proj/apptest.dsp cjpeg, djpeg, jpegtran ¤ÎÆ°ºî¥Æ¥¹¥È(make test)
- vc6proj/jconfig.h VC++ ÍѤΠjconfig.h (jconfig.vc ¤ÈƱ¤¸¤â¤Î)
-
-
-¢£ÆÃÄê¤Î¥³¥ó¥Ñ¥¤¥éÍѤΠjconfig.h ¤È Makefile
-
- ¾Ü¤·¤¯¤Ï¡¢simd_install.ja.txt ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢
- SIMD ²½¤Ëȼ¤Ã¤Æ¿·¤¿¤ËÄɲ䵤줿¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ë´Ø¤¹¤ëµ½Ò¤¬Äɲ䵤ì¤Æ
- ¤¤¤Þ¤¹¤«¤é¡¢¥ª¥ê¥¸¥Ê¥ëÈǤËÉÕ°¤Î jconfig.* ¤È Makefile.* ¤Ï¡¢
- ¤³¤Î SIMD ÈǤǤϻÈÍѤǤ¤Þ¤»¤ó¡£
-
- jconfig.bc5 Borland C++ Compiler 5.5 (win32) ÍѤΠjconfig.h
- makefile.bc5 Borland C++ Compiler 5.5 (win32) ÍѤΠMakefile
- jconfig.dj DJGPP v2.0 ÍѤΠjconfig.h
- makefile.dj DJGPP v2.0 ÍѤΠMakefile
- jconfig.mgw MinGW ÍѤΠjconfig.h
- makefile.mgw MinGW ÍѤΠMakefile (ÀÅŪ JPEG ¥é¥¤¥Ö¥é¥ê¤òºîÀ®)
- makefile.mgwdll MinGW ÍѤΠMakefile (DLL ÈÇ JPEG ¥é¥¤¥Ö¥é¥ê¤òºîÀ®)
- jconfig.vc VC++ ÍѤΠjconfig.h
- makefile.vc VC++ ÍѤΠMakefile (ÀÅŪ JPEG ¥é¥¤¥Ö¥é¥ê¤òºîÀ®)
- makefile.vcdll VC++ ÍѤΠMakefile (DLLÈÇ JPEG ¥é¥¤¥Ö¥é¥ê¤òºîÀ®)
- jconfig.linux linux ÍѤΠjconfig.h (Ãí¡§configure ¤Î»ÈÍѤò¿ä¾©)
- makefile.linux linux ÍѤΠMakefile (Ãí¡§configure ¤Î»ÈÍѤò¿ä¾©)
-
- °Ê²¼¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢¾åµ°Ê³°¤Î¥³¥ó¥Ñ¥¤¥é¤ËÂбþ¤¹¤ë jconfig.h ¤È Makefile
- ¤ò¿·¤¿¤ËºîÀ®¤¹¤ë¾ì¹ç¤Î¿÷·¿¤È¤Ê¤ë¥Õ¥¡¥¤¥ë¤Ç¤¹¡£¥ª¥ê¥¸¥Ê¥ëÈǤˤ⸺ߤ·¤Þ¤¹
- ¤¬¡¢SIMD ²½¤Ëȼ¤¦Êѹ¹¤¬»Ü¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-
- ckconfig.c jconfig.h ¤òÀ¸À®¤¹¤ë¥×¥í¥°¥é¥à
- makefile.ansi Makefile ¤Î¿÷·¿¥Õ¥¡¥¤¥ë (ANSI ¥³¥ó¥Ñ¥¤¥éÍÑ)
- makefile.unix Makefile ¤Î¿÷·¿¥Õ¥¡¥¤¥ë (Èó ANSI ¥³¥ó¥Ñ¥¤¥éÍÑ)
-
-
-¢£¥½¡¼¥¹¥Õ¥¡¥¤¥ë
-
- ¡ü x86 SIMD extension ¤Ç¿·¤¿¤ËÄɲ䵤줿¥Õ¥¡¥¤¥ë
-
- jccolmmx.asm RGB->YCbCr ¿§¶õ´ÖÊÑ´¹ (MMX)
- jccolss2.asm RGB->YCbCr ¿§¶õ´ÖÊÑ´¹ (SSE2)
- jcsammmx.asm ¥À¥¦¥ó¥µ¥ó¥×¥ê¥ó¥° (MMX)
- jcsamss2.asm ¥À¥¦¥ó¥µ¥ó¥×¥ê¥ó¥° (SSE2)
-
- jdcolmmx.asm YCbCr->RGB ¿§¶õ´ÖÊÑ´¹ (MMX)
- jdcolss2.asm YCbCr->RGB ¿§¶õ´ÖÊÑ´¹ (SSE2)
- jdsammmx.asm ¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥° (MMX)
- jdsamss2.asm ¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥° (SSE2)
- jdmermmx.asm ¿§¶õ´ÖÊÑ´¹¡¿¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥°Åý¹ç (MMX)
- jdmerss2.asm ¿§¶õ´ÖÊÑ´¹¡¿¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥°Åý¹ç (SSE2)
-
- jcqntint.asm ¥Ç¡¼¥¿ÊÑ´¹¤ÈÎ̻Ҳ½ (ÈóSIMD, À°¿ô)
- jcqntflt.asm ¥Ç¡¼¥¿ÊÑ´¹¤ÈÎ̻Ҳ½ (ÈóSIMD, ÉâÆ°¾®¿ôÅÀ)
- jcqntmmx.asm ¥Ç¡¼¥¿ÊÑ´¹¤ÈÎ̻Ҳ½ (MMX, À°¿ô)
- jcqnts2i.asm ¥Ç¡¼¥¿ÊÑ´¹¤ÈÎ̻Ҳ½ (SSE2, À°¿ô)
- jcqnt3dn.asm ¥Ç¡¼¥¿ÊÑ´¹¤ÈÎ̻Ҳ½ (3DNow! & MMX, ÉâÆ°¾®¿ôÅÀ)
- jcqntsse.asm ¥Ç¡¼¥¿ÊÑ´¹¤ÈÎ̻Ҳ½ (SSE & MMX, ÉâÆ°¾®¿ôÅÀ)
- jcqnts2f.asm ¥Ç¡¼¥¿ÊÑ´¹¤ÈÎ̻Ҳ½ (SSE & SSE2, ÉâÆ°¾®¿ôÅÀ)
-
- jfdctint.asm ¹âÀºÅÙÀ°¿ô(½çÊý¸þ)DCT (ÈóSIMD)
- jfmmxint.asm ¹âÀºÅÙÀ°¿ô(½çÊý¸þ)DCT (MMX)
- jfss2int.asm ¹âÀºÅÙÀ°¿ô(½çÊý¸þ)DCT (SSE2)
- jfdctfst.asm ¹â®À°¿ô(½çÊý¸þ)DCT (ÈóSIMD)
- jfmmxfst.asm ¹â®À°¿ô(½çÊý¸þ)DCT (MMX)
- jfss2fst.asm ¹â®À°¿ô(½çÊý¸þ)DCT (SSE2)
- jfdctflt.asm ÉâÆ°¾®¿ôÅÀ(½çÊý¸þ)DCT (ÈóSIMD)
- jf3dnflt.asm ÉâÆ°¾®¿ôÅÀ(½çÊý¸þ)DCT (3DNow!)
- jfsseflt.asm ÉâÆ°¾®¿ôÅÀ(½çÊý¸þ)DCT (SSE)
-
- jidctint.asm ¹âÀºÅÙÀ°¿ô(µÕÊý¸þ)DCT (ÈóSIMD)
- jimmxint.asm ¹âÀºÅÙÀ°¿ô(µÕÊý¸þ)DCT (MMX)
- jiss2int.asm ¹âÀºÅÙÀ°¿ô(µÕÊý¸þ)DCT (SSE2)
- jidctfst.asm ¹â®À°¿ô(µÕÊý¸þ)DCT (ÈóSIMD)
- jimmxfst.asm ¹â®À°¿ô(µÕÊý¸þ)DCT (MMX)
- jiss2fst.asm ¹â®À°¿ô(µÕÊý¸þ)DCT (SSE2)
- jidctflt.asm ÉâÆ°¾®¿ôÅÀ(µÕÊý¸þ)DCT (ÈóSIMD)
- ji3dnflt.asm ÉâÆ°¾®¿ôÅÀ(µÕÊý¸þ)DCT (3DNow! & MMX)
- jisseflt.asm ÉâÆ°¾®¿ôÅÀ(µÕÊý¸þ)DCT (SSE & MMX)
- jiss2flt.asm ÉâÆ°¾®¿ôÅÀ(µÕÊý¸þ)DCT (SSE & SSE2)
- jidctred.asm ½Ì¾®Å¸³«ÍÑ(µÕÊý¸þ)DCT (ÈóSIMD)
- jimmxred.asm ½Ì¾®Å¸³«ÍÑ(µÕÊý¸þ)DCT (MMX)
- jiss2red.asm ½Ì¾®Å¸³«ÍÑ(µÕÊý¸þ)DCT (SSE2)
-
- jsimdcpu.asm CPU ¤Î SIMD ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯
- jsimddjg.asm OS ¤Î SIMD ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯ (for DJGPP V.2)
- jsimdw32.asm OS ¤Î SIMD ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯ (for Win32)
- jsimdgcc.c OS ¤Î SIMD ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯ (for gcc)
-
- makecfg.c ¥¢¥»¥ó¥Ö¥ê¸À¸ìÍÑÀßÄê¥Õ¥¡¥¤¥ë jsimdcfg.inc ¤òºîÀ®¤¹¤ë
-
- jsimdext.inc ¥¢¥»¥ó¥Ö¥ê¸À¸ì¥½¡¼¥¹ÍѤζ¦Ḁ̈إåÀ¥Õ¥¡¥¤¥ë
- jdct.inc DCT ´ØÏ¢¥Õ¥¡¥¤¥ëÍѤΥإåÀ¥Õ¥¡¥¤¥ë
- jcolsamp.inc ¿§¶õ´ÖÊÑ´¹¡¿¥µ¥ó¥×¥ê¥ó¥°´ØÏ¢¥Õ¥¡¥¤¥ëÍѤΥإåÀ¥Õ¥¡¥¤¥ë
-
- jcolsamp.h ¿§¶õ´ÖÊÑ´¹¡¿¥µ¥ó¥×¥ê¥ó¥°´ØÏ¢¥Õ¥¡¥¤¥ëÍѤΥإåÀ¥Õ¥¡¥¤¥ë
- ¥ª¥ê¥¸¥Ê¥ëÈǤˤϸºß¤·¤Ê¤¤£Ã¸À¸ì¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Ç¡¢
- SIMD ²½¤ÇƳÆþ¤µ¤ì¤¿´Ø¿ô¤ÎÀë¸À¤¬µ½Ò¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-
- jpegdll.def DLL ÈÇ JPEG Library ÍѤδؿô¥¨¥¯¥¹¥Ý¡¼¥ÈÄêµÁ¥Õ¥¡¥¤¥ë
- jpegdll.rc DLL ÈÇ JPEG Library ÍѤΥС¼¥¸¥ç¥ó¥ê¥½¡¼¥¹ÄêµÁ¥Õ¥¡¥¤¥ë
- ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢IJG JPEG Library ¤ò¤½¤Î¤Þ¤Þ DLL ¤Ë
- ¤¹¤ë¾ì¹ç¤Ë»ÈÍѤ·¤Þ¤¹(makefile.vcdll/makefile.mgwdll)¡£
-
- ¡ü x86 SIMD extension ¤Ç²þÊѤ¬²Ã¤¨¤é¤ì¤¿¥Õ¥¡¥¤¥ë
-
- Êѹ¹ÆâÍƤˤĤ¤¤ÆÆä˵½Ò¤Î¤Ê¤¤¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢SIMD ²½¤Ç¿·¤¿¤ËƳÆþ¤µ¤ì¤¿
- ´Ø¿ô¤ÎÀë¸À¤ä¤½¤Î¸Æ¤Ó½Ð¤·µ½Ò¡¢SIMD ²½¤Ë´ØÏ¢¤¹¤ë¥Þ¥¯¥íÄêµÁ¤Ê¤É¤¬ÄɲÃ
- ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-
- jpeglib.h JPEG ¥é¥¤¥Ö¥é¥ê¤Î¥á¥¤¥ó¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë
- jpegint.h JPEG ¥é¥¤¥Ö¥é¥ê¤ÎÆâÉôÍѥإåÀ¥Õ¥¡¥¤¥ë
- jmorecfg.h JPEG ¥é¥¤¥Ö¥é¥ê¤Î¾ÜºÙÀßÄê¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë
-
- jdct.h DCT ´ØÏ¢¥Õ¥¡¥¤¥ëÍѤΥإåÀ¥Õ¥¡¥¤¥ë
- SIMD ½èÍý¤ËŬ¤¹¤ë¤è¤¦¤Ë¡¢´ö¤Ä¤«¤ÎÊÑ¿ô¤Î·¿¤âÊѹ¹¤µ¤ì¤Æ
- ¤¤¤Þ¤¹¡£
-
- jcdctmgr.c ½çÊý¸þDCT¤Î¥Þ¥Í¡¼¥¸¥á¥ó¥È½èÍý
- jddctmgr.c µÕÊý¸þDCT¤Î¥Þ¥Í¡¼¥¸¥á¥ó¥È½èÍý
-
- jccolor.c RGB->YCbCr ¿§¶õ´ÖÊÑ´¹ (ÈóSIMD)
- jdcolor.c YCbCr->RGB ¿§¶õ´ÖÊÑ´¹ (ÈóSIMD)
- jdmerge.c ¿§¶õ´ÖÊÑ´¹¡¿¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥°Åý¹ç (ÈóSIMD)
- jcsample.c ¥À¥¦¥ó¥µ¥ó¥×¥ê¥ó¥° (ÈóSIMD)
- jdsample.c ¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥° (ÈóSIMD)
- jdsample.c ¤Ë¤Ï¡¢ÈóSIMDÈǤΠh1v2 ¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥°´Ø¿ô
- (h1v2_upsample, h1v2_fancy_upsample) ¤âÄɲ䵤ì¤Æ¤¤¤Þ¤¹¡£
-
- jdhuff.h ¥Ï¥Õ¥Þ¥óÉä¹æ¥Ç¥³¡¼¥É½èÍý (¥Ø¥Ã¥À)
- jdhuff.c ¥Ï¥Õ¥Þ¥óÉä¹æ¥Ç¥³¡¼¥É½èÍý (¥·¡¼¥±¥ó¥·¥ã¥ë)
- jdphuff.c ¥Ï¥Õ¥Þ¥óÉä¹æ¥Ç¥³¡¼¥É½èÍý (¥×¥í¥°¥ì¥Ã¥·¥Ö)
- ¤³¤ì¤é¤Î£³¤Ä¤Î¥Õ¥¡¥¤¥ë¤ÎÊѹ¹ÅÀ¤Ï¡¢SIMD ²½¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
- ¥Ç¥³¡¼¥É½èÍý¤ÎÊýË¡¤ò¸úΨ²½¤µ¤»¤Æ¤¢¤ê¤Þ¤¹¡£
-
- jdcoefct.c DCT¥Ç¡¼¥¿¥Ö¥í¥Ã¥¯¤Î¥Þ¥Í¡¼¥¸¥á¥ó¥È
- SIMD ²½¤È¤Ï´Ø·¸¤Ê¤¯¡¢°ìÉô¤Î¥³¡¼¥É¤ò¸úΨ²½¤µ¤»¤Æ¤¢¤ê¤Þ¤¹¡£
-
- jcomapi.c °µ½Ì/Ÿ³« ¶¦ÄÌ API ´Ø¿ôÄêµÁ
- SIMD ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯´Ø¿ô¤Ê¤É¤¬Äɲ䵤ì¤Æ¤¤¤Þ¤¹¡£
-
- jmemmgr.c JPEG library ÍÑ¥á¥â¥ê¥Þ¥Í¡¼¥¸¥ã (¥á¥¤¥ó)
- SIMD ²½¤Ëȼ¤¤¡¢16¥Ð¥¤¥È¥¢¥É¥ì¥¹¶³¦¤Ë¹ç¤Ã¤¿¥á¥â¥êÎΰè¤ò
- ¾ï¤Ë16¥Ð¥¤¥Èñ°Ì¤Ç³ÎÊݤ¹¤ë¤è¤¦¤ËÊѹ¹¤·¤Æ¤¢¤ê¤Þ¤¹¡£
-
- cjpeg.c JPEG °µ½ÌÍÑ ¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥æ¡¼¥Æ¥£¥ê¥Æ¥£
- djpeg.c JPEG Ÿ³«ÍÑ ¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥æ¡¼¥Æ¥£¥ê¥Æ¥£
- -v ¥ª¥×¥·¥ç¥ó¤Ç¤Î SIMD ´ØÏ¢¾ðÊó¤Îɽ¼¨¤ä¡¢-nosimd ¤Ê¤É¤Î
- ¥ª¥×¥·¥ç¥ó¥¹¥¤¥Ã¥Á¤¬Äɲ䵤ì¤Æ¤¤¤Þ¤¹¡£
-
- rdbmp.c BMP ¥Õ¥¡¥¤¥ëÆɤ߹þ¤ß¥â¥¸¥å¡¼¥ë
- wrbmp.c BMP ¥Õ¥¡¥¤¥ë½ñ¤½Ð¤·¥â¥¸¥å¡¼¥ë
- SIMD ²½¤È¤Ï´Ø·¸¤Ê¤¯¡¢°ìÉô¤Î¥³¡¼¥É¤ò¸úΨ²½¤µ¤»¤Æ¤¢¤ê¤Þ¤¹¡£
-
- rdgif.c GIF ¥Õ¥¡¥¤¥ëÆɤ߹þ¤ß¥â¥¸¥å¡¼¥ë(version 6a)
- wrgif.c GIF ¥Õ¥¡¥¤¥ë½ñ¤½Ð¤·¥â¥¸¥å¡¼¥ë(version 6a)
- Unisys ¤Î GIF (LZW) Æõö¼º¸ú¤Ëȼ¤¤¡¢version 6a ¤Ç¥µ¥Ý¡¼¥È
- ¤µ¤ì¤Æ¤¤¤¿ cjpeg/djpeg ¤Ç¤Î GIF ¤ÎÆþ½ÐÎϤòÉü³è¤µ¤»¤Þ¤·¤¿¡£
- ¤³¤Î GIF ¥â¥¸¥å¡¼¥ë¤Ï version 6a ¤Î¤â¤Î¤òήÍѤ·¤Æ¤¤¤Þ¤¹¡£
- version 6b ¤Î GIF ¥â¥¸¥å¡¼¥ë¤Ï unused/ ¤Ë¤¢¤ê¤Þ¤¹¡£
-
-
-¢£Ê£¿ô¥Õ¥¡¥¤¥ëÂбþÈǤΠcjpeg/djpeg (altui/)
-
- altui/ ¤Ë¤¢¤ë¥Õ¥¡¥¤¥ë¤Ï¡¢¸µ¡¹ jpegaltui.v6b.tar.gz ¤È¤¤¤¦¥Õ¥¡¥¤¥ë̾¤Ç
- Ê̤ËÇÛÉÛ¤µ¤ì¤Æ¤¤¤¿¤â¤Î¤Ç¤¹¡£¤³¤Î SIMD ÈǤǤϡ¢£±¥Õ¥¡¥¤¥ëÈÇ cjpeg/djpeg
- ¤ÈƱÍͤΠSIMD Âбþ²½¤Ë´Ø¤¹¤ë½¤Àµ¤È¡¢Borland C++ / Microsoft VC++ ¤Ë
- ¤ª¤¤¤Æ¥ï¡¼¥ë¥É¥«¡¼¥ÉŸ³«½èÍý¤ò͸ú²½¤¹¤ë¤¿¤á¤Î¥³¡¼¥É¤ò½ñ¤²Ã¤¨¤¿¤â¤Î¤Ç¤¹¡£
-
- altui/cjpeg.c Ê£¿ô¥Õ¥¡¥¤¥ëÂбþÈǤΠcjpeg
- altui/djpeg.c Ê£¿ô¥Õ¥¡¥¤¥ëÂбþÈǤΠdjpeg
- altui/README.alt jpegaltui.v6b.tar.gz ¤ËƱº¤µ¤ì¤Æ¤¤¤¿ README
- altui/usage.alt Ê£¿ô¥Õ¥¡¥¤¥ëÂбþÈÇ cjpeg/djpeg ¤Î¥Þ¥Ë¥å¥¢¥ë(º¹Ê¬)
-
-
-¢£SIMD ÈǤǤϻȤï¤ì¤Ê¤¤¥Õ¥¡¥¤¥ë·² (unused/)
-
- unused/ ¤Ë¤¢¤ë¥Õ¥¡¥¤¥ë¤Ï¡¢¥ª¥ê¥¸¥Ê¥ëÈǤΠIJG JPEG software ¤Ë¼ýÏ¿¤µ¤ì¤Æ
- ¤¤¤¿¤¬¡¢¤³¤Î SIMD ÈǤǤϻȤï¤ì¤Ê¤¤/»È¤¨¤Ê¤¤¥Õ¥¡¥¤¥ë·²¤¬¼ý¤á¤é¤ì¤Æ¤¤¤Þ¤¹¡£
-
- unused/j?dct???.c ¥ª¥ê¥¸¥Ê¥ë¤Î£Ã¸À¸ìÈÇ DCT ´Ø¿ô
- unused/jmem*.* ¥·¥¹¥Æ¥à°Í¸¥á¥â¥ê¥Þ¥Í¡¼¥¸¥ã(for MS-DOS/Macintosh)
- unused/??gif.c version 6b ¤Î GIF ¥â¥¸¥å¡¼¥ë
- unused/jconfig.* ¥ª¥ê¥¸¥Ê¥ëÈǤËÉÕ°¤Î jconfig.*
- unused/mak*.* ¥ª¥ê¥¸¥Ê¥ëÈǤËÉÕ°¤Î Makefile.*
-
-
-
-[EOF]
diff --git a/simd_install.ja.txt b/simd_install.ja.txt
deleted file mode 100644
index ef8f825..0000000
--- a/simd_install.ja.txt
+++ /dev/null
@@ -1,436 +0,0 @@
-Independent JPEG Group's JPEG software release 6b
- with x86 SIMD extension for IJG JPEG library version 1.02
- == INSTALL ==
------------------------------------------------------------
-
-¢£¤³¤Î¥Õ¥¡¥¤¥ë¤Ï
-
- ¤³¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢SIMD ÈÇ libjpeg ¥é¥¤¥Ö¥é¥ê¤Î¥³¥ó¥Ñ¥¤¥ë¤Î»ÅÊý¤ò²òÀâ
- ¤·¤Þ¤¹¡£¾¡¼ê¤Ê¤¬¤é¡¢¤³¤³¤Ç¤Ï¥ª¥ê¥¸¥Ê¥ëÈǤΠlibjpeg ¥é¥¤¥Ö¥é¥ê¤Î°·¤¤Êý
- (¥³¥ó¥Ñ¥¤¥ë¤Î»ÅÊý¡¿¥×¥í¥°¥é¥à¤ÎÃæ¤Ç¤Î»È¤¤Êý)¤ò¤¢¤ëÄøÅÙ¿´ÆÀ¤Æ¤¤¤ë¤È¤¤¤¦
- ¿Í¤òÂоݤˤµ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹¡£¥ª¥ê¥¸¥Ê¥ëÈǤλÈÍÑË¡¤Ë¤Ä¤¤¤Æ¤Ï¡¢
- install.doc (±Ñʸ) ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- ¢£¥¢¥»¥ó¥Ö¥é NASM ¤ÎÆþ¼ê¡¿¥¤¥ó¥¹¥È¡¼¥ë
- ¢£¥³¥ó¥Ñ¥¤¥ë¤Î»ÅÊý
- ¡ü Microsoft Visual C++ 6.0 °Ê¹ß¤ÎÅý¹ç³«È¯´Ä¶(DevStudio)¤Î¾ì¹ç
- ¡ü jconfig.h ¤È Makefile ¤òÁªÂò¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤¹¤ë
- ¡ü UNIX ´Ä¶¤Ç configure ¥¹¥¯¥ê¥×¥È¤ò»È¤¦
- ¢£Ê£¿ô¥Õ¥¡¥¤¥ëÂбþÈǤΠcjpeg/djpeg (altui/)
- ¢£¥³¡¼¥É¥µ¥¤¥º¤ò¸º¤é¤¹¤Ë¤Ï
- ¢£ÆÃÄê¤Î SIMD Ì¿Îá¤ò»ÈÍѤ·¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤Ë¤Ï
-
-
-¢£¥¢¥»¥ó¥Ö¥é NASM ¤ÎÆþ¼ê¡¿¥¤¥ó¥¹¥È¡¼¥ë
-
- ¤³¤Î x86 SIMD ÈÇ libjpeg ¥é¥¤¥Ö¥é¥ê¤Î SIMD ³ÈÄ¥Éôʬ¤Ï¡¢¤½¤Î¤Û¤È¤ó¤É¤¬
- x86 ¤Î¥¢¥»¥ó¥Ö¥ê¸À¸ì¤Ç½ñ¤«¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤Î¥¢¥»¥ó¥Ö¥ê¸À¸ì¥½¡¼¥¹¥³¡¼¥É¤ò
- ¥¢¥»¥ó¥Ö¥ë¤¹¤ë¤Ë¤Ï¡¢NASM (Netwide Assembler) ¤È¤¤¤¦¥¢¥»¥ó¥Ö¥é¤¬É¬ÍפǤ¹¡£
- Microsoft ¤Î MASM ¤ä¤½¤Î¸ß´¹¥¢¥»¥ó¥Ö¥é¤Ç¤Ï°·¤¨¤Þ¤»¤ó¤Î¤ÇÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- NASM (Netwide Assembler) ¤Ï¡¢¸ø¼°¥µ¥¤¥È http://nasm.sourceforge.net/ or
- http://sourceforge.net/project/showfiles.php?group_id=6208 ¤«¤é¥À¥¦¥ó
- ¥í¡¼¥É¤Ç¤¤Þ¤¹¡£Ver.0.98.25 °Ê¹ß¤ÎÈæ³ÓŪ¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î¤â¤Î¤¬É¬ÍפǤ¹¡£
- ¸½»þÅÀ(2006/02)¤Ç¤ÎºÇ¿·ÈÇ¤Ï Ver.0.98.39 ¤Ç¤¹¡£
-
- ¤Ê¤ª¡¢x86 ÈǤΠDarwin ¤ä Mac OS X ¤Ê¤É¤Ç»ÈÍѤ¹¤ë¾ì¹ç¤Ï¡¢¸½»þÅÀ¤Ç¤Ï¤Þ¤À
- Àµ¼°¤Ë¥ê¥ê¡¼¥¹¤µ¤ì¤Æ¤¤¤Ê¤¤ Ver.0.98.40 °Ê¹ß¤Î¥Ð¡¼¥¸¥ç¥ó¤Î¤â¤Î¤¬É¬ÍפǤ¹¡£
- ¸½»þÅÀ¤Ç¤Ï¡¢Ver.0.98.40 ¤Ï¾åµ¤Î¸ø¼°¥µ¥¤¥È¤Î CVS ¥ê¥Ý¥¸¥È¥ê¤«¤é¥½¡¼¥¹
- ¥³¡¼¥É¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¡¿¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
-
- Windows ·Ï¤Î¾ì¹ç¤Ï¡¢nasm-0.XX.YY-win32.zip (XX.YY ¤Ë¤Ï¥Ð¡¼¥¸¥ç¥óÈֹ椬Æþ¤ë)
- ¤È¤¤¤¦Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Æ¡¢¤½¤ì¤Ë´Þ¤Þ¤ì¤ë nasmw.exe ¤ò
- £Ã¥³¥ó¥Ñ¥¤¥é¤Î¼Â¹Ô¥Õ¥¡¥¤¥ë·²¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¾ì½ê¤Ë¥³¥Ô¡¼¤·¤Þ¤¹¡£
-
- ³Æ¼ï PC-UNIX ¤Î¾ì¹ç¤Ï¡¢OS ¤ÎÇÛÉÛ¸µ¤Ë¤Æ°Ü¿¢ºÑ¤ß¥Ñ¥Ã¥±¡¼¥¸¤¬Ä󶡤µ¤ì¤Æ¤¤¤ë
- ¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤Þ¤ººÇ½é¤Ë¤½¤Á¤é¤ò³Îǧ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£¤½¤ì¤¬¤Ê¤¤
- ¾ì¹ç¤Ï¡¢¾åµ¸ø¼°¥µ¥¤¥È¤«¤é¥½¡¼¥¹¥³¡¼¥É(nasm-0.XX.YY.tar.gz)¤ò¥À¥¦¥ó¥í¡¼¥É
- ¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¡¿¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£linux ¤Î¾ì¹ç¤Ç rpm ¥Ñ¥Ã¥±¡¼¥¸¤ò
- °·¤¨¤ë¥·¥¹¥Æ¥à¤Î¾ì¹ç¤Ï¡¢¾åµ¸ø¼°¥µ¥¤¥È¤Ë¤Æ rpm ¥Ð¥¤¥Ê¥ê¥Ñ¥Ã¥±¡¼¥¸¤âÆþ¼ê
- ¤Ç¤¤Þ¤¹¡£
-
- Ãí°ÕÅÀ¤È¤·¤Æ¡¢YASM (http://www.tortall.net/projects/yasm/) ¤Ï»È¤ï¤Ê¤¤¤Ç
- ¤¯¤À¤µ¤¤¡£YASM ¤Ï NASM ¸ß´¹¤òëð¤Ã¤Æ¤¤¤Þ¤¹¤¬¡¢¸½ºß¤Î¥Ð¡¼¥¸¥ç¥ó(0.4.0)¤Ç¤Ï
- ¤Þ¤À¸ß´¹ÅÙ¤¬Ä㤤¾å¤Ë¥Ð¥°¤¬¤¢¤ë(¥¢¥É¥ì¥¹·×»»¤¬¤Þ¤Ã¤¿¤¯¥Ç¥¿¥é¥á¤Ê¥³¡¼¥É¤ò
- À¸À®¤·¤Æ¤¤¤ë)¤¿¤á¡¢ÅöÊý¤Î¥Æ¥¹¥È¤Ç¤Ï YASM ¤Ç¥¢¥»¥ó¥Ö¥ë¤·¤¿¥³¡¼¥É¤Ï¤Þ¤Ã¤¿¤¯
- Æ°¤¤Þ¤»¤ó¤Ç¤·¤¿¡£¡ÊÃí¡§¤³¤Î x86 SIMD extension for IJG JPEG library
- ¤Ç¤Ï¡¢¤¿¤È¤¨ YASM ¤òÍѤ¤¤Æ¤â AMD64 ¤Î 64bit Âбþ¤Ë¤Ï¤Ê¤ê¤Þ¤»¤ó¡£¡Ë
-
-
-¢£¥³¥ó¥Ñ¥¤¥ë¤Î»ÅÊý
-
- ¤Û¤È¤ó¤É¤ÎÉôʬ¤Ç¥ª¥ê¥¸¥Ê¥ëÈǤÈÊѤï¤ê¤¢¤ê¤Þ¤»¤ó¤Î¤Ç¡¢°Ê²¼¤ÎÀâÌÀ¤Ç¤Ï¡¢
- ¤³¤Î SIMD ³ÈÄ¥ÈǤËÆÃͤÎÃí°ÕÅÀ¤òÃæ¿´¤Ë½Ò¤Ù¤Þ¤¹¡£
-
-
- ¡ü Microsoft Visual C++ 6.0 °Ê¹ß¤ÎÅý¹ç³«È¯´Ä¶(DevStudio)¤Î¾ì¹ç
-
- ¤³¤ÎÇÛÉÛ¥»¥Ã¥È¤Ë¤Ï¡¢Microsoft Visual C++ 6.0 ÍÑ¤Î¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
- ¤¬ÉÕ°¤·¤Æ¤¤¤Þ¤¹¡£V6.0 °Ê¹ß¤Î VC++ ¤Î¾ì¹ç¤Ï¡¢VC++ 6.0 ¤Î¥Õ¥¡¥¤¥ë¤ò
- ÊÑ´¹(¥¤¥ó¥Ý¡¼¥È)¤·¤Æ»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£Microsoft Visual C++ 2005 Express
- Edition ¤Ë¤Æ¡¢¥¤¥ó¥Ý¡¼¥È¡¿¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹¡£
-
- ÊýË¡¤Ï¡¢¤Þ¤º vc6proj ¥Õ¥©¥ë¥À¤ÎÃæ¤Ë¤¢¤ë¥Õ¥¡¥¤¥ë¤ò¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë·²
- (*.c) ¤Î¤¢¤ë¥Õ¥©¥ë¥À¤Ë¤¹¤Ù¤Æ°ÜÆ°¤·¤Þ¤¹¡£¤½¤·¤Æ libjpeg.dsw ¤ò³«¤¤¤Æ
- (¤â¤·¤¯¤Ï¥¤¥ó¥Ý¡¼¥È¤·¤Æ)¡¢¥á¥Ë¥å¡¼¤Î ¥Ó¥ë¥É¢ª¥Ð¥Ã¥Á¥Ó¥ë¥É ¤Ç¤¹¤Ù¤Æ¤Ë
- ¥Á¥§¥Ã¥¯¤òÆþ¤ì¤Æ¥Ó¥ë¥É¤¹¤ì¤Ð£Ï£Ë¤Ç¤¹¡£
-
- ¥ï¡¼¥¯¥¹¥Ú¡¼¥¹ libjpeg.dsw ¤Ë¤Ï¡¢°Ê²¼¤Î¥×¥í¥¸¥§¥¯¥È¤¬¼ý¤á¤é¤ì¤Æ¤¤¤Þ¤¹¡£
-
- ¢¡ makecfg.dsp
-
- ¤³¤Î¥×¥í¥¸¥§¥¯¥È¤Ï¡¢makecfg.c ¤ò¥³¥ó¥Ñ¥¤¥ë¡¿¥ê¥ó¥¯¤·¤Æ¡¢¥«¥¹¥¿¥à
- ¥Ó¥ë¥É¥¹¥Æ¥Ã¥×¤Ç¤½¤ì(makecfg.exe)¤ò¼Â¹Ô¤·¡¢libjpeg.dsp ¤Î¥Ó¥ë¥É¤Ë
- ɬÍפÊÀßÄê¥Õ¥¡¥¤¥ë jsimdcfg.inc ¤òºî¤ëƯ¤¤ò¤·¤Æ¤¤¤Þ¤¹¡£
-
- ¤³¤ì¤Ï¡¢libjpeg.dsp ¤¬¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤ëÁ°¤Ëɬ¤º¥³¥ó¥Ñ¥¤¥ë(¼Â¹Ô)
- ¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
-
- ¢¡ libjpeg.dsp
-
- JPEG ¥é¥¤¥Ö¥é¥ê libjpeg.lib ¤ò¥Ó¥ë¥É¤·¤Þ¤¹¡£makecfg.dsp ¤¬½ÐÎϤ¹¤ë
- ÀßÄê¥Õ¥¡¥¤¥ë jsimdcfg.inc ¤¬É¬ÍפǤ¹¡£
-
- ¢¡ cjpeg.dsp, djpeg.dsp, jpegtran.dsp, rdjpgcom.dsp, wrjpgcom.dsp
-
- IJG JPEG library ¤ËÉÕ°¤·¤Æ¤¤¤ë¥µ¥ó¥×¥ë¡¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤¹¡£
- cjpeg ¤Ï JPEG °µ½Ì¤ò¡¢djpeg ¤Ï JPEG Ÿ³«¤ò¡¢jpegtran ¤Ï JPEG
- ¥Õ¥¡¥¤¥ë¤ÎÊÑ´¹¤ò¤·¤Þ¤¹¡£rdjpgcom ¤È wrjpgcom ¤Ï¡¢JPEG¥Õ¥¡¥¤¥ë
- Ãæ¤Î¥Æ¥¥¹¥È¥³¥á¥ó¥Èʸ¤òÁàºî¤·¤Þ¤¹¡£
-
- ¢¡ apptest.dsp
-
- ¤Ç¤¤¢¤¬¤Ã¤¿ cjpeg, djpeg, jpegtran ¤ËÂФ·¤Æ´Êñ¤ÊÆ°ºî¥Æ¥¹¥È¤ò
- ¤·¤Þ¤¹(make test ¤ÈƱÅù)¡£¤Þ¤º¡¢¤³¤ì¤é¤Î¥½¥Õ¥È¤Ç¼ÂºÝ¤Ë²èÁü¥Õ¥¡¥¤¥ë
- ¤òÊÑ´¹¤µ¤»¡¢¤½¤Î½ÐÎϤò fc.exe ¤ÇÈæ³Ó¤·¤Þ¤¹¡£"FC: Áê°ãÅÀ¤Ï¸¡½Ð
- ¤µ¤ì¤Þ¤»¤ó¤Ç¤·¤¿" ¤È¤¤¤¦¥á¥Ã¥»¡¼¥¸¤¬£¶²óɽ¼¨¤µ¤ì¤ì¤Ð¡¢¥×¥í¥°¥é¥à¤Ï
- Àµ¤·¤¯Æ°¤¤¤Æ¤¤¤Þ¤¹¡£
-
- JPEG ¥é¥¤¥Ö¥é¥ê libjpeg.lib ¤ò¾¤Î¥½¥Õ¥È¤Ë¥ê¥ó¥¯¤¹¤ë¤¿¤á¤Ë libjpeg.dsp
- ¤ò¾¤Î¥ï¡¼¥¯¥¹¥Ú¡¼¥¹¡¿¥½¥ê¥å¡¼¥·¥ç¥ó¤Ë´Þ¤á¤ë¾ì¹ç¤Ï¡¢makecfg.dsp ¤â
- ɬ¤ºÆ±¤¸¥ï¡¼¥¯¥¹¥Ú¡¼¥¹¡¿¥½¥ê¥å¡¼¥·¥ç¥ó¤Ë´Þ¤á¡¢¾ï¤Ë makecfg.dsp ¤¬
- libjpeg.dsp ¤è¤ê¤âÀè¤Ë¥Ó¥ë¥É¤µ¤ì¤ë¤è¤¦¤Ë¡¢°Í¸´Ø·¸¤òÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
- ¤³¤ì¤Ï¡¢Àè¤Ë½Ò¤Ù¤¿¤è¤¦¤Ë¡¢libjpeg.dsp ¤Ï makecfg.dsp ¤¬½ÐÎϤ¹¤ëÀßÄê
- ¥Õ¥¡¥¤¥ë jsimdcfg.inc ¤òɬÍפȤ·¤Æ¤¤¤ë¤¿¤á¤Ç¤¹¡£
-
- ÀßÄêË¡¤Ï¡¢(VC++ 6.0¤Î¾ì¹ç) ¥á¥Ë¥å¡¼¤Î ¥×¥í¥¸¥§¥¯¥È ¢ª °Í¸´Ø·¸ ¤Ç
- libjpeg ¤òÁªÂò¤·¡¢²¼¤Î°ìÍ÷¤ÎÃæ¤Î makecfg ¤Ë¥Á¥§¥Ã¥¯¤òÆþ¤ì¤Þ¤¹¡£
-
-
- ¡ü jconfig.h ¤È Makefile ¤òÁªÂò¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤¹¤ë
-
- Windows ·Ï¤Î¥³¥ó¥Ñ¥¤¥é¤Î¾ì¹ç¤Ç¡¢¥³¥Þ¥ó¥É¥é¥¤¥ó¤«¤é¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¾ì¹ç
- ¤Ï¡¢¤³¤ÎÊýË¡¤ò¤È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
-
- ÊýË¡¤Ï¡¢ÉÕ°¤Î jconfig.* ¤È Makefile.* ¤ÎÃ椫¤éŬÀڤʤâ¤Î¤ò¤½¤ì¤¾¤ì
- °ì¤Ä¤º¤ÄÁª¤Ó¡¢¤½¤ì¤¾¤ì jconfig.h ¤È Makefile ¤Ë̾Á°¤òÊѤ¨¤Þ¤¹¡£
- ¤½¤·¤Æ¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¤¢¤ë¥Ç¥£¥ì¥¯¥È¥ê(¥Õ¥©¥ë¥À)¤ò¥«¥ì¥ó¥È¥Ç¥£¥ì
- ¥¯¥È¥ê¤Ë¤·¤Æ¡¢¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ç make (VC++ ¤Î¾ì¹ç¤Ï nmake)¤È¥¿¥¤¥×
- ¤¹¤ì¤Ð£Ï£Ë¤Ç¤¹¡£¸å¤Ï¼«Æ°Åª¤Ë¡¢libjpeg ¥é¥¤¥Ö¥é¥ê¤È¡¢¥µ¥ó¥×¥ë¥¢¥×¥ê
- ¥±¡¼¥·¥ç¥ó(cjpeg ¤ä djpeg ¤Ê¤É)¤¬¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Þ¤¹¡£
-
- ÉÕ°¤·¤Æ¤¤¤ë jconfig.* ¤È Makefile.* ¤Ï¡¢°Ê²¼¤Î½èÍý·Ï¤ËÂбþ¤·¤Æ¤¤¤Þ¤¹¡£
- ¤Ê¤ª¡¢¥ª¥ê¥¸¥Ê¥ëÈǤËÉÕ°¤·¤Æ¤¤¤ë jconfig.* ¤È Makefile.* ¤Ï¡¢¤³¤Î
- SIMD ÂбþÈǤǤϻÈÍѤǤ¤Þ¤»¤ó(¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¹½À®¤¬ÊѤï¤Ã¤Æ¤¤¤ë¤¿¤á)¡£
-
- ¡¦ jconfig.dj & makefile.dj -- DJGPP v2.0 or later
- ¡¦ jconfig.bc5 & makefile.bc5 -- Borland C++ Compiler 5.5 (win32)
- ¡¦ jconfig.mgw & makefile.mgw, makefile.mgwdll -- MinGW
- ¡¦ jconfig.vc & makefile.vc , makefile.vcdll -- VC++ 6.0 or later
- ¡¦ jconfig.linux & makefile.linux -- linux
-
- ¤³¤ì¤é°Ê³°¤Î¥³¥ó¥Ñ¥¤¥é¤ËÂбþ¤µ¤»¤ë¾ì¹ç¤Ï¡¢install.doc ¤Ë½ñ¤¤¤Æ¤¢¤ë
- ¤è¤¦¤Ë¡¢¤Þ¤º ckconfig.c ¤ò¥³¥ó¥Ñ¥¤¥ë¡¿¼Â¹Ô¤·¤Æ jconfig.h ¤òÀ¸À®¤·¡¢
- makefile.unix ¤â¤·¤¯¤Ï makefile.ansi ¤ò¼êºî¶È¤ÇÊÔ½¸¤·¤Æ Makefile ¤ò
- ºîÀ®¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- °Ê²¼¡¢³Æ¥³¥ó¥Ñ¥¤¥é¤Ë¸ÇͤÎÃí°ÕÅÀ¤ò½Ò¤Ù¤Þ¤¹¡£
-
- ¢¡ jconfig.dj & makefile.dj -- DJGPP v2.0 or later.
-
- ²Äǽ¤Ê¸Â¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£DJGPP 2.03 + gcc 3.4.4
- + binutils 2.16.1 ¤È¤¤¤¦ÁȤ߹ç¤ï¤»¤ÇÆ°ºî¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹¡£
-
- makefile.dj ¤Ë¤Ï¡¢gcc 3.4.x ¸þ¤±¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó¤¬½ñ¤«¤ì¤Æ
- ¤¤¤Þ¤¹¤Î¤Ç¡¢gcc 3.4.x °Ê³°¤Ç¤¦¤Þ¤¯¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤Ê¤¤¾ì¹ç¤Ï¡¢Å¬Åö¤Ë
- ½ñ¤Ä¾¤·¤Æ»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
-
- ¢¡ jconfig.bc5 & makefile.bc5 -- Borland C++ Compiler 5.5 (win32)
-
- ²¿¤ÎÌäÂê¤â¤Ê¤¯¥³¥ó¥Ñ¥¤¥ë¤Ï¤Ç¤¤ë¤Ï¤º¤Ç¤¹¤¬¡¢¤³¤Î BCC 5.5 ¤Î¾ì¹ç¤Ï¡¢
- ¤Û¤È¤ó¤É¤Î¥±¡¼¥¹¤Ç SSE/SSE2 ¤¬Æ°ºî¤·¤Þ¤»¤ó¡£Íýͳ¤Ï¡¢BCC 5.5 ¤ËÉÕ°¤Î
- ¥ê¥ó¥«(ilink32.exe)¤¬¸Å¤¯¡¢SSEÄê¿ô¤ò16¥Ð¥¤¥È¶³¦¥¢¥É¥ì¥¹¤ËÇÛÃÖ¤¹¤ë
- ¤³¤È¤¬¤Ç¤¤Ê¤¤¤¿¤á¤Ç¤¹¡£
-
- ¤½¤Î¤¿¤á¡¢BCC 5.5 ¤ò»È¤¦¾ì¹ç¤Ï SSE/SSE2 ¤Î¥µ¥Ý¡¼¥È¤òºï½ü(¸å½Ò)¤·¤Æ
- ¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤³¤È¤ò¤ª´«¤á¤¤¤¿¤·¤Þ¤¹¡£
-
- ¢¡ jconfig.mgw & makefile.mgw, makefile.mgwdll -- MinGW
-
- ²Äǽ¤Ê¸Â¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£gcc 3.4.4 + binutils
- 2.16.91 ¤È¤¤¤¦ÁȤ߹ç¤ï¤»¤ÇÆ°ºî¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹¡£
-
- ¤Þ¤¿¡¢GNU make ¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤³¤È¤âɬÍפǤ¹¡£MinGW ¤Î¾ì¹ç¡¢
- (make.exe ¤Ç¤Ï¤Ê¤¯) mingw32-make.exe ¤È¤¤¤¦Ì¾Á°¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì
- ¤Þ¤¹¤Î¤Ç¡¢make ¤Ç¤Ï¤Ê¤¯ mingw32-make ¤È¥¿¥¤¥×¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
-
- ¤³¤ì¤é¤Î makefile ¤Ë¤Ï¡¢gcc 3.4.x ¸þ¤±¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó¤¬½ñ¤«
- ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢gcc 3.4.x °Ê³°¤Ç¤¦¤Þ¤¯¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤Ê¤¤¾ì¹ç¤Ï¡¢
- ŬÅö¤Ë½ñ¤Ä¾¤·¤Æ»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
-
- makefile.mgw ¤Ï¡¢libjpeg ¥é¥¤¥Ö¥é¥ê¤òÀÅŪ¥é¥¤¥Ö¥é¥ê(libjpeg.a)¤Ë
- ¥³¥ó¥Ñ¥¤¥ë¤·¤¿¾å¤Ç¡¢¤³¤Î libjpeg.a ¤ò¥ê¥ó¥¯¤·¤¿ cjpeg, djpeg,
- jpegtran ¤òºîÀ®¤·¤Þ¤¹¡£makefile.mgwdll ¤Ï¡¢libjpeg ¥é¥¤¥Ö¥é¥ê¤ò
- DLL(jpeg62.dll)¤Ë¥³¥ó¥Ñ¥¤¥ë¤·¤¿¾å¤Ç¡¢¤³¤Î jpeg62.dll ¤ò¥ê¥ó¥¯¤·¤¿
- cjpeg, djpeg, jpegtran ¤òºîÀ®¤·¤Þ¤¹¡£
-
- ¢¡ jconfig.vc & makefile.vc , makefile.vcdll -- VC++ 6.0 or later
-
- VC++ 6.0 °Ê¹ß¤Ê¤é²¿¤ÎÌäÂê¤â¤Ê¤¯¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤ë¤Ï¤º¤Ç¤¹¡£¥Õ¥ê¡¼¤Ç
- ¸ø³«¤µ¤ì¤Æ¤¤¤ë Microsoft Visual C++ Toolkit 2003 ¤Ç¤â¡¢nmake.exe
- ¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ì¤Ð¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤Þ¤¹¡£
-
- makefile.vc ¤Ï¡¢libjpeg ¥é¥¤¥Ö¥é¥ê¤òÀÅŪ¥é¥¤¥Ö¥é¥ê(libjpeg.lib)¤Ë
- ¥³¥ó¥Ñ¥¤¥ë¤·¤¿¾å¤Ç¡¢¤³¤Î libjpeg.lib ¤ò¥ê¥ó¥¯¤·¤¿ cjpeg, djpeg,
- jpegtran ¤òºîÀ®¤·¤Þ¤¹¡£makefile.vcdll ¤Ï¡¢libjpeg ¥é¥¤¥Ö¥é¥ê¤ò
- DLL(jpeg62.dll)¤Ë¥³¥ó¥Ñ¥¤¥ë¤·¤¿¾å¤Ç¡¢¤³¤Î jpeg62.dll ¤ò¥ê¥ó¥¯¤·¤¿
- cjpeg, djpeg, jpegtran ¤òºîÀ®¤·¤Þ¤¹¡£
-
- ¢¡ jconfig.linux & makefile.linux -- linux
-
- ³Æ¼ï¤Î linux ¤ËÂбþ¤·¤Þ¤¹¤¬¡¢linux ¤Î¾ì¹ç¤Ï configure ¥¹¥¯¥ê¥×¥È¤ò
- »È¤¦¤³¤È¤ò¶¯¤¯¤ª´«¤á¤¤¤¿¤·¤Þ¤¹¡£
-
-
- ¡ü UNIX ´Ä¶¤Ç configure ¥¹¥¯¥ê¥×¥È¤ò»È¤¦
-
- ³Æ¼ï¤Î PC-UNIX ¤Î¾ì¹ç¤Ê¤É¡¢¥·¥§¥ë¡¦¥¹¥¯¥ê¥×¥È¤òÁö¤é¤»¤ë¤³¤È¤Î¤Ç¤¤ë
- ´Ä¶¤Î¾ì¹ç¤Ï¡¢configure ¥¹¥¯¥ê¥×¥È¤ò»È¤¦¤È´Êñ¤Ë¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤Þ¤¹¡£
-
- $ ./configure --enable-shared --enable-static
- $ make
- $ make test (¢«Æ°ºî¥Æ¥¹¥È¡¨É¬Íפ˱þ¤¸¤Æ)
- # make install
-
- ¤³¤ÎÊýË¡¤Ç¤Ï¡¢°Ê²¼¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤ë¤³¤È¤ò³Îǧ¤·¤Æ
- ¤¤¤Þ¤¹¡£¤³¤ì°Ê³°¤Î UNIX ·Ï OS ¤Ç¤â¥³¥ó¥Ñ¥¤¥ë¤Ï²Äǽ¤À¤È»×¤ï¤ì¤Þ¤¹¤¬¡¢
- ¼ã´³¤Î¼êľ¤·¤¬É¬Íפˤʤë¾ì¹ç¤â¤¢¤ë¤«¤È»×¤¤¤Þ¤¹¡£
-
- ¡¦Vine Linux 2.6r4 (gcc 2.95.3) ¤ª¤è¤Ó Vine Linux 3.2 (gcc 3.4.4)
- ¡¦Fedora core 3 (gcc 3.4.2) ¤ª¤è¤Ó Fedora core 4 (gcc 4.0.0)
- ¡¦FreeBSD 5.4 (gcc 3.4.2) ¤ª¤è¤Ó FreeBSD 6.0 (gcc 3.4.4)
- ¡¦NetBSD 2.0 (gcc 3.3.3) ¤ª¤è¤Ó NetBSD 3.0 (gcc 3.3.3)
- ¡¦Solaris 10 1/06 for x64/x86 (i386-pc-solaris2.10)
- ¡¦Darwin 8.0.1 for x86 (i386-apple-darwin8.0.1; gcc 3.3)
- ¡¦MinGW & MSYS (gcc 3.4.4)
- ¡¦cygwin (gcc 3.4.4)
-
- Ʊº¤Î configure ¥¹¥¯¥ê¥×¥È¤Ï GNU autoconf ¤ÇÀ¸À®¤µ¤ì¤¿¤â¤Î¤Ç¤¹¡£
- ¤³¤Î configure ¥¹¥¯¥ê¥×¥È¤Ï¡¢°ìÈÌŪ¤Ê configure ¥¹¥¯¥ê¥×¥È¤¬Ç§¼±¤¹¤ë
- ¥¹¥¤¥Ã¥Á¥ª¥×¥·¥ç¥ó¤Î¾¤Ë¡¢°Ê²¼¤Î¥¹¥¤¥Ã¥Á¤òǧ¼±¤·¤Þ¤¹¡£
-
- ¡û --enable-shared / --enable-static
-
- --enable-shared ¤ò»ØÄꤹ¤ë¤È¡¢GNU libtool ¤ò»È¤Ã¤Æ¶¦Í¥é¥¤¥Ö¥é¥ê¤ò
- ºîÀ®¤·¤Þ¤¹¡£--enable-static ¤ò»ØÄꤹ¤ë¤È¡¢Æ±¤¸¤¯ GNU libtool ¤ò
- »È¤Ã¤ÆÀÅŪ¥é¥¤¥Ö¥é¥ê¤òºîÀ®¤·¤Þ¤¹¡£Î¾Êý¤ò»ØÄꤹ¤ë¤È¡¢¶¦Í¥é¥¤¥Ö¥é¥ê
- ¤ÈÀÅŪ¥é¥¤¥Ö¥é¥ê¤ÎξÊý¤òºîÀ®¤·¤Þ¤¹¡£µÕ¤Ë¤³¤ÎξÊý¤È¤â»ØÄꤷ¤Ê¤¤¤È¡¢
- GNU libtool ¤ò»È¤ï¤º¤ËÀÅŪ¥é¥¤¥Ö¥é¥ê¤Î¤ß¤òºîÀ®¤·¤Þ¤¹¡£
-
- ¥·¥¹¥Æ¥à¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¥é¥¤¥Ö¥é¥ê¤òºîÀ®¤¹¤ë¾ì¹ç¤ÏξÊý¤ò»ØÄꤹ¤ë
- ɬÍפ¬¤¢¤ë¤Ç¤·¤ç¤¦¡£
-
- ¡û --disable-mmx / --disable-3dnow / --disable-sse / --disable-sse2
-
- ÆÃÄê¤Î SIMD Ì¿Î᥻¥Ã¥È¤Î¥µ¥Ý¡¼¥È(¥³¡¼¥É)¤òºï½ü¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£
-
- ¡û --enable-uchar-boolean
-
- ¥½¡¼¥¹¥³¡¼¥ÉÃæ¤Î bool ·¿¤ÎÄêµÁ¤ò int ·¿¤Ç¤Ï¤Ê¤¯ unsigned char ·¿¤Ë
- Êѹ¹¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤ÏÄ̾ï¤Ï(ÆäËɬÍפǤʤ¤¸Â¤ê)»ÈÍѤ·¤Ê¤¤¤Ç
- ¤¯¤À¤µ¤¤¡£¤³¤ì¤Ï¡¢MinGW ¤Ê¤É¤Î Windows ¾å¤Î UNIX ´Ä¶¤Ë¤Æ¡¢bool ·¿
- ¤ÎÄêµÁ¤ò Windows ¤Î½¬´·¤Ë¹ç¤ï¤»¤ë¤¿¤á¤ËÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤Ç¤¹¡£
-
- °Ê²¼¡¢³Æ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ë¸ÇͤÎÃí°ÕÅÀ¤ò½Ò¤Ù¤Þ¤¹¡£
-
- ¢¡ ³Æ¼ï linux ¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó
-
- ¤è¤Û¤É¸Å¤¤¤â¤Î¤Ç¤Ê¤¤¸Â¤ê¡¢¾åµ¤Î¼ê½ç¤Ç²¿¤ÎÌäÂê¤â¤Ê¤¯¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤ë
- ¤Ï¤º¤Ç¤¹¡£
-
- ¾åµ¤Î¼ê½ç¤Ç¶¦Í¥é¥¤¥Ö¥é¥ê¤òºîÀ®¤·¤¿¾ì¹ç¡¢¤½¤Î¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤Ï
- 62.1.0 (¥Õ¥¡¥¤¥ë̾¡§libjpeg.so.62.1.0) ¤È¤Ê¤ê¤Þ¤¹¡£¤³¤ì¤ÏÁ°½Ò¤·¤¿
- ¤È¤ª¤ê¡¢¥ª¥ê¥¸¥Ê¥ëÈÇ(¥Õ¥¡¥¤¥ë̾¡§libjpeg.so.62.0.0)¤È¥Ð¥¤¥Ê¥ê¥ì¥Ù¥ë
- ¤Ç¤Î¾å°Ì¸ß´¹À¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¥ª¥ê¥¸¥Ê¥ëÈǤȤ½¤Î¤Þ¤ÞÃÖ¤´¹¤¨¤ë¤³¤È
- ¤¬¤Ç¤¤Þ¤¹¡£
-
- rpm ¤ò»È¤Ã¤¿¥Ñ¥Ã¥±¡¼¥¸´ÉÍý¤òºÎÍѤ·¤Æ¤¤¤ë¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Ç¤Ï¡¢
- Ʊº¤Î spec ¥Õ¥¡¥¤¥ë (libjpeg.spec) ¤â¤´ÍøÍѤ¤¤¿¤À¤±¤Þ¤¹¡£¤³¤ì¤Ï¡¢
- Vine Linux 3.2 ¤ª¤è¤Ó Fedora core 4 ¤Ç¤ÎÆ°ºî¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹¡£
-
- ¢¡ xBSD ¥Õ¥¡¥ß¥ê (FreeBSD/NetBSD/OpenBSD)
-
- ºÇ¶á¤Î¥Ð¡¼¥¸¥ç¥ó¤Î FreeBSD ¤È NetBSD ¤Ë´Ø¤·¤Æ¤Ï¡¢¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤ë
- ¤³¤È¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹¡£OpenBSD ¤Ë´Ø¤·¤Æ¤âÌäÂê¤Ï¤Ê¤¤¤È»×¤¤¤Þ¤¹¡£
- ¤¿¤À¡¢¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë a.out ¤ò»È¤Ã¤¿¸Å¤¤¤â¤Î¤Ë´Ø¤·¤Æ¤Ï¡¢
- ¥Õ¥¡¥¤¥ë¥Õ¥©¡¼¥Þ¥Ã¥È¤Î¼ïÎà¤â°ì±þ configure ¥¹¥¯¥ê¥×¥È¤Ë¤Æ¸¡½Ð¤Ç¤¤ë
- ¤è¤¦¤Ë¤·¤Æ¤¢¤ê¤Þ¤¹¤¬¡¢Æ°ºî¤Ï̤³Îǧ¤Ç¤¹¡£
-
- FreeBSD ¤Î¾ì¹ç¡¢¾åµ¤Î¼ê½ç¤Ç¶¦Í¥é¥¤¥Ö¥é¥ê¤òºîÀ®¤·¤¿¾ì¹ç¡¢¤½¤Î
- ¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤Ï 9 (¥Õ¥¡¥¤¥ë̾¡§libjpeg.so.9) ¤È¤Ê¤ê¤Þ¤¹¡£¤³¤ì¤Ï¡¢
- ports collection ¤ÎÃæ¤Ë¤¢¤ë¸ø¼°ÈǤΥС¼¥¸¥ç¥óÈÖ¹æ¤Ë½à¤¸¤¿¤â¤Î¤Ç¡¢
- (¥Ð¥¤¥Ê¥ê¾å°Ì¸ß´¹¤Ê¤Î¤Ç)¸ø¼°ÈǤȤ½¤Î¤Þ¤ÞÃÖ¤´¹¤¨¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
- NetBSD/OpenBSD ¤Î¾ì¹ç¤Î¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤Ï 62.1.0 (¥Õ¥¡¥¤¥ë̾¡§
- libjpeg.so.62.1.0) ¤Ë¤Ê¤ê¤Þ¤¹(¥Ð¥¤¥Ê¥ê¾å°Ì¸ß´¹)¡£
-
- ¢¡ Solaris 10
-
- ºî¼Ô¤Î¥Æ¥¹¥È¤Ç¤Ï¡¢Àµ¾ï¤Ë¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤Æ¡¢¶¦Í¥é¥¤¥Ö¥é¥ê¤¬¥Ð¥¤¥Ê¥ê
- ¸ß´¹¤Ë¤Ê¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹(¥Õ¥¡¥¤¥ë̾¡§libjpeg.so.62.1.0)¡£
- ¤Ç¤¹¤¬¡¢¤³¤Î SIMD ÈÇ libjpeg ¥é¥¤¥Ö¥é¥ê¤Ï AMD64 ¤Ë¤Ï¸½»þÅÀ¤Ç¤ÏÂбþ
- ¤·¤Æ¤¤¤Ê¤¤¤¿¤á¡¢32bitÈǤΥ饤¥Ö¥é¥ê¤·¤«ºî¤ì¤Þ¤»¤ó¡£
-
- ¢¡ Darwin for x86
-
- ºî¼Ô¤Î¥Æ¥¹¥È¤Ç¤Ï¡¢Àµ¾ï¤Ë¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤Æ¡¢¶¦Í¥é¥¤¥Ö¥é¥ê¤¬¥Ð¥¤¥Ê¥ê
- ¸ß´¹¤Ë¤Ê¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹(¥Õ¥¡¥¤¥ë̾¡§libjpeg.62.1.0.dylib)¡£
- x86 ÈÇ Mac OS X ¤Ç¤â¡¢¥³¥ó¥Ñ¥¤¥ë¤µ¤¨¤Ç¤¤ì¤ÐÆ°ºî¤¹¤ë¤â¤Î¤È»×¤ï¤ì¤Þ¤¹¡£
-
- ¸½»þÅÀ¤Ç¤Ï¡¢¥¢¥»¥ó¥Ö¥é nasm ¤Î Darwin ¤Ø¤Î¥µ¥Ý¡¼¥È¤¬½½Ê¬¤Ç¤Ê¤¤¤¿¤á¡¢
- ¤ä¤ä¥È¥ê¥Ã¥¡¼¤Ê¥³¡¼¥É¤Ç Darwin / Mac OS X ¤ËÂбþ¤µ¤»¤Æ¤¤¤Þ¤¹¤¬¡¢
- Æ°ºî¤Ë¤Ï¤Þ¤Ã¤¿¤¯ÌäÂê¤Ê¤¤¤Ï¤º¤Ç¤¹¡£
-
- ¢¡ MinGW & MSYS (gcc 3.4.4)
-
- MinGW ¤Î¾ì¹ç¤Ï¡¢ÉÕ°¤Î makefile.mgw / makefile.mgwdll ¤ò»È¤¦¤³¤È¤ò
- ¿ä¾©¤·¤Þ¤¹¤¬¡¢MSYS ¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ì¤Ð configure ¥¹¥¯¥ê¥×¥È
- ¤â»È¤¨¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ï¡¢configure ¥¹¥¯¥ê¥×¥È¤òÁö¤é¤»¤ëºÝ¤Ë
- --enable-uchar-boolean ¤òɬ¤º»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£¤³¤¦¤¹¤ë¤³¤È¤Ç¡¢
- ¾¤Î Windows ·Ï¤Î½èÍý·Ï(VC++¤Ê¤É)¤¬½ÐÎϤ¹¤ë¥³¡¼¥É¤È¥Ð¥¤¥Ê¥ê¸ß´¹¤Ë
- ¤Ê¤ê¤Þ¤¹¡£
-
- ¢¡ cygwin (gcc 3.4.4)
-
- ¤Þ¤ºÃí°Õ¤¹¤Ù¤ÅÀ¤Ï¡¢cygwin ¤Î¾ì¹ç¡¢cygwin ¤«¤é¸ø¼°¤Ë¥ê¥ê¡¼¥¹¤µ¤ì¤Æ
- ¤¤¤ë DLL (cygjpeg-62.dll) ¤È¤Ï¥Ð¥¤¥Ê¥ê¸ß´¹¤Ë¤Ï¤Ê¤ê¤Þ¤»¤ó¡£¤³¤ì¤Ï¡¢
- ¸ø¼°ÈǤΥХ¤¥Ê¥ê¤Ë¤Ï lossless jpeg patch (ljpeg-6b.tar.gz) ¤È¤¤¤¦
- ½¤Àµ¥Ñ¥Ã¥Á¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¤¿¤á¤Ç¡¢ÅöSIMDÈǤËÂФ·¤Æ¤³¤Î¥Ñ¥Ã¥Á¤òŬÍÑ
- ¤¹¤ë¤³¤È¤Ïº¤Æñ¤À¤«¤é¤Ç¤¹¡£
-
- ¥Ð¥¤¥Ê¥ê¸ß´¹¤Ç¤Ï¤Ê¤¤¤¿¤á¡¢¸ø¼°¥ê¥ê¡¼¥¹ÈǤΠDLL ¤ò¤³¤ÎSIMDÈǤÇÃÖ¤
- ´¹¤¨¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£¤½¤Î¤¿¤áÅöSIMDÈǤΠDLL ¤Ï cygjpeg-162.dll
- ¤È¤¤¤¦Ì¾Á°¤Ë¤Ê¤ë¤è¤¦¤Ë¤·¤Æ¤¢¤ê¤Þ¤¹¡£¤³¤ì¤ò¥·¥¹¥Æ¥à¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë
- ¤³¤È¤â¤Ç¤¤Þ¤¹¤¬¡¢¤³¤ÎSIMDÈǤΠDLL ¤òÍøÍѤ¹¤ë¤Ë¤Ï¡¢JPEG ¥é¥¤¥Ö¥é¥ê¤ò
- »ÈÍѤ·¤Æ¤¤¤ë¥½¥Õ¥È¤òºÆ¥³¥ó¥Ñ¥¤¥ë¡¿ºÆ¥ê¥ó¥¯¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
-
- ¤Ê¤ª¡¢¤³¤Î DLL ¤Ë¤Ä¤±¤é¤ì¤ë¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÊѤ¨¤¿¤±¤ì¤Ð¡¢configure
- ¥¹¥¯¥ê¥×¥È¤òÁö¤é¤»¤ëÁ°¤Ë config.ver ¤ÎÆâÍƤòÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£
-
-
-¢£Ê£¿ô¥Õ¥¡¥¤¥ëÂбþÈǤΠcjpeg/djpeg (altui/)
-
- ¥µ¥ó¥×¥ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î cjpeg ¤È djpeg ¤Ë¤Ä¤¤¤Æ¤Ç¤¹¤¬¡¢¥Ç¥Õ¥©¥ë¥È¤Î
- ¾õÂ֤ǥ³¥ó¥Ñ¥¤¥ë¤µ¤ì¤ë¤â¤Î(¾¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë·²¤ÈƱ¤¸¾ì½ê¤Ë¤¢¤ë cjpeg.c
- ¤È djpeg.c) ¤Ï¡¢°ìÅ٤˰ì¤Ä¤Î¥Õ¥¡¥¤¥ë¤·¤«ÊÑ´¹¤Ç¤¤Ê¤¤¤â¤Î¤Ç¤¹¡£¤Ä¤Þ¤ê¡¢
- ÆþÎÏ¥Õ¥¡¥¤¥ë¤Ï¥³¥Þ¥ó¥É¥é¥¤¥ó¾å¤Ë°ì¤Ä¤·¤«»ØÄê¤Ç¤¤º¡¢½ÐÎϤÏɸ½à½ÐÎϤ«
- -outfile ¥ª¥×¥·¥ç¥ó¤Ç»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤Ë½ñ¤½Ð¤µ¤ì¤Þ¤¹¡£³Æ¼ï¤Î UNIX ·Ï
- OS ¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ìÍøÍѤµ¤ì¤Æ¤¤¤ë cjpeg/djpeg ¤Ï¤³¤Î¥¿¥¤¥×¤Î¤â¤Î¤Ç¤¹¡£
-
- °ìÊý¡¢IJG ¤«¤é¸ø¼°¤Ë¥ê¥ê¡¼¥¹¤µ¤ì¤Æ¤¤¤ë MS-DOS ÈǤΠcjpeg/djpeg
- (ftp://ftp.simtel.net/.2/simtelnet/msdos/graphics/jpeg6_b.zip) ¤Ç¤Ï¡¢
- Ê£¿ô¤ÎÆþÎÏ¥Õ¥¡¥¤¥ë¤ò»ØÄê¤Ç¤¡¢½ÐÎϤÏÆþÎÏ¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¾ì½ê¤Ë¼«Æ°Åª¤Ë
- ºî¤é¤ì¤Þ¤¹¡£¤³¤Î¥¿¥¤¥×¤Î cjpeg/djpeg ¤òºî¤ê¤¿¤±¤ì¤Ð¡¢altui/ ¤ÎÃæ¤Ë¤¢¤ë
- cjpeg.c ¤È djpeg.c ¤ò¡¢¸µ¤«¤é¤¢¤ë(£±¥Õ¥¡¥¤¥ëÈǤÎ) cjpeg.c / djpeg.c ¤È
- Æþ¤ìÂؤ¨¤Æ¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤Î altui ÈǤΠcjpeg.c / djpeg.c ¤Ï¡¢
- ¸µ¡¹ jpegaltui.v6b.tar.gz ¤È¤¤¤¦¥Õ¥¡¥¤¥ë̾¤ÇÇÛÉÛ¤µ¤ì¤Æ¤¤¤¿¤â¤Î¤ËÂФ·¤Æ
- SIMD Âбþ²½¤Ë´Ø¤¹¤ë½¤Àµ¤ò²Ã¤¨¤¿¤â¤Î¤Ç¤¹¡£
-
- ¤³¤ÎÊ£¿ô¥Õ¥¡¥¤¥ëÂбþÈǤΠcjpeg/djpeg ¤ò Windows ·Ï¤Ê¤É¤ÎÈó UNIX ´Ä¶¤Ç
- »ÈÍѤ¹¤ë¾ì¹ç¡¢ÆþÎÏ¥Õ¥¡¥¤¥ë̾¤ò¥ï¥¤¥ë¥É¥«¡¼¥É¤Ç»ØÄê¤Ç¤¤ë¤è¤¦¤Ë¤¹¤ë¤Ë¤Ï¡¢
- ³Æ¥³¥ó¥Ñ¥¤¥é¤Ë¸ÇͤÎÆÃÊ̤ÊÀßÄ꤬ɬÍפˤʤë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£¤Ê¤¼¤Ê¤é¡¢
- MS-DOS·Ï¡¿Windows·Ï¤Î´Ä¶¤Ç¤Ï°ìÈ̤ˡ¢¥ï¥¤¥ë¥É¥«¡¼¥É¤ÎŸ³«½èÍý¤Ï¥³¥ó¥Ñ¥¤¥é
- ¤ËÉÕ°¤Î¥¹¥¿¡¼¥È¥¢¥Ã¥×¥³¡¼¥ÉÆâ¤Ç¹Ô¤Ê¤ï¤ì¤ë¤¿¤á¤Ç¤¹¡£
-
- MinGW ¤ä DJGPP V.2 ¤Ê¤É¤Î¾ì¹ç¤Ï¡¢¥ï¥¤¥ë¥É¥«¡¼¥É¤ÎŸ³«½èÍý¤ÏºÇ½é¤«¤é͸ú
- ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤¿¤á¡¢ÆÃÊ̤ʤ³¤È¤ò¤·¤Ê¤¯¤Æ¤â¥ï¥¤¥ë¥É¥«¡¼¥É¤Ë¤è¤ë¥Õ¥¡¥¤¥ë»ØÄê
- ¤Ï¤Ç¤¤Þ¤¹¡£Microsoft Visual C++ ¤ä Borland C++ ¤Î¾ì¹ç¤Ï¡¢ÉáÄÌ¡¢¥ï¥¤¥ë¥É
- ¥«¡¼¥ÉŸ³«¤ò͸ú²½¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤Ç¤¢¤ë setargv.obj ¤ä
- wildargs.obj ¤ò EXE ¥Õ¥¡¥¤¥ë¤Î¥ê¥ó¥¯»þ¤Ë¾¤Î¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤È°ì½ï¤Ë
- ¥ê¥ó¥¯¤¹¤ë¤³¤È¤Ç¡¢¥ï¥¤¥ë¥É¥«¡¼¥ÉŸ³«¤ò͸ú²½¤Ç¤¤Þ¤¹¤¬¡¢¤³¤Î SIMD ÈÇ
- cjpeg/djpeg ¤Î¾ì¹ç¤Ï¡¢setargv.obj ¤ä wildargs.obj ¤ÎÆâÍƤËÁêÅö¤¹¤ë¥³¡¼¥É¤ò
- cjpeg.c/djpeg.c ¤ËľÀܽñ¤¹þ¤ó¤Ç¤¢¤ë¤¿¤á¡¢¥×¥í¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤ä Makefile
- ¤Ë¾åµ¤Î¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤òÄɲ䷤ʤ¯¤Æ¤â¡¢¥ï¥¤¥ë¥É¥«¡¼¥É¤Ë¤è¤ë¥Õ¥¡¥¤¥ë
- »ØÄ꤬¤Ç¤¤ë¤è¤¦¤Ë¤·¤Æ¤¢¤ê¤Þ¤¹¡£¤³¤ì¤é°Ê³°¤Î£Ã¥³¥ó¥Ñ¥¤¥é¤ò»ÈÍѤ·¤¿¾ì¹ç¤Ç¡¢
- ¥ï¥¤¥ë¥É¥«¡¼¥É¤Ë¤è¤ë¥Õ¥¡¥¤¥ë»ØÄ꤬¤Ç¤¤Ê¤¤¾ì¹ç¤Ï¡¢¥³¥ó¥Ñ¥¤¥é¤Î¥Þ¥Ë¥å¥¢¥ë
- ¤ò»²¾È¤·¤Æ¡¢¥ï¥¤¥ë¥É¥«¡¼¥ÉŸ³«¤ò͸ú²½¤¹¤ëÀßÄê¤Ç¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- °ìÊý¡¢linux ¤Ê¤É¤Î UNIX ´Ä¶¤Ç¤Ï¡¢¥ï¥¤¥ë¥É¥«¡¼¥É¤ÎŸ³«½èÍý¤Ï¥×¥í¥°¥é¥à¤¬
- µ¯Æ°¤µ¤ì¤ëÁ°¤Ë¥³¥Þ¥ó¥É¥·¥§¥ë¤Ë¤è¤Ã¤Æ¹Ô¤Ê¤ï¤ì¤ë¤¿¤á¡¢¥³¥ó¥Ñ¥¤¥é¤ÎÀßÄê¤Ê¤É
- ¤ÏɬÍפ¢¤ê¤Þ¤»¤ó¡£¥ï¥¤¥ë¥É¥«¡¼¥É¤Ë¤è¤ë¥Õ¥¡¥¤¥ë̾»ØÄê¤Ï¾ï¤Ë»È¤¨¤Þ¤¹¡£
-
-
-¢£¥³¡¼¥É¥µ¥¤¥º¤ò¸º¤é¤¹¤Ë¤Ï
-
- SIMD ¥³¡¼¥É¤òÉղä·¤¿¤¿¤á¡¢¤½¤Îʬ¤À¤±¥³¡¼¥É¥µ¥¤¥º¤¬Áý¤¨¤Æ¤¤¤Þ¤¹¡£¤Ç¤¹¤¬¡¢
- JPEG library ¤ò°Ê²¼¤Î¤è¤¦¤Ê¥Ç¥Õ¥©¥ë¥È¤Î¾õÂ֤Ǿï¤Ë»ÈÍѤ·¤Æ¤¤¤ë¤Î¤Ê¤é¤Ð¡¢
- jmorecfg.h ¤ÎÃæ¤Ë¤¢¤ëÀßÄê¹àÌÜ(¥Þ¥¯¥í)¤ò°Ê²¼¤Î¤è¤¦¤ËÊѹ¹¤·¤Æ¥³¥ó¥Ñ¥¤¥ë
- ¤¹¤ë¤³¤È¤Ç¡¢»ÈÍѤµ¤ì¤Ê¤¤¥³¡¼¥É¤ò½ü³°¤¹¤ë¤³¤È¤¬¤Ç¤¡¢¥³¡¼¥É¥µ¥¤¥º¤ò¸º¤é¤¹
- ¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
-
- ¡û cinfo.dct_method ¤ÎÃͤòÊѹ¹¤·¤Æ¤¤¤Ê¤¤¾ì¹ç
-
- ¤³¤ÎÊÑ¿ô¤Ï DCT±é»»¤ÎÊýË¡¤ò»ØÄꤷ¡¢cjpeg/djpeg ¤Ç¤Ï -dct ¥ª¥×¥·¥ç¥ó¤Ë
- Âбþ¤·¤Þ¤¹¡£¤³¤ÎÊÑ¿ô¤ÎÃͤϥǥե©¥ë¥È¤Ç¤Ï JDCT_ISLOW ¤Ç¡¢ÆäËÍýͳ¤Î
- ¤Ê¤¤¸Â¤ê¤³¤Î¥Ç¥Õ¥©¥ë¥È¤Î¾õÂ֤ǻÈÍѤ¹¤ë¤³¤È¤ò¶¯¤¯¿ä¾©¤·¤Þ¤¹¡£°Ê²¼¤Î
- ¥Þ¥¯¥í¤ò #undef ¤Ë¤¹¤ë¤³¤È¤Ç¡¢JDCT_ISLOW ¤Î¾õÂ֤ǤϷ褷¤Æ»ÈÍѤµ¤ì¤Ê¤¤
- ¥³¡¼¥É¤ò½ü³°¤Ç¤¤Þ¤¹¡£
-
- #define DCT_IFAST_SUPPORTED -> #undef DCT_IFAST_SUPPORTED
- #define DCT_FLOAT_SUPPORTED -> #undef DCT_FLOAT_SUPPORTED
-
- ¤³¤ì¤À¤±¤Ç¤â¤«¤Ê¤ê¤Î¥³¡¼¥É¥µ¥¤¥º¤¬ºï¸º¤Ç¤¤Þ¤¹¡£ÆÃ¤Ë DCT_FLOAT_SUPPORTED
- ¤ò #undef ¤Ë¤¹¤ë¤È¡¢3DNow! ¤È SSE ¤Î¥µ¥Ý¡¼¥È¤â¼«Æ°Åª¤Ë̵¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£
-
- ¡ûŸ³«½èÍý¤Ç cinfo.do_fancy_upsampling ¤ÎÃͤòÊѹ¹¤·¤Æ¤¤¤Ê¤¤¾ì¹ç
-
- ¤³¤ÎÊÑ¿ô¤Ï djpeg ¤Ç¤Ï -nosmooth ¥ª¥×¥·¥ç¥ó¤ËÁêÅö¤·¡¢-nosmooth ¤ò»ØÄê
- ¤¹¤ë¤È FALSE ¤ËÀßÄꤵ¤ì¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï TRUE ¤Ç¡¢¤³¤ì¤âÆäËÍýͳ¤Î
- ¤Ê¤¤¸Â¤ê¤³¤Î¥Ç¥Õ¥©¥ë¥È¤Î¾õÂ֤ǻÈÍѤ¹¤ë¤³¤È¤ò¶¯¤¯¿ä¾©¤·¤Þ¤¹¡£°Ê²¼¤Î
- ¥Þ¥¯¥í¤ò #undef ¤Ë¤¹¤ë¤³¤È¤Ç¡¢TRUE ¤Î¾õÂ֤ǤϷ褷¤Æ»ÈÍѤµ¤ì¤Ê¤¤¥³¡¼¥É¤ò
- ½ü³°¤Ç¤¤Þ¤¹¡£
-
- #define UPSAMPLE_MERGING_SUPPORTED -> #undef UPSAMPLE_MERGING_SUPPORTED
-
- ¡ûŸ³«½èÍý¤Ç cinfo.scale_num, cinfo.scale_denom ¤ÎÃͤòÊѹ¹¤·¤Æ¤¤¤Ê¤¤¾ì¹ç
-
- ¤³¤ì¤ÏÍפ¹¤ë¤Ë¡ÖJPEG½Ì¾®Å¸³«¡×¤Îµ¡Ç½¤Ç¡¢djpeg ¤Ç¤Ï -scale M/N ¥ª¥×
- ¥·¥ç¥ó¤ËÁêÅö¤·¤Þ¤¹¡£¥µ¥à¥Í¥¤¥ëºîÀ®¤Ê¤É¤Î¾ì¹ç¤ËÍøÍѤµ¤ì¤ë¤³¤È¤¬Â¿¤¤
- µ¡Ç½¤Ç¤¹¤¬¡¢¤³¤ì¤ò¤Þ¤Ã¤¿¤¯»ÈÍѤ·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢°Ê²¼¤Î¥Þ¥¯¥í¤ò #undef
- ¤Ë¤¹¤ë¤³¤È¤Ç¡¢¥³¡¼¥ÉÎ̤òºï¸º¤Ç¤¤Þ¤¹¡£
-
- #define IDCT_SCALING_SUPPORTED -> #undef IDCT_SCALING_SUPPORTED
-
- Ãí°ÕÅÀ¤È¤·¤Æ¡¢¤³¤ì¤é¤ÎÀßÄêÊÑ¿ô¤¬¤É¤Î¤è¤¦¤Ê¾õÂ֤ǻȤï¤ì¤ë¤«Í½Â¬¤Ç¤¤Ê¤¤
- ¾ì¹ç¡¢¤¿¤È¤¨¤Ð¡¢¥·¥¹¥Æ¥à¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¶¦Í¥é¥¤¥Ö¥é¥ê¤òºî¤ë¾ì¹ç¤Ê¤É
- ¤Ï¡¢¤³¤¦¤¤¤Ã¤¿¥³¡¼¥Éºï¸º¤Ï¹Ô¤Ê¤¦¤Ù¤¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¥³¡¼¥Éºï¸º¤ò¹Ô¤Ê¤¦
- ¤Î¤Ï¡¢JPEG ¥é¥¤¥Ö¥é¥ê¤Î»È¤ï¤ìÊý¤¬¤è¤¯¤ï¤«¤Ã¤Æ¤¤¤ëÆÃÄê¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó
- ¤Ë¥ê¥ó¥¯¤¹¤ë¾ì¹ç¤Î¤ß¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
-
-
-¢£ÆÃÄê¤Î SIMD Ì¿Îá¤ò»ÈÍѤ·¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤Ë¤Ï
-
- ¤³¤ì¤Ï jconfig.h ¤ÎÃæÄø¤Ë¤¢¤ë¡¢#undef JSIMD_***_NOT_SUPPORTED ¤È¤¤¤¦
- ¥Þ¥¯¥í¤ò #define ¤Ë¤¹¤ë¤³¤È¤Ç¼Â¸½¤Ç¤¤Þ¤¹¡£configure ¥¹¥¯¥ê¥×¥È¤Ç
- --disable-mmx ¤Ê¤É¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢¤³¤Î¥Þ¥¯¥í¤Ï¼«Æ°Åª¤Ë
- #define ¤µ¤ì¤Þ¤¹¡£
-
- 3DNow! ¤È SSE ¤Ï¸µ¡¹¡¢ÉâÆ°¾®¿ôÅÀDCT¤Ë¤·¤«ÍøÍѤµ¤ì¤Æ¤¤¤Þ¤»¤ó¤Î¤Ç¡¢¾å½Ò¤Î
- DCT_FLOAT_SUPPORTED ¤ò #undef ¤Ë¤·¤¿¤À¤±¤Ç¤Þ¤È¤á¤Æ̵¸ú¤Ë¤µ¤ì¤Þ¤¹¡£
- MMX ¤È SSE2 ¤Ï¡¢°µ½ÌŸ³«½èÍý¤Î³Æ½ê¤ËÍøÍѤµ¤ì¤Æ¤¤¤Æ¡¢¹â®²½¤Ø¤Î¹×¸¥ÅÙ¤¬
- ¹â¤¤¤Î¤Ç¡¢Í¸ú¤Ë¤·¤Æ¤ª¤¯¤³¤È¤ò¤ªÁ¦¤á¤·¤Þ¤¹¤¬¡¢ÁȤ߹þ¤ßÍÑÅӤʤɡ¢¥³¡¼¥É
- ¤òÁö¤é¤»¤ë¥×¥í¥»¥Ã¥µ¤Î¼ïÎब¤ï¤«¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¡ÖÄ̾ïÍøÍѤµ¤ì¤Ê¤¤Êý¡×
- ¤Î¥µ¥Ý¡¼¥È¤ò³°¤¹¤³¤È¤Ç¡¢¥³¡¼¥É¥µ¥¤¥º¤Îºï¸º¤¬¤Ç¤¤Þ¤¹¡£
-
-
-
-[EOF]
diff --git a/simd_internal.ja.txt b/simd_internal.ja.txt
deleted file mode 100644
index d234901..0000000
--- a/simd_internal.ja.txt
+++ /dev/null
@@ -1,293 +0,0 @@
-Independent JPEG Group's JPEG software release 6b
- with x86 SIMD extension for IJG JPEG library version 1.02
- == INTERNAL ==
------------------------------------------------------------
-
-¢£¤³¤Î¥Õ¥¡¥¤¥ë¤Ï
-
- ¤³¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢SIMD ÈÇ libjpeg ¥é¥¤¥Ö¥é¥ê¤Î¡¢SIMD ³ÈÄ¥Éôʬ¤Î¾ÜºÙ¤ò
- ²òÀ⤷¤Þ¤¹¡£SIMD ³ÈÄ¥Éôʬ¤ËÂФ·¤Æ²¿¤é¤«¤Î¼ê¤ò²Ã¤¨¤¿¤¤¾ì¹ç¤ä¡¢É¸½à¤Ç¤Ï
- Âбþ¤·¤Æ¤¤¤Ê¤¤¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤ËÂбþ¤µ¤»¤¿¤¤¾ì¹ç¤Ê¤É¤Ï¡¢¤³¤³¤òÆɤó¤Ç
- ¤¯¤À¤µ¤¤¡£
-
- ¢£¥Õ¥¡¥¤¥ë¥Õ¥©¡¼¥Þ¥Ã¥È¡¿¸Æ¤Ó½Ð¤·µ¬Ìó(ABI)¤Î»ØÄê
- ¢£OS ¤Î SIMD ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯ (jsimdgcc.c / jsimddjg.asm / jsimdw32.asm)
- ¢£¥¢¥»¥ó¥Ö¥ê¸À¸ìÍÑÀßÄê¥Õ¥¡¥¤¥ë jsimdcfg.inc ¤ÎºîÀ® (makecfg.c)
- ¢£SIMD Ì¿Îá¤Î¼Â¹Ô»þ¤ÎÁªÂò¡¿SIMD Æ°ºî¥â¡¼¥É¾ðÊó
- ¢£¤½¤Î¤Û¤«¤ÎÀßÄê¹àÌÜ¥Þ¥¯¥í
- ¡û RGB_RED / RGB_GREEN / RGB_BLUE / RGB_PIXELSIZE
- ¡û RGBX_FILLER_0XFF
- ¡û JFDCT_INT_QUANTIZE_WITH_DIVISION
- ¡û UPSAMPLE_H1V2_SUPPORTED
-
-
-¢£¥Õ¥¡¥¤¥ë¥Õ¥©¡¼¥Þ¥Ã¥È¡¿¸Æ¤Ó½Ð¤·µ¬Ìó(ABI)¤Î»ØÄê
-
- ¥¢¥»¥ó¥Ö¥ê¸À¸ì¤Ç½ñ¤«¤ì¤¿¥³¡¼¥É¤ò¡¢£Ã¸À¸ì¤Ê¤É¤Î¹âµé¸À¸ì¤Ç½ñ¤«¤ì¤¿¥³¡¼¥É
- ¤È¥ê¥ó¥¯¤¹¤ë¤Ë¤Ï¡¢¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤ò°ìÃפµ¤»¤ë¤³¤È¡¢
- ¤ª¤è¤Ó¡¢¸Æ¤Ó½Ð¤·µ¬Ìó¤Ê¤É¤Î¥Ð¥¤¥Ê¥ê¥³¡¼¥É¤Îµ¬Ìó(ABI)¤ò°ìÃפµ¤»¤ë¤³¤È¤¬
- ɬÍפǤ¹¡£¤³¤Î¥½¥Õ¥È¤Ç¤Ï¡¢¤³¤ì¤é¤Î»ØÄê¤ò¡¢¥¢¥»¥ó¥Ö¥é nasm ¤ËÍ¿¤¨¤ë¥ª¥×
- ¥·¥ç¥ó¤Ç»ØÄꤷ¤Æ¤¤¤Þ¤¹¡£
-
- ¡¦nasm -fwin32 -DWIN32 ...
-
- Win32 ¤Î coff ¥Õ¥©¡¼¥Þ¥Ã¥È¡£Microsoft Visual C++ ¤ä MinGW¡¦CygWin
- ¤Ê¤É¡¢Win32 ¥³¥ó¥Ñ¥¤¥é¤ÎÂçÉôʬ¤¬³ºÅö¡£
-
- ¡¦nasm -fobj -DOBJ32 ...
-
- Win32 ¤Î obj ¥Õ¥©¡¼¥Þ¥Ã¥È¡£¸µ¡¹¤Ï MS-DOS ¤Ç»È¤ï¤ì¤Æ¤¤¤¿ obj ·Á¼°
- (MSOMF)¤ò 32bit ¤Ë³ÈÄ¥¤·¤¿¤â¤Î¡£Borland C++ Complier (Win32) ¤Ê¤É¡£
-
- ¡¦nasm -felf -DELF ...
-
- ³Æ¼ï¤Î UNIX ¤Ç¹¤¯ºÎÍѤµ¤ì¤Æ¤¤¤ë ELF ¥Õ¥©¡¼¥Þ¥Ã¥È¡£linux ¤ä xBSD
- ¥Õ¥¡¥ß¥ê¤Ê¤É¡¢¸½ºß¤Î UNIX ¤ÎÂçÉôʬ¤¬³ºÅö¡£
-
- ¡¦nasm -faoutb -DAOUT ...
-
- °ÊÁ°¤Î xBSD ¥Õ¥¡¥ß¥ê¤Ç»È¤ï¤ì¤Æ¤¤¤¿ a.out ¥Õ¥©¡¼¥Þ¥Ã¥È¡£
-
- ¡¦nasm -fmacho -DMACHO ...
-
- Darwin (MacOS X) ¤Ê¤É¤ÇºÎÍѤµ¤ì¤Æ¤¤¤ë Mach-O ¥Õ¥©¡¼¥Þ¥Ã¥È¡£
- Ãí¡Ë-fmacho ¥ª¥×¥·¥ç¥ó¤Ï nasm 0.98.40 °Ê¹ß¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤¹¡£
-
- ¡¦nasm -fcoff -DDJGPP ...
-
- MS-DOS ¤Î DJGPP ¥³¥ó¥Ñ¥¤¥é¤Ç»È¤ï¤ì¤ë coff ¥Õ¥©¡¼¥Þ¥Ã¥È¡£
-
- ¤³¤Î¤¦¤Á¡¢-f ¥ª¥×¥·¥ç¥ó¤Ï nasm ¤¬²ò¼á¤¹¤ë¥Õ¥¡¥¤¥ë¥Õ¥©¡¼¥Þ¥Ã¥È¤Î»ØÄê»Ò¤Ç¡¢
- -D ¥ª¥×¥·¥ç¥ó(¥Þ¥¯¥í¤ÎÄêµÁ)¤Ï jsimdext.inc ¤ÎÃæ¤Ç²ò¼á¤µ¤ì¤ë¥Ð¥¤¥Ê¥êµ¬Ìó
- (ABI)¤Î»ØÄê»Ò¤Ç¤¹¡£jsimdext.inc ¤Ç¤Ï¡¢-D ¥ª¥×¥·¥ç¥ó¤Ç¤Î¥Þ¥¯¥íÄêµÁ¤Ë½¾¤Ã¤Æ¡¢
- ¥»¥°¥á¥ó¥È(¥»¥¯¥·¥ç¥ó)¤ÎÄêµÁ¤ä³°Éô̾̾Á°Áõ¾þ¤ÎÄêµÁ¤ò¹Ô¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
- ¾Ü¤·¤¯¤Ï jsimdext.inc ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
-
- ELF ·Á¼° ¤ª¤è¤Ó a.out ·Á¼° ¤Î¾ì¹ç¡¢-DPIC ¤òÄɲ䷤ƻØÄꤹ¤ë¤È¥³¡¼¥É¤¬
- Position Independent Code (°ÌÃÖÆÈΩ¥³¡¼¥É) ¤Ë¤Ê¤ê¤Þ¤¹¡£-DPIC ¤Ï
- jsimdext.inc ¤ÎÃæ¤Ç²ò¼á¤µ¤ì¡¢¥³¡¼¥É¤ò PIC ¤Ë¤¹¤ë¤¿¤á¤Î¥Þ¥¯¥í¤òÄêµÁ¤·¤Þ¤¹¡£
- Mach-O ·Á¼°¤Î¾ì¹ç¤Ï¡¢¥³¡¼¥É¤Ï¾ï¤Ë PIC ¤Ç¤¢¤ëɬÍפ¬¤¢¤ë¤¿¤á¡¢-DPIC ¤ò
- »ØÄꤷ¤Ê¤¯¤Æ¤â¾ï¤Ë PIC ·Á¼°¤Î¥³¡¼¥É¤òÀ¸À®¤·¤Þ¤¹¡£
-
- ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ë±þ¤¸¤Æ¡¢¤³¤ì¤é¤ÎÃ椫¤éŬÀڤʤâ¤Î¤òÁªÂò¤¹¤ëɬÍפ¬¤¢¤ê
- ¤Þ¤¹¡£Æ±º¤Î makefile ¤Ç¤Ï¡¢¤¢¤é¤«¤¸¤áŬÀڤʤâ¤Î¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£
- configure ¥¹¥¯¥ê¥×¥È¤Ç¤Ï¡¢config.guess ¤¬½ÐÎϤ¹¤ë¥Û¥¹¥È¾ðÊó¤ò¸µ¤ËÁªÂò
- ¤·¤Æ¤¤¤Þ¤¹¡£
-
-
-¢£OS ¤Î SIMD ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯ (jsimdgcc.c / jsimddjg.asm / jsimdw32.asm)
-
- SIMD Ì¿Îá¤ò¼Â¹Ô¤¹¤ë¤Ë¤Ï¡¢»öÁ°¤Î CPU ¤Î¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯¤À¤±¤Ç¤Ï¤Ê¤¯¡¢
- OS ¤Î¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯¤âɬÍפǤ¹¡£ÆÃ¤Ë SSE/SSE2 ¤Ë¤Ä¤¤¤Æ¤Ï¡¢OS ¦¤Ç
- SSE/SSE2 Ì¿Îá¤ò¼Â¹Ô¤Ç¤¤ë¤è¤¦¤Ë»öÁ°¤ËCPU¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¡¢¤½¤ì¤ò
- ¹Ô¤Ê¤Ã¤Æ¤¤¤Ê¤¤ OS ¤Ç¤Ï¡¢OS ¤¬¥·¥ó¥°¥ë¥¿¥¹¥¯¤«¥Þ¥ë¥Á¥¿¥¹¥¯¤«¤Ë´Ø¤ï¤é¤º¡¢
- SSE/SSE2 ¤Ï¼Â¹Ô¤Ç¤¤Þ¤»¤ó¡£¤µ¤é¤Ë¡¢¤¢¤Þ¤êÃΤé¤ì¤Æ¤¤¤Þ¤»¤ó¤¬¡¢CPU ¤Ë
- Æ⢤µ¤ì¤¿ FPU (¿ôÃͱ黻¥×¥í¥»¥Ã¥µ) ¤ò»ÈÍѤ·¤Ê¤¤(¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë)ÀßÄê
- ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È¡¢MMX ¤ä 3DNow! ¤â´Þ¤á¤¹¤Ù¤Æ¤Î SIMD Ì¿Îá¤ÏÁ´¤¯¼Â¹Ô¤Ç¤
- ¤Þ¤»¤ó¡£Íפ¹¤ë¤Ë¡¢SIMD Ì¿Îá¤ò¼Â¹Ô¤Ç¤¤ë¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¤Ë¤Ï¡¢CPUID ¤Î
- ¥Õ¥é¥°¤òÄ´¤Ù¤ë¤À¤±¤Ç¤ÏÉÔ½½Ê¬¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
-
- SIMD Ì¿Îá¤Î OS ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯¤È¤¤¤Ã¤Æ¤â¡¢Êݸî¥â¡¼¥É¤ÇÆ°¤¤¤Æ¤¤¤ë
- ¥×¥í¥°¥é¥à¤Î¾ì¹ç¡¢CPU ¤ÎÀßÄê¥Õ¥é¥°¤Î¾õÂÖ¤òľÀܥ桼¥¶¡¦¥×¥í¥°¥é¥à¤«¤é
- ÆɤߤȤ뤳¤È¤¬¤Ç¤¤Ê¤¤¤¿¤á¡¢SIMD Ì¿Îá¤ò»î¤·¤Ë¼Â¹Ô¤·¤Æ¤ß¤Æ̵¸úÌ¿ÎáÎã³°¤¬
- ȯÀ¸¤¹¤ë¤«¤É¤¦¤«¤ò³Î¤«¤á¤ë¤È¤¤¤¦¡¢°Ü¿¢À¤Î°¤¤´ÖÀÜŪ¤ÊÊýË¡¤òºÎ¤é¤¶¤ë¤ò
- ÆÀ¤Ê¤¤¤Î¤¬¸½¾õ¤Ç¤¹¡£
-
- ¤³¤Î SIMD Ì¿Îá¤Î OS ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯¤ò¤ä¤Ã¤Æ¤¤¤ë¤Î¤¬¡¢jsimdgcc.c /
- jsimddjg.asm / jsimdw32.asm ¤Î£³¤Ä¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ç¤¹¡£¤½¤ì¤¾¤ì¡¢
- UNIX/gccÍÑ¡¢DJGPPÍÑ¡¢Win32ÍѤǤ¹¡£jsimdgcc.c ¤Ç¤Ï¡¢Îã³°¤ÎȯÀ¸¤ò
- signal() ´Ø¿ô¤Î¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ÇÊá¤Þ¤¨¤Æ¤¤¤Þ¤¹¡£¥³¡¼¥É¤Î°ìÉô¤Ë gcc ¤Î
- ¥¤¥ó¥é¥¤¥ó¥¢¥»¥ó¥Ö¥é¤ò»È¤Ã¤Æ¤¤¤ë¤¿¤á¡¢gcc ÀìÍѤǤ¹¡£gcc °Ê³°¤Ç¤â
- ¥³¥ó¥Ñ¥¤¥ë¤Ï¤Ç¤¤Þ¤¹¤¬¡¢¤³¤Î¾ì¹ç¤Ï SIMD Ì¿Îá¤Î¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯¤Ï
- ¹Ô¤Ê¤ï¤ì¤Þ¤»¤ó¡£jsimddjg.asm ¤Ï DPMI ¤ÎÎã³°½èÍýµ¡¹½¤òľÀÜÍøÍѤ·¤¿
- ÊýË¡¤Ç¡¢jsimdw32.asm ¤Ï Win32 ¤ÎÎã³°½èÍýµ¡¹½¤òľÀÜÍøÍѤ·¤¿ÊýË¡¤Ç¤¹¡£
-
- ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ë±þ¤¸¤Æ¡¢¤³¤Î£³¼ïÎà¤ÎÃ椫¤éŬÀڤʤâ¤Î¤òÁªÂò¤¹¤ëɬÍפ¬
- ¤¢¤ê¤Þ¤¹¡£Æ±º¤Î makefile ¤Ç¤Ï¡¢¤¢¤é¤«¤¸¤áŬÀڤʤâ¤Î¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£
- configure ¥¹¥¯¥ê¥×¥È¤Ç¤Ï¡¢config.guess ¤¬½ÐÎϤ¹¤ë¥Û¥¹¥È¾ðÊó¤ò¸µ¤ËÁªÂò
- ¤·¤Æ¤¤¤Þ¤¹¡£
-
- ¤³¤Î£³¼ïÎà¤Î¤É¤ì¤È¤âŬ¹ç¤·¤Ê¤¤¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¾ì¹ç¤Ï¡¢¿·¤¿¤Ê¥Á¥§¥Ã¥¯
- ´Ø¿ô¤ò½ñ¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£¤Ç¤¹¤¬¡¢¤½¤Î OS ¤¬Á´¤Æ¤Î SIMD Ì¿Îá¤ò¥µ¥Ý¡¼¥È
- ¤·¤Æ¤¤¤ë OS ¤Ç¤¢¤ë¤³¤È¤¬¤ï¤«¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¤³¤Î OS ¥µ¥Ý¡¼¥È¥Á¥§¥Ã¥¯¤Ï
- ¾Êά¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£°Ê²¼¤Î¤è¤¦¤Ê¶õ¤Î´Ø¿ô¤Î¤ß¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò
- ºî¤Ã¤Æ¾åµ¤Î£³¤Ä¤Î¥Õ¥¡¥¤¥ë¤ÎÂå¤ï¤ê¤Ë»ÈÍѤ¹¤ë¤«¡¢¤â¤·¤¯¤Ï jcomapi.c ¤ò
- ²þÊѤ·¤Æ jpeg_simd_os_support ¤Î¸Æ¤Ó½Ð¤·¤ò¥Ð¥¤¥Ñ¥¹¤¹¤ë¤è¤¦¤Ë¤¹¤ì¤Ð£Ï£Ë
- ¤Ç¤¹¡£
-
- GLOBAL(unsigned int)
- jpeg_simd_os_support (unsigned int simd)
- {
- return simd;
- }
-
-
-¢£¥¢¥»¥ó¥Ö¥ê¸À¸ìÍÑÀßÄê¥Õ¥¡¥¤¥ë jsimdcfg.inc ¤ÎºîÀ® (makecfg.c)
-
- Åö¥½¥Õ¥È¤Î¾ì¹ç¡¢¥¢¥»¥ó¥Ö¥ê¸À¸ì¤Î¥½¡¼¥¹¥³¡¼¥ÉÃ椫¤é£Ã¸À¸ì¤Î¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë
- ¤Ë¤¢¤ë¾ðÊ󡢤¿¤È¤¨¤Ð¡¢¥×¥ê¥×¥í¥»¥Ã¥µ¥Þ¥¯¥í¤ÎÃͤ乽¤ÂΤÎÃæ¤Ë¤¢¤ëÊÑ¿ô¤Î
- ¥ª¥Õ¥»¥Ã¥È¤Ê¤É¡¢¤òÃΤëɬÍפ¬¤¢¤ê¤Þ¤¹¡£makecfg.c ¤Ï¡¢JPEG ¥é¥¤¥Ö¥é¥ê¤Î
- ¥³¥ó¥Ñ¥¤¥ë¤ËÀèΩ¤Ã¤Æ¥³¥ó¥Ñ¥¤¥ë¡¦¥ê¥ó¥¯¡¦¼Â¹Ô¤µ¤ì¡¢¥¢¥»¥ó¥Ö¥ê¸À¸ì¦¤Î
- ¥½¡¼¥¹¥³¡¼¥É¤ÇɬÍפȤʤë¾ðÊó¤ò¥¢¥»¥ó¥Ö¥ê¸À¸ìÍÑÀßÄê¥Õ¥¡¥¤¥ë jsimdcfg.inc
- ¤È¤·¤Æ½ÐÎϤ¹¤ëƯ¤¤ò¤·¤Æ¤¤¤Þ¤¹¡£
-
- Ãí°ÕÅÀ¤È¤·¤Æ¡¢makecfg.c ¤Ï JPEG ¥é¥¤¥Ö¥é¥ê¤Î¥½¡¼¥¹¥³¡¼¥É¤ÈƱ¤¸¥³¥ó¥Ñ¥¤¥ë
- ¥ª¥×¥·¥ç¥ó¤Ç¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£Æäˡ¢¹½Â¤ÂΤβò¼á(¥µ¥¤¥º
- ¤Ê¤É)¤¬ JPEG ¥é¥¤¥Ö¥é¥êËÜÂΤΤâ¤Î¤È°Û¤Ê¤Ã¤Æ¤·¤Þ¤¦¤È¡¢JPEG ¥é¥¤¥Ö¥é¥ê¤¬
- ¥¯¥é¥Ã¥·¥å¤·¤Þ¤¹¡£
-
-
-¢£SIMD Ì¿Îá¤Î¼Â¹Ô»þ¤ÎÁªÂò¡¿SIMD Æ°ºî¥â¡¼¥É¾ðÊó
-
- ¤³¤Î SIMD ³ÈÄ¥ÈÇ JPEG ¥é¥¤¥Ö¥é¥ê¤Ç¤Ï¡¢¥×¥í¥°¥é¥à¤Î¼Â¹Ô»þ¤ËÆÃÄê¤Î SIMD
- Ì¿Îá¤ò»ÈÍѤ·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¤ê¡¢³Æ½èÍýÃʳ¬¤Ç¤É¤Î SIMD Ì¿Îá¤ò»ÈÍѤ·¤ÆÆ°ºî
- ¤¹¤ë¤Î¤«¤òÇÄ°®¤Ç¤¤ë»ÅÁȤߤ¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-
- jpeg_simd_mask() ¤ò»È¤¦¤È¡¢ÆÃÄê¤Î SIMD Ì¿Îá¤ò¼Â¹Ô»þ¤Ë»ÈÍѤ·¤Ê¤¤¤è¤¦¤Ë
- ¤Ç¤¤Þ¤¹¡£
-
- GLOBAL(unsigned)
- jpeg_simd_mask (j_common_ptr cinfo, unsigned remove, unsigned add);
-
- ¤³¤Î´Ø¿ô¤Ï¡¢³Æ SIMD Ì¿Î᥻¥Ã¥È¤ËÂбþ¤¹¤ë¥Þ¥¹¥¯¥Ó¥Ã¥È¤òÀßÄꡦÊѹ¹¤·¤Þ¤¹¡£
- remove, add ¤½¤·¤ÆÌá¤êÃͤϡ¢³Æ SIMD Ì¿Îá¤ËÂбþ¤¹¤ë¥Ó¥Ã¥ÈÃÍ (JSIMD_MMX,
- JSIMD_3DNOW, JSIMD_SSE, JSIMD_SSE2) ¤ò OR ±é»»¤ÇÁȤ߹ç¤ï¤»¤¿¤â¤Î¤Ç¤¹¡£
-
- "¥Þ¥¹¥¯¥Ó¥Ã¥È" ¤Ï¡¢¹½Â¤ÂÎ cinfo ¤ËÊÝ»ý¤µ¤ì¤ëÃͤǡ¢¤½¤Î½é´üÃÍ¤Ï 0 ¤Ç¤¹¡£
- ¤½¤·¤Æ¤³¤Î´Ø¿ô¤Ï¡¢¤³¤Î¥Þ¥¹¥¯¥Ó¥Ã¥È¤ò°Ê²¼¤Î¤è¤¦¤Ë¹¹¿·(Áàºî)¤·¤Þ¤¹¡£
-
- (¿·¤·¤¤¥Þ¥¹¥¯¥Ó¥Ã¥È) = ((¸Å¤¤¥Þ¥¹¥¯¥Ó¥Ã¥È) & ~remove) | add;
-
- ¤½¤·¤Æ¡¢¤³¤Î¥Þ¥¹¥¯¥Ó¥Ã¥È¤¬ 1 ¤Ë¤µ¤ì¤¿ SIMD Ì¿Î᥻¥Ã¥È¤Ï¡¢¤¿¤È¤¨ CPU/OS
- ¤ÇÂбþ¤·¤Æ¤¤¤Æ¤â»ÈÍѤµ¤ì¤Þ¤»¤ó¡£¤³¤Î´Ø¿ô¤Ï¡¢¤³¤Î´Ø¿ô¤ò¸Æ¤ÖľÁ°¤Þ¤ÇÀßÄê
- ¤µ¤ì¤Æ¤¤¤¿¥Þ¥¹¥¯¥Ó¥Ã¥È¤òÊÖ¤·¤Þ¤¹¡£¤Ê¤Î¤Ç¡¢remove, add ¶¦¤Ë 0 ¤òÍ¿¤¨¤Æ
- ´Ø¿ô¤ò¸Æ¤Ù¤Ð¡¢¸½ºßÀßÄꤵ¤ì¤Æ¤¤¤ë¥Þ¥¹¥¯¥Ó¥Ã¥È¤ò¼èÆÀ¤Ç¤¤Þ¤¹¡£¤³¤Î´Ø¿ô¤Î
- »ÈÍÑÎã¤Ï¡¢cjpeg.c, djpeg.c, jcomapi.c ¤Ë¤¢¤ê¤Þ¤¹¡£
-
- ¤³¤Î¥Þ¥¹¥¯¥Ó¥Ã¥È¤ÎÃͤϡ¢¼ÂºÝ¤Ë¤Ï¹½Â¤ÂÎ cinfo ¤Î output_gamma ¤â¤·¤¯¤Ï
- input_gamma ÊÑ¿ô¤Î²¼°Ì¥Ó¥Ã¥È¤ÎÊݸ¤µ¤ì¤Æ¤¤¤Þ¤¹(¾Ü¤·¤¯¤Ï jcomapi.c ¤ò
- »²¾È)¡£¤³¤ì¤Ï¡¢¹½Â¤ÂÎ cinfo ¤Ë¿·¤¿¤ÊÊÑ¿ô¤òÄɲ䷤Ƥ·¤Þ¤¦¤È¥Ð¥¤¥Ê¥ê¸ß´¹
- ¤¬Êø¤ì¤Æ¤·¤Þ¤¦¤¿¤á¤Ç¡¢¸½¾õ¤Ç¤Ï̤»ÈÍѤȻפï¤ì¤ë¾åµ¤ÎÊÑ¿ô¤ò¡Ö´Ö¼Ú¤ê¡×
- ¤·¤Æ¤¤¤Þ¤¹¡£
-
- ¤Þ¤¿¡¢°Ê²¼¤Î´Ø¿ô·²¤ò»È¤¦¤È¡¢¥é¥¤¥Ö¥é¥êÆâÉô¤Î³Æ½èÍýÃʳ¬¤Ç¤É¤Î SIMD Ì¿Îá
- ¤ò»ÈÍѤ·¤ÆÆ°ºî¤¹¤ë¤Î¤«¤òÇÄ°®¤Ç¤¤Þ¤¹¡£
-
- jpeg_simd_color_converter(); -> ¿§¶õ´ÖÊÑ´¹(RGB->YCbCr)
- jpeg_simd_downsampler(); -> ¥À¥¦¥ó¥µ¥ó¥×¥ê¥ó¥°
- jpeg_simd_forward_dct(); -> DCT½çÊÑ´¹
- jpeg_simd_color_deconverter(); -> ¿§¶õ´ÖÊÑ´¹(YCbCr->RGB)
- jpeg_simd_upsampler(); -> ¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥°
- jpeg_simd_inverse_dct(); -> DCTµÕÊÑ´¹
-
- ÊÖ¤¹Ãͤϡ¢ÉâÆ°¾®¿ôÅÀDCT½çÊÑ´¹/µÕÊÑ´¹ ¤Î¾ì¹ç¤Ï JSIMD_3DNOW ¤« JSIMD_SSE¡¢
- ¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï JSIMD_MMX ¤« JSIMD_SSE2 ¤òÊÖ¤·¤Þ¤¹¡£¤Þ¤¿¡¢0 ¤¬Ê֤äÆ
- ¤¤¿¾ì¹ç¤Ï SIMD Ì¿Î᥻¥Ã¥È¤Ï»È¤ï¤ì¤º¡¢½¾Íè¤Î¥ë¡¼¥Á¥ó¤¬»È¤ï¤ì¤ë¤³¤È¤ò
- °ÕÌ£¤·¤Þ¤¹¡£
-
- ¤³¤ì¤é¤Î´Ø¿ô¤Î¾Ü¤·¤¤»È¤¤Êý¤Ë¤Ä¤¤¤Æ¤Ï¡¢cjpeg.c, djpeg.c (»ÈÍÑÎã) ¤ò¤´Í÷
- ¤¯¤À¤µ¤¤¡£
-
- ¤Ê¤ª¡¢¤³¤ì¤é¤Î SIMD ¥Þ¥¹¥¯´Ø¿ô¡¿SIMD ¥â¡¼¥É¾ðÊó´Ø¿ô ¤¬É¬Íפʤ¤¾ì¹ç¤Ï¡¢
- °Ê²¼¤Î¥Þ¥¯¥í¤ò jconfig.h ¤Ê¤É¤Ë´Þ¤á¤ë¤³¤È¤Ç¡¢¶Ï¤«¤Ç¤¹¤¬¥³¡¼¥É¥µ¥¤¥º¤¬
- ÀáÌó¤Ç¤¤Þ¤¹¡£
-
- #define JSIMD_MASKFUNC_NOT_SUPPORTED
- #define JSIMD_MODEINFO_NOT_SUPPORTED
-
-
-¢£¤½¤Î¤Û¤«¤ÎÀßÄê¹àÌÜ¥Þ¥¯¥í
-
- ¡û RGB_RED / RGB_GREEN / RGB_BLUE / RGB_PIXELSIZE
-
- ¤³¤ì¤Ï¡¢jmorecfg.h ¤ÎÃæ¤Ë¤¢¤ëÀßÄê¹àÌÜ¥Þ¥¯¥í¤Ç¡¢¼è¤ê°·¤¦ RGB ·Á¼°²èÁü
- ¥Ç¡¼¥¿¤Î RGB ¤Îʤӽç¤ä¥Ô¥¯¥»¥ë¥µ¥¤¥º¤òÀßÄꤷ¤Þ¤¹¡£¤³¤Î SIMD ³ÈÄ¥ÈÇ
- ¤Ç¤âÊѹ¹¤Ç¤¤ë¤è¤¦¤Ë¤·¤Æ¤¢¤ê¤Þ¤¹¤¬¡¢RGB_PIXELSIZE ¤¬ 3 ¤« 4 ¤Î¾ì¹ç¤Î¤ß¡¢
- SIMD ÈǤ臨õ´ÖÊÑ´¹¥ë¡¼¥Á¥ó¤¬Í¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£¤½¤ì°Ê³°¤ÎÃͤˤ·¤¿¾ì¹ç¤Ï¡¢
- SIMD ÈǤ臨õ´ÖÊÑ´¹¥ë¡¼¥Á¥ó¤Ï¼«Æ°Åª¤Ë̵¸ú²½¤µ¤ì¤Æ¡¢½¾Íè¤Î¿§¶õ´ÖÊÑ´¹
- ¥ë¡¼¥Á¥ó¤¬»È¤ï¤ì¤Þ¤¹(¤ä¤äÄ㮤ˤʤê¤Þ¤¹)¡£
-
- ¤³¤ì¤é¤ÎÃͤòÊѹ¹¤¹¤ë¤³¤È¤Ç¡¢½ÐÎϤò 32bit/pixel ·Á¼°¤Ë¤·¤¿¤ê¡¢BMP ·Á¼°¤Ë
- ¹ç¤ï¤»¤Æ¥Ô¥¯¥»¥ë¤ò BGR ½ç¤Ë¤·¤¿¤ê¤¹¤ë¤³¤È¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£¤Ê¤ª¡¢
- ¤³¤ì¤é¤ÎÃͤòÌ·½â¤¹¤ëÃÍ¤Ë #define ¤·¤¿¾ì¹ç¤Ï¥³¥ó¥Ñ¥¤¥ë¤Ç¤¤Ê¤¤¤è¤¦¤Ë¤·¤Æ
- ¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢Ãí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£
-
- ¡û RGBX_FILLER_0XFF
-
- ¤³¤ì¤â jmorecfg.h ¤ÎÃæ¤Ë¤¢¤ëÀßÄê¹àÌÜ¥Þ¥¯¥í¤Ç¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï #undef
- ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¾å¤Î RGB_PIXELSIZE ¤ò 4 ¤Ë¤·¤¿¾ì¹ç¡¢£±¤Ä¤Î¥Ô¥¯¥»¥ë
- ¥Ç¡¼¥¿Ãæ¤Ë(RGB¤Î£³¥Ð¥¤¥È¤Î¾¤Ë);·×¤Ê£±¥Ð¥¤¥È¤¬Â¸ºß¤¹¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
- ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¤³¤Î;·×¤Ê£±¥Ð¥¤¥È(filler byte)¤Ë¤Ï 0x00 ¤¬Ëä¤á¤é¤ì¤Æ
- ½ÐÎϤµ¤ì¤Þ¤¹¤¬¡¢¤³¤Î RGBX_FILLER_0XFF ¤ò #define ¤¹¤ë¤È 0x00 ¤ÎÂå¤ï¤ê
- ¤Ë 0xFF ¤¬ filler byte ¤ËËä¤á¤é¤ì¤Æ½ÐÎϤµ¤ì¤Þ¤¹¡£
-
- ½ÐÎϤò 32bit/pixel ·Á¼°¤Ë¤·¤¿¾ì¹ç¤Ç¡¢filler byte ¤ò¥¢¥ë¥Õ¥¡¥Á¥ã¥Í¥ë
- ¤È¤·¤Æ°·¤¤¤¿¤¤¾ì¹ç¤Ê¤É¤Ï¡¢RGBX_FILLER_0XFF ¤ò #define ¤¹¤ë¤ÈÅԹ礬Îɤ¤
- ¾ì¹ç¤¬¤¢¤ë¤Ç¤·¤ç¤¦¡£
-
- ¤Ê¤ª¡¢¥ª¥ê¥¸¥Ê¥ëÈǤΠJPEG ¥é¥¤¥Ö¥é¥ê¤Ç¤Ï¡¢¤³¤Î filler byte ¤Ë¤Ï²¿¤â
- µÍ¤á¤é¤ì¤º¡¢¸µ¤ÎÃͤ¬¤½¤Î¤Þ¤ÞÊÝ»ý¤µ¤ì¤Þ¤¹¡£¤Ç¤¹¤¬¡¢SIMD ÈǤ臨õ´ÖÊÑ´¹
- ¥ë¡¼¥Á¥ó¤Ç¤Ï¸µ¤ÎÃͤòÊÝ»ý¤¹¤ë¤Ë¤Ï¼ê´Ö¤¬¤«¤«¤ë¤¿¤á¡¢¾ï¤Ë 0x00 ¤« 0xFF
- ¤ÇËä¤á¤Æ½ÐÎϤ¹¤ë¤è¤¦¤Ë»ÅÍÍÊѹ¹¤ò¹Ô¤Ê¤¤¤Þ¤·¤¿¡£
-
- ¡û JFDCT_INT_QUANTIZE_WITH_DIVISION
-
- ¤³¤ì¤Ï¡¢jmorecfg.h ¤ÎÃæ¤Ë¤¢¤ëÀßÄê¹àÌÜ¥Þ¥¯¥í¤Ç¡¢°µ½Ì½èÍý¤Ç¤Î DCT·¸¿ô¤Î
- Î̻Ҳ½½èÍý¤ÎÊýË¡¤òÊѹ¹¤·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï #undef ¤Ç¡¢#undef ¤Î¾õÂÖ¤Î
- Êý¤¬¹â®¤Ê¤Î¤Ç¡¢ÆäËÍýͳ¤Î¤Ê¤¤¸Â¤ê #undef ¤Ç»ÈÍѤ¹¤ë¤³¤È¤ò¤ªÁ¦¤á¤¤¤¿¤·
- ¤Þ¤¹¡£
-
- DCT·¸¿ô¤ÎÎ̻Ҳ½½èÍý¤È¤¤¤¦¤Î¤Ï¡¢Ã¼Åª¤Ë¸À¤¨¤Ð²èÁü¥Ç¡¼¥¿¤ËÂФ·¤Æ°ì¤Ä°ì¤Ä
- ³ä¤ê»»(À°¿ô½ü»»)¤ò¼Â¹Ô¤¹¤ë¤³¤È¤Ç¤¹¡£¤Ç¤¹¤¬¡¢½ü»»¤Ï¸¶ÍýŪ¤Ë¹â®²½¤¬
- ÉÔ²Äǽ¤Ê¤Î¤Ç¡¢¤³¤Î SIMD ³ÈÄ¥ÈǤǤÏÀ°¿ô½ü»»¤ÎÂå¤ï¤ê¤ËÀ°¿ô¾è»»¤ò»ÈÍѤ·¤Æ
- Î̻Ҳ½½èÍý¤ò¼Â¹Ô¤·¤Æ¤¤¤Þ¤¹¡£
-
- ¤³¤ÎÀ°¿ô¾è»»¤òÂåÍѤ¹¤ëÊýË¡¤Ç¤â¡¢¹âÀºÅÙÀ°¿ôDCT/¹â®À°¿ôDCT¤ò»È¤Ã¤¿¾ì¹ç¤Ç¡¢
- ¤«¤Ä¡¢0¡Á100 ¤Î¤¹¤Ù¤Æ¤Î°µ½Ì¥¯¥ª¥ê¥Æ¥£ÀßÄê¤Ç¥ª¥ê¥¸¥Ê¥ëÈǤÈÁ´¤¯Æ±¤¸·ë²Ì¤ò
- ½Ð¤¹¤³¤È¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹¡£¤Ç¤¹¤¬¡¢°µ½Ì²è¼Á¤ò "¥¯¥ª¥ê¥Æ¥£" ¤Î»Øɸ¤ÇÀßÄê
- ¤»¤º¡¢¥¯¥ª¥ê¥Æ¥£ 0 ¤è¤ê¤âÄã²è¼Á¤ÎÎ̻Ҳ½¥Æ¡¼¥Ö¥ë¤òľÀÜÍ¿¤¨¤Æ°µ½Ì¤·¤¿¾ì¹ç
- ¤Ê¤É¤Ï¡¢±é»»ÅÓÃæ¤Î¿ôÃÍÈϰϤδط¸¤Ç¡¢¥ª¥ê¥¸¥Ê¥ëÈǤȤϰۤʤë·ë²Ì¤¬½Ð¤ë¤³¤È
- ¤âÈÝÄê¤Ç¤¤Þ¤»¤ó¡£¤½¤¦¤¤¤Ã¤¿Æüì¤Ê¶³¦¾ò·ï²¼¤Ç¤â¥ª¥ê¥¸¥Ê¥ëÈǤȤθߴ¹ÅÙ¤¬
- ¹â¤¯¤Ê¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¾ì¹ç¤Ê¤É¤Ë¤Ï¡¢¤³¤Î¹àÌܤò #define ¤Ë¤·¤Æ»ÈÍѤ·¤Æ
- ¤¯¤À¤µ¤¤¡£¼ã´³Â®ÅÙ¤ÏÍî¤Á¤Þ¤¹¤¬¡¢½¾Íè¤É¤ª¤ê¡¢°ì¤Ä°ì¤Ä½ü»»¤ò¹Ô¤Ã¤ÆÎ̻Ҳ½
- ½èÍý¤ò¹Ô¤¤¤Þ¤¹¡£
-
- ¤â¤Ã¤È¤â¡¢¥¯¥ª¥ê¥Æ¥£ 0 ¤è¤ê¤âÄã²è¼Á¤ÎÀßÄê¤Ç°µ½Ì¤·¤Æ¤â¡¢¤Û¤È¤ó¤É¼ÂÍѤË
- ¤Ê¤ê¤Þ¤»¤ó¤Î¤Ç¡¢¤³¤ÎÀ°¿ô¾è»»¤òÂåÍѤ¹¤ëÊýË¡¤Ç¤â¡¢ÌäÂê¤Ë¤Ê¤ë¤³¤È¤Ï¤Ê¤¤¤È
- »×¤¤¤Þ¤¹¡£
-
- ¡û UPSAMPLE_H1V2_SUPPORTED
-
- ¤³¤ì¤Ï¡¢jmorecfg.h ¤ÎÃæ¤Ë¤¢¤ë¡¢¥ª¥ê¥¸¥Ê¥ëÈǤΠIJG JPEG library ¤Ë¤Ï
- ¸ºß¤·¤Ê¤¤ÀßÄê¹àÌÜ¥Þ¥¯¥í¤Ç¤¹¡£¤³¤ì¤Ï¡¢Y:1x2 Cb:1x1 Cr:1x1 (4:2:2) ¤Î
- ¥µ¥Ö¥µ¥ó¥×¥ê¥ó¥°Èæ¤ò»ý¤Ä JPEG ¥Õ¥¡¥¤¥ë¤ò¡¢¥ª¥ê¥¸¥Ê¥ëÈǤΠIJG JPEG
- library ¤è¤ê¤â¹â®¡¿¹â²è¼Á¤ËŸ³«¤Ç¤¤ë¤è¤¦¤Ë¤¹¤ë¤â¤Î¤Ç¤¹¡£
-
- ¥µ¥Ö¥µ¥ó¥×¥ê¥ó¥°Èæ Y:1x2 Cb:1x1 Cr:1x1 (4:2:2) ¤ò»ý¤Ä JPEG ¥Õ¥¡¥¤¥ë¤Ï¡¢
- ¥ª¥ê¥¸¥Ê¥ë¤Î IJG JPEG Library ¤Ç¤âŸ³«¤Ç¤¤Þ¤¹¤¬¡¢¤³¤Î¥µ¥Ö¥µ¥ó¥×¥ê¥ó¥°
- Èæ¤ËÂбþ¤¹¤ë¥¢¥Ã¥×¥µ¥ó¥×¥ê¥ó¥°¡¦¥ë¡¼¥Á¥ó¤¬´Êñ¤Ê¤â¤Î¤·¤«ÍÑ°Õ¤µ¤ì¤Æ
- ¤¤¤Ê¤¤¤¿¤á¡¢Å¸³«Â®ÅÙ¤âÃÙ¤¯¡¢¤Þ¤¿¡¢¿§¤Î¶Ìܤ¬¤Ï¤Ã¤¤ê¤·¤Æ¤¤¤ë£Ã£Ç²èÁü
- ¤Ê¤É¤Î¾ì¹ç¤Ï¥¸¥ã¥®¡¼¤¬ÌÜΩ¤Ã¤Æ¤·¤Þ¤¦¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¹àÌܤò͸ú¤Ë
- ¤¹¤ë¤³¤È¤Ç¡¢¤³¤Î¤è¤¦¤Ê¥µ¥Ö¥µ¥ó¥×¥ê¥ó¥°Èæ Y:1x2 Cb:1x1 Cr:1x1 ¤ò»ý¤Ä
- JPEG ¥Õ¥¡¥¤¥ë¤ò¹â®¤Ë¡¢¤Þ¤¿¡¢¥¸¥ã¥®¡¼¤¬ÌÜΩ¤¿¤Ê¤¤¤è¤¦¤Ë¹â²è¼Á¤ËŸ³«
- ¤Ç¤¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
-
- ¤³¤Î¡¢¥µ¥Ö¥µ¥ó¥×¥ê¥ó¥°Èæ Y:1x2 Cb:1x1 Cr:1x1 ¤Î JPEG ¥Õ¥¡¥¤¥ë¤Ï¡¢¤¢¤Þ¤ê
- °ìÈÌŪ¤Ê¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤¬¡¢¥Ç¥£¥¸¥¿¥ë¥«¥á¥é¤Ê¤É¤¬½ÐÎϤ¹¤ë¤³¤È¤Î¿¤¤¡¢
- ¥µ¥Ö¥µ¥ó¥×¥ê¥ó¥°Èæ Y:2x1 Cb:1x1 Cr:1x1 (4:2:2) ¤Î JPEG ¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ
- ¡ÖJPEG ¥í¥¹¥ì¥¹²óž¡×½èÍý¤ò¹Ô¤Ê¤¦¤È¡¢¤³¤Î Y:1x2 Cb:1x1 Cr:1x1 ¤Î JPEG
- ¥Õ¥¡¥¤¥ë¤Ë¤Ê¤ê¤Þ¤¹¡£¥Ç¥£¥¸¥¿¥ë¥«¥á¥é¤Ç¡¢¥«¥á¥é¤ò½Ä¤Ë¤·¤Æ¡Ê½Ä°ÌÃ֤ǡ˻£±Æ
- ¤·¤¿²èÁü¤ò¡ÖJPEG ¥í¥¹¥ì¥¹²óž¡×¤·¤ÆÀµ¾ï¤Ê¸þ¤¤Ëľ¤¹¡¢¤Ê¤É¤È¤¤¤¦¤³¤È¤Ï¡¢
- ¤è¤¯¤ä¤ë¤³¤È¤À¤È»×¤¤¤Þ¤¹¡£¤Ç¤¹¤¬¡¢¤³¤Î¤è¤¦¤Ê¡ÖJPEG ¥í¥¹¥ì¥¹²óž¡×¤µ¤ì¤¿
- JPEG ¥Õ¥¡¥¤¥ë¤ò¥ª¥ê¥¸¥Ê¥ë¤Î IJG JPEG Library ¤ÇŸ³«¤¹¤ë¤È¡¢¾åµ¤ÎÍýͳ¤«¤é¡¢
- JPEG ¥Õ¥¡¥¤¥ë¤òŸ³«¤·¤Æ¤«¤é²èÁü½èÍý¥½¥Õ¥È¤Ç²óž¤µ¤»¤¿²èÁü¤ËÈæ¤Ù¤Æ²è¼Á¤¬
- Îô¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£¤³¤Î¹àÌܤò͸ú¤Ë¤¹¤ë¤³¤È¤Ç¡¢²èÁü½èÍý¥½¥Õ¥È¤Ç²óž¤µ¤»¤¿
- ²èÁü¤È¤Û¤ÜƱ¤¸¥¯¥ª¥ê¥Æ¥£¤Ç²èÁü¤òŸ³«¤¹¤ë¤³¤È¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£
-
- ¤³¤Î¹àÌܤϡ¢ÆäËÍýͳ¤Î¤Ê¤¤¸Â¤ê¡¢#define ¤Î¾õÂ֤ˤ·¤Æ¤ª¤¯¤³¤È¤ò¤ªÁ¦¤á
- ¤¤¤¿¤·¤Þ¤¹¡£¥ª¥ê¥¸¥Ê¥ë¤Î IJG JPEG Library ¤È´°Á´¤ËƱ°ì¤Î·ë²Ì¤¬É¬ÍפÊ
- ¾ì¹ç¤Î¤ß #undef ¤Ë¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£
-
-
-
-[EOF]
diff --git a/structure.doc b/structure.doc
deleted file mode 100644
index 51c9def..0000000
--- a/structure.doc
+++ /dev/null
@@ -1,948 +0,0 @@
-IJG JPEG LIBRARY: SYSTEM ARCHITECTURE
-
-Copyright (C) 1991-1995, Thomas G. Lane.
-This file is part of the Independent JPEG Group's software.
-For conditions of distribution and use, see the accompanying README file.
-
-
-This file provides an overview of the architecture of the IJG JPEG software;
-that is, the functions of the various modules in the system and the interfaces
-between modules. For more precise details about any data structure or calling
-convention, see the include files and comments in the source code.
-
-We assume that the reader is already somewhat familiar with the JPEG standard.
-The README file includes references for learning about JPEG. The file
-libjpeg.doc describes the library from the viewpoint of an application
-programmer using the library; it's best to read that file before this one.
-Also, the file coderules.doc describes the coding style conventions we use.
-
-In this document, JPEG-specific terminology follows the JPEG standard:
- A "component" means a color channel, e.g., Red or Luminance.
- A "sample" is a single component value (i.e., one number in the image data).
- A "coefficient" is a frequency coefficient (a DCT transform output number).
- A "block" is an 8x8 group of samples or coefficients.
- An "MCU" (minimum coded unit) is an interleaved set of blocks of size
- determined by the sampling factors, or a single block in a
- noninterleaved scan.
-We do not use the terms "pixel" and "sample" interchangeably. When we say
-pixel, we mean an element of the full-size image, while a sample is an element
-of the downsampled image. Thus the number of samples may vary across
-components while the number of pixels does not. (This terminology is not used
-rigorously throughout the code, but it is used in places where confusion would
-otherwise result.)
-
-
-*** System features ***
-
-The IJG distribution contains two parts:
- * A subroutine library for JPEG compression and decompression.
- * cjpeg/djpeg, two sample applications that use the library to transform
- JFIF JPEG files to and from several other image formats.
-cjpeg/djpeg are of no great intellectual complexity: they merely add a simple
-command-line user interface and I/O routines for several uncompressed image
-formats. This document concentrates on the library itself.
-
-We desire the library to be capable of supporting all JPEG baseline, extended
-sequential, and progressive DCT processes. Hierarchical processes are not
-supported.
-
-The library does not support the lossless (spatial) JPEG process. Lossless
-JPEG shares little or no code with lossy JPEG, and would normally be used
-without the extensive pre- and post-processing provided by this library.
-We feel that lossless JPEG is better handled by a separate library.
-
-Within these limits, any set of compression parameters allowed by the JPEG
-spec should be readable for decompression. (We can be more restrictive about
-what formats we can generate.) Although the system design allows for all
-parameter values, some uncommon settings are not yet implemented and may
-never be; nonintegral sampling ratios are the prime example. Furthermore,
-we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a
-run-time option, because most machines can store 8-bit pixels much more
-compactly than 12-bit.
-
-For legal reasons, JPEG arithmetic coding is not currently supported, but
-extending the library to include it would be straightforward.
-
-By itself, the library handles only interchange JPEG datastreams --- in
-particular the widely used JFIF file format. The library can be used by
-surrounding code to process interchange or abbreviated JPEG datastreams that
-are embedded in more complex file formats. (For example, libtiff uses this
-library to implement JPEG compression within the TIFF file format.)
-
-The library includes a substantial amount of code that is not covered by the
-JPEG standard but is necessary for typical applications of JPEG. These
-functions preprocess the image before JPEG compression or postprocess it after
-decompression. They include colorspace conversion, downsampling/upsampling,
-and color quantization. This code can be omitted if not needed.
-
-A wide range of quality vs. speed tradeoffs are possible in JPEG processing,
-and even more so in decompression postprocessing. The decompression library
-provides multiple implementations that cover most of the useful tradeoffs,
-ranging from very-high-quality down to fast-preview operation. On the
-compression side we have generally not provided low-quality choices, since
-compression is normally less time-critical. It should be understood that the
-low-quality modes may not meet the JPEG standard's accuracy requirements;
-nonetheless, they are useful for viewers.
-
-
-*** Portability issues ***
-
-Portability is an essential requirement for the library. The key portability
-issues that show up at the level of system architecture are:
-
-1. Memory usage. We want the code to be able to run on PC-class machines
-with limited memory. Images should therefore be processed sequentially (in
-strips), to avoid holding the whole image in memory at once. Where a
-full-image buffer is necessary, we should be able to use either virtual memory
-or temporary files.
-
-2. Near/far pointer distinction. To run efficiently on 80x86 machines, the
-code should distinguish "small" objects (kept in near data space) from
-"large" ones (kept in far data space). This is an annoying restriction, but
-fortunately it does not impact code quality for less brain-damaged machines,
-and the source code clutter turns out to be minimal with sufficient use of
-pointer typedefs.
-
-3. Data precision. We assume that "char" is at least 8 bits, "short" and
-"int" at least 16, "long" at least 32. The code will work fine with larger
-data sizes, although memory may be used inefficiently in some cases. However,
-the JPEG compressed datastream must ultimately appear on external storage as a
-sequence of 8-bit bytes if it is to conform to the standard. This may pose a
-problem on machines where char is wider than 8 bits. The library represents
-compressed data as an array of values of typedef JOCTET. If no data type
-exactly 8 bits wide is available, custom data source and data destination
-modules must be written to unpack and pack the chosen JOCTET datatype into
-8-bit external representation.
-
-
-*** System overview ***
-
-The compressor and decompressor are each divided into two main sections:
-the JPEG compressor or decompressor proper, and the preprocessing or
-postprocessing functions. The interface between these two sections is the
-image data that the official JPEG spec regards as its input or output: this
-data is in the colorspace to be used for compression, and it is downsampled
-to the sampling factors to be used. The preprocessing and postprocessing
-steps are responsible for converting a normal image representation to or from
-this form. (Those few applications that want to deal with YCbCr downsampled
-data can skip the preprocessing or postprocessing step.)
-
-Looking more closely, the compressor library contains the following main
-elements:
-
- Preprocessing:
- * Color space conversion (e.g., RGB to YCbCr).
- * Edge expansion and downsampling. Optionally, this step can do simple
- smoothing --- this is often helpful for low-quality source data.
- JPEG proper:
- * MCU assembly, DCT, quantization.
- * Entropy coding (sequential or progressive, Huffman or arithmetic).
-
-In addition to these modules we need overall control, marker generation,
-and support code (memory management & error handling). There is also a
-module responsible for physically writing the output data --- typically
-this is just an interface to fwrite(), but some applications may need to
-do something else with the data.
-
-The decompressor library contains the following main elements:
-
- JPEG proper:
- * Entropy decoding (sequential or progressive, Huffman or arithmetic).
- * Dequantization, inverse DCT, MCU disassembly.
- Postprocessing:
- * Upsampling. Optionally, this step may be able to do more general
- rescaling of the image.
- * Color space conversion (e.g., YCbCr to RGB). This step may also
- provide gamma adjustment [ currently it does not ].
- * Optional color quantization (e.g., reduction to 256 colors).
- * Optional color precision reduction (e.g., 24-bit to 15-bit color).
- [This feature is not currently implemented.]
-
-We also need overall control, marker parsing, and a data source module.
-The support code (memory management & error handling) can be shared with
-the compression half of the library.
-
-There may be several implementations of each of these elements, particularly
-in the decompressor, where a wide range of speed/quality tradeoffs is very
-useful. It must be understood that some of the best speedups involve
-merging adjacent steps in the pipeline. For example, upsampling, color space
-conversion, and color quantization might all be done at once when using a
-low-quality ordered-dither technique. The system architecture is designed to
-allow such merging where appropriate.
-
-
-Note: it is convenient to regard edge expansion (padding to block boundaries)
-as a preprocessing/postprocessing function, even though the JPEG spec includes
-it in compression/decompression. We do this because downsampling/upsampling
-can be simplified a little if they work on padded data: it's not necessary to
-have special cases at the right and bottom edges. Therefore the interface
-buffer is always an integral number of blocks wide and high, and we expect
-compression preprocessing to pad the source data properly. Padding will occur
-only to the next block (8-sample) boundary. In an interleaved-scan situation,
-additional dummy blocks may be used to fill out MCUs, but the MCU assembly and
-disassembly logic will create or discard these blocks internally. (This is
-advantageous for speed reasons, since we avoid DCTing the dummy blocks.
-It also permits a small reduction in file size, because the compressor can
-choose dummy block contents so as to minimize their size in compressed form.
-Finally, it makes the interface buffer specification independent of whether
-the file is actually interleaved or not.) Applications that wish to deal
-directly with the downsampled data must provide similar buffering and padding
-for odd-sized images.
-
-
-*** Poor man's object-oriented programming ***
-
-It should be clear by now that we have a lot of quasi-independent processing
-steps, many of which have several possible behaviors. To avoid cluttering the
-code with lots of switch statements, we use a simple form of object-style
-programming to separate out the different possibilities.
-
-For example, two different color quantization algorithms could be implemented
-as two separate modules that present the same external interface; at runtime,
-the calling code will access the proper module indirectly through an "object".
-
-We can get the limited features we need while staying within portable C.
-The basic tool is a function pointer. An "object" is just a struct
-containing one or more function pointer fields, each of which corresponds to
-a method name in real object-oriented languages. During initialization we
-fill in the function pointers with references to whichever module we have
-determined we need to use in this run. Then invocation of the module is done
-by indirecting through a function pointer; on most machines this is no more
-expensive than a switch statement, which would be the only other way of
-making the required run-time choice. The really significant benefit, of
-course, is keeping the source code clean and well structured.
-
-We can also arrange to have private storage that varies between different
-implementations of the same kind of object. We do this by making all the
-module-specific object structs be separately allocated entities, which will
-be accessed via pointers in the master compression or decompression struct.
-The "public" fields or methods for a given kind of object are specified by
-a commonly known struct. But a module's initialization code can allocate
-a larger struct that contains the common struct as its first member, plus
-additional private fields. With appropriate pointer casting, the module's
-internal functions can access these private fields. (For a simple example,
-see jdatadst.c, which implements the external interface specified by struct
-jpeg_destination_mgr, but adds extra fields.)
-
-(Of course this would all be a lot easier if we were using C++, but we are
-not yet prepared to assume that everyone has a C++ compiler.)
-
-An important benefit of this scheme is that it is easy to provide multiple
-versions of any method, each tuned to a particular case. While a lot of
-precalculation might be done to select an optimal implementation of a method,
-the cost per invocation is constant. For example, the upsampling step might
-have a "generic" method, plus one or more "hardwired" methods for the most
-popular sampling factors; the hardwired methods would be faster because they'd
-use straight-line code instead of for-loops. The cost to determine which
-method to use is paid only once, at startup, and the selection criteria are
-hidden from the callers of the method.
-
-This plan differs a little bit from usual object-oriented structures, in that
-only one instance of each object class will exist during execution. The
-reason for having the class structure is that on different runs we may create
-different instances (choose to execute different modules). You can think of
-the term "method" as denoting the common interface presented by a particular
-set of interchangeable functions, and "object" as denoting a group of related
-methods, or the total shared interface behavior of a group of modules.
-
-
-*** Overall control structure ***
-
-We previously mentioned the need for overall control logic in the compression
-and decompression libraries. In IJG implementations prior to v5, overall
-control was mostly provided by "pipeline control" modules, which proved to be
-large, unwieldy, and hard to understand. To improve the situation, the
-control logic has been subdivided into multiple modules. The control modules
-consist of:
-
-1. Master control for module selection and initialization. This has two
-responsibilities:
-
- 1A. Startup initialization at the beginning of image processing.
- The individual processing modules to be used in this run are selected
- and given initialization calls.
-
- 1B. Per-pass control. This determines how many passes will be performed
- and calls each active processing module to configure itself
- appropriately at the beginning of each pass. End-of-pass processing,
- where necessary, is also invoked from the master control module.
-
- Method selection is partially distributed, in that a particular processing
- module may contain several possible implementations of a particular method,
- which it will select among when given its initialization call. The master
- control code need only be concerned with decisions that affect more than
- one module.
-
-2. Data buffering control. A separate control module exists for each
- inter-processing-step data buffer. This module is responsible for
- invoking the processing steps that write or read that data buffer.
-
-Each buffer controller sees the world as follows:
-
-input data => processing step A => buffer => processing step B => output data
- | | |
- ------------------ controller ------------------
-
-The controller knows the dataflow requirements of steps A and B: how much data
-they want to accept in one chunk and how much they output in one chunk. Its
-function is to manage its buffer and call A and B at the proper times.
-
-A data buffer control module may itself be viewed as a processing step by a
-higher-level control module; thus the control modules form a binary tree with
-elementary processing steps at the leaves of the tree.
-
-The control modules are objects. A considerable amount of flexibility can
-be had by replacing implementations of a control module. For example:
-* Merging of adjacent steps in the pipeline is done by replacing a control
- module and its pair of processing-step modules with a single processing-
- step module. (Hence the possible merges are determined by the tree of
- control modules.)
-* In some processing modes, a given interstep buffer need only be a "strip"
- buffer large enough to accommodate the desired data chunk sizes. In other
- modes, a full-image buffer is needed and several passes are required.
- The control module determines which kind of buffer is used and manipulates
- virtual array buffers as needed. One or both processing steps may be
- unaware of the multi-pass behavior.
-
-In theory, we might be able to make all of the data buffer controllers
-interchangeable and provide just one set of implementations for all. In
-practice, each one contains considerable special-case processing for its
-particular job. The buffer controller concept should be regarded as an
-overall system structuring principle, not as a complete description of the
-task performed by any one controller.
-
-
-*** Compression object structure ***
-
-Here is a sketch of the logical structure of the JPEG compression library:
-
- |-- Colorspace conversion
- |-- Preprocessing controller --|
- | |-- Downsampling
-Main controller --|
- | |-- Forward DCT, quantize
- |-- Coefficient controller --|
- |-- Entropy encoding
-
-This sketch also describes the flow of control (subroutine calls) during
-typical image data processing. Each of the components shown in the diagram is
-an "object" which may have several different implementations available. One
-or more source code files contain the actual implementation(s) of each object.
-
-The objects shown above are:
-
-* Main controller: buffer controller for the subsampled-data buffer, which
- holds the preprocessed input data. This controller invokes preprocessing to
- fill the subsampled-data buffer, and JPEG compression to empty it. There is
- usually no need for a full-image buffer here; a strip buffer is adequate.
-
-* Preprocessing controller: buffer controller for the downsampling input data
- buffer, which lies between colorspace conversion and downsampling. Note
- that a unified conversion/downsampling module would probably replace this
- controller entirely.
-
-* Colorspace conversion: converts application image data into the desired
- JPEG color space; also changes the data from pixel-interleaved layout to
- separate component planes. Processes one pixel row at a time.
-
-* Downsampling: performs reduction of chroma components as required.
- Optionally may perform pixel-level smoothing as well. Processes a "row
- group" at a time, where a row group is defined as Vmax pixel rows of each
- component before downsampling, and Vk sample rows afterwards (remember Vk
- differs across components). Some downsampling or smoothing algorithms may
- require context rows above and below the current row group; the
- preprocessing controller is responsible for supplying these rows via proper
- buffering. The downsampler is responsible for edge expansion at the right
- edge (i.e., extending each sample row to a multiple of 8 samples); but the
- preprocessing controller is responsible for vertical edge expansion (i.e.,
- duplicating the bottom sample row as needed to make a multiple of 8 rows).
-
-* Coefficient controller: buffer controller for the DCT-coefficient data.
- This controller handles MCU assembly, including insertion of dummy DCT
- blocks when needed at the right or bottom edge. When performing
- Huffman-code optimization or emitting a multiscan JPEG file, this
- controller is responsible for buffering the full image. The equivalent of
- one fully interleaved MCU row of subsampled data is processed per call,
- even when the JPEG file is noninterleaved.
-
-* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients.
- Works on one or more DCT blocks at a time. (Note: the coefficients are now
- emitted in normal array order, which the entropy encoder is expected to
- convert to zigzag order as necessary. Prior versions of the IJG code did
- the conversion to zigzag order within the quantization step.)
-
-* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the
- coded data to the data destination module. Works on one MCU per call.
- For progressive JPEG, the same DCT blocks are fed to the entropy coder
- during each pass, and the coder must emit the appropriate subset of
- coefficients.
-
-In addition to the above objects, the compression library includes these
-objects:
-
-* Master control: determines the number of passes required, controls overall
- and per-pass initialization of the other modules.
-
-* Marker writing: generates JPEG markers (except for RSTn, which is emitted
- by the entropy encoder when needed).
-
-* Data destination manager: writes the output JPEG datastream to its final
- destination (e.g., a file). The destination manager supplied with the
- library knows how to write to a stdio stream; for other behaviors, the
- surrounding application may provide its own destination manager.
-
-* Memory manager: allocates and releases memory, controls virtual arrays
- (with backing store management, where required).
-
-* Error handler: performs formatting and output of error and trace messages;
- determines handling of nonfatal errors. The surrounding application may
- override some or all of this object's methods to change error handling.
-
-* Progress monitor: supports output of "percent-done" progress reports.
- This object represents an optional callback to the surrounding application:
- if wanted, it must be supplied by the application.
-
-The error handler, destination manager, and progress monitor objects are
-defined as separate objects in order to simplify application-specific
-customization of the JPEG library. A surrounding application may override
-individual methods or supply its own all-new implementation of one of these
-objects. The object interfaces for these objects are therefore treated as
-part of the application interface of the library, whereas the other objects
-are internal to the library.
-
-The error handler and memory manager are shared by JPEG compression and
-decompression; the progress monitor, if used, may be shared as well.
-
-
-*** Decompression object structure ***
-
-Here is a sketch of the logical structure of the JPEG decompression library:
-
- |-- Entropy decoding
- |-- Coefficient controller --|
- | |-- Dequantize, Inverse DCT
-Main controller --|
- | |-- Upsampling
- |-- Postprocessing controller --| |-- Colorspace conversion
- |-- Color quantization
- |-- Color precision reduction
-
-As before, this diagram also represents typical control flow. The objects
-shown are:
-
-* Main controller: buffer controller for the subsampled-data buffer, which
- holds the output of JPEG decompression proper. This controller's primary
- task is to feed the postprocessing procedure. Some upsampling algorithms
- may require context rows above and below the current row group; when this
- is true, the main controller is responsible for managing its buffer so as
- to make context rows available. In the current design, the main buffer is
- always a strip buffer; a full-image buffer is never required.
-
-* Coefficient controller: buffer controller for the DCT-coefficient data.
- This controller handles MCU disassembly, including deletion of any dummy
- DCT blocks at the right or bottom edge. When reading a multiscan JPEG
- file, this controller is responsible for buffering the full image.
- (Buffering DCT coefficients, rather than samples, is necessary to support
- progressive JPEG.) The equivalent of one fully interleaved MCU row of
- subsampled data is processed per call, even when the source JPEG file is
- noninterleaved.
-
-* Entropy decoding: Read coded data from the data source module and perform
- Huffman or arithmetic entropy decoding. Works on one MCU per call.
- For progressive JPEG decoding, the coefficient controller supplies the prior
- coefficients of each MCU (initially all zeroes), which the entropy decoder
- modifies in each scan.
-
-* Dequantization and inverse DCT: like it says. Note that the coefficients
- buffered by the coefficient controller have NOT been dequantized; we
- merge dequantization and inverse DCT into a single step for speed reasons.
- When scaled-down output is asked for, simplified DCT algorithms may be used
- that emit only 1x1, 2x2, or 4x4 samples per DCT block, not the full 8x8.
- Works on one DCT block at a time.
-
-* Postprocessing controller: buffer controller for the color quantization
- input buffer, when quantization is in use. (Without quantization, this
- controller just calls the upsampler.) For two-pass quantization, this
- controller is responsible for buffering the full-image data.
-
-* Upsampling: restores chroma components to full size. (May support more
- general output rescaling, too. Note that if undersized DCT outputs have
- been emitted by the DCT module, this module must adjust so that properly
- sized outputs are created.) Works on one row group at a time. This module
- also calls the color conversion module, so its top level is effectively a
- buffer controller for the upsampling->color conversion buffer. However, in
- all but the highest-quality operating modes, upsampling and color
- conversion are likely to be merged into a single step.
-
-* Colorspace conversion: convert from JPEG color space to output color space,
- and change data layout from separate component planes to pixel-interleaved.
- Works on one pixel row at a time.
-
-* Color quantization: reduce the data to colormapped form, using either an
- externally specified colormap or an internally generated one. This module
- is not used for full-color output. Works on one pixel row at a time; may
- require two passes to generate a color map. Note that the output will
- always be a single component representing colormap indexes. In the current
- design, the output values are JSAMPLEs, so an 8-bit compilation cannot
- quantize to more than 256 colors. This is unlikely to be a problem in
- practice.
-
-* Color reduction: this module handles color precision reduction, e.g.,
- generating 15-bit color (5 bits/primary) from JPEG's 24-bit output.
- Not quite clear yet how this should be handled... should we merge it with
- colorspace conversion???
-
-Note that some high-speed operating modes might condense the entire
-postprocessing sequence to a single module (upsample, color convert, and
-quantize in one step).
-
-In addition to the above objects, the decompression library includes these
-objects:
-
-* Master control: determines the number of passes required, controls overall
- and per-pass initialization of the other modules. This is subdivided into
- input and output control: jdinput.c controls only input-side processing,
- while jdmaster.c handles overall initialization and output-side control.
-
-* Marker reading: decodes JPEG markers (except for RSTn).
-
-* Data source manager: supplies the input JPEG datastream. The source
- manager supplied with the library knows how to read from a stdio stream;
- for other behaviors, the surrounding application may provide its own source
- manager.
-
-* Memory manager: same as for compression library.
-
-* Error handler: same as for compression library.
-
-* Progress monitor: same as for compression library.
-
-As with compression, the data source manager, error handler, and progress
-monitor are candidates for replacement by a surrounding application.
-
-
-*** Decompression input and output separation ***
-
-To support efficient incremental display of progressive JPEG files, the
-decompressor is divided into two sections that can run independently:
-
-1. Data input includes marker parsing, entropy decoding, and input into the
- coefficient controller's DCT coefficient buffer. Note that this
- processing is relatively cheap and fast.
-
-2. Data output reads from the DCT coefficient buffer and performs the IDCT
- and all postprocessing steps.
-
-For a progressive JPEG file, the data input processing is allowed to get
-arbitrarily far ahead of the data output processing. (This occurs only
-if the application calls jpeg_consume_input(); otherwise input and output
-run in lockstep, since the input section is called only when the output
-section needs more data.) In this way the application can avoid making
-extra display passes when data is arriving faster than the display pass
-can run. Furthermore, it is possible to abort an output pass without
-losing anything, since the coefficient buffer is read-only as far as the
-output section is concerned. See libjpeg.doc for more detail.
-
-A full-image coefficient array is only created if the JPEG file has multiple
-scans (or if the application specifies buffered-image mode anyway). When
-reading a single-scan file, the coefficient controller normally creates only
-a one-MCU buffer, so input and output processing must run in lockstep in this
-case. jpeg_consume_input() is effectively a no-op in this situation.
-
-The main impact of dividing the decompressor in this fashion is that we must
-be very careful with shared variables in the cinfo data structure. Each
-variable that can change during the course of decompression must be
-classified as belonging to data input or data output, and each section must
-look only at its own variables. For example, the data output section may not
-depend on any of the variables that describe the current scan in the JPEG
-file, because these may change as the data input section advances into a new
-scan.
-
-The progress monitor is (somewhat arbitrarily) defined to treat input of the
-file as one pass when buffered-image mode is not used, and to ignore data
-input work completely when buffered-image mode is used. Note that the
-library has no reliable way to predict the number of passes when dealing
-with a progressive JPEG file, nor can it predict the number of output passes
-in buffered-image mode. So the work estimate is inherently bogus anyway.
-
-No comparable division is currently made in the compression library, because
-there isn't any real need for it.
-
-
-*** Data formats ***
-
-Arrays of pixel sample values use the following data structure:
-
- typedef something JSAMPLE; a pixel component value, 0..MAXJSAMPLE
- typedef JSAMPLE *JSAMPROW; ptr to a row of samples
- typedef JSAMPROW *JSAMPARRAY; ptr to a list of rows
- typedef JSAMPARRAY *JSAMPIMAGE; ptr to a list of color-component arrays
-
-The basic element type JSAMPLE will typically be one of unsigned char,
-(signed) char, or short. Short will be used if samples wider than 8 bits are
-to be supported (this is a compile-time option). Otherwise, unsigned char is
-used if possible. If the compiler only supports signed chars, then it is
-necessary to mask off the value when reading. Thus, all reads of JSAMPLE
-values must be coded as "GETJSAMPLE(value)", where the macro will be defined
-as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere.
-
-With these conventions, JSAMPLE values can be assumed to be >= 0. This helps
-simplify correct rounding during downsampling, etc. The JPEG standard's
-specification that sample values run from -128..127 is accommodated by
-subtracting 128 just as the sample value is copied into the source array for
-the DCT step (this will be an array of signed ints). Similarly, during
-decompression the output of the IDCT step will be immediately shifted back to
-0..255. (NB: different values are required when 12-bit samples are in use.
-The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be
-defined as 255 and 128 respectively in an 8-bit implementation, and as 4095
-and 2048 in a 12-bit implementation.)
-
-We use a pointer per row, rather than a two-dimensional JSAMPLE array. This
-choice costs only a small amount of memory and has several benefits:
-* Code using the data structure doesn't need to know the allocated width of
- the rows. This simplifies edge expansion/compression, since we can work
- in an array that's wider than the logical picture width.
-* Indexing doesn't require multiplication; this is a performance win on many
- machines.
-* Arrays with more than 64K total elements can be supported even on machines
- where malloc() cannot allocate chunks larger than 64K.
-* The rows forming a component array may be allocated at different times
- without extra copying. This trick allows some speedups in smoothing steps
- that need access to the previous and next rows.
-
-Note that each color component is stored in a separate array; we don't use the
-traditional layout in which the components of a pixel are stored together.
-This simplifies coding of modules that work on each component independently,
-because they don't need to know how many components there are. Furthermore,
-we can read or write each component to a temporary file independently, which
-is helpful when dealing with noninterleaved JPEG files.
-
-In general, a specific sample value is accessed by code such as
- GETJSAMPLE(image[colorcomponent][row][col])
-where col is measured from the image left edge, but row is measured from the
-first sample row currently in memory. Either of the first two indexings can
-be precomputed by copying the relevant pointer.
-
-
-Since most image-processing applications prefer to work on images in which
-the components of a pixel are stored together, the data passed to or from the
-surrounding application uses the traditional convention: a single pixel is
-represented by N consecutive JSAMPLE values, and an image row is an array of
-(# of color components)*(image width) JSAMPLEs. One or more rows of data can
-be represented by a pointer of type JSAMPARRAY in this scheme. This scheme is
-converted to component-wise storage inside the JPEG library. (Applications
-that want to skip JPEG preprocessing or postprocessing will have to contend
-with component-wise storage.)
-
-
-Arrays of DCT-coefficient values use the following data structure:
-
- typedef short JCOEF; a 16-bit signed integer
- typedef JCOEF JBLOCK[DCTSIZE2]; an 8x8 block of coefficients
- typedef JBLOCK *JBLOCKROW; ptr to one horizontal row of 8x8 blocks
- typedef JBLOCKROW *JBLOCKARRAY; ptr to a list of such rows
- typedef JBLOCKARRAY *JBLOCKIMAGE; ptr to a list of color component arrays
-
-The underlying type is at least a 16-bit signed integer; while "short" is big
-enough on all machines of interest, on some machines it is preferable to use
-"int" for speed reasons, despite the storage cost. Coefficients are grouped
-into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than
-"8" and "64").
-
-The contents of a coefficient block may be in either "natural" or zigzagged
-order, and may be true values or divided by the quantization coefficients,
-depending on where the block is in the processing pipeline. In the current
-library, coefficient blocks are kept in natural order everywhere; the entropy
-codecs zigzag or dezigzag the data as it is written or read. The blocks
-contain quantized coefficients everywhere outside the DCT/IDCT subsystems.
-(This latter decision may need to be revisited to support variable
-quantization a la JPEG Part 3.)
-
-Notice that the allocation unit is now a row of 8x8 blocks, corresponding to
-eight rows of samples. Otherwise the structure is much the same as for
-samples, and for the same reasons.
-
-On machines where malloc() can't handle a request bigger than 64Kb, this data
-structure limits us to rows of less than 512 JBLOCKs, or a picture width of
-4000+ pixels. This seems an acceptable restriction.
-
-
-On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW)
-must be declared as "far" pointers, but the upper levels can be "near"
-(implying that the pointer lists are allocated in the DS segment).
-We use a #define symbol FAR, which expands to the "far" keyword when
-compiling on 80x86 machines and to nothing elsewhere.
-
-
-*** Suspendable processing ***
-
-In some applications it is desirable to use the JPEG library as an
-incremental, memory-to-memory filter. In this situation the data source or
-destination may be a limited-size buffer, and we can't rely on being able to
-empty or refill the buffer at arbitrary times. Instead the application would
-like to have control return from the library at buffer overflow/underrun, and
-then resume compression or decompression at a later time.
-
-This scenario is supported for simple cases. (For anything more complex, we
-recommend that the application "bite the bullet" and develop real multitasking
-capability.) The libjpeg.doc file goes into more detail about the usage and
-limitations of this capability; here we address the implications for library
-structure.
-
-The essence of the problem is that the entropy codec (coder or decoder) must
-be prepared to stop at arbitrary times. In turn, the controllers that call
-the entropy codec must be able to stop before having produced or consumed all
-the data that they normally would handle in one call. That part is reasonably
-straightforward: we make the controller call interfaces include "progress
-counters" which indicate the number of data chunks successfully processed, and
-we require callers to test the counter rather than just assume all of the data
-was processed.
-
-Rather than trying to restart at an arbitrary point, the current Huffman
-codecs are designed to restart at the beginning of the current MCU after a
-suspension due to buffer overflow/underrun. At the start of each call, the
-codec's internal state is loaded from permanent storage (in the JPEG object
-structures) into local variables. On successful completion of the MCU, the
-permanent state is updated. (This copying is not very expensive, and may even
-lead to *improved* performance if the local variables can be registerized.)
-If a suspension occurs, the codec simply returns without updating the state,
-thus effectively reverting to the start of the MCU. Note that this implies
-leaving some data unprocessed in the source/destination buffer (ie, the
-compressed partial MCU). The data source/destination module interfaces are
-specified so as to make this possible. This also implies that the data buffer
-must be large enough to hold a worst-case compressed MCU; a couple thousand
-bytes should be enough.
-
-In a successive-approximation AC refinement scan, the progressive Huffman
-decoder has to be able to undo assignments of newly nonzero coefficients if it
-suspends before the MCU is complete, since decoding requires distinguishing
-previously-zero and previously-nonzero coefficients. This is a bit tedious
-but probably won't have much effect on performance. Other variants of Huffman
-decoding need not worry about this, since they will just store the same values
-again if forced to repeat the MCU.
-
-This approach would probably not work for an arithmetic codec, since its
-modifiable state is quite large and couldn't be copied cheaply. Instead it
-would have to suspend and resume exactly at the point of the buffer end.
-
-The JPEG marker reader is designed to cope with suspension at an arbitrary
-point. It does so by backing up to the start of the marker parameter segment,
-so the data buffer must be big enough to hold the largest marker of interest.
-Again, a couple KB should be adequate. (A special "skip" convention is used
-to bypass COM and APPn markers, so these can be larger than the buffer size
-without causing problems; otherwise a 64K buffer would be needed in the worst
-case.)
-
-The JPEG marker writer currently does *not* cope with suspension. I feel that
-this is not necessary; it is much easier simply to require the application to
-ensure there is enough buffer space before starting. (An empty 2K buffer is
-more than sufficient for the header markers; and ensuring there are a dozen or
-two bytes available before calling jpeg_finish_compress() will suffice for the
-trailer.) This would not work for writing multi-scan JPEG files, but
-we simply do not intend to support that capability with suspension.
-
-
-*** Memory manager services ***
-
-The JPEG library's memory manager controls allocation and deallocation of
-memory, and it manages large "virtual" data arrays on machines where the
-operating system does not provide virtual memory. Note that the same
-memory manager serves both compression and decompression operations.
-
-In all cases, allocated objects are tied to a particular compression or
-decompression master record, and they will be released when that master
-record is destroyed.
-
-The memory manager does not provide explicit deallocation of objects.
-Instead, objects are created in "pools" of free storage, and a whole pool
-can be freed at once. This approach helps prevent storage-leak bugs, and
-it speeds up operations whenever malloc/free are slow (as they often are).
-The pools can be regarded as lifetime identifiers for objects. Two
-pools/lifetimes are defined:
- * JPOOL_PERMANENT lasts until master record is destroyed
- * JPOOL_IMAGE lasts until done with image (JPEG datastream)
-Permanent lifetime is used for parameters and tables that should be carried
-across from one datastream to another; this includes all application-visible
-parameters. Image lifetime is used for everything else. (A third lifetime,
-JPOOL_PASS = one processing pass, was originally planned. However it was
-dropped as not being worthwhile. The actual usage patterns are such that the
-peak memory usage would be about the same anyway; and having per-pass storage
-substantially complicates the virtual memory allocation rules --- see below.)
-
-The memory manager deals with three kinds of object:
-1. "Small" objects. Typically these require no more than 10K-20K total.
-2. "Large" objects. These may require tens to hundreds of K depending on
- image size. Semantically they behave the same as small objects, but we
- distinguish them for two reasons:
- * On MS-DOS machines, large objects are referenced by FAR pointers,
- small objects by NEAR pointers.
- * Pool allocation heuristics may differ for large and small objects.
- Note that individual "large" objects cannot exceed the size allowed by
- type size_t, which may be 64K or less on some machines.
-3. "Virtual" objects. These are large 2-D arrays of JSAMPLEs or JBLOCKs
- (typically large enough for the entire image being processed). The
- memory manager provides stripwise access to these arrays. On machines
- without virtual memory, the rest of the array may be swapped out to a
- temporary file.
-
-(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large
-objects for the data proper and small objects for the row pointers. For
-convenience and speed, the memory manager provides single routines to create
-these structures. Similarly, virtual arrays include a small control block
-and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.)
-
-In the present implementation, virtual arrays are only permitted to have image
-lifespan. (Permanent lifespan would not be reasonable, and pass lifespan is
-not very useful since a virtual array's raison d'etre is to store data for
-multiple passes through the image.) We also expect that only "small" objects
-will be given permanent lifespan, though this restriction is not required by
-the memory manager.
-
-In a non-virtual-memory machine, some performance benefit can be gained by
-making the in-memory buffers for virtual arrays be as large as possible.
-(For small images, the buffers might fit entirely in memory, so blind
-swapping would be very wasteful.) The memory manager will adjust the height
-of the buffers to fit within a prespecified maximum memory usage. In order
-to do this in a reasonably optimal fashion, the manager needs to allocate all
-of the virtual arrays at once. Therefore, there isn't a one-step allocation
-routine for virtual arrays; instead, there is a "request" routine that simply
-allocates the control block, and a "realize" routine (called just once) that
-determines space allocation and creates all of the actual buffers. The
-realize routine must allow for space occupied by non-virtual large objects.
-(We don't bother to factor in the space needed for small objects, on the
-grounds that it isn't worth the trouble.)
-
-To support all this, we establish the following protocol for doing business
-with the memory manager:
- 1. Modules must request virtual arrays (which may have only image lifespan)
- during the initial setup phase, i.e., in their jinit_xxx routines.
- 2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be
- allocated during initial setup.
- 3. realize_virt_arrays will be called at the completion of initial setup.
- The above conventions ensure that sufficient information is available
- for it to choose a good size for virtual array buffers.
-Small objects of any lifespan may be allocated at any time. We expect that
-the total space used for small objects will be small enough to be negligible
-in the realize_virt_arrays computation.
-
-In a virtual-memory machine, we simply pretend that the available space is
-infinite, thus causing realize_virt_arrays to decide that it can allocate all
-the virtual arrays as full-size in-memory buffers. The overhead of the
-virtual-array access protocol is very small when no swapping occurs.
-
-A virtual array can be specified to be "pre-zeroed"; when this flag is set,
-never-yet-written sections of the array are set to zero before being made
-available to the caller. If this flag is not set, never-written sections
-of the array contain garbage. (This feature exists primarily because the
-equivalent logic would otherwise be needed in jdcoefct.c for progressive
-JPEG mode; we may as well make it available for possible other uses.)
-
-The first write pass on a virtual array is required to occur in top-to-bottom
-order; read passes, as well as any write passes after the first one, may
-access the array in any order. This restriction exists partly to simplify
-the virtual array control logic, and partly because some file systems may not
-support seeking beyond the current end-of-file in a temporary file. The main
-implication of this restriction is that rearrangement of rows (such as
-converting top-to-bottom data order to bottom-to-top) must be handled while
-reading data out of the virtual array, not while putting it in.
-
-
-*** Memory manager internal structure ***
-
-To isolate system dependencies as much as possible, we have broken the
-memory manager into two parts. There is a reasonably system-independent
-"front end" (jmemmgr.c) and a "back end" that contains only the code
-likely to change across systems. All of the memory management methods
-outlined above are implemented by the front end. The back end provides
-the following routines for use by the front end (none of these routines
-are known to the rest of the JPEG code):
-
-jpeg_mem_init, jpeg_mem_term system-dependent initialization/shutdown
-
-jpeg_get_small, jpeg_free_small interface to malloc and free library routines
- (or their equivalents)
-
-jpeg_get_large, jpeg_free_large interface to FAR malloc/free in MSDOS machines;
- else usually the same as
- jpeg_get_small/jpeg_free_small
-
-jpeg_mem_available estimate available memory
-
-jpeg_open_backing_store create a backing-store object
-
-read_backing_store, manipulate a backing-store object
-write_backing_store,
-close_backing_store
-
-On some systems there will be more than one type of backing-store object
-(specifically, in MS-DOS a backing store file might be an area of extended
-memory as well as a disk file). jpeg_open_backing_store is responsible for
-choosing how to implement a given object. The read/write/close routines
-are method pointers in the structure that describes a given object; this
-lets them be different for different object types.
-
-It may be necessary to ensure that backing store objects are explicitly
-released upon abnormal program termination. For example, MS-DOS won't free
-extended memory by itself. To support this, we will expect the main program
-or surrounding application to arrange to call self_destruct (typically via
-jpeg_destroy) upon abnormal termination. This may require a SIGINT signal
-handler or equivalent. We don't want to have the back end module install its
-own signal handler, because that would pre-empt the surrounding application's
-ability to control signal handling.
-
-The IJG distribution includes several memory manager back end implementations.
-Usually the same back end should be suitable for all applications on a given
-system, but it is possible for an application to supply its own back end at
-need.
-
-
-*** Implications of DNL marker ***
-
-Some JPEG files may use a DNL marker to postpone definition of the image
-height (this would be useful for a fax-like scanner's output, for instance).
-In these files the SOF marker claims the image height is 0, and you only
-find out the true image height at the end of the first scan.
-
-We could read these files as follows:
-1. Upon seeing zero image height, replace it by 65535 (the maximum allowed).
-2. When the DNL is found, update the image height in the global image
- descriptor.
-This implies that control modules must avoid making copies of the image
-height, and must re-test for termination after each MCU row. This would
-be easy enough to do.
-
-In cases where image-size data structures are allocated, this approach will
-result in very inefficient use of virtual memory or much-larger-than-necessary
-temporary files. This seems acceptable for something that probably won't be a
-mainstream usage. People might have to forgo use of memory-hogging options
-(such as two-pass color quantization or noninterleaved JPEG files) if they
-want efficient conversion of such files. (One could improve efficiency by
-demanding a user-supplied upper bound for the height, less than 65536; in most
-cases it could be much less.)
-
-The standard also permits the SOF marker to overestimate the image height,
-with a DNL to give the true, smaller height at the end of the first scan.
-This would solve the space problems if the overestimate wasn't too great.
-However, it implies that you don't even know whether DNL will be used.
-
-This leads to a couple of very serious objections:
-1. Testing for a DNL marker must occur in the inner loop of the decompressor's
- Huffman decoder; this implies a speed penalty whether the feature is used
- or not.
-2. There is no way to hide the last-minute change in image height from an
- application using the decoder. Thus *every* application using the IJG
- library would suffer a complexity penalty whether it cared about DNL or
- not.
-We currently do not support DNL because of these problems.
-
-A different approach is to insist that DNL-using files be preprocessed by a
-separate program that reads ahead to the DNL, then goes back and fixes the SOF
-marker. This is a much simpler solution and is probably far more efficient.
-Even if one wants piped input, buffering the first scan of the JPEG file needs
-a lot smaller temp file than is implied by the maximum-height method. For
-this approach we'd simply treat DNL as a no-op in the decompressor (at most,
-check that it matches the SOF image height).
-
-We will not worry about making the compressor capable of outputting DNL.
-Something similar to the first scheme above could be applied if anyone ever
-wants to make that work.
diff --git a/testimg.bmp b/testimg.bmp
deleted file mode 100644
index 8603d15..0000000
--- a/testimg.bmp
+++ /dev/null
Binary files differ
diff --git a/testimg.jpg b/testimg.jpg
deleted file mode 100644
index b34ca5d..0000000
--- a/testimg.jpg
+++ /dev/null
Binary files differ
diff --git a/testimg.ppm b/testimg.ppm
deleted file mode 100644
index 9d81ce2..0000000
--- a/testimg.ppm
+++ /dev/null
@@ -1,4 +0,0 @@
-P6
-227 149
-255
-0/-0/-10.21/51.51.62/62/83/83/:3-:3-:3-:3-:3-:3-:2/91.91.80-80-91.91.:2/80-80-80-80-80-80-80-80-6.+6.+6.+5-*5-*4,)4,)4,)4,)4,)4,)4,)4,)4,)4,)2-)/*$/,%/,%0-&1.'2/(30)30)63,63,74-85.85.96/:70:7.A:0B<0D>2F@4IA4JB5KC6KC6MD5MD5OC3NB2OC3OC3PD4RE5R?1Y?2b@4nB5}E6H8G9£F7¯G:¸G9¾E:ÅG;ÇG>ÊG?ËH@ÐE@çFLíCLëDKëEIîCIïBDñ>Bô=Aø;A÷:@ô:?ð<?é?@â@>×?<ËA7»=/µ@.µ@.´?-´?-³@-²?-¯@-@,ªA,¦A-¢B,@*A)@*A,>-?/?/>.>,=+<+<+?+?+=*=*=*>+?,@/?6>5=2?1©B3³D3¼D4¿D4¹?0µA2¬F8H;H9oA2T8*C3&=5295495473271160050-50-72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-5,-4+,4*+3)*7(+=.1E69P:<jBC|IHMMOOW[ªdnªot{£®º~½sy`aTKvPDhSJgOG^MH^TQbfdo|}£©¢¨ {|lfgUXWEQNEUR[UQbUQb0/-0/-10.10.40-51.62/62/83/83/:3-:3-:3-:3-:3-:3-91.91.80-80-80-80-91.91.80-80-80-80-80-80-80-80-6.+6.+5-*5-*5-*4,)4,)4,)5-*5-*5-*5-*5-*5-*5-*3.*0+%0-&0-&1.'2/(30)41*41*63,63,74-74-85.96/:70:7.@9/A;/C=1E?3H@3IA4JB5JB5LC4LC4MA1MA1MA1NB2OC3QD4P>0U?1^A3jC4xD6E4E5C3§C4¯A4µA4¼B7ÀD:ÄE<ÅF=ÍC@áEIçBIèCIêDHíDGïBDó@Cö?Cø;A÷:@ô:?ð<?é?@àA>Õ@<Ê@6¹>/µ@.´?-´?-´?-²?,°?-¯@-@,©@+¦A-¡A+@*A)@*A,>-?/>.>.>,=+<+<+?+>*=*=*=*>+?,@/@5>5>3 >1«A3µD4½C4¿D5»A2·C6¬F8I;
G:l@3S9*B4)>63:6595484382271161.61.72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-3--5,-4*+3)*5)+<-0C47N8:d>=vEAJINLTV¤aj¥l}r{¢®
¹{»ou©[[QHuOCiOFeOG_PH_RN_[Yfnot ~ojkY][LVSJXSZVRaXQa/.,/.,0/-10.40-40-51.51.72.72.72.72.92,92,92,92,91.80.7/-7/-7/-7/-80.91/80.80.80.80.80.80.80.80.6.,5-+5-+5-+4,*4,*4,*4,*5-+5-+5-+5-+5-+5-+5-+3.*2-'1.'2/(30)30)41*41*52+63,63,63,74-85.96/96/:7.?8.@:.B<0D>2G?4H@5H@3H@3I@1I@1K?1K?1K?/L@0MA1NB2MA1QA1YB2dC2qC3|C2B2A0<- :+§;.¯=2µ@6ºD:¿F=ÅD>ÙCEá@FãBGçBFêDFðCEôADø?Dú;@ù:?õ;@ð=@è@@ÜA=Ñ@;Æ@5·=.³@-³@-²?,²?-°?-¯>,@,ª?-§@-¥@,¡A+A,?*@*@+>->.>.>.=+=+=+=+>,>,<+<+=,=,?+?.A6?5>3£>2¯A4¹C5¿D5ÁC5ÀD8¸F;®I=J=G;h@4Q:,B5,?74=77<66:4494183072/72/62/62/62/51.52-41,41,21,.0-,1-.0-.0-//-//-0/-2.-5//4..5,-4*+4*+9-/>24I56[97l?9|E@IDOM[`fvmw}}¹u~·fm¤TVMEvLAkMAeOFcQHcMH^NK\[[eqty
|xzlfiXZ[MVSLZU[ZT`[S`.-+/.,/.,0/-3/,40-40-40-61-61-61-61-81+81+81+81+7/-7/-6.,6.,6.,6.,7/-7/-80.80.80.80.80.80.80.80.5-+5-+5-+4,*4,*4,*3+)3+)6.,6.,6.,6.,6.,6.,6.,4/,30+30)30)41*41*52+52+52+52+52+63,74-85.85.96/96->7-?9-@:.B<0E=2E=2F>1F>1G=1G>/H<.I=/I=/J>.L@0JA0KD2NE4UD4^D3iD2sB1~A/?-9)9'9*£<-¬@3³E8¸H<ÁF>ÒDCÚACÞBCâDCçCDìBCó@C÷?Aú;@ù:?õ;@î>@åA@ÚB=Í@9Â@3µ=-°@,°@,°@,¯>,®?,®?,¬?+©@-¦?,£@+ @*@+@*@)?*>,>.>.=-=+=+<*<*=+=+<*<*<+>,>-?-A6?5>2¦@4²B6¼C8ÁC7ÂB7ÂF<ºJ?¬L@K>|F:b@4L:.A7-@85>96=77<74:5294183083062/62/62/32.52-21,21,12--2.-2./1./1.00.00.10.10.5106005//5,-4+,6,-:01D22T71c;3qA7{E;HDRU_lis}y«x}µowµ`f¢QRLEyL@pL@hPEgQFfLC^GBVMLZ^^fjnquyxx}wzvwzokoa`bTWYLTTL]WY]V]]V^------.-+/.,0/-10.3/,40-3/,3/,4/+4/+4/+4/+6/)6/)4/,4/,3.+3.+3.+3.+4/,4/,50-50-50-50-50-50-50-50-3.+3.+2-*2-*2-*1,)1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,41,41,41,41,41,52-52-52-52-52-63.63.74/85096196/<5-=6,?8.@9/B:/C;0C;0C;.D:.D:.F:.G;-H<.I=/J>0I@1JG6MH5RG5YF5bE3jD1uB/}>,;):):*=,£B2¬F8²J=»I?ÌGBÔDCØDBÝEBâBBéAAð=@ô<>ù:?ø:<ô<>í?>áB>ÓC:ÅA5¹?0²?-®?,®?,®?,>-¬>-¬>-ª?-¨>.¤?- ?,?+?,?+>*>*>,?.>->->-=,=,=,=,=,=,=,<,>->.?.B4A4@1¨@3¶A7¿C9ÅB8ÄA7¾C;·H?¦LCJ@tE;Z>2E9-<5+@93@85?75>63=52<4194083/62/43/43/23.32.12-12-02--2.,2.-2.-2./1./1.00.10.3205105104..2,,4+,7./=/.N5.Y9.e=1n@3sB;yKKZegpzxªu{·ks´_d¦TTOGLBwNAmNBhMAeJA`GBYGFXKKWMPU]cc`fbbia`f\Z`TW[MUXMXXP^YV`WX`WZ,,,,,,.-+.-+/.,0/-3/,3/,2.+2.+3.*3.*3.*3.*5.(5-*3.+3.+2-*1,)1,)2-*3.+3.+3.+3.+3.+3.+3.+3.+3.+3.+2-*2-*2-*2-*1,)1,)1,)0+(3.+3.+3.+3.+3.+3.+3.+3.+41,41,41,41,41,41,41,41,41,52-52-63.74/85085085.;4,<5+=6,>7-@7.A9.A9.A9.C9/C9-E9-F:.G;/H<.J>0HA1JG6IH6NG5VF6\E3dC2n@0v>-{<+;);*=,@1£F5ªJ:´J=ÄH@ÌEAÑFAÖE@ÞCAä@>ì>?ñ:<÷;<ô:;ð<=é@=ÜC=ÍC8¾@2±>,®?,«@,ª?+ª?+ª?-©>,©>,¨?,¥>-¢?, ?,>,?+>*>)?*>+>->->-=,=,=,<+=,<+<+<+<-=,>/?.B4A2 @2¬B5¹C9ÂC:ÅB:ÂA;ºA9±I@£NGNEoG=S?4A;/96-@93A75?74>63<4194083/74/43/43/34/23.23.02-02-.3--3/-3/.3/.3/02/02/11/11/21/32032040/2.-1-,4..8.,G4-O4)X8+`<0e?6mGFyYdk
u||²w|¼nu»dh¯[[¡RMLB~OArL@hI=cH>`HB^ECX@BO;@FBGJDMJJQJJQIIQFKQEOUIVWO^YS`YS`XU++++++,,,---/.,/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-)2-*2,,1++1++1++1++2,,2,,1++1++1++1++1++1++1++1++2,,2,,2,,1++1++1++0**0**3--3--3--3--3--3--3--3.+41,41,41,30+30+30+30+30+41,41,52-63.74/74/85085.:3+;4,<5-=6.?6/?6-?6-?7,B8.B8.E8/E9-G;/H<0J>2H@3HE6GF4KE5QD4XC2_B2f?.n=,v=,|:*
9);*=.B2¢F7¬F8»F<ÂF>ÉF>ÐE>ÙD@âC?ê@@ð>>ò::ñ;:ì<<äA<ÖC;ÆD6µ@/ª=)ª?-©@-©@-¨?,¨>.¨>.§=-¥>-£=. ?.?-?-?,>*?*>)>+>->-=,=.=.<-<-<-=-;,<,</>.=0?/C2B1¡A1®B6¼C:ÂC<ÄC=ÀC=¹FA²QJ¥XRXQsRIWI>CC7<?6>93@72>71=60:5/94.83/63.43.43.34/13.13..3-.3-.3--3/-3/-3/-3/.3/.3/02/02/00.11/22021/0/-/.,2.-4/,?0+D0)K3)T8-Z<4dFFu]js«
¾~ÇtzÆmp½ce¯VSLCK?qI<gG;cE>_FB]DBW?AN;?H:BE>HGDMHGQIGQHJRGNVKUXM^ZOaYNaXO++++++,,,,,,.,-/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-*2,,1++1++0**0**1++1++2,,0**0**0**0**0**0**0**0**2,,2,,2,,1++1++0**0**0**2,,2,,2,,2,,2,,2,,2,,2,,3/,30+30+30+30+30+30+30+41,41,52-63.63.74/85085092,:3+;4,<5->5.>5.>5.>5,B8/B8.E8/E8/G:1I=1J>2I?3FC4FC4JB5OA4TA2\@2b>0j<-q<.w9*}8)
8(:,=/B4¤B5²F:ºE;ÁF>ÊG?ÔG@ÞFAçCAîB@í;;ë;;ç>;ßB;ÑD:¿D4¯@-¤>(¦A-¦A-¥@,¥@.¥@.¤?-¤?-¤>/¢>.@.?.?->+?*>)>+>->->-=,=.<-<-=-=-<.<.<.</>/>1?1D2C1¢B4C6ºC;ÁD>ÁD>»EA¹PL²[T¥e\f]u_T[UIGMACI?<92?82>71;6094.74-63.43.43.34.24/13./4..3-.3-.3--3/-3/-3/-3/.3/.3/02/02///-00.22022010.0/-0/-3/,8,,;,)C0*K70S<6^IHtbnz¶ÆÏzÌrxÆik¶WWIDE=nG<dD<aC>^CAY@CV@DP>EKGQRKWUQ^WU`XS_UR^TT^SY_S^[LaZJaZJ,-/,-/,-/,.-------.-+.-+/.,/.,1-*0,)0,)0,)/+(/+(/+*/+*/+*/+*/+*/+*/+*0,+/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+1-,1-,2.-1-,1-,1-,1-,1-,1-,1-,1-,0,)1-*2.+3/,3/,3/,3/,3/,3/,3/,3/,3/,40-51.62/74/80-92,:3-;4.=4/>5.>5.>5.?4.?5,B5-C6.D7/F90G:1F<2G?4H@5J@6P?5T>3X<1^90b6+m9.t8-|8+9,;/=0?1>0§A3A4µC8¾E:ÊG=ÔG>ÞE?åC@è@?êBAæDAÚE>ÈD8·B1ªA.¢B,¢A.¡@-¢?,¢>.¡=-¡=-¢>. ?/<,=,<->-=,=+=*>*<+<+=-<,<,<,:-;-=/</</=0>3@2A5A4E5D4£E9±I>ºG@»D>»EA¸MG´ZR¯f_£qfsh~rdjj^V^SIQFLLBJF=B>5<8/95,74+63,33+43.34.14-14-02-/1,,1+,1+-2.-2.-2.-2./1./1./1./1.02/02/11/11/11/11/11/40/4+0;/3A32C4/J;6]OOymy
»ÏÙÓtzÆjn·_b§Z[LItHBdA>]>>X?BUAIVLU\U`bbqnn}xv|rulyoguh_k_W_P]\Hb\Fc]G,-/,-/,-/,-/------.,-.-+/.,.-+0,)0,)/+(/+(/+(/+(.*).*).*).*)/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+0,+1-,1-,1-,1-,1-,1-,1-,1-,1-,1-,0,+0,)1-*2.+3/,3/,2.+2.+2.+2.+2.+2.+3/,40-51.62/80.91.:2/;4.=4/>50>50=4-?4.?4.A4.B5-C6.E80G:2H;3H>5H>5L=6O>6Q=4V;2Z90_7/h70p7.w7-9-9.<1<1=1¢@3§A3¬B5´D8¾E:ÉF<ÔE=ÛD=ßD@àE@ÞFAÔG>ÄF8²C2¥B-B-C.B-@.?-?-?->.>.=,>,=-=,=+>+>*=,<+=+<,<,<,;+;-
<-</
=/
=1=1>2@6A7B6G9E7£G<¯J@¸IB¸GA·LF³TN±d\ªqf~oo|mmseZfZNXMLNAKI=EC7@=4=:188.44,11)23-23-03,/2+/1,.0+.0+.0+/1.-2./1./1./1./1./1./1.02/02/11/11/11/11/11/2015+49-7<23?53H?:^VTxr|¹ÊÔÏyÂqy¸kthn\_XZqSUjRWjT^hZgmfvvrt~~vyrqfteZeT[ZE`Z@b\D,-/,-/,-/,-/,-/,.-------.-+.-+.-+-,*/+(.*'.*'.*',+),*+,*+,*++)*+)*+)*+)*-+,-+,-+,-+,-+,-+,-+,-+,,*+,*+-+,-+,-+,.,-.,-.,-.,-.,-.,-/-./-./-./-./.,0,+0,+1-,2.-2.-2.-2.-1-,1-,1-,1-,1-,2.-3/.40/51.80.91.:2/;30=31=4/=4/=4/?40?4.A4.A4.C60D71F93G:4H;5J;6K<7N=6P;6S:5V72[6.c60k6.t5,}7/9/;0<0<1?3 @4¢@3¨@3±C6ºD8ÅE:ÍD:ÕF@×H@ÔIBÌI?¾E:®C3¡B.A.B/A.?.>->->->/?0<-=-<.=.>-=,<+=+<*<*<,;+;-
<-:-;-<0<0<2>3?4
A8C:D9J=H; H>¬KD²KF³LG²SM®`Vsg¦qz{wsocqbXcUNRDMN@HI;DD8@@49;.46+/1&01)01)/0*/0*./*./*//-//-//-.0-//-//-//-//-//-//-00.00.00.00.00.00.00.1/26+97+98/4;63HE>_^Yzz|±¿ÇÃ}»{¶|²}«}wq~n}n~~o~y
¡¨¥|{j{i\hTXX@]Y<_[@-.0-.0-.0-.0-.0-.0.......-+.-+-,*-,*.*'.*'.*'.*),*++)*+)*+)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+-+,-+,-+,-+,.,-.,-.,-.,-/-./-./-./+*0,+1-,1-,1-,1-,0,+0,+0,+0,+0,+0,+1-,2.-3/.40/91/:20;31<41=31=31=31=4/>3/>3/@2/@3-A4.C60D71E82F93H94I:5J;6L:6N94Q83T50^72e60o6/x8/90:/<1>1?4?4?2?1¥A2®B5¸D7¿E:ÇG>ËH@ÊJAÃI>¶F:ªB5A0@.A-A-?->,>,>,=.>.<,=,=.=-=,=+=-<,;););+;+;,;,;-;,;/<1<1>5@7C:D<E<L@H<G>§JC®LI®QL]Vªj^§o¡yzxm{jbm]SZJQUFKO@EI:@D6;=057,13(01)/0(./).-(.-).-)/.,0/-/.,/.,/.,/.,/.,..,/.,..,0/-//-0/-//-//-//-//-2-17,:6*83-1961HJ?bfX{z£°¶²¯
²¤¶¨³¨«¤£ }£°±£
|k|iXfOSV;ZV9^Z=+/2+/2+/2+/2-.0-.0......------.-+-,*-,*,+),+),+),*+,*+,*++)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*++)*+)*+)*,*+-+,-+,.,-.,-/-./-./-./+*0,+0,+0,+0,+0,+/+*.*)/+*/+*/+*/+*0,+1-,3/.40/901:20;31<42=32=31<20<20=20=2.?1.?1.@2/A30B5/C60D63C84D95E:6G96H94K84N50X72_60i70r7/}:1<1>2>2@6?5?5?3@3£C5«C6³E8ºE;½G=¾H>¹G=°D8¦A5?0@/@-@-?.>-=,<,=/=/<.;-</<.<-<,<,<,;+:*:*:*:+:+:,:.:0<1=4?6B9D=F@H?KAH=G?£LE¨PL¨XQ©f]¦vh¢w¤£~}tqjue\eRV_LNUCEL:?F6<@27:/68-01)00(.-(/,'/+(/+*1-,2.-1-,1-,1-,1-,1-,/.,1-,/.,2.-0/-2.-0/-0/-0/-0/-2-18,:5)51++66,GL8`hQzp ¥£¢ª©¹± À³·¨¶§·¨·¥±««±³´¢
{xgzdTbIQT9VU9XW;,03,03,03,03./1./1//////....../.,.-+.-+.-+-,*-,*-+,-+,-+,,*++)**()*()*()+)*+)*+)*+)*+)*+)*+)*+)*,*+,*++)*+)*+)**()*()*(),*+,*+,*+-+,.,-.,-/-./-./+*/+*0,+0,+/+*/+*.*)-)(0,+0,+/+*0,+1-,2.-3/.40/:12:12;31<42=32<21<20;1/=20<1/>0->0-?1.@2/A4.?4.@51@72@93A:4B94C84F74H5/Q51X5/a6/l8-u9.</>0=1?5>5?5?4B4B4 C4¥D4¬B5°D8´E:±E;ªB7¡?4>1>0?.?+=,=,<+<+<.<.;-<-<.;-;,<,;+;+:*:*
9):):+9*9-9-<1<3?6A8C<
F?IBICJAG>HCNJ§VR§`Z©pe¤r}¡¨§ ~~yup{jdp\]iSR^JJS@BK:>E5:@29<134,22*1.)/,'/))0**1++2,,1++1++1++1++1++0,+0,+0,+1-,1-,1-,1-,/.,/.,/.,2,.8*75(13+(56&EK1\gGudy¥´¢Å¥©Î¥É¦Ê°§Ë±¤È¬¾³°²²²¬¡{wrdx]Q_ENR7QQ5SR6,03,03,03,03./1./1./1./1/////////////.,/.,.-+.-+/-..,-.,--+,,*++)*+)**()+)*+)*+)*+)*+)*+)*+)*+)*+)*+)*+)**()*()*())'()'(+)*+)*,*+-+,.,-.,-/-./-./+*/+*/+*/+*/+*.*)-)(,('0,+0,+0,+0,+1-,2.-40/40/:12;23;23<34=32<21<21;10<1/<1/>0/=/.>0->0-?1.>3/=60;60;83<94=:5>93@72C60G4.O4+Y4+d5+n8,x:-;.
;.<4<5>3@3A2B1A2@0 >1¦@4ªB7ªB9¥@6>5=2?2?-?->,=+;*;*<-<-;.;.;-;-;.:-:,;,
9)
9):)9(9*9*~8,~8,<1=4@7B9E>
IAKFMFIAH@JF¡SO¨]X©hb©{n¤y§¬ª¡~wxnjxadr[ZhQQ]IITCCL;>D6<?467/44,30+0+'1()1()2)*4+,2)*2)*2)*2)*2)*0**0**0**1++1++0,+0,+0,+0,+0,+1+-6)25)-4-%46!AH&Wc;qWm} ¢¡¨¸ ȤЩӫ¨Ò®§Ñ¡Ë¥½
¯¬°®
±«{{tqk_sWM]BIO3JM0KK/./1,01./1./1.0/.0/.0////00.00.00.0/-0/-0/+/.,1-,2.-1-,1-,0,+/+,,*++)*+)*+)*+)*+)*+)*+)*+)*+),+)*+),+)*-(,*(),())'()'((&'*()+)*,*+,+)-+,.-+/.,/.,-,*-,*/+*/+*.*)-)(,(',('1-,2-*2-*2-*3.+4/,50-61.;31;31<42<42=31<20;1/;1/<1/<1/=/.=/.=/,>0-?1.=2.=4-=6.;819919:29:2;81?6/C2+J1,T2)^3*g7+o9-u=.z</=2=3?2@2@3@1?1=/</>2¢B6¡C7B7?4>2>1>/=.=-<,=,=,=.>/<.<.</;.:-:-:,;,:+:+:*~;*~;+|:*}9,|:.>2>5@6C:G=
JBNEOGICIDPJ\Tg`uiu¡
ª¬¨¡~zytoi}bby]\pUUgOO\HGRAAH8=A388.85.7/,3+)2()2()3)*4*+0*,/+*0*,0**0*,0*,2),2),3*-1+-1+-1+-0,-0,-0,-1+/4)/4*+4-%46!?F%T`8m|Qgtz¡~¡z§{¶ÄËÉÇÆÁ·
®µ«®
©~xvolfZnSJZ?GM3FJ1DF./0+.0+/0+01,01,01,12-21-32.43/43/62/51.41,3/,4/,50-50-4/,3.+2,,1-,0,+0,+.,-.,---/--/,,.++-*).))+.)/.)-/(/.)-/)-.)-.*+.*+/+*/+*-,*.-)--+-.)./*./*------.,-/-./.,0/-2.+2.+2-*4,)5-*6.+8/*:1,:1*;2+=4-=4->50>50>50=4/<3.;2-=2.<1-<1/;0.=/.>0/>0/@1.A0)@2);4*77-39-28.56.:3-?-)F*'L)'S*&Z/(`5,d<0k@0yA0@/A1B3@3=0;/8-;/=.A1B2C2A0>.;,;0:2;1=0?0?/?.>.@1?0>1<0;/:.:-;-{9+~@3w<.q7)w>-w>-v;-}?2{;/@4E9I?LAMBPCNEKISPbYpa}jq|¤¦§§¤~u{ouiib_[zXZsUZnSWeNPWEJK=C?6@93;0.6**3')3'+3'+1&*,*-)+***,*(),'+.(,1(-2'-3(.3(.3(02(00)10)1/*1/*0/)-1++0-(//#<?*V\@pzXgus¡v¦w¨vªu´{¿Á¾º³®}
«|ª{
ª~¨}¦~|yurmh|cYkUMZFIQ<CH4?B//0*01+01+01+12,12,21,32-43.43.74/74/63.52-50,50,7/,7/,6.,6.,3.+2-*0,+0,+0,-/-./-0--/-,1+*/)*.)(-.)//(//(//(//)-/)-.*+.*+/+*/+*.-).-)./*./*./)./*.....0....../.,/.,1-*3.+5-*5.(7.)8/(:/);0*<2)=3*>5,>5,>5.>5.>5.=4-<3.<3.=2.<1-;0.;0.=/.=/.>0/@1.C0*C0)A2+>4+:6-95,:3-<1-?-+D*)I*(N+'T/)Z5-_:1e>/pA/xA-A0@2?4=3:2;19.</>.@0A1A1A/?1;2;2<2=0>0@/?/?.
@1>/=0<.;.;,:,;,x8,x<1s9-n9+s>.s>.r8*u:,}=1A5E:I=K@NAPCNEJHSRf]wfpw¥§§§§¤w}ovei``YZY{X\wXZnSSaJNUCFH;C@7<737/-3*+2)*1(+.(*,*+**,+),+),-(,/)-2(02(02(02(02(10)1/*1-*3-*3-*12-12.-0,)--%8:,SXBox]ioln£p¤p¥pw¶¹¶³®{«x¨w¨y¨|¦|¤{xuqnh{eYjWMZHEL<@D5;=/12,12,12,12,23-23-43.43.54/54/85085085074/72.61-80-80-7/,6.+4/,3.+2,,1-,1-./-.0.1/-0--/,,.+*/+)./(/1'//)-/)-/)-/)-.*+.*+0,+0,+/.*/.*/.)0/*0/*0/+//-///0./0./0/-/.,1-*2-*6.+70*90+:1*<1+=3*>4+?5,?6-?6-@7.@7.?6/>5.=4-=4-=2.<1-;0.;0.;0.;0.<1/?1.C2+E0+H/+K--L,/K+.I*/E+.A-,@.*A.(E.(M.)X1*b3-g5,j:,o;-w;0=4<6<5:4:4<2=2>2
?3A2A3B5C5?2=/>1>.>/
>,=.<,;.<,:-:*;,<)~=+{<+}=1z<1v:/u;/x@1x@1v<.v;-?5B8F=H?JAKANCNFJHTQf\ve
nt{¤
¨ªª©¥}yximae\a\`]`[|]UrVPhPFYEBP?:D93:2.3,*/)*,)**(0'(1&*1&*1&*0'*1(+0*.0+//*.-+.,+0+,0)-0(-1(-1)-01/23/..*'**"57*PUAmv[|ik~jjn n~ m¥q¬x¯|zªx©v§v§u¦w¦y¤y¢}}ywtpmh|cYkUMZHDH9=?299-23-23-34.34.34.45/54/54/650761961:72:72961940940:2/91.91.80-50-4/,4..4..3/03/01/01/20.1..0--/-+.0)02).0*.0*.0*.0*,/+,/+*1-,1-,0/+0/+10+10+10+10,11/1111/010.10.2.+3.+3.*92,92,;2+<3,>4+@6-@6-A7.B8/A8/B90A8/A81@70>5.>5.=2.=2.<1/;0.;0.<1/=20=2.B3.E2.L..R+0V'/U&.P'/I).C/.<1+;2)?2)G0(R/)_.*d/)i9/k;/u<3}<6
;8;9;7:6>8@8B9
B9
C7B7A7A5@1A/@.@.>-<,;+:+8*9*:*:)<){=(x>(x>*>1{7.z7.z<1v;-w=/|A3{@2B7E:H=J?J@MBODQHSJ\Qh[tb
gm~v|§©ªª¦ ~}yqoiifgfeggde_~_Zw[PhPK^JBP?8D62:/.4*,/(+*%2&&5%(4%(2&(1'(/)+/+,.,-+++*+-*+-(,-(,/',/',/*+-.*+1++0+'.+"88,PUAiqYvc{hyh|il}mykz m¥r§t¥q}£p}£p}¥s~¥v~¥x}¤x|¡x}zzwuqnje|bWkRN[GDF9?=1:8,45/45/45/560560560761761872872;83<94<94<94<73<73<41<41;30;3083072/61.61.5106216213122011/00./1-.2,04+.4+.4+.2,.2,,2,,2,,3/.3/,3/,3/,21,21,32-32.32032032032051051.61.61-;4.<5/=4-?6-A7.B8/E8/C9/D:1D:1E;2D:1C90B8/@5/@5/>3/>3/=2.=2.=20=20>31>31@51E31M02T,4X)3W(2R)1K,1B30:6-77+:6*B4)M2)X/)^/)f:1j;3s<7z=:<:<;;;::;7>8A8B9C:C:
@9@7C2C1B0?/=.<.:-9-7+8+
9+:+~=+x>*v?*x>*9-|/'8/>4w4+s5*}A6}C7E:G<I>J?KBMDQG
WJ|aNzjQpYu]|biu|£~§ª
¬©¥{}zwzpzlxlwkumrlmgkd`rX[iRR[HHL=@@4;7,70&5*$6('5''3''1'&.)&+*(++)+-*',('+*)+*)+***,+),+),-)*,#$2*'50*86*BC5UZFfpWn}^teqbuexiwkshtiwkz¢nx lwmx ny£s{¥u{¥w|£wyuzwwtsomhd{_WkPN[GCC7>:195,560560671671782782872872983:94=:5>;6>;6>;6>95>95?74?74>63=52;63:5294194184184395484373243151240/6-06-.6-06-.4..4..4..4/,40-40-40-51.32-32-43.43.43/431542540841850940:5/=60>7/@7.A8/C90D:0G:1H;2F<3F<3F<3F<3E;2C90B71A60@51@51?40>3/>31?42@53?53@72C52I35P16T/6S.5P05J22C52=90<:-=:+C7)I6(Q3)W2)]2+d3,l50v64}77877766~75}:4}<6}>5?9@8?9
A8B3C1B1@0
=/;.:.9-
9,9,:,<,|=,y>,x?,|=,5*2,¡LE§XQA8|90F;K=yH:zJ<{M>|N?}OBQEUJ_LrkOosR|uXw]ybis zz|£¨
§¤~{y~vp
oppp{pwmskj~bfv\_hSV[GOM>GA3@6*=0';,'9+(6+'3+(/,',-'+.').().(+-(-,*/+*3)*4(*7'*7'(3($<3,E>4IG8QR@]bKgqVjyZn]k\l]pbqeodoerfumrjqitnx¢rz¤vy¢vyvvtwvurokj
fc|^UlON\ECC7@91;4,671782782782893893983:94:94;:5>;6?<7?<7?<7@;7@;7B:7B:7A96@85=84=84<73<73<73<74<74<74;639529338308/09/.8/080.80.80.61.61-61-61-52-52-63.63.74/74/540540841952:63<94=84@93@70A8/C90D:0G:1H<0I=1I=1J=4J=4J=4I<3F<3D:1B8/A7.A81@70@72?61?61@72@72A83?74@85B86D97G96H96H96H94E80E8/E9-E9+G9,I9*K9+Q7*Z/&d/'n3-z6398;9;:=;A>@:=6<3:3<4=7@7A5B3@2?2=1<0;/</~<.|=.{=.|>/|>/}>/=/9/1+¢<8ÍlfÙ~yZTC<LAN@tJ<qM=pQ?qR@tS@zWD[J~eOmsOo{Uy[u_©oc¶mf¾qk½wo»w±z§~¡¡~
y
vrrrrr|sxptpmiiedx\]kQV^GMP;ED0B;+@3+?2,;0*70*30)00(./'./)/0*2/*6,+:*+>(+C&+E$+C&(F5-LC4VQ>[YD`bJgmQiwVj{Wl[gWfWl\oananbrfskojoirnw ty¢xxwuvssuvsrnlicb{[TmMM]CGH:E<5@707827828938938939:4:94:94;:5<;6?<7@=8@=8@=8A<8A<8C;8C;8C;8B:7?:6>95>95=84>95>95>95>95=85<73:51;30:0.:0.91.91.91/91.91.72.61-61-63.63.63.74/74/74/540651952;83<94?:4B;5B;3A8/B:/C9/E;/H<0I=1J>2J>2K>5K>5J=4J=4F<3E;2C90B8/B92B92A83@72@72A83B94A:4?82@93B;5D=7F=6G<6K<5N;4M6.N6,Q6+Q6+Q7*P9+P9)V6'f6*r6,~;3@9D@HDJGLF QJLDD;
;07-
7-91=4>5>7=6
<5
<5=4}=3z>3x@3vA3x@3z>3<3:37331(&³=;ì|zýÅhcG@K@xH:nM<jQ=fT>hV>lX@t[E`LhPysQwUt\´l^É__ÓV\ÙQ[×T\äouÙzxÌ|À~µ«}£xvrtuuussr|nyju{amoWgbN_TBUE5R</O4-M1-I0,D/*>/(9/&7.'6/'81):/)=.+A,+F)+H(+K'+H)'TB4YQ<d^FgeLilOnuVm{Xl~XkZgVgVm]pbqbrduitlokojrmwvyxwytusuuusqokiea|[TmMM]BMN@KB9F=69:49:49:49:49:4:;5=<7=<7=<7=<7@=8@=8A>9B?:D?;D?;E@<E@<E@:D?9D?9C>8E>8D=7B;5B;5B;5B;5B:7B;5A:4A:4A83A83A83@72@64>71>71>71<71<71;60:5/85.85.74/74/961961961:70<71=82A:2B;1C:1D<1F<2J>2K?3L@2N@3N@5N@7N@7L?6K>5I<3H;2E;2E;2B90A8/@91?80?80?80@93@93<5/MD=M@:K:3T@9R62O0+a<6\3-`5.`4+^/'^/%f6,m=1q=0I=G;I?KAF>>7=6D;¦ND¤PE¨VJ«YK¥OBA5;0>69898655284?8|@6r>1rB4oA2q=0v:07243-1',ÈHIèbaÅEDÍWUáyv«VOF<VFmR=i[AibFjeHj`En^D|dLjTbL²m]ÑnhÛX]à;Lç-Eò+Hõ0Lö@YìI\ä[eånrâ{|Û}ÛØÃv½wºx¶x²xw¨y¥xo~mxioabYUM{IBxA>u:<i.2d02a11P&'G%#L0-M51G4.E2,D1-F1.F.,G+*K--Q6/YH4`W:f_BgdEkoNu|Zu]oYlWlZp]rasbudwfvhrjsosqqostwxz|yzxysrmjkfidazZTmMO_DNO?SK@PG>9:49:49:49:4:;5;<6>=8?>9>=8>=8A>9A>9B?:C@;D?;D?;FA=E@<E@:E@:D?9D?9E>8E>8E>8E>8E>8D=5C<6C<4D;4C:1B92B92B92B92A83A83@93@93>71<71;60;6096/85.74/74/96196/96/:70<71>:1A:0B<0C;0E;/I=1J>0L@2L@2N@3N@3N@5N@7M?6J=4I<3H;2E;2E;2C:1B90@91@91@91@91A:4B92D93I81L/+V.,j76u99{;;
ECD?H@
IAG>IBNH¡PL¢OGD7B4B6C8 >37-7-=0£C5?0@0 E3¤G6§F6®H:¶NE´LM¯HL¥@D9;98>:@8x>3o>0zI;
LA?8,+).³9DÒLWÜKNßMMÊ>=À@?Ð`\³YQ@5TDyaIe[@^]?ihIslOvgJ~dKcN¼dXÖ_[æUZëANò,Eþ%Dÿ&Hÿ'Iÿ.Nù3Nò<RðIZëP^åQ]ãS]àXbÛbiÕflÔjnÒmqÏqrÍutÉxwÇywÊ||ÉyzÈvxÇqtÆkrÅfnÅakÃ_kÅ`n³S_¥KUGQDKEIm69HT1-M0*H1+J6/K81K:2O>6UE8[O5cZ9gaAifEnrOz]zbt^r_p_p`q`udwdwdwfsixrzxyx~}
zzromhhd`y[TmMNaERSAVPBUOC8938938939:4;<6<=7?>9@?:@?:@?:C@;C@;C@;C@;D?;D?;FA;FA;FA;E@:E@:E@:G@8F?7JA:I@9H?8G>5F=6E<3F<3E;1D:1D:1D:1D:1D;4D;4D;4C<4?80?80<71;60:5/:5/94.94.96/96/:5/;7.>7/@9/B90C;0E;1F<0I=1K?1M?2M@0NA1M@0P?5M?4L>3K=2I<3H;2E;1D:0C:1C:1A:0A:0?;2@<3@<3D;4UD<R3.j23AGLWÃU`Ë]fÆ_bB>I?LANB¬RJ¾URÌOSÄLK¥@4B0 @0¥?1¥;.£7+¤8+§=/«E6¡>+7$:'¥>-¬A/²C2¶D:§02¯:B¹DL½LRºMRKLA>71{8/v6,x2*1-37¹=GÕGWèM[âFIÏ53Ð:9½31ÈNKÆc]J?[J}cLj_CgdEtoOpQhJhN°hYäbbõQZôDQö7Iý1Jÿ2Nÿ/Mÿ*Hÿ2Oü0K÷1Jõ5Lò4Mð2Kó3Ló7Pò@XïC[îF]íIaëNcêQeèUhèVkåSjäRiãOiäNiçNlëPoòSsóVuþh
ña|å[tÕUlÍYlÉdr¨R]r-2^&'Y0,W:4Q?5B:-:8)>B1LN9VO3aV6e_?heDquTe~iwdxiuerdrcveyhzizjv~
£¨©¦¢zypmg~b^wYTmMPcGSXDXUDYVG7827828939:4;<6=>8@?:A@;BA<BA<DA<DA<DA<DA<E@<E@<GB<GB<GB<FA;FA;FB9HA9HA9LC<KB9JA8I@7H>5G=3F<2E;1D:0D:0E;1E;2D;2E<3E<5E<5@91?80=82<71;60:5/:5/:5/96/96-;7.;7,?8.@:.C;0D</F<0F=.J>0K?/M@0M@0M@/M@0O?2O>4L>3K=2J<3G:1E;1D:0D;2D;2B;1@<1@<3A=4B>5F<3S81[*&:?¾T`ÙTeæUfãUcËJO30:/>0A3®F=ÅIGÕBHÍ>@±B7§F5©B3¬@3¯?3°>3³B4´D6²G5©B/£<)¤;(©<(«:(®6&3(¶97º9=½7>¼7<¿<BÆJLÄTS¾XS?74*,%61ÃHKÜOWâAQÛ3@Þ:9Í.*Ó84È74ÆE@È]U©WKWFwW@veI~pSpQfJdK©o[ÕuiîSWüDP÷;Jø9Iþ=Nÿ@Qÿ:Lù4Hÿ?Sþ9Mú4Ký3Ký1Jÿ/Iÿ0Nÿ6Sÿ3Tý4Vý6Wú7Wø9Zø=\÷>^õ@aøCfö@fõ?eõ?gø?hüCmÿErÿIsÿOuÿQuþUvòSqçTnåaxÖfv·Wb}15j0/X1*P8,G>/>A.;D/?G/PK._T8g`CokN||`rv}qzq|s|szozm}ouz£©£®¦±¡¬´§±¹®°·°«µ¡«¢ sqh|c]tXSlNPdHRZCWYDYZH671671782893:;5<=7?>9@?:BA<BA<DA<DA<DA<EB=FA=FA=FC<FC<GB<HC=HD;HD;JC;JC9LC:KB9KA8J@6J=4I=1H<0G;/E;/E;/E;/E;1E;1E;1D;2D;2@9/@9/@91?80<71;60;60:5/;7.;7.;7.<8-?8.A;/C;0D</G=1G>/K?1M@0M@0NA0O?/O?0O?2N=3N=3J<1I;0G;/D:0D:0D<1D<1B;1@<1A=2A?3B?6K=4\5.w32LSÛ]iæM_å@Q×6E·&+¨1)7(:&<)¬@3ÃD=Ô>?Í;;±?5¨B4ª@2?2²@5¸C9¼H;»J<¬>/ª?/¨=+¦;)ª9)°:,·;/¼<1ÊFAÎDAÐ>?Ð79Ö7<ÞBEâLNÝROÄC>ÆKCÍTLÔSMÙKJÛ?Bà5>á27Û4.Ú7.Ð1+Ï:4¿84³@9µ[PUC{N9bIkP`F[FfTËrdçmhêEKò:Dê9Cç<DçBHçFKèGLêFMôJSòBMò9Iö5Hù2Gý/Fÿ2Lÿ8Rÿ9Vÿ9Xÿ:Xý:Zþ;]ÿ=_ÿ@bÿAeÿCiþDkþDmýBmüCoüCoüBqýBoÿGpÿ@hÿGmÿMpòIhéOkå[rÙcs½Yc?D`&$Q+"V@3VO=IL7@D-RJ3eYCujV{gy¤¨²¶§¸¼®¿Á¶ÀÁ¹ÂýÅÆÁÃÃþ¾¾°µ±¢©¢yvi{e\sYTmORfJQ[BUZCW\F560560671782893:;5=<7>=8@?:@?:C@;DA<EB=EB=GB>GB>GD=GD=HC=ID>IE<IE<KD:LE;LC:KC8LB8KA5L@4K?3J>2I=1G=1G=1F<0F<0E;1E;1D;2C:1A:0A:0@91@91=82<71;60;60;7.;7.;7,<8-?9-A;/D</E=0H?0J>0L?/M@0NA0NA0O?/O?/O?2N=3M<2L;1I;0G;/F90C9/C;0B<0B;1@<1@>2A?3B?6N;4m84FEÄY_ÛWbßCQÞ8FÔ3;½++1'¡8%:!9 ¤;&¶>.Ã:2¾71§7,¢:-¥9-§7,¯:1¸B8ºE;·E:®>2?0§<,¤6'ª6)¶>0ÃD;ÊG=¾8-Î@6áD?ìBBô=Aó9>ë27Þ.0Û75âGBèSLåNGÜ=9Ù10ã/2ê67Ù1(Þ</Í,"Ð71¾3,°7/Ég\¸l\WCZCV?R=©\LÎlaágbäTTðEKñ=Fä;@Ù=>ÒA>ÒGBÝOMëWWíNRïDMð:Gö5F÷2Fø.Dû1Gþ7Nþ8Sý8Tý8Vþ9Wÿ;\ÿ>aÿAeÿCkþ;eý<hý>jý?mú>nø>oô=mö:jÿHrÿ;aÿ?dÿKnÿKn÷NmïUoãZnèrÂajILt:8\6-P9+PC2UM:^QAreU|n¦§¡¦§¤¦¯¬¦¬¨¢§£¦¨£µ´°ÂÁ¼ÌÉÀÑÎÅÕÐÌÕÐÍÔÎÎÕÏÑÑËÏËÆÊ¿½À°²¯~m~k`t[WnRVjNS`FV`EX`H560560560560671893:94;:5=<7>=8A>9C@;DA<FC>HC?HC?GD=HE>ID>ID>JF=JF=MF<MF<ME:LD9MC9MC7NB6MA3N@3MA3JA2JA2I@1H?0G=1F<0D<1D<1C:1C:1A:2@91?82?82<71<71<8/<8-<8-<8-@:.A;/D</E=0H?0K?1M@0NA0P@0P@0O@-O?/O=1O=1M=0L</I;0F:.E8/C9/B:/A;/A:0?;0?=1@>2@@4P91r1/¨JKÁSV»>D½06Â03Á//º1)©1!£9#=!;< ¡=#¥;%¤6%6) 8-¢6,¥4,81·@:¸C<²@6±B7A4¨</¦8+¯:0¼C8ÃD=Å@7Ã>-Ï>-Ù5+á*&í"%ú%+ÿ*1ÿ.4í)*ç.+á3,ß4,à3,ã2,é0-ç2+Ú2%Ö6&Ð2&Ï7,Å6.½>7È`UÒq¦eSVBM:£WIÈf[ßd_çRTèCIõFMí@Dß??Ô@<É@8Æ@7ÑFAãMLïJNô@Kù9Hý7Hü5Hø3E÷6Gú;Mú8Pü7Rû6Rý6Uÿ6Xÿ9]ÿ;aÿ<gÿ>kÿ?mÿ@qÿBtÿBuþBuüBtùBpÿFmúAaþEeÿKjþKkÿVtÿ_zõ]tòj~æp~Óow®^aCAg6/hB7sUJye\}v££¡²®«¶¶¶²¶¹ª¯³°·½¶½Å½ÁÊÀÃÊÃÂÊÉÆÍÕÎÖÝ×ÛâÚØçÝÛéÝÝæÚÜåØßä×ààÔÞÙÏØÊÅ˺ºº¢§£tqexb\sW[oS[jM\iK]gL561561561560561671872983<;6=<7@=8B?:DA<FC<GD=HE>HE>HE>HE<JF=JF;KG;KG;NH:MG;MG;ME:MD;MD;MD=NC?NC=MC7MD5KB3JA2H>2G=1E=2D;2C:1C:3A:2A:4@93?74<73<71>7/>7/<8/=90>:1A:2C<2D=3H@5I?3L@2MA1NA0P@0O@-O@-L?/L>1M=0L;1J91I81E80C90@9/>:/;;/<<0=>0>?1A?0S8-<7Ä\[ÊZY®86«.*²1+®.%2#¬9&¬B*ªF,¦D'£A&£A&¢<#9# 9*£;0¦:0¦7.<4¶C<·E;°@5«=0¨</©;.¬<0»E9ÆLAÅE<¼8,¿6$Í:(Ý;.æ3,ñ+*ù(+ý&+û%'ø**õ.+ï2,ë4,è3*å3)ä2(à3%à:*Ñ2Ü?0Î6)È8-Â?5³A6Ñl`¿gY¥RB¨OAËcZçhbæRRêAFóBJë>Dá;=Ö<<Í@9Á>4¶8,¹6.Ä94âHHé@Eð;Dö:Hú:Iø8G÷;Iû?NþAUÿ?Vþ<Tþ9Tÿ8Uÿ9Zÿ:^ÿ;cÿ>iÿ>lÿ>oÿ>pý>qú@rø@t÷Aq÷CjÿMmÿSs÷Jhë@`ýTsÿg
ÿe÷]wï_xçh{Üp}Æqx§gg^X{ZQ~wª¾°Ä¼ºÆÂÃÈÇÌÇÇÏÃÃÏËÊØÌÊØÑÊÚ×ÎßßÔäæÛéêàëíãëïåæòèæôèèðäæîáèíàéêÝçäØâÑÊÑÁ¿Â««©zxl{hbu_`rXbpVboScmT21/320431651875984984984;:5<;6==5??7AA9CC9EE;EE;HH@HH>HH<JH;KJ8LK7ML8NK8MJ9JF:GD;JFCNIMNIPGDOD?ENE>LC4J@4KA5MC9LB8F=4B90E<5C:5@93?74@85?75<74<42C:5B94A96>95?:7>:7?;8@<9B?:D@7G@6J@4L@0O@-O@+L?,G@.F?/I;0K81M53K65J88F;9B?:6904</9D4:A/69$?=(bC1¼j^¹JA¦7,¥5)§7+¥5'¥7&¨=+£8$¥<&ª@*@)¬=)¬9&®6%«6%¤6'¡7)¢8*¦<.ª@2¬B4¬B2¬A1©>,«=,<,³=/½C4ÄF8À>1º2&Ç9+Ì8*Ð8+Ö8-Û7-â5.é3/î1-ñ.,ô.-ó0,ñ1,ê5*ã7)Ý:)Û:(Ü9&Ô3Ð3 Ï8'Æ7'¾6(ÂB5ÏSIÈNCÏSKá\Wî]ZðPRí>Cò9?÷?GêAFßCDÕAAÈ?9»<3±;/°</²<0ÊL@ÔKCÜGCá>?ë<A÷?Gý?Iù;GþDQüCQþDRÿDUý@Vü<Uÿ<ZÿBdÿFkÿAjú;gõ:gö<mùCsýIyÿKzÿMyÿMtøPsðOpçMiêMjüYxÿgÿ_õGlöWwè_yÃ^n½{a^xp§»§ÑÄ»ÝÖÐÝÜÚÜÛàÞÜçâÛëæ×ìëØîñÙñöÝó÷âó÷çôõëôôîòùôñùôðùñïöíîóèìîãééÞäæÝâÖÐÔÍÉÊ»º¸£¥ yxr}op{k}sxlv}k0./1/0320542653762873872:94;:5==5??7AA7CC9DD8EE;HH>HH>HH<JH9KJ6LK6MM5NM8KJ8KI=KJEPPRWU`YXjVTjRO`OIKMD?H?:F=8G>9H?:F=8B;5D:8A96?74?74@85@85=85;62=4/=4/=52<74=96>:9=<:>=9B?:D?9G@6J@4M@0O@-P?+L@*B?,B?.F<0H:1J65I56F35@65@<9:=6;>5@@4E<-J9)^B4L>®QB«;- 2#¡6&£:'7$9%£>*¡;%§<(®?+³@-¶=,·9*¸6(µ7)ª9)¥:*¤9)¥;+¨>.«A1«B/«@.®?,«:(±<+¿E6ÆH9Á?1¼8+À6)Ë7+Ï7,Ð9.Ñ;-Ô</Ø:.à8/ç4-î1-ô.+ô.+ñ0+ê4)á7(×:'Õ:$Þ<'Ù6#Õ8%Ô=*Ì;*Á5&Ä:/ÏF<ÑF?ÚIDéOMóPQôGIð;@õ:AøCHåBEÚDCÒBAÅ>8·;1®:-ª<-«=.¶E5ÆL?ÔNEÜGCã?>ï?Bú?Fþ@JøCJ÷CLúDPÿFTýBSù>Sü>XÿBaÿFhÿCiü?iù@jùBpüFvþJzÿK{ÿJzÿHtõKpñQsõ\zù_{ûXwüNqýEkúDlïEiÚKgÈ_p±nukLI~t°Ì²¥äÓÉìãÜëçæêéîêçòíâóöãùûáúÿâýÿçÿÿìÿÿòþÿöþÿùûþú÷ýúõü÷ôúõòøïðôëîñèíïæëæÝàÜÖØÊÆų²®¡
~/.,0/-10.21/43/540762761:94::2<<4>>6@@6BB8CC9DD:IF=IG;JH;LI8MJ7NL7NL7OL9KI:NKBTRS_^fihxmm
lkkh`YiYQ\OGRH@KH>GG=EE<A@:<C:;?:7<74<73=82>93>:1=9083-94.;60<92=:3>;4?<5@<3E>4G?4I?3L@0O?0P?/P?-L?,<;&:=(?<+A;-B71A62>42;30=84B;5H94N2.Y,)l/.;= FE£;0¢2$1 ¤9'¥<)7$8"¢<&¤;&ª=)±A-¶A/¹>.»<-¾:-¾</²<.¬<.©9+©9+«<+>->-<,²?-°8(¹>.ËL=ËG:¼6*º2&É9.Ð6,Ô6+Ô8,Ö:.Ø:/Ü8.ã6/è3,ð0-ô.+ô.+ð1)ç2'Ý6&Ô8"Ò7!Ý8$Ü5#Ú9'Ú>/Ó=.È6)Å9,ËA7É<5Í>8ÙEAåKIêJJéCCì?AëCCÞCAÕD?ÍB=Â=4¶:.®8*«:*¬;+¬8)ÀD8ÔNEÝIEà@@è>A÷BIÿHPôAGô@IùCOýGTþEUú@Uû?XþA_ÿDfÿCiÿCkÿFpÿIwÿK{ÿL|ÿJzÿFxÿHwÿKtúNtÿZ|ÿaýUvñCdûIkÿTvÜ?\ÍI`Ø{
¸||aC;|n®Õ³§óÛÑûìåúòðù÷ú÷ôýôìûúëÿÿêÿÿìÿÿîÿÿóÿÿ÷ÿÿûÿÿýüÿþûÿýùÿúøÿøöÿõöýóôûðôùðóðçêåßáÓÏξ½¹®¨¢¥£££«¦£/.,/.,0/-10,21-32.54/650880991;;3==5??5AA7BB8CC9HE<JF;KH9MJ9PK8OM8QL8OL;LJ>QPL^]bmlzzz¡¨¦{urke_{YSmTLdMEZG@PB<HD?F@;?<87;63;60<8/=9.;8/:70991;;3>;2?=1@<1?;/A;-F?/H?.K?/M@/O?0O?/P>0L?/@=*?>,@=.?;/?;2>93=:5:94<94D95M51V-+j)-288C«>C¦7.¥7(¥:(ª?-¨?, 9&¡8#¤;&¥:&«<)³>,¹@/½>/Á=0Å=1Ä>2½?3¶=2²9.®8*¯9+°:,²:,³9*¶;,¹;-ÄB4ËE9È>3¾1'À2(Í9/Ö5+Ø4*Ú6-Û7-Þ7.á6,æ3,ì1*ó0,ô.+ô/)ï0(ä2&Û4$Ò6 Ð5×2Ú0Ú4$Ü<.Ö=/Ð9.Í=2ÒD:Ä5-Å60Ê;5ØD@âMIåKIÞC?Ö=8Ó@9ÎA8Ç>4¾</µ:+°8*¯9+±;-¬4&½?3ÑH@ÙHCÝB@å@DóFLýNUð?Eð?EöBMþHUþHWüBWú@XüA^ÿAcÿCfÿFmÿIrÿMyÿO|ÿL{ÿIyÿDvÿN~ÿR}þKrøMoÿVuÿUu÷MjðFcïKfÒ>Vádtþ§Ód92lJ>¥ynÐ¥õÔËÿéãÿôòÿýÿÿüÿùóÿüïÿÿïÿÿðÿÿòÿÿôÿÿ÷ÿÿûýÿüûÿýúÿüøÿúøÿù÷ÿö÷ÿõöÿôøþó÷öëïìãäÚÕÒÉÆÁº¹´³´¬±´©°¶ª¶¾³°¸¬´©10,10,0/+0/+10,21,43.54/77/880991;;3==3??5AA7DA8IE:LF:NH:PJ:RK9RM:SL:QK=OJDVTUfdqwx¨¹ÃÆÀ¶{w©pmid_[~UPnNJaKGXEBM?=B;7895296/85,85,671783891;;1></?<+B=*C<)G?,J?+K@,LA/M@0M?2L@4K>5L?6K>5F<3B92=82:946;47<59<5>:1H4-Y2-w78?D¦>E§9<ª;0ª<+«@.¬A/©@-¥<)¦;'«>*§8$:'µ<+¼=.Á<-Å;.Ê<0Ê=3Å?6¾>3º:/·7,·7,¸8+º8+º8+»7+ÇA5ÍC8Å8.Á1&Æ3)Ë7-Ï5+Û4+ß3)á4-â6,ã5,ç5+ì1*ð/*õ/,ö/*ò/)ì0'â2#Ù4!Ð5Ï4Ö1Ù/Ø2"Ø6)×9-Ô:0Ö?6ØE=ÖF>Í@7É<5Ë@9ÖKDÙNGÒE>Å;1Å=1Â<0À</º;,·9*´:+¶<-¹?0µ9-¿<2É@:ÒC?ÛCBãDHíJOöOVì?Eí>CòBLûIUÿJYýFXúCYûC]û@_ûBdÿElÿJsÿNzÿO|ÿLyþIvÿJwÿTÿT}ýJqùImÿStÿVtøNiëD^äF]êXkÿ¢ÿµ¼óHFk.)¦kcÍóÈÁÿãÞÿñðÿüýÿýÿü÷þþöÿÿöÿÿ÷ÿÿøÿÿúÿÿüÿÿýýÿýúÿüøÿûøÿùøÿø÷ÿöøÿõ÷ÿôøÿôøýñóóéêäÜÚÖÑÍÍÊÃÉÉ¿ÊÊÀÊÍÂÉÐȾȿ·Á¸65143.32.10+10+21,32-43.66.77/880::2<<2>>4@@6B@4JD8ME8OH8RK;TK:TM;SL<RKAQLIZW^li|~¸ÌØÞÚÔÉ
¿~µxv§nkfe]ZwVTiMKYDAJ><?;:8;74762555457664872<:.?<+C>*F@*G?*H@+IA,IB0IA4HB6HA9G@:K=<I;;C9:=77875384/83/917<574+C1']80~C=GC>?51§;/ª<+ª?-ª?-©>,©>*¬?+°?-«8%²9(¹:+¿9-Ã9,È:.Í:0Ï<4Ë>5Æ;4Â91Á8.Á8.Â9/Â8.Ã6,Å7-ÑC9Ð@7Ã0&Ã,#Ð7/Ö<4Ó2*à3,ä2(ç2+è3*ê3+í2+ð/*ó-*ö/*õ.)ñ0)ì1(á4$Ú5"Ñ6 Ð5Ø7#Ù3#Ö3$Õ3&Õ5)Ô8,Ô<1Ö?6ìYQáRJÓHAÌC;ÊE<ÌI?ÈE;À>1¼:*¼;(¼:*¹:)·:(¸:+¼>0¿A3ÁA6Á<3Å<6ÏA=×EEÝGHäIMëLPèBFê@CðCIùKTþNYüJZüF\üF_øA_ùBaýEiÿJpÿNwÿOzÿNxÿLvÿQ{ÿRyþOvýOtÿVyÿ]{ÿSoîD^úTlîQd÷dtÿÿôÇ`d§MMµjgÎXÿÞÙÿïîÿúùÿüþýûÿýúÿþûÿÿûÿÿûÿÿüÿÿûýÿûûÿûøÿûøÿüùÿûúÿûúÿøúÿöøÿó÷ýñóùíïòææçÝÛßØÒÛ×ÎÝÛÏàÞÒßáÖÜãÛÏØÓÅÎÉ<94;8185052+41*41*52+63,74-85.96/;81=:1?<3A>5C?4JB7MC7PG8SJ;WK;UL=UK?SJCSJK]Wcnl¦Å ڦꢩñ¡¥ï ëåÝÖʽ±zy¡rqfc~XVkPN\IGRFCLCBJ??K==G;:@;9:<94?;/C=-E@,F@*FA+EB/EC4CC7BC;AC>@ACB<FD>LCANEEOCHNAIL>HI>GDCHAA=2L:.gF7OAI<?28)¥>/©>,«>*¬?+@,¯@-°?-±<*±8'¶8)½9*Ã9,È8-Ì8.Ò91Ô;5Ï:4Í:3Ë81Ë81Ì92Í:2Ì70Ë6/Ó<5Õ>5Ò91Ì2(Î4*Ø;2Ú<3×3*ä1*é1'ì1*î2)ð1)ò/)ô-(ö,(÷-)ô/)ð1)é3(â5'Ù6%Ò7!Ï7 Ô9%Õ8%Ó6%Ñ4%Ò4(Ó7+Ò8.Ð7/ãNGèXPçZSÚQIÌG>ÄD9¿@7¹>/¹<*¹<&¹<(¹:'¸9(º;*À>0ÃA4ÉD;Æ@7É@:ÑFCÕIHÖHGØGJßIKæFHèBDíDIõLSüQZûO]ûL]ûK`öD^÷DaùFfýIlÿNuÿOxÿOxÿPw÷VxóUvôTvüYxÿ]{ÿZwûQkòI`ýWköUgêM^ö^mâKZæTaåTa×XaÁefÈ~嫧ÿÔÑÿëèÿóòÿøùÿþÿûüÿûüÿûüÿüüþüúýýùúý÷÷ü÷ôÿú÷ÿûøÿüûÿûúÿøøÿóóýîñúëîðáäéÝÝäÙÕâÙÒæßÕëçÛñíáññåìóìÛæâÎÙÕ@=6=:3:7074-52+52+52+63,74-74-96/;81=:1?<3@=4B>3JB7MC7RF8VJ:WK;XL<WK?TICSJM^Xfpm«Ë¤ã£õ§°ýª±ÿ¦¬ú¡§ó ¤î£ê¡áÖÌÄ´yyji`]|XUpRPhOMeNJcKG^FBS@=H?:>?:6@<1A>/C@/CB0BC3BD7?D=>D@<ED;BJ>CVCIaLRhU\o\br`dobbjd`afXWaJDlG>SEXFJ7@+>+¨A.®@/®A-¯@-°A.´A/²=+°7&µ7(¼8+Â8+È8-Í6-Ñ7/Õ81Ø;4Ò72Ð72Ð72Ñ82Ô94Ô94Ó83Ó6/ÞA:Õ8/Ñ3*Ö8/Þ=5Þ=5Ú91Ü5,ç2)ë0'ï0(ñ0)ô/)÷-)÷,(÷,(÷-)ô/)î2)é4)á5'Ú7&Ô7$Ï8#Î7"Ï8%Î7$Ï6&Ð7)Ò9+Ñ7+Î4*Ë4+ãNGód\ë`YÕOFÄA7º;2µ9-¸>)¸>'¹<&¹;%º9&½9*À</Ä>2ÊD9ÊA9ÎE?ÕKHÓLIÎGDÍEEÖHGãIIæCDèEHòMSøSZùR\÷O^úOaôH^õG`øGdûIiÿNrÿQxÿRyÿTzðUuïZwù^}ý^|ùUpõMgùOiÿYnÿ[mÿctðM^÷TeôO`üUgõL_äR_À^_»vq×úÉÅÿåãÿíëÿôôÿÿýüÿÿûÿÿûÿÿûÿþýýýýüúþùöýøõÿøõÿùöÿúùÿúùÿööüððøéìôææëÝÝèÚÙäÙÓèÞÕðèÝùóåÿúìþþòôúöáëêÓÝÜB>5A=4@<3>:1<8/:6-84+73*62)62)73*84+;60>93A<6E>6I@7MC7RF8UI9WJ:XK;ZLA[NHTIMXR`gd|~§Ê ãªö¥°ÿª³ÿ«²ÿ¬´ÿ¬²üª±ùª¯ó¨¬ì©«è¡ÚÒÁ±tr¡he]ZXR~XQzYQvVOnMH_C?M?:@?;:B?8>>4@B5BE:?D=<B>:CB>FH?LUDVnQfaristvxo^l[cWYWU¦VM¦M?@.9$ :$§<(¬=*®?,±@.³@-´?-¶=,¹;,º6'¾6(Ä6*Ë7-Ñ7-Ö8/Ú91Ú83×84Ø95Ù:6Ø93Ø61Ø61Ú83Ý:3æC<à=6Ú70ã@7þ[Rÿlcÿ]Tç?6å3)í2)ñ2*ô/)ô*&õ(%ø(&ø+(÷-+ó0,í2+ã1'Ú0#Ô1"Ô4$Ó:(Ì;&Ê<(Í<)Ï<*Ò:,Ò9+Ò8,Ñ7-Ú@8Ï81ÜGAôc^åXQËB<Å@;·4*·:&¶<$¹<&º<&½:(¿:+Ä<0Æ>2Ç>4ÌC;ÙPJßXRÔOJÃ?:À?:ÏHDÞHGâGEæJKïPTñRWïNVíKXñL\ùRføOf÷Ke÷JfüMlÿQsÿRvýRvôWvîXuõXuû[wÿ\xÿZsÿWnÿVkÿbuýVgÿ\mÿ[lñFXôDXÿQeîVeÆfgªieÊ網øÒÏÿëçýïîüø÷ùýüùÿÿùÿÿúÿþüþýÿþüÿûøþöôþùõÿû÷ÿùöÿöôÿööÿõõöèèæØØãÕÔÞÐÍáÖÐñçÞüôçþøèÿüéÿÿóúÿùèñðØáàC?6B>3A=4?;2=90;7.:6-95,73*73*73*84+:5/=82@;5D=5H?6LB6QE7TH8VI8WJ9YK>ZMEUJNWQ_eby{¤Éâ¦õ£®þ«´ÿ¬µÿ®¶ÿ¯·ÿ°·ÿ¯¶ü¯´ø¯²õ©ªë¢£ãØÉ»uq®ie c^`W`V]TVPtMIbFCTBAIAAC<<:AB=FEACD?A?@DBEOMRWVdchqu}¢}} {¥p¤`u¬Yi¶VaºQU¸HF°@4¬;)¬<&='¨8$¨7%«8&®9(°8'²9(µ7(¸6(»3%Â4(Ê7-Ó:2Ù<3Þ=5ß<5ß<5á>9ß<7ß<7á>9åB=èC=çB<æA;å@:æB9ä@7Ü8/Õ1(Ø6+ëI>ÿ[Oñ@6î6,ê+#î)#ø-)ÿ/-þ,+ö((ú0.õ4/ï61ç6.Þ3)Ö2&Ô2%Ï6&Ë:'È;'Ê<(Í:(Ï9*Ð7)Ñ5)Ð4(Ó9/Ï5-Ô=6åPJåTQÛLHÍB?·1(¼;(»=&½<'¾;'¾9(À8(Â:,Ä:/È>4ËB8ÕOFÜWPÒRIÃD=¿C;ÌHCÛLHßJFåMLëSRíTWëPVéNVìOZ÷VføUhùSiúRküRmÿSqÿStÿRuòMmøUtÿ\zÿ_{ÿ\vÿUoûRiûReüUf÷RbÿZhÿZhóN^øScþYißS^¶`_^W¶}Ù©¥îÈÅýáÞùééýøõúüùùÿÿøÿÿ÷ÿýúþýÿÿýÿûûÿ÷õýøôþùõþùõþöóÿ÷öÿõõöêêêÜÛäÖÓÝÐÊßÕÌïåÛüõåÿùçÿýéÿÿïúÿøèñîÛáßEA6EA5C?4A=2?;0=9.<8-;7,84+84+73*84+:5/=82?:4C<4G>5JB7ND8RF6TG6WG7YI<YJCWKKXP]b^ysu
Âܤð «úª³þµþ¯·ÿ±¹ÿ³ºÿ´»ÿµ¹ÿµ¹ÿ¯²ù¬¬ô££ëàÓÇxu¼sm³k`¢i]cZ]W
VRwNKhEDV@@L85<A<@KABL@BQ>BZEJpW]csr¥z§®«²{£¸vÀpÂcÀTnÂG\ÐK\ÑHPÄ<<º5.¸9*µ<'°<%°;'°;)²:)´;*·<,»<-À<-Ä<.Ä6*Ë8.Ó<1Ù?5ßA8á>7à<3ß:4Ü71Ù4.Ø3-Þ93æA;ìE?éB<ä=5ã<4Û4,Ø4+Û7-Ô2'Ì, Ö6*éG:õK>ò@6ï4-ð-)ö,*ú,,ü,,ø*,ð*)ì/+è2.ã5.Ü4+Ø1(Õ1'Ñ3'Í7(Ë:)Í:(Ð:)Ò;*Ó:*Ô8+Ô8,Ñ4+Ö<4Õ:5Õ<7åONíYWÙEEÂ3/À;,¿<(À;*¿:)Á9)À8(À8*À8,Æ=3ÇA6ÏJAØUKÒRGÆG>ÀD:ÇG>ÖKDØICÝLIäSPåSTâPSâMSåNWòXdöZhý[pþZrüVnúRlûQlÿQpýGmÿPvÿZ}ÿ[{ÿVrýTkþWkÿ\mûYhøZhûamö`kí]gïfnìfmÉ\_ ]W{OFmfÁݺ¶ðÔÑôàßÿõôùù÷ùÿýùÿÿ÷ÿýúþýÿÿÿÿýÿÿøùüùôüùòüùôýøôÿùöÿøöùîìïäâåÚÖÛÐÊÜÒÈîäØýöäÿûèÿýçÿÿíúýôêðìÞãßIE9HD8FB6D@4B>3@<1?;0>:/:6-95,95,95,:5/<71>93@;5E>6I@7LD7OF5RE4UE5WG8WI>XMKXNW^ZqppºÔ¡é©õ¨°ù©±ù³ý°·ÿ±·ÿ²¹ÿ´¸ÿ´¸ÿ¯±ü«ø¥§òêâ×Í}yÅum¶pgªf`_ZYXQQuGGcA>Q=5DH8BT=C`@EnCJOU]d«fx¿kÉnËoÉiÈ`ÉWxÆIgÄ;UÆ2HÙAPàEMÑ;<Æ71Ä?0½@,±:$6"5$®5$³5&¶7(¼8+Ã;-È</Ó@6×@7Ú@6Ü?6Þ=5Þ93Ý6.Û4,Ó.(Ò-'Ó.(Ø3-á:4ã<4á81Ü5-Ü5-Ð,"Í)Ù7,âB6Ü?0Ð4%Ë.éF7óI<ýH?ü<7ô-*ñ#%õ')û/2ñ-.ë/.ä2.Þ3,Ú1*×0*Ö/)Ó0'Ó7*Ò9+Ö:+Ø<-Ú>/Û?0Ü@3Ü@3Ò6*æLBåJEÎ50ßGFóZ\ßIKÕA?È</Ä;+Ã:*Ã:*Â:*Â:*Á9+¾9*Â<0Â>2ÈF9ÏOBÎPDÆH<¿C7ÁC7ÎH?ÑF?ÕJEÛPKÝROÙMLÚKMÜKPëX`ó[güaqÿauúXmõOgõMgÿNkÿOuÿRyÿUwÿTqüTmý[pÿcuÿjxÿguúboõamídlãflÙhjÎghµfa^TeG<^U©Í«©åÇÅïÚÙÿóóùøöùýüøÿÿ÷ÿÿûÿÿÿþÿÿüÿÿùúþûöûûóûúõþûöÿýùÿûøþôòøíéêßÙÞÔËÝÓÉíæÖÿøåÿþèÿÿæÿÿëøúïêïèãæßNH:MG9LF8JD6HB6F@4D=3C<2?80>7/=6.=6.=60>71@93?:4C>8EA8KC8NE6QD3RE2VF6VH;ZMGVMR[Whlk~±Îã¦î¦®÷©¯ù°ý¯³ý°³ÿ°´þ°³ÿ¯³ý«®û¨«ø¤§ô ¢ïéâÙ
ÑÉ{u»mk¬de_aY[RQsNHbWFY_CQmBLEMMT¬U]¼[bÊZhÙRpâRußTuÙPlÒJbÍBWÇ8JÅ.?Ô8EãCKæGKØ>>Í>6ÌF:ÃH6¶?+·>-¸=-º<-½>/Ã?0ÊB4ÐD7ÕE:ÙE9ÚB7Û>5Ù;2Ù6-Ù5,Ú3+×3*Ô1*×4-Ú7.Ý90ß80Þ7/Ý6.Ü5,Ö/&Ù5+×7+Ï2#Í1"Ò9)Õ>-Ô;)Ø<-æD7øJAýD?ù64õ*-ö*-÷/2÷67í55â30Ú1,×0*×/,Ù0-Ù0+ã81ä91â:1â;2à<0ß=0Ü?0Ú>1Ñ7+ïWLøaZÓ;6Ñ;:æPQÜFHæPQÏ<4Ê:/Æ8,Å9,Ä:-Ä<.Ã;-À;,¾:-¾<.ÃA3ÇH9ÇI;ÂD6¾@2¼>0ÉF<ÊE<ÎIBÕPI×RMÕNKÓKK×LOéZ`ð^hüfrÿhxü]qòPeóMeýNkÿVzÿTxÿRrøTmö]qûhxûjw÷erüetó_mì`kêkrßruÃjfªd\la}fVXH9kXJ|r½ ÞÂÁîÖÖþîïûõõûûûûÿÿùÿÿýþÿÿþÿÿûÿÿúýÿþùûþõûüöÿþùÿÿúÿþúÿûõÿ÷òñèáäÜÑáÙÌðé×ÿúäÿÿæÿþåÿÿê÷ùëíðçèéáQK=PJ<OI;MG9KE9IC7G@6G@6B;3A:2@91?80?82?82A:4@;5B?8EB9KE9MF6PE3RE2UF3UH7YLCUKLZScii
|«Èޤ리ø©¬û¬ý°ÿ®±ÿ®±þ°ý°ý©¬ù§ª÷¤¨ò¢¦ð£íèãÞÚÍ|Àsx²ou©mpigj_}y_xWjP_£O\»S\ÍT]ÖPWÛHRå@Qè?RäCRÜDPÖCKÏ@DÊ9<É46äJLçIJáAAÕ74Î95ÎA8ÈD8¾>1ÃE6ÃE6ÅF7ÉE8ÎF8ÑG:×G<ÚG=Ö>3Õ;1Ö8/Õ4,Ö3*Ø4+Û4,Ú6-Û81Ý<4à=4ß<3Ý90Ü5-Ü5,Û7-Ò.$Ý;0Ú=.Í1"Æ-Î7&Ò=)Í:&Ì9'Ô8)â:/ó=9ÿ@@ÿ<>þ37ó,/ê,.á+*Ø*)Ô+(×/,Þ44ä88é99ï75ð74î73è71ã7-Ü6*×5(Ñ5&Í5(çPEÿmcÛHAÈ42×CCÓ>BêVVÙA<Ò>4Ë8.Æ6+Æ:-Æ</Ã>/Á=.»9+»<-¾?0ÀA2¿A2½@.¼=.»<-ÃC6ÄD9ÈH?ÐPGÓRLÐOIÒNLÕONé^cîagûitÿnzÿduõVjõQiÿUoÿWvÿVtúXpñ^pônyöwíksÞXañ`mñ`mìboïs}ìÌ|ªthyjskXON:_VGqg¯ÜÀ¿ïÕØüéëþôõýûüýþÿúþÿþýÿÿýÿÿûÿÿùþÿÿûùÿõúýöÿÿúÿÿúÿÿøÿý÷ÿþöùðçíåÚéáÔôïÜÿûåÿþåÿÿãÿÿèùúêòôçîðåSM=RL<QK=OI;MG9KE7JD8IC7E>4D=3B;3A:2@93A:4A96@;7A@;CC;IE9MG7OG2RF0UF1UH5WK?RHFXR^jg}§Äڢ礧ö¦§ú«©ü«¬þ¬ÿ®þ¬®û¬®û¨¬ö¦ªô¤¨ñ£§ð¡¨î §í¤è¢æâÛÒÊ·¨ymcz©Xi»Q_ÏMYàIRèAIê=Aé=;ã>8ÝC9ÖH:ÎI8ÅF3ÂC0Å@1äTIàG?Ú;7Ø64Ø88Ø:;Ñ98È74À:/¾<.¿;.À:.Â8+Ã7*Æ4'Æ2&Î4*Ð3*Ñ3(Ô3)Ö3*Ù5,Ý6.Ü8/Þ=3Û=2Ü;1Û8/Û7-Ú6,Ø4*×3)Õ3&Ó3%Ð4%Ï6&Ò=)Ñ>*Ê9$À2È:&Ê4%Õ1'ç51ú<<ÿ=@ÿ7=÷37ê-1á-.Ù--×/.Ü43ã9:é;=ð9=ö26ø03ô01í1/ä1*Þ2(Õ1%Ï3$É1$Ñ=1új_äTLÈ95Ð@?Ë:=äRSäJHÜC=Ñ:3É6.Æ8.Å;0Â<0¿=/º;*¼?-½@.¼?-º;*º;(½;+¾<,¼>0¼>2ÀD8ÈLBÌPHÊNFÌLIÐNLèaeìaføhrÿo{ÿhx÷Zk÷UjþZrÿYsû]tîaræjtë}ñèwyÚ_dñgtþm|óeuëlwöì¢Ä¢|hjUHQ<WUFth\¤Û¿¾òÕÙùãæÿóöÿúüþþÿüýÿþûÿÿüÿÿúÿÿøýÿÿûùÿõ÷ýóýÿ÷ÿÿøÿýöÿý÷ÿÿöÿùïõïáòìÜúõáÿýçÿýäÿþâÿÿçýþìùúì÷÷ëVO?TN>SK>PJ<OG:LF8LD7JD8H@5F@4E<3B;1B92A:2C:3A<6C@9DD:JF:MG7OG2QF0TH2UH5UI=QGEWQ]jh~¨ÅØ¢ç ò£ ÷¦£ú§§ý¨ªÿ©«þ©¬ý§û¥«õ£ªò£§î¢§ë¤©í¦©î¥¨í£§î è¡åß×; ¯ª ¥e´]pÂQcÐIWÜBNå>Fë<Aì<<ê?8ãA4ÜE4ÔI4ÊI3ÂF.¿B,Â?-âSEÞD<Ý97æ>>êDFå@DÙ8=Î65ÍB;ÈD8ÉC8ÇA5Æ>2Ã9,Â6)Â2'Æ2(Ë3(Î4*Ó5,Ø5.Ù4.Û4.Û4,äB7Ý=1Ù7,Ú6,ß9-ß9-Û5)Õ1%Ø8(Í2 Ê1!Ï9(Î8'Ç4"Ê7%ÔC0È7&Î8*×6,Þ5.æ3/î53ö:9û?>ÿLKúHFòBBì>=ê<=ç7:å26æ,1ô+1ø)/ô,.ï/.è1+à4*Ù5)Ó7(Æ0!À.ôdYë]SÏ@:ÔDCË;;ßMMêRQàHEÓ;6É6/Æ8.Æ9/Ã;-¾:+¾<,Á@-ÀA.»<)·8%¸9&½<)¾?.µ7)³7+¸>1ÁG:ÅK@ÅIAÈIBËJEåa_æ^`ñdjþnwþkuó]iðXeø]mú^sõbtèdoãlrì~ùö
éqsøryÿyõaqàXföÿ´´Ð®¢ ]jPDR9QT?jbUÚÀ¿òØÙöàãÿô÷ÿúýÿþÿýüÿþüÿÿýÿÿûÿþùýûÿúôÿòòþòùÿôüÿöûýòÿýôÿÿôÿÿóûõç÷ñáþùåÿýçþüãþýáÿÿêÿÿñýýóüüòXO@WP@WN?UN>TK<RK;RI:PH;MC7KC6KA5H@3H>2G?2H>2F@4GC:GE9JG8NI6RJ5UJ4UJ4VK9XNDULMZTbkh{~§Ã×磤ö¥¢ù¢¢ü¡¢ü ¤ÿ¢¨ÿ£«ÿ¤ü¡ªõ¡©ñ¡¨ì¥¨íª©ï©ó±©ö¬©ø ©ø§ò¡âÖ¦£Î¶¾¹
¸gz¿L]ÑERß>Mç;Gç<Dæ=Bà@@à@@â>?ß<=ÝEBÉ:4ÊD9ÊF:º1)ÛJEèJIéCEë>Bè;?æ<?á=>Ú<=Ô<;ÏB;È?7ÊD;ÑMAÍK>¿=0¸6)½9,¿7+Ã6,È5-Ë2*Ñ/*Ô/+Û2/Þ5.çA5ß9+Ù1$Ý3&å9+ç;-ß8&Õ2Ï2Ì4Ê5!Ç4"Ç4"Ê4%Í5'Ï5)Ê0&Ï2)Ñ5)Ò6*Ò4(Õ3&×3'Ü4)à2)æ3.ë52ë33é/2ç-2è-4í.5ö-3ö+/ï+,ì/-ê5.ã9,Ù7(Ð4%Ã-Ä3"çXHéYNË;3ßNIÅ41ÚHHáOPÜJJÔC@Ì;6È80Æ8,Ç9+È<+Å<*Â;(¾9&¼;(»<)º=)º=+·<,´8,µ;0¹=1»?3»?3¾@4À@5ÄA7ïjaõpiêc_ômjûqqìadôgmÿpyÿlzûhxðdoébiëdjîlnîqoîqoûy{ÿ}
ùZlücwßbpû¬¯¶ª}u]rQJY:LR8snZ¥Ë·°íÕÓÿîðÿö÷ÿ÷ûýøüüüþþÿÿþÿÿÿþÿûÿþðÿôåþéæûêïÿîøÿöüÿôþÿóÿþñÿýñÿûîÿúêÿùæÿùãÿùáÿùáüúåÿÿõÿÿûÿÿûYPAXO@XO@VM>UL=TK<SJ;RI:NE6MD5LC4KB3JA2JA2JA2IA4GC8HD9LF8OH6RJ5SK4VK7TK:XNEULMYUckh{}¦ÀÓáìñôù¢ý¦ÿ ªÿ¡¬û ¬ô «í§è¢¥è¥¤ê©£í« î¤ï §÷¦ð¡á£Ð±À¿ªÂqÄTbÑCOâ<Fì8Aï7?ê:=å<?Ü@AÛACà<CÚ9?ÚADË;;ÌB?Ê@=Á31åOPæCFè?Dê;Bç8?â8;Û89Õ:8Ï;7ÔE?Æ=5Å<4ÌG>ÌLAÁC5¸:,·9+¹7*¿7+Æ6-Ë4-Ñ2.Ø3/á53ä84ä>2á;-Þ6)ß5&á5'á5'Ú5"Ó4Ñ9$Ë9"Ç9%Ç:&É<+Ë<,Ì8,Î4*Õ3.Ö5-Ó7+Ï7)É6&Ç4"Ë4!Ï4"Ø2$Þ2&ã0+æ.,æ,-æ,/æ-2è.3ì+.í,-ì0.è2.à4*Û5'Õ8'Ò9'Õ?.»*ÖD5Ð>1ÙF>ëVPÚB?ØBAçUVâRRÜKHÔC>Í=5É9.È9+Ç8(È;*Ä;(¿:'½<)½>+º?-¹@/¶>.²:,´;0·=0¸>1º?0½?1ÁB3ÅC5ëi\òmdçb[ðkfõolèbañklütxÿq~ÿo|öirí]fêY`ñbf÷qpþzxûvwÿx~ùRdþ[pä]nö¦©©¦jkZtON_;SZ;us\©ÖĸöáÜÿõñÿúúÿúûÿûüüüüúþýûÿþúþÿõÿúíÿóáÿéáýæéÿëóÿñøÿòýÿòÿÿñÿýïÿýíÿúéÿöåûóàúòÝüôßü÷äýúóüüúÿÿý\PB[OA[OAYM?XL>WK=VJ<VJ<SG9RF8QE7OC5OC5OC5OC5MC7JC9JF;MG9PI7SK6VK5VK7TK:WMCVMNZWbkiy{¡
¹ËÖÞãéî ô£÷§ø ©ô ªï¨è¤ã¢ààáãâßڤбÀ¿¬ÇrÉYqÇBS×ALß>Dã=?å==å<?ã=?á>Aá>Cà<C×8=Õ?AÏA@ÊC?Ã<8Ä96éWWàBCä>Bè;?ã9<Ü68Ö66Ñ96Ì;6ÕHAÄ;1¾5+ÅA5ÍK>ÆH:»=/·8)º6)¿7)Ç7,Ï6.×50Þ71æ95é=9×3*×5*Ú6*Ü6*Ý5*Ý7)Ú:*×>,Å4!¿4¹4!¹6"¼8)½8)½3(À-%ã@;å>8Þ=3Õ<.Ì9)È7$È7"Ì7#Ò7%Õ3$×/&Ù.'Û.*Ü.-Û//Ü./Û,)ß0+à5-Ü5,Õ3&Ð4%Ð9&Ñ>*ÔA/Â1 çSEÒ;0ÚA;ÞC?èJIðTUíUTçSQãOMÝJCÖC;Ï<2Ê8+Å6&Ä7&À7%¼7&¹:'¹<*·>-µ=,²=,°:,±;/´<.µ=/·=.¹?0¾C4ÃE7Ü\Qêg]äaYðlgöpmça`ìfgójqàR^ï^kõhqòemñ`gôeiùqqþxwútuÿnuóJ]øRhä[mñ¡£a`UoHOd=W`Aww]¥áÑÂÿîæÿøñÿüøÿþúþÿúûÿüûÿýûÿýùÿûóÿöèÿîÜþãÚøÞáùáèûåïüèöýëýþìýúéÿúêÿ÷æúñàôèØòçÕöëÙøñáþúñýüøÿþû\PB\PB[OAZN@YM?YM?XL>XL>UI;TH:SG9RF8RF8RF8RF8PF:LE;KG<OI;RK9TL7WL6WL8WK;VLBUMK\V`jh~yy
²ÂÎÒÖÛãèì¢í£ë¥è¢ßÚÕÕÖÖÒ
½¶¥}±·s¢ÈfÒVzÕGaÔ<KÞAJàBCÞCAàB?áAAä?Cç>Eç=Fã?FÖ:>Ñ?@ÑEDÆA<º61Å>:êZYÝABã@Cæ=@ã:=Û89Ó97Ð<8ÎA8ÏE;Â:.»2(À</ÇE7ÄE6½>/¸9(½8)Â9)Ë8.Ò:/Ù80à91è;7ë>8Ø1+Ù2*Ü3,Ý5,à5-ß7.Û9.Ö=/É7(Æ:)Á<+¾<,¿;.Á;0Å<6Î95ëC@í@<ä@7Ù=1Ï9*Ç9%È:&É;%Ï<(Ð7'Ï1%Ñ1%Ô1(Ö3,Ô1,Ñ/*Ó2*Ó5,Ó7+Ð7)Í5'Ê7%Ì;(Ì>*Ì;(Ï<,ô^PàF<Ò3/Ò.,æ@@ûWXÿusÿroÿjgö^YçPGÕA7Ç5(½. Ä8'À8(»8&¸;)·<,µ=-²=,°<-¯;.<.°</°<-±;-¶>.¼B3ÀF7ËMAß`Wâa[ôpløtræ`aä]aæ]dÖHTçYeógrôgoöelükpþsvþvvûpsûenñDXôKbåXkë _zYQlCSh?\gEy|_°ªçÜÊÿõèÿùðÿûñþþôýÿ÷ûÿúùÿúöÿøòüóêûëÚøÞÎóÒÊëÌÏìÎ×îÒàðÖéóÛò÷áöõáûöãüõãõìÛíáÑéÝÍíáÑñèÙüõíü÷ñþùó\PB\PB[OA[OAZN@YM?YM?YM?WK=VJ<UI;UI;TH:UI;UI;SI=OG<OI=QI<SL:UM8XM7YL9XL<UKAUKI\U]hexut|~¥
·ÂÃÈÏÔÜàßÞÜÖÎÇ
ÅÃ}Á~¸}tp¨gÁ\ÖNvâAcè:Uê9KæAGàECÜGAÛGCßEEæAGî<Jí=JæBI×>@Ð@?ÐIE¿>8³2,ÈC<àUPÜDCáACã?@á>?Ú?=Ô@<ÑD;ÏF<Ç=2À8*½5)½9*¿=-¿=-½;+½<)Â:*Ç;*Ï;/Õ;/Û8/à8/ç83é:5æ95ä52ä20æ21ç32æ40Ý2+Ô0'Ë1'Ë7-È:0Ä7.Á4-Ã40Ì:;Ý?@ë8;í76ä71Ø5,Ì4&Æ5"Ä7#Å:%Ë=)Ë8&Ì4&Î5'Ô8,Ô:0Ó9/Ð8-Ð>1Ê;-Å8'Ä7%Æ9'Ç<)Ç<)Ç:(Í>-Í:*Ø>2áC:Ô/-ä::à24ß56×53Ö;6ÞC>åKCêQIêSHèTHäUGË?0Ä?.¾<,¸=-·>-´?.°?/®>0¬<.¬<.¬<.¬=,<,±=.·A3ºD6ÆLAÞbXâc]ðnlôrrå`cå`eç`g÷kvûoz÷kví`hð_fýlqÿx{ÿy|úmsø^jóAWôC]èUhæ£g]YtI^uIhwPf³²èâÌÿúéÿýíÿþïýÿòûÿôøÿôôÿñíûêäòáØî×Åèǻ伺޺¿Þ¼ÇàÀÍâÃØæÌãëÓìîØôñÞ÷òßóêÙìàÒèÚÍêÜÏïáÖòèßñèáòéâ[OA[OA[OAZN@ZN@YM?YM?YM?XL>XL>WK=VJ<VJ<WK=WK=XL>QI>QI>SK>UL;XM9XM7YL9XM;WK?ULGYSWe^nnjut~}¥
±´¹ÁÈÏÔÕÓÓÊÀ|¸u|²ovio«ljlcy®YvËPoãBdð7Vö4L÷8Hï@EåFBÝJCÛJEáGGèCJò=Nð>LäCI×CCÌA>ÎIDº;4°4,ÉI@ÕLFØBAÚ?=Û;;Ú<;Ø@=ÔE?ÍG<ËG:À8*Á8(À8*¾9(¼9'»8&½:(À;(Ä;)Ê=,Ò<.×;.Ü8.á6.ä6/è50é32è./é,0î02õ47õ77î45æ21Ú.*×4/Õ62Ñ32Ï/1Ò/4Û6=ê:Dí06î02æ3/Ü3,Ñ5)Ê7'È9(É<(Æ8$É6$Î6(Ó:,Ú>2ÝA5ÝA5ØA6ÓG8ÉA1Â;(À9&Ã<)Æ=*Å<*Å8&Ì:+Í7)Í0'æC<Û2/ï?Aã/2Ú*,Õ1/Ò5.Õ81Ö90Ò8.Ì5*Æ2&À1#ÎE5ÆA2¼=.µ:*±9)¯9+«:,ª:,«;/«=0¬>/¬<.«<+<,²>/µA2ÉSGàg^àc_êjiînoæchðjqõoxúq{ýt~ömuîbködnÿrzÿx~ÿquúipøWfùAYô@[êQfá~¬ykm]oZy`r¶·ßÞÂùôÞüúåÿÿïûÿïõÿïïÿëçúäÜïÙÐãÍÅÞÁ°Ö¨Ó¦ªÐ§°Ó«¶Ô®¼Ö±ÇÚºÒßÁàæÌèêÔòíÚòéØîâÔìÛÑêÙÏìÛÓéÚÓæÙÑåØÐ[N>[N>[N>[N>ZM=ZM=ZM=ZM=YL<YL<XK;XK;XK;YL<YL<YM?SI?TJ>UL=XL<YN:ZM:ZM:YN<YM?ULEXOR_Wbd_sjfsoyy|~¤~©²¼ÆËÌÊÈ¿|}µvwpq§kl¤fg l``qV^³N^ÒJ^ì@X÷6Kþ3Fþ9Có?BéD@áHBÞICâFIéBJò=Nï>NÝAEÔFDÈA=ÉHB´:/±7,ÎOFÉB<Î=8Ð64Ï10Ð51Ó>8ÏE;ÈF9ÃD5¾9(Ã:(Â:*¿:'½8%¾9&¿:'Á:&Ä9&Ë:)Ó:,Ù9+Ý7+á5+ä3+ê3-ë*+ñ*-ø-3ü/4ÿ17ÿ37ÿ38ý58ù8;õ8<ò9>ò9Aô9D÷7Fû6Hþ5Eô+5ô-2í12ã4/Ù6-Ð8*Î;+Î=,Ë5&Ñ8*Ù;/ß=2â>4ä=4å>5ßA6ÙJ<ÏG7ÉA1Ä<,Â9)Â9'Æ8*È9)É2'Ó9/á@8ëD>Þ0/à..ë46è66Ø3-Õ7.×90×:1Õ;1Ò;0Í:0É;/ÖL?ÌF:¿@1´9*°6)¬6(«7*©8*¬;-=/®>0=/«<+«<+<.±=0ÀKAÚdZÞc^èkiðosêinõrzüvîfp÷oyùryöjsþlvÿwÿv}ùhoùcn÷RbþB[÷<YêKaÝt{µz}k{fhu¬²ËÌààÄéìÑîöÞåóÙÙíÑÏæÉÅÞÀ¼Õ·´Ë®ªÈ¤ÁÂáȧˬˡµÎ§ÁÒ°ÎÙ»ÙÝÄåãÎìåÕïáÖëÚÒçÒÍãÐÊàÏÈÚÌÃÕǾ[N>ZM=ZM=ZM=ZM=ZM=YL<YL<ZM=YL<YL<XK;XK;YL<ZM=ZL?VJ>VJ>XL>YN<ZM<ZM:ZM:ZM<[OAWMDWML\RZ^Xfb]qjfspwvxx|{§~µ¿
ÅÈÇ}¿y·zuxq§vo¥tk¢pg zaQZHE³EHÓHOîBNø:Fþ6Aþ9@õ==îA=æD?ãEBäCHèAKî=Më?MØ?BÑGDÅA<ÃG?²9.³:/ÑUKÃ>5É83Ç/,Å*&È/*Í:3ÌC9ÃC6¼>/À;*Ä;)Ã<)Á:'Â;(Ã<)Â;'Ã8%Ä5$Ê7%Ô8)Ù7*Ý5*á3*å3)ê2*õ33ÿ58ÿ8<ÿ4:ÿ-2ÿ(-ÿ(-þ+1ü-3ö)0ò&1÷)6ÿ,?ÿ*Aü 9ó/ö"0ó(.í,1æ0/Ú1,Ô3+Ñ5)Ð6*Ô6+Ý90æ=6ë>7ë:4è71è50â92ßH=×K<ÓE7Ë=/Ä6(Â3%È6)Ï8-Î4*Ô6-æC<ß82à21Ò ì89å63Õ1(Ò4)Ò4)Ï5)Î6+Ê6*È5+Å7+ãYNØRFÊH;¾@2·;/µ;.µ<1µ<1¯9-±;/±=0±=.¯;,9*9,®:-±<2ÐYQÜb]ìppôvyîmrõq|ör}ÿzÿÿyôhq÷epÿq|ÿuÿktø^jöOaÿA^÷8WéG^Ûntº©n~ghq¡©´ºÈÍÕܽÌÙ»ÁÔ´²Ì©§Â¼¶²±³µ~¹ÀÂĨŲȡ¾ÎªÉÒµÚÙÄæßÍêÞÒéÖÏáÌÉÛÆÃÔÁ»Î½µÈ·°ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL<YL<ZM=ZM=ZM=ZL?ZL?ZM=[N=]M=^O<\O<\O>YM=WMCWLHXNOZPX]Ub`Yia\rjfokspvq§{u³~ÁÉÇÀ~¼y²r¨r§t«l£\HL¤B9¶A:ÍC@Þ@?è:;ô<>ÿDE÷><ó=<ì>=ê@AëBIêCMëANãALÐ>>Å@9¾?6·>3°</²<0ÀD8ÒMDÇ61Ô;6Í2.Ì3.ÖC;Ç?3µ6'»>,º7%Á:'Ã<)Â;(À9%Â9&Å:'Ç:(Ë:'Ð9(Ö6(Ø2$Ú."à/%ì7.õ=5õ82÷40÷0-ø**û&(û%'û%'û%'û&*÷!)ø".ÿ'7ÿ(>ÿ!;ÿ6ý1ÿ'8ï#,æ#+ã+-Ý--Ô+(Ò-)Ü41â62è64î66ò65ò12ï./î,,å/,Ü92Ñ:1Ò91ìSK»"Ä+#ßF>È.&Í.(Þ<7èE@â:7Ø/*Ú.*â51å<7ß>4Õ<.Ï5)Ë3&Ì5*Í;.Ë;0Å8.ìbXàZOÈC:¹6,º:/¸8-±3'´6*°0%°2&®2&¯4%°6'²:*´<.³=1°:0ºC;Ö\Wìppñsvöx|ûyõq|ÿ|ýwút}üs{ÿr~ÿr}ÿmxÿgsü`nôI\ÿ>\ÿ>[äAVÔek´¡zm}f~cjw¦ ¨¨££|vzqyo|r v¤uw³y¸¼¾¾¾¢½§¼¯½¾Â§Ï̹ßÓÇãÒÊÜÇÄÔ¿¼Ìº¶Á²«¹ª¥ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL<YL<ZM=ZM=ZM=ZL?ZM=\L=]M=]N;^O<\O<\O>]P@[OC[NFYNJZPQ\SX_U^_Wfd\tibngqjxp¬y¼ÄÄÁ~ºt«n¢q¤¡u¨jW{=Aª5+±5+Â<3Ó@8Ý>8è?:óA=õ=;õ;<ô;@ñ>Bî@IèAIâ@KÚAFÇ<9½=4¶<1±;/«:,®:+½A5ÐJAÚG@ÜA=Ô63Ð51Õ@9ÍC8»9+²5#½8'Â;(Ä=*Ä=*Ä;(Æ;(Ç:(Ê9(Ï9(Ï6&Ô2%Ú2%ã5*ê8.ï80ð91ç1&ç/%ê.%ï,&ö+'û+)þ,+ÿ-.ü*-ú%+ú$.ÿ'7ÿ$;ÿ7ÿ3ü0õ0ö.9õ3<å*1Û(,Ü.0Þ02Û+.ñ:>ô7=÷4:ö26ö/4ø03ù25ô87Û2-Ú;5×82äE?äE?Î/+Ñ2.Á"Ô51á?:èE@à=8Ø3-Ù2,Ý60Ý:1Ô:.Ï9*É5'Ç5(È9+Ê<0Ê<2Æ9/ícYáXNÉ@8º4+Â91Ã:0¿6,Â9/¿5+¾4*½4*»5)¸6)µ5(´6(°6)´;0»B9ÓYTèljïqtöx|þ|øvþ|üyùv~þuÿsÿp}ÿkwüdqý_nöI]ÿ>\ÿ>\éCYÓeh®wozbu\x]ckpp
mp]l]h\g^k_qeyizk¬t±v·|»}¼¼½»µ¡³¶¾½¨ÏÆ·ØÇ¿ÖÁ¼Ï¼¸Æ·´º¬©²¤£\L<\L<\L<\L<\L<\L<\L<\L<ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<\L=\L=]K=]M=]N;^O<^O<\O<_RA]QA\PD[NFZOK[PN]QS]RZ_SgcXvh]
kbsk¤vµ}¾}½
Á·v©p®u¢ºv¥µi±Rt¸<D¾5-º4+À<0ËC7ÓE9ÛC8ä?9ñ=<÷:>ù:Aö=Eï@GæAHÙ@EÏ@BÀ;6¸90±9+9*©8(9*»?3ÏF<ÙD>×96Ù74Ú;7ÜC=ÝOEÎH<µ3#¾9(Á:'Ä;)Æ=+É=,È<+É:)Ì9)Ï7)Ï2#Ó/#ß4*î=3ô?6ñ91é4+à4&ß5&â2%å/$ë,$î+%ñ+(ò+(ó+-ð(+ò&/ø(6þ%:ý7ü3ø3ô%7ò0;ó5Aò8Cð;Dð<Eé5>ä,6ð2<ó/;ö.9ö-7õ.3õ.1ó/1í42Ü0,â=9Ú64ß;9ÿmjåCAÑ/-Î/,Ù:7ß@<àA;Û<6Õ7.Ö5-Ö5+Ò6*È6'Ã6%Â6'Ä8)Å;.Æ<1Æ<1Å;1ë`YáTMÉ<3¿0(Ë;3Ñ>6Î;3Ò=6Ø=8×<7Ô=6Ï<2É;1Ã9.¼6*¶6)¹;/¼@6ÏTMãgeíorøz~ÿû|û|ûyûxÿwÿsÿn}ÿgvû`pü[mõG^ÿ<Zÿ>\ìFZÎ`a~ev
ZiQh
OmRt
X{]}^x\qX`zM_Pa
UeYn`ug} j~£m¬r²t¶x¹y¹y¹zº~º±¬©©ºµ¢Ç¹®Ë¸²È¶´¸¬¬ª¡¢ [K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]K=]K=]L<^M=^M;^O<^O<^O<^Q@^Q@]OB[OC\NE[NF\OI]OO^P_bTmdY{i^pg|t
{·{³
º¥
´¯ª¸z¡ÆxÑuÌcÈMlÜFRßA@ÕA=ÏE;ÌH;ÍG;ÓE9ÞA:î@Aõ<Aú=Dø?GðAHâAFÒ@AÆ?<¿?6¶<1¯9+«:*ª9)®8*¼>0ÎD:Õ<7Õ31à;9åA?áD?èSLßUJ¿:+Á9)¾7$À7%Ä;)É=,Ê=,Ë9*Î8)Í4&Ò2&Ù2)å9/ñ>7õ>6ð5.ä/&à6)Þ6)à4*ã1'ç.)ê-)ì*(ì**ê),è',ë'1ò)9ö&<÷!;û=û%Aû6Hä(6ç.<ÿP\ÿ`lÿP\ò<Ió9Gè)8í*8ñ-9ô0:ñ27ê01á+*×(%Ø0-Ú72Ô2/åC@ÿspõVSÝ>;åGDÛ=:Ú<9Õ:5Ò80Ñ7-Ð6*Í4&Æ3#¾5#¹6$»8&¿;,À</¿9-À:/Å<2åXQÜMGÊ70Ç0)×<7ÞA:Ú;5ß<5ç>9é=9æ?9á@8Ù?5Ð<2È:.Á9-»9,»=1ËNHàc_ìnoú|ÿý~
øyøyüyÿxÿtÿn}ýetù^n÷VhóE\ý8Vÿ<ZîH\ÇYZlRcrG\tB\yCdzIl}PtVvXrXoWmZl\obuh{¤l¨oªq
«p
q
±t´u·v·v·v¸w¹z´|«{¤|¤
«¾²¤È·¯Ç¸µ´«®¡¥[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]L<^K<^K<^M=^M;_N<^O<^O<^O<^N>^N>\O?^NA]OB^PE^OJbNYbQdcTqdZ}lexr¢w¨v¤}§¬«Â©ÎÚwálÛXwÚD_óBTúDPïJPáIHÐE>ËE<ÐF<ÙD>èBBð@Cõ@GõBHíDGßCDÏA=Â?7¿@7µ=/®:+«:*ª9)®8*»;.Ì?6áFAâ=;îBBëAAÞ;6ãJBæXLÕK>È@2À8(¼3#Á8(È<-É:*Ë7)Ð8+Î0%×3)à8/é;4í:5í60ë0+å,'ã0,ã1-ç10ì31ó25ö37÷48÷6;ì-5ê,6í.=ñ0Có-Fö)Gý+Nÿ3Rô9Lå3?ð@Mÿ_lÿlzÿWfõCSõ>Pî3Dí3Aí3>é6<ã99Û83Î4*Ç/$Ë2*Ç.(Ð72òYTö\ZòXVÛA?âHFÜB@Ô<7Î70Í6-Ï8-Ï9+Ê7'Â5#¹8#³9$µ:(¸=-¹;,¶6)¼7.Æ=5ÛNGÙEAÎ50Ð1-á>9ç@:ã81ç51ë20î21ë52ç83á:2Ø:/Ð9.È:.¾6*º8+ÈIBÜ_Yënlû}ÿ
ýõv}öw~üyÿxÿsÿk}ýdvù^pôSeôF]ý8Vþ=ZïL]ÀTRz_BWh<Yq?[vCfyKn~QtVx
Zy_wayexhz m|§qªr«r
«p©or°t³tµtµt
·r¸t¸w¶{¬x£x¤À¹§ÎÀµÒÄÁ¼¹À¨ª¶¨ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:ZJ:[K;[K;\L<\L<]L<^K<^K<^K<_L=^M;_N<^O<^O<]N;]N;^O<_O?_O?`P@aQAbPFbNPcN]_Pe`Usga
to{t}qv®Ì¡Ûær
ëduéPdé;Rù3Lÿ<QûERéDKÕ?@Î@>ÑC?ÖEBãEFèBDîAEíCFçDEÚEAËB:¿?4»?3±;-©8(¨9(ª9)°8*¼:-Ê;3èIEé??ë=>å78Ú2/ÞA:îZPôh[ÚPCÉA3¾5%Â6'Ç9+È9+Ë7+Ò8,Ñ0&Ú6-æ;4é;4ê40è/,ê-+ë--ó49õ3;ø3=ü3=ÿ1>þ0=ý1=ù1>õ0Aò1Bô4Kõ5Nõ0Nö-Oÿ1Xÿ>_æ3HùO\ÿanÿ_nÿWfûP`ôDXé8JóAQê:GÝ2:Ò/2Ê2-Â8-½;+¼:*Ä:/À2(ÙJBúkcÝLGáPKÏ;9Ï;9àLJÔ@<Ê70Ê7-Î</Í<+Ë:)Ä;(´;&:%¯<)³>-±9)¯3'º:/ÊD;ÖGAØC=Ô72×2.ç;7ì:6è2.í2-ò,-ô,,ò./ï31è71â:1Ú<1Ò>2Â6)º4)ÅB:×XRçjhú|}ÿþõv}÷xýzÿxÿqÿi{ûbtø]oòQc÷I`ÿ:Xý?[ðO_ºQNqX:Sf8]uEa|InSvY{]~`gll}m|¤o}¨p©oªn©l
©l«q®q°r³r³oµp
·r¸tµv¬t¥w¨°´ÈïØ̾ÚÑÌÂÂÌ«±Á¡±ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:]L:^K<`J<^K<_L=^M;_N<^O<^O<^O:_P;`O;aP>aP>aP>aP<bOAeMMdMW`O_aUmgbuq|vsuÍß~îqyùclúP[ú;Mÿ*Fÿ2Qÿ<Sñ<Mà<E×@EÕCDÔBCÜCEàBCäADâBDÞDBÔC>É@8¾>3¸>1¯9+¨7'©:)<*´<,Á=1Ï?7ß=:å99ã03â/2à42Û94æMEülaòh[ÙQCÆ</Æ:-È:.É7*Í6+Õ8/Õ4,Þ7/æ93è62é1/è/,î1/õ15ÿ2Cÿ0Eÿ-Fÿ*Bÿ%@ÿ#=ü 9ö 8÷'Aõ+Eõ.Mõ/Pó+Pô)Tÿ2`ÿAhóCXÿ`mÿhuøVeíKZñL\ëBUÚ2Cë@RÝ7CÉ-1º((±.$«8&¥?&¨@'¸?.¼:,ÝYMá]QÍG>ÍD>Á63É;7äUQÕF@É91È8-É:,È9(È9(Ä=)±?'¦<&¨;&¬=*«7(¬3(¼=4ÓLFÖGAÝE@Û96Ü30é73ì51ë0+ô1-ý,/ÿ+-ú./ô1/í4/æ81ß;1Ø>2É9.½3(À;2ÏNHáa^÷yzÿÿùzû|ÿ{ÿxÿn~þew÷^põZlëL`õIaü9Wû=YîM]²JGhQ1Qd6\tDf~Nu[chjns¤t¦t§r}¨p¨n©m©l
©l
¨n«n
o
¯o°l²k¶n
·r³tt§w¬
²¹ÈƯ×νÙÒÌ»¿Ê¤¬¿[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8[L9\K9\M:]L:]L:^K<^K<^K<^M=^M=^O<^O<\O<`Q>aR=aR?bQ?bQ?aP>aO;bL>hOKgNRbP\cWkjfuv}|xz«ÆÚ}
ðuzþlmÿY[ýDLþ/Iÿ5Rÿ<Uó<Né?LãCKÝBHÖ=@ÛACÜ@AÞ@AÛA?ØC?ÐA9Ç>4½=0µ?1¬;+©8(<,´?.»@1ÊA7ØC=Ù74á85Þ..â30æ:6Ó0'Ï5)ëUGÿwjë[PÑC7Ê<0Ë;0É7*Í6+Ô:0Ú70ß82å63ç32ê01í12ô36ý4<þ%6ÿ#9ÿ"9ÿ"9ÿ!8ÿ6ý5ø6ï2î9ð%Bï(Gî&Jñ'Mÿ3\ÿEhÿbuÿ`l÷WcñQ]òP]ïMZâ@MÔ2=Ú=FÌ7;»/.®/(¦5'¢;(?&>%ª9'²8+ÒVJ»;2Ä?8¾41½2/ÎC@åWSÕHAÈ91Ä6*Å6(Ä5%Æ5$Ã:(±<(§:&¨7%9*¬4&¯1%Â?5ÛRJÙIAáHBÞ;6Þ2.ê41í1/ï-+ü22þ,/ý+.ù+-ó++í-*æ1*ß4,Ö8,Ñ=1¿2(¼7.ÈIBÙ\Xówwÿÿû
þÿ}ÿvÿj|þ_s÷XlöTiêD\õD^õ6Uñ:VàLZ¥HC^K-Mc5Uo?b}Jt\gln r¥v¬z«wªr~§m|¥i}¥g¥g¦i¥k¨m«m¬l®h~°i³j¶o¶s¯r¬x°»¿Å©ËʵËͶ½Åªº§]K7\K7]K7\K7]K7\K7]K7\K7^L8]L8^L8]L8^L8]L8^L8]L:]J<]K=^L>\L<\L<[N=]P?^SA`SB_R?`P@bQAcRBdQBdNAdLBjMIhKMdPYf[lnkw{
²©¥©¾ Ðây~ðsqújbÿa^ùJWñ>Që:Lî?NïCQê@Kæ<Gå>Fá<Bß<?Ú<=Ö<:Ï>9Ê=4Á;0¸:,§6&¯A0<,¬6(¿A5ÌF=Ì=5Ð72Ú85Ü71Þ5.Þ6-Þ8*Ý<*×:'Ó6%Ù;0ðSLòZOÙE9Ç8*Í>.ÔB3Ò:-Ô3+ðGBá//î5:ó6=î,7ÿBMñ'3ú&2ÿ)2ÿ(2ù'ý"*ÿ'/þ'/ð&ð)ù+7ê .ì&7ñ-Aç#;ÿXrç-Dÿ]lÿ_iþZcùU\õPWëHMÝ?@Í84Ë>7ÄA7·?1¦7&2!6#;'<)§8-®7/ÂE?¿;7½31Ä64Å54ÔDCÛLHÚKEÑD;È:0Ä4)Ç5(Ë4)Å5*¼</³9,/#«(³-$Ã9/ÒC;ØH?äPFßE=Ú70Ý0*ç0,ò21ù13ý14÷/1ö01ö01ó0.ò0.í2-æ5-Ý9/Õ=0¾2%À>1¹=3Ö_Yésqÿûûÿÿxÿh}ÿ_wÿ[uÿUoøLføEcñ:Yô;[æ?YÛ]i@;VF-L^6YuBgMw]}cg¡j¦n¨o§n¦m~¥l}¥i|¤h}£f£e£f¥l¦m«l¬k~g®f±g³iµm´r°v®|´§½±Á¤²Á®¦²°z
]K7]K7]K7]K7]K7]K7]K7]K7^L8^L8^L8^L8^L8^L8^L8^K:\K;^L>_M?^N>[N=[N=\Q?^RB_SC]QA]OB_OB`NDbPFcOHeNHiMJgNQeS_g_tnny~¨»ÁÊ£»«£¹xÓyê|{ôvjöi`ø]aóOZìFRòHSøIVõEPï?Jë;Eä9?à:<Ú::Õ=8Î?7Ç>4À</·<,«<+ª?-©8(²:,ÁA6Å<4Ç61Ô<7Ò50Ö5-×5*Ø4(Ù8&Û:&Û;%Ú9'Ý6.æA;ëMDáI<Ð>/Ç8(Ê8)Ó;.Þ;4öJFä01ð6;ö6Añ.<ÿ@Nï'4ó$,÷%(û),ý+,ü*+ø((ö((÷+,ï$'í%(ê%,ý;DÙ'ð4CüARØ&6ÿjuÿbjþZaüW]ôOSåBC×<8Ñ>6¾8,¿D5¹H6©>,/)((-%°:6ÑTPÎHGÃ54Æ45Ñ==ëWUØGBÖG?ÐA9Ç9/Æ3)Ê6,Ð7/Î70Ç=3Â91Â5.Ã2-É4.Ñ83Ø?9ÞE=äJ@ÞA8Ú6-Ý0*ç0,ò21û03û03ô02ó12ô01ó/0ó0.î1-ç4-ß9-×=1¿3$¾</·=2Ó^Wévsÿù
ø
ÿÿt
ÿf|ÿ\vÿXtÿQoþIhü@aó:Zñ?_áI`ÁS\{?7RF.M_9ZvCeKsYx_wb{¡f}¥i}¦j|¥i|¥i|¤h{£e{¡d{¡d}¡c~¢e|£j}¦l}©l}ªi|«e}c¯c±c
°h²k¯p«s«|¬ª¢xdppR^^]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8]L8^K:_N>aP@`P@]P?\O>[O?[RC[QE[QG\OG\OI_PMcQOfTTgUUgUUgV\h]nlisv£|ºËÔ× Êª´¹}Ïäîvósjûeg÷S\íGQðFOöHR÷EQòAKî=Eä7=à7:Ù99Ô<7Í@7ÅA4¾?0¶>->-ª<+«:,¸B6ÇH?À;2»0)Ê:2Í6/Ð6.Õ7,Ø8,Ù7(Ù8&Ü9&à:*Ý4-Û4.âA9éOCÞH:È5%È2#Ù@2â>5õHDè13ò5;ù7@ø4@ÿESø2?ð)0ë#&ì$'ù13õ-/ï''ì&%õ12ë)*ö8:è+1â)1ë3=ÿR^ï=Kÿ[gþ^fñV\îOTðMRêEIÝ:;Õ74Ô?9À6,Á?2¼B5³=1¬7-¥3)¡,#' %©/*ÇECÂ::¼,,È35×ABô^]Ð?:ÒC;ÐA9Ë=3Ì9/Ô=4Ú@8Û@;Û@<Ø=;Ý>;ãA?ä>>à::ã?=ëIDàB9Ý<4Ù5,Ý2+ç1-ð31õ12ø02ô02ô02ô01ó/0ó0.î1-ç4-ß9-Ø>2À4%º8+µ;0Ð[Tízwÿûúý~ÿrÿdyÿ[tÿTqÿNmÿFgû=_ô=\îEbßTg¢AHp;3SH2Qa<]xEfNrZu^t_xc{£g{£gy¢fy¢fy¡cx byby a| bz cz¢f{¤h{§h{¨e{©a{©`}«`®`²jµn²s¬t¦wuynolSeYAPM2A>^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^L8`N:aP<`Q>]P?ZN>YOCXPEXOH[QO_UTbXYeX_iYcl\fk^glaildqokrty~µÊ
Úá×Óij©½yÌ{ÞzòwÿsrÿcgùU\ôMTõGPôCMò>Gï<Bå6;à88Û97Ô<7Í@6ÅA4¼A1·?.«:*>-±=0¼F:ÌRGÇH?º5.º1)È91Í81Ó;0Ù=1Û;-Ù6'Ü6&à8+à5-Û2+à=4ìNBãK=Ò:,Ñ8*àB6ß7.ð>:é/0ð16÷4<ü8BÿNZÿLUý>Eò38â$&í/1ê,,ð22è**ë/.ò::Ñæ37Ý,2è9@ðEMÿXcóMWØ=CÚADáBFá>AÞ9=Ü89Ø88Ó97É83Â91½:2ÀA:ÍNHÖVSÐNNÃC@²72¶95ÏKIÙMLãQRïYZêRQñYVÉ51Î>6ÒB9Ð@7Ó?5ÙB9àC<â@;é?@ç8=ì9=ò?Cï:?è58ì>=öMJÞ93Û60Ú3+Þ3,å4.ì30ò21ô01ô02ö/2ö01õ/0õ/.ð0-é4-à8-Ù?3Â6'·5(³9.ËVOï|yÿüýþzýoücwÿXqÿOlÿFhÿ@cû9\ô?^éKdØZh
35g;0WO8WgCa{KjPsYt\u^wby¡ez¢fw dv awav`x`x`{az cz¢fz£gz§fz§bz¨`z¨]|«]~_²g´n³ts¦uqtiidQcUDSL8G@^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M9]K5_M5`P9_P;\O>ZN@XOFXQKYPQ`W\g`hnfsshysg{sg}qh}ol}pqrwv}«zÁÒàåãÚ ¿u l¬nq¼vlÒviòsmÿllÿgiþ^`ûRWõFMï<Bê7=æ5;á78Ý98Ö=7ÎA7ÆB5½B0¸@/7)´@3¯:0°;1ÈRHÕ\QÉMC»;0¾90Á7-Ì9/Ö>3Û=1Ú6*Ü4'â6*à3,â70ä=5åE9âF9ÞB3ÞA2â>2Û0&ê72ì0/ï.1ñ.4ú7?ÿPXÿ]dÿZ_ÿOSá.1ã03à,-÷EEè66Ü,,Û-.ë>@Ü25Ù37ÿbhà=BË*2Ê-4Á&*Õ;=á@EÛ6:Ù37ß9=Ü7;Í/0Ì43Í;;ÕGFÞRSì`cõilôekê^aÄ@>ÆE@å^[øhgÿopÿjjåKK×=;É40Ñ>7×D<ÖC;Õ>5Õ<4Ø:1Ü41î5;ñ-7ð,6ò.8ï,4ë,3ó9<þJKß3/Ü3.Ú3+Ü3,ã5.ê40ï4/ò21ô02ö/2÷/1ö.0õ/.ð0-ê3-â7-Ù?3Æ8*´2%²8-ÃNGï|yÿÿÿÿw
úl|øatûTnýHgÿ>bÿ:_ú6\óAaàNeÂWap/+_?0[W>^lIe}MkSt\u_v_xcy¡cx bu`u`u_v_w_x`{az¡bz¢d{¥e|¦d|§`y§^y¨Z{ª\}¬^¬a
¯g®mªp
¥s r{nrjexe[k^RbU_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N:^L4_N4`N8^O:[N>YOEZSMZTT_Zahbprmzu{u{qzpvpqtrxt}¨w¶zÄ~ÏÚÞÜÍ
¶¢£ª«~yl[Q>¼MBÔQIâWRëWUñSRñKMí>Cå4:é9<æ9;à;9Ø=8Ó@8ÊB6ÀA0º?/³9,ºA6«5+£.$¾I?Ùg\ÙdZËUI¸<2¸6)À3)Î:0Ù;0Ú6,Þ3)ä6-ß1*ä71ã;2Ý9/Þ>0ãF5äB3ß9+ß1(é4-ð31ï-.í*.ô17ÿEJÿV[ÿ]bÿ\aâ9<ã9<Õ+,ôJKâ89×//Û57Ì()Ì'+øXZÝ>BÕ9=Ñ6:º#Ä(+Ü<>æAEÝ49Ù,2Þ17Ù05Í(.Ò37äKNöaeûhnùcl÷`iú`løbkÖLLÕNJê\ZêVTçMMãHFÏ42Î3/ÙA<àKDäOHßJCÙ@8×:3×6.Ü.-õ2:û-:ø*7õ'4õ)4ø0:ÿ>CÿJJà1.Þ3,Ü3,Ý5,á4-ç4/í4/ð3/ô02÷/2ù.1ø-0ö..ñ/-ë2-â7-Ù=1É;-³1$±7,ºC=ìyvÿÿÿ|ÿqöhxö_rùRlûDcÿ9^ÿ6]ú6\ðFcÑN`¢IMe5+VD0[Y@^lIe|NkRt[w_x`{dz cv`s]r\s\t]v^w_{az¡by¡bz¤b|§b{¦_x¦[x§Yz©Y{ªZ~ª_e
¬k©m§s¥us|rupnlfwe_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:aP6aP6aO9^O<[OA[RK\VV_Zakgvso}z~¡|¥}w£{u¥xv§sy©s}°x¸{¿~ÄÉÎÍÇ ½«µ¼¦²É©Å¦ªmfJE2¯A4¶@4ÂB9ÖHDèNNîJKì?Cë=?é;=ä<;ß=:Ù@8Ð@5È>1Á=0½:0¾?6¯4,§1'»I?ÑcVÖh[ÕeWÃOBº>2º4)Ç7,Ö90Ù5,ß2+ç60â0,ã4/â7/Þ7.à>1åC4ä>0Þ4%æ4*é0+ð3/ð..ï-.ò14ó78öBEöMRüY^éFKöQWØ37ëFJÝ8<æAEÚ7:Î.0Ñ05äHKÒ7;Ð7:¹#%Õ;=Û8;å;>ë<Aç6<â-6Ý)2á1;ç<DðLSý]eÿksÿjsú`jöZgùXh÷[fôddèZVèWTØ@=Ï10Ô44Ó33áC@ãJEéRKêSLáJAÙ?7Ø93Û81ã33ó.7ÿ0>ÿ0=ú*7ü.:ÿ;EÿCHûABã1/ß4-Ý4-Ý5,â4-æ3,í4/ñ40ô02÷/2ù.1ø-0ö..ñ/-ë2-ã7-Ø:/Í>0µ1%±7,²;5ésqÿÿÿvþi}óató[p÷PjúCbÿ7`ÿ7aù;_ìLf¿O[~86]=0NF1VX@ZeEcxMj
Rr[v^ya{dxas]pYpWqXqXt\u]y_x`x¡_y¢^z¥^y¤\x¤Yx¤Wy¥V{§X©_¬d«h¨l¥o¢qmxjq
ij~cbv]_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:cQ9cQ9aP<]P@ZPG\TR_Zaa_mtryx¨°~~°yy¯yu°wwµw|¾xÁ}
ÄÄ
Á¿¾ ¼¬§»¶¬µ¾³±È¸«Ð¾¦ÖÁ¢Ñ»Ð¬¯oT®\G¤G5¨>0ÂG?àWQïWVñNOé@Cê=?æ<=â=;ß=:×=5Ñ:1É90Á80Á<5¹:3¸=5ÁOEÇXMÇ]OÑeXÓcUÂL>¼:-Å8.Ò91×4-ß2,ç60æ40á2-à5.ã<3çC7æC4â:-ß3%ê5,æ.&ð0-ï/,ð31ñ54ç-.â24çBF÷X]öW\ÿouåDJëHMà<Cþ[`ÿouÞ=Bÿ}ÿmqêQTÔ>@Æ02Ö:=òHKî9>ð7?ø=Fò7Bè-8ô>Jÿ]gÿmwÿjrÿcn÷]gú^kÿaoÿ]nùYeò\]ãPIâJGÕ74Ò/0Ù54Ò0.Ø95ßD?ãJDâIAÙ@8Ó6/Ö4/Ü71è66ê'/ü0<þ2=÷+6ù0:ÿ>Eý?Aì44â3.à5.Þ6-ß4,á3*è3,ï4/ô41ö01÷/2ù.1ø-0ø..ò/-ë2-ã7-×9.Ñ?2¶0%²6,°61èpoÿÿÿpücxñ\pôXn÷OiûBbÿ9aÿ<döAbäRg°QWd/'WD3GG/RT<U^?btLiQq[v_zb|dx_rZnUnUnUoVrZt\w]w]w[x¡[y£[w£Xv¢Wv¢Uw£Ty¥Xz¤Z~¦_¦c¡d~f{fr]iX`vRZoPRgH\L<^N>`P@`P@_O?_O?_O?aQAbRB_O?]M=]M=aQAcSCbRB`Q>dS?aP>]P@^QI[QPZSZeapsqyxz|¥~±¹}ºxz·rs´lo¶twÈv{ÌÊÆ䤾²°»¼¹´ËƳÓÌ°ÙϬÛϧÜÏ£ÝУÙËÙÂѨ¸g ^FËzgÖue½H?×QN÷ccéKLå?Aâ89ä::â:9Ü75Ù61Ö;6Ë81À5.ÇB;»<3¿I?ÆXK¹OAÎdVÑcTÌXIÅG9Ä:/Í6-Ø7/á6/ã4/ß0-ß2,à70ä=4à<0Ý7)ß5(å7,ä/$ê/&ì/)î1-î20ë40è51â64×79æJNõY]íNS×8=×6<ùX`ÿ~ÿ~ÿouÿgoÿipÿflõ\añX[ûZ_ÿUZÿDKü8Bû7Aö2>î+9ì0>ñ=HÿS_ÿ`iÿgrÿepþbmÿcnÿ`oý]gíSSßF@Ö85Ö41×11×/.Ø31Û94áD=ÜB:Ù?7Ö<4×90Û81à93æ66ð7<ó4;ó4;ö4<õ6;ò59ë33ã1/Þ3,Þ5.ß7.à5+ä3+é2,ï2,õ20÷12ø03ú/2ù.1ù//ó0.ì3.å7.à?5Ì8,¿6,¯/&¸;7ÒXWÿþ{ÿmÿe|ø\rðPhôGeüCeÿ;dù9`õNlÓRd=?P, C;&CG.KM5Y_CZjEcxMqZxbx`t\rYqYlSmRnSoTrXtZu]u[tXtWv Xw¡Wv¢Wv¢Uu¡Tt S{¥[{£]z^u[mUb~MXrCSj>AW0?U/<R,[K;^N>`P@`P@`P@_O?`P@aQAbRB`P@_O?`P@bRBcSCbRB`P@fVG_QF\OG^TSaZad`omkvwwy¢{}®}¸x|¹quµkp´lo¶nq¾uvÐ|~ÕÓΨ§Ç¸¶ÁÉźÓαÛתâÛ¥çÞ¥æÝ¢äÛ¤âØ£ÛÑ ÔÇÓ¼»©}dÅwÊ}m´VJÒa[örpìZ[çKLã?@ç=>ë>@ç;;â66Û64Ö=8É83Ê?8¹6.¸>3½K@¶H;È]MÝo`Ô`QÆH:½5)Ä0&Ô6-Ü5-Û0)â51å95ä=7à<3Ü8.Û5)ß4*ã5*ì7.í5+í2+ë0+ç0,ã2,á4.Ý52Ö87Ø>@äJLóW[ú^bü\dþ]eÿaiôS[ïNVñQYÿ_gÿjqÿflõZ`óNTí4:ñ,5ô*6÷-9ñ'5å!-æ'6í7CþPZÿZdÿblÿdmÿenÿcmý[hõQZåEEÞ<7Û64Þ63ß55Ü30Ú2/Û62à>9Û>7Ø;4×:3Û81ß82å95ç:6é9;ê7:ë7:î79î79ì65å31ß2,Ü3,Ý6-ß7,â6,å2+ê1,ò1,õ20÷12÷03ú/2ù.1÷//ó0.ì3.å7.ß<3Ô=2Â8.¶1*·74ØZ[ÿûs}ÿfzÿ^vùWo÷OiùFfû?bü<cô@cåOh¹KVx;8L2#<:#<B(EG/OS8VdA`rJnXu_v]tXqVpTkOkPlQmRpVrXs[sYtXuWuWuWtTrQqRpQnPlNhLbFXu?Ni6F]/@W+@W-@W-AX.YL<[N>^QA^QA^QA^QA_RB`SCaTD`SC_RB`SCaTDaTD`SC^PCbUM\QM[QRcYbkdtqmvuy{¤y{¬y~¶x|»nsµei°`g¯jn¸ruÆ}}×ÝÛ©§Ø»¹ÏËÊÈÜØ¿åá´éäªíè¦ðé¥íå¤çá§âÛ§×Ï¡Ëø¯©k¨p§o`RGº]UÝmi÷uuï__äJLå@DëADì>@è8:â66ß=:Ô;6ÔA:Â70·7,·>3®=/¶F8Ûj\ßi[Ù[MÊB6Å2(Ñ4+Ù6-Ù2,Þ52éA>ìGCà=6Õ2)Õ1'Ú2'Þ0%æ4*è1)ç.)æ/)ã2,â7/á=4àB9Æ-(Ê43ÜDCðVXú^b÷ZaóS[ñQ[èFQêHSïOYü\fÿmvÿntôY_ã>Dé.5ô-4û2<ü2>õ+9í'4ö6EÿKW÷ISõPWøW_þ^fÿckÿ`i÷RYéBIÞ97Þ71ã75é<8ë;;æ95á51Ý60Ý:3Ù;2×90×90Ü71á83ç:6é<8ã99ã99å97ç98è88æ74á40Û2+Ú6-Û7-Þ8,â6,ç2)ë0)ó0,÷10õ12õ13ø02÷/1÷//ò0.î3.ç6.Ý90ÜD9Ç80»4.µ/.ä_bÿølwþbxþWsúPmþLlÿCfö:]ó;_ìIfÔSgDJl;4O>,=<':?(ED/FH0Q\<YkEg|Qr[tZqUmRkOiMiKiLkPmTnUpXqWuYuWtUrTpRmMkMjLeGaE[AUt;Li3E`-AX*>U'B\/E_2Ic6WJ:ZM=\O?^QA]P@^QA_RBaTD`SC`SC`SCaTDaTD`SC_RB\PDZOMZQVbXcjcsqmvuxz£z|w|´sy·mr´bi¯]d¬ag±lr¾x{Êß夡䶵áÇÄÙÕÑÎáÝÄçä¹ëæ¯îêîè¬éâ«ãÛªÚÓ©Ë¡»¶¥¥vqrcbW³i`Ïrmûõutê[]æLNèCGí@Dì<?é;<ß:8Û<8ÞE?ÓC;Ã:0º:/°6)§1#¿I;ÛaRêk\ÛSEÉ:,Ì4'Ô6+×4-Ù42ñMKþZXíKFÙ80Ö3*Û4+Þ2(ß.&á,%á,%Þ-%Ü1)Ú6,Ù;0×?4Â/'Ä4,Î:6ÙCBßFHàEIäGNêMVñQ]öVbøXbù\eÿgpÿmuôYaÞ;@ê17ñ.4ò-6ð+4ë%2ì(4û=IÿS_í?IèAIêGLôQVÿY`ÿX]ôGMä68á53ä73ê;8ò@>ô@?ï=;æ95à72Ý82Ú91Ù80Ù80Ü71ã73è96é:7â:7à;9ã:7æ:8ç:6å84à5.Ú3+Ú6,Û7-Þ8,â6,ç2)ë0)ò/+ö0/ô22ô23÷12ö01ö0/ò0.î3.ç6.Ü8/àF<É91¾3.¶,,îfjÿyøgtÿbyýTqþKkÿGjÿ>cò6Yë=^ãQhÄXeBBgC7[N;GF1AC-JH3EE-LU6Sc>btLlUpXnRkPiKgIhJhKjMkPmToWpVtXsUqSoPjMgJeHdG`D]AWy=Rq8Mi6Lf6Ne7Of8Lf7Oi9Sm>UH8WJ:[N>\O?]P@]P@_RBaTD_RB`SCaTDaTD`SC_RB_RB^QIVMR_Xhnf{tpxtxw¡xz«y{´sy·jr³`g[c«_g°jr»v|ÆÎàä®ç»½æËÉßÔÓØÝÛÎáßÆåá¾æâ¼äß¹à׶ÚеÎƱ¾µ¦§
y|qvksi¨meºoiæî~ósrñedñWYðMNîDEì@@ã:7à;7äB=ÞE?Ì<3Æ=3ÄB5¯1#®0"ÇI;ÜXKÖN@Ì=/Î8*Ð6*Ñ3*Ö42õUUÿkhú]XãD>Ü;3ß;2ã80â4-ã2,â1+Ý0)Ô0'Í/$Æ/$Â0#Å9,À4'Á3)Ë:5×CAÛEGÛBGÚ@HàDOëOZòVaòVaú^iÿgoóYaáBGê:<í57í38ï28ñ3=÷9CÿHSÿV_ä6?Ý4;ß6;ëADùJOüIMô;Aé13è51ë95ï<8ò<9ó;9ð:7é73â70ß;2Ü;1Û:0Ü90ß82ä73è64é75æ:8ä;8æ:8è:9è;7æ95á6/Ü3,Û7-Ü8.ß9-á7*å3)é1)ñ0)ô1-ó32ñ33ô22ô01ô1/ò0.î3.ç6.Þ7/àC:Ê70À1-À13÷jpÿqzúftû]túPmÿCfÿ=dÿ9cõ8^æEdÙZm«V[wE>dJ=aYFTO;KI4PI6GE.GP3L\8ZlFf|Nm
SmRlMhJfHgHgIiLjOlSnVoUtVsUnRjLfKcHaF_FZBX|?St;Pn8Ok:Rl=Wn@ZqCUo?Vq>WqARE5UH8XK;ZM=[N>\O?^QA`SC`SCaTDaTDaTD`SC`SCbUEaVP^Vcje|yu}yzy¡xy©vy°sw´jr³cj°[c«]e®hp¹v~ÇÑÓÝ£¥à¯³ã»¿åÆÇãÏÎÞÔÓØ×ÖÑÙ×ËÙÖÇ×ÑÅÒÉÀÌþŹ¹´¨¬£x{tyvquleleoga[`[ÀsmØyuð{ü|yÿrpýccöSTðHGïC?ê>:á<6àA;Ñ:1ÓC:ÝTJÂ>2¸6)½9,Â=.È?/ÏB1×C5Ö@1Ñ7-Ð2/êLMú_]òWSßD?Ù:4Û81à70æ93ç92ç92â:1Ú9/Ñ9,Ê8+Ä8)°(¸3"È@2ÓI>ÒD@Ë;:Ì7;Ï:@Ñ7AâHRíV_ðYbõ^g÷`iêU[ÜAEå@>ì?;ñACúGJÿLTÿQYÿT]ÿV^á4:Ú/5Ü/3ç7:ô=Aø;?÷48ó12í42ï95ð86í42ë20ê20ç40á4.ã<4à=4ß<3Þ;2á83ä73è43è43è88ç98è88ë99ë97é75â5/Þ3,Û7-Ü8,Ý:+ß7*ã2(ç0(ï0(ò1,ñ42ð43ó32ó11ó1/ñ1.ì3.ç6.à91Ù<3Ì71Á0-Ñ@CÿnuýkuùbqðRiõHfÿ;aÿ4^ÿ6bû>däNiÊ\iGFjF:]L<]VCXQ>RJ7OG4ID.DJ.GU2Sc>^sHgMjOjKgGgFfGfHgJiNkRmUmUqUoQjNgKcH`E_F^G\E[~DWxAVr?Uo@YpB]rG^uG[sCYtAXs@NB2QE5UI9WK;XL<ZN>\P@^RBaUEbVFbVFaUE_SCaUEfZJh]Yngwup|x{y wx¦vwpu¯jo¯ah¬^f®_g°em¶pxÀ}
ÍØØ Ö¡¨Öª±Û´¹ßº¿ßÀÁÝÃÃÛÇÆØÆÃÔÅÁÐÁ»É¼³Ä»°Áµ¨¼¦¯
qqqtpopfewhenj_Yd_ZT¹f`Ùsnðzvÿ{wÿwsÿhfüZWþRNõHBæ=6çD=Ø;4ÛG=ê\RÅ;0Ä<0½7+¾6(Ç>.ÑD3ÔB3ÔA1×A3Ò86Ø>>ÝCCÜB@Ö=7Õ81Ø7/Þ7/å:3æ93å:3â;3Û>5ÕA5ÑE8ÌG6®-¼;%ÍJ8ÑL=Æ=5»0+À00Ê9>×AJáKTëU`ðZeð]eìYaßLRÔ>@Ï4/Ø7/à;9ê@@òCHõDJñBIî?Fâ5;ß26ã36ï8<õ79ø14û/2ü14ï20ð95ð74ì0.è,*ç0,æ3.à3,ä=5à=4à=4à<3ã:5æ95ê65ì65ì57ì57í57î68î66ë54ä2.Þ1+Þ7.Ý9-Ý:+ß7*á4&æ1&í1(ñ1,ð42î53ñ42ò21ó1/ñ1.ì3.ç6.â;3Ò4+Ò:5Æ20çUXÿpxùcnòZiçI`óEfÿ8bÿ/]ÿ5bÿBhÜLe±PYj5/^G7XK:UN;[P>VI8M@0JC0@F,AO.K[6Xj@bxGfJhIfFeDcBcEeHgLhOiRkSnRlPhNdJaH_F_H_H_
H_H]~G]yF]wH`wKcxOczN]uC[vAZu@JC3MF6QH9TK<WK=YM?\O?^QAdWFeXGdXHbVF_UIaWMg^Ulcfwryuxvtsrr¤tulp¯bg©Za©_e¯fl¸ms¿v|ÈÓÝÞ¡Õ §Ó©Ú®³Ý±´Ý²´Û´´Ú¶´Ûµ±Ö³Ñ®§É«¡ÄªÂ¤¼¯~|xdbgiefcYZj[X{c_yVPc]NF¢UM½`XÖkcñwrÿzÿzwÿnjþa\÷TOéGBîOIÝB=ÞG@êWOº,"¾1'¾4'Ç>.ÑE6Ë>-Á2"Ê7'ÛE7ÞE?Ó97Ì3.Í50Ô;5×=5Ý<4á=4ä;4ä92Þ5.×4+Ï5)Ê8+Å<,Â?-ÔS>ÈG2½<)¾:-Ã=2Ä;5Â74Â43ÜKNÞMRáPUåTYèY]åVXÜMOÓD@É5+Ñ7+Ø7/Ý52â24å26æ18æ.6ì4>ì3;ó5?û9Bý4>ú+5ÿ(3ÿ/9ø-3ù57ù59ð./ë*+é0.è51â5/ã<4à=4à=4á=4ä;6ç:6ë76î66ì46ë35ì25í34í55ê41ã1-Û0(Þ8,Ý:+Ý:+Þ8(à4&ã3$é3&ì4*î50î52ð42ð3/ò2/ï2,ì4,ç6.ä=4Í/&×>9Ì35ùbgÿoy÷[iðNcêC]ùEhÿ:eÿ0]ÿ6aöGhÉJ]CFR,#VI8SL:OH6[O?UI9F?-HF1>B'@J(IU1Sd:_rEe}IgJeHcCaBbCcEeHfMhPiQlPkMfJcIaG`F`H`I^G^F_}G`|Ia{Kd{Mf|Nf~N]xC]z@^{CDB6FD8JF;PG>RH>WI>]M>_O?`Q>aR?`SB_VGbYRgb_ojnso~wqzt |y¨yw©pp¦gg£`a¢\_¤`bfhµopÀyzÌÖßçæ Ý¡¡×££Ù¤¤Ú¦£Ø¥¢×¥¡Ô¤ ӥѣ͢ɢÈû°|rn}igld^`fZZkYUrWP}WNWORI¨ZPµXPÁZSØkdìyrù|ÿùuqÿusí_]ßPLÙEAïZTÌ71Å2*Ä6*Ã7(À7'Ã7&Æ9(Ê;+Ð<.Õ?1Ò8.Ö<2×?4Ó;0Í5(Í3'Ø:/â@5à90á90Þ7.×7+Ï7)É:*Æ?,ÄA/Â=.Æ@4ËE:ÍG<ÌC;Å<4»2,¶+&Ç<7ÐEBÙOLàVSãYVáXRØOIÐC:Ì;*Ó:(Ü8,â5.è./ì*2ð(3ô'6ú->ú+?û*?ý)?ÿ(?ÿ&?ÿ$<ÿ$<ÿ$8ÿ'9ÿ+<þ,9ó+5í.5è45ç;9Ý84Ý:3Þ;4à;5ã:5æ95é73ë54ë35ì46ë54é54ç53â5/Ý5,Û5)Ü8,Û9*Ü9(Þ9&ß8&â7%ã6%æ4&ì5-í4/ð50ñ4.ñ5,í5+ê5*å7,à90Ø7/Õ:6Û?BÿmwÿbsûSjõIcÿKjö6[ÿ6_ÿ<gø>cçNj¯IV^$"D, ?:'HE4PM<PI9EB1>C/?G/BH&EK%KS.S]8[kDavKd~NdJbF`Ba@cBeFhJlPmQlLiHgGfHfJeIc
HaGdJdIbGc~GdJdHe~Ga}C[{<\=_B=?4?A6FC<JE?PE?TG>[K>]M=`O;`Q<^SA^VIc[Xhcinlysotpvptp¢pm¢gfaa]^¡\\¤ed°kjºtrÅ}{ÏÙàæåÙÕÖ×ÖÕÔÑÑÍÊÇÄ»®xtk|mdif]^f[YiZSoWM{UJVKVK°\RºYRÁXRÓfaàqjãvoí~wý
ÿ
÷usîgdãUSëZUÇ2,Â/%Å7)Ã7&À7%Á8&Ä8'È;*Ï;-Ó=/Õ9,Õ9,Ó:,Ò:,Ñ9+Ñ9+Ô8+Ø8,ß;1à90Ü8.Ö8,Ï9*È9(Á:&¾9&¾6*Á80Æ=5É@8ÊA9È?7Å<4Â91¿4-Ç>6ÑH@ØOGÚQI×NFÌC;Ã7*Ê7%Ó8$Ý7)å4,í//ô+3ù)7ý(:ÿ+@ÿ*Aÿ)Aÿ&Aÿ#@ÿ!<ÿ=ÿ:ÿ:ÿ 9ÿ%;ÿ);÷-9ð19ê7:å;;Ü94Ü:5Þ;4à;5ã:5æ95é73ë52ë35ì46ë54è64ä71ß6/Ü5,Ù5)Û9*Û9*Ü9(Ü9&Þ9&ß8%á8%ã6%ç5+ê3+ë4,ë5*ë5*ê6(ä7)á7*ß;1Õ4,Ó54óTYÿesÿ[põGbÿIhÿAdÿ;`ý3[ù;aòMmÍLb8?S*$A5'69(;<,B@1DA0@?-=B.>G,=CKP'\b<eoJhvRezQd~OdLaFaAa@c@gDiHkMlNlKjGhHfFgJfIf
JdHfKdIdHdFeGeGfEb~A]>_?bB69.:<1??7DA:KB;OE<VH=YL<^O<\O<\SB^WMc]]helom{sqsoqkjfc`\[ZZ\] \_¦hjµno¿wxÊÒØÜàÝÓÐÐÒÑÑÐÎÍÇÄÀ¾³z¥r|ewu^fi[[d[Vd[RfXKrVHTH£ZQ½`YÉ\YÏYWÛcbákißokãvqûÿÿ
ÿ}y÷nhîaXÄ4+À2&Ä8)Á:'À9&À9%Â9&Æ;(Ì:+Ð:,Ö:-Ó5)Î5'Ð8*Ô>/Ô>/Î6(Ë/"Ú:.Ú8-Ù7,Ö8,Ð:+É:)Â9&¾7$½5)À6,Â8.Ä:0Ç=3Ê@6ËA7ÌB8Ç:1Ê@6ÏE;ÐF<ÒH>ÑG=Ê@6Å7+Ì6%Ö6&ß7,ç4/ñ03ö-5û+9ÿ*<ü';ü'=û%=ù#;û!:ú7ü7þ6ÿ8ÿ6ÿ$8ý*;÷2<ñ6=ë8;ä::Ü94Ü:5Þ;4à;5å95ç85é73ë52í36î47í55ê65å61á6/Ü5,Ø4(Ú8)Ù9)Ú9'Û8%Ý8%Þ7$à7$á6%á5'â4)ã5*ã6(ã6(á7(Þ6)Û7+Ý<2Ð1+Ø88ÿkrÿ]nþPiñ<[ÿHlÿ7]ÿ>eù5[î>bæVqª?Qa#(L/);7+07'37&9<)@=*A<(@>)BB&?FXa4s~Tdw`hSa}LaG`C`
?a@c@hEjJkMlNnMkHhHgGhKhKfLdJeKdJcFdGfHfGeFbBcDeEhH25*58-;<4A>7G@:KB;RE<VJ<XL<YM=YQD^WOc^bigronrormjg`^WWTUWX\_¢acln»rsÃ{|ÎÕÙÛÜ×ÒÎÏÐÑÐÏ
Î
Ê
Æ
Á¼¶¬xo_p|Y`lXYd[T^_Q_\IjWF}SEUL¾\YÐY[ÙX\äcgçkkáplåxsì}vízsþ~ÿÿ{õkaÉ<2Ä8)Â;(¿:'¿;&¾:%Á:&Å:'È9)Î8*Ø:.Ô6*Î5'Î8)Ñ>.Ñ>.Ë8(Ç/!Ò6)Ó5)Ò4(Ò6)Ñ9+Í<+È=*Ä;)Ä:-Ä:/Æ90Æ9/Ç:1È;1É<3Ë=3ÓD<ÓE;ÐA9Ë=3Ë<4ÏA7Ï@8Î;1Î5'Ù5)â5.ë31ò/5÷+6ù)7ü):ù&9÷&;÷&;ø'<û&<ý%:ÿ$:ÿ#:ÿ"7þ#7ú%7ù,;÷5>ò9?è8:à87Ü94Ü:5Þ;4à;5å95ç85é73ë54î47î47î66ê65æ72á6/Ü5,×5*Ø8*Ø8(Ø8(Ù8&Ú7&Ü7$Ý6$Ý6$Û5%Ü6(Ý7'Ü9(Ü9(Û:(Ù9)×:+×:1Ð3.ëHKÿoyÿVjøD_ø<_ÿAgÿ3\ÿ8bø>cèMlÅOe0=J C1-11'.6'4=,=B.B@+B<$E>$HE$U\0p~Mr¨|mjW_{J]~E_Ca@bAfCkJlLmOmOoNlIiIhHiLiLhNgMf
LdJdGeHgHhIfGdDgHiIlL-3'36+891<;6B=9G@:MD=QG=SI=SK>UNDZUQa^eigumklkjhb`XVPPQQXY`cªfj´orÁuxÉ|Ð
ÖÙØÙÖÏÌÍÐ
ÑÑÑÐÏÈ
Áº°¥~wm
YjSZnVTc\RZaOZ_HeZDxUBLD¸TRÐSWÛRYå^dèejãklæuqäunâoh÷~vÿ{ÿ~ôl`É?2Á8(À;(¿='¿='À<'Â;'Å:'Ç8(Í7)Ø:/Ù8.Ò8,Ï9+Ì:+É:*È9)É7(Ï9+Ñ7+Ò8,Ñ7+Ï7*Ì8*Ë<,Ë>-Ê<0É=0Ê<2É;/È:0Æ8,Å7-Å5*Ð@7Ð@5Í=4É9.Ë80Î;1Í:2Ì5,Ð/%Ù0)ä20ì25ô/8ù-9û+;ü,<ü-?û.?ü/@ü/@þ/Aÿ/?ÿ-?ÿ.@ÿ)9ü)8÷+7õ0:ñ6=í8=ã77Ü43Ü94Ü:5Þ;6â:7å95ç85ê65ì44ñ48ñ48ï56í76æ72á6/Ú6,×5*Ø8*Ö9(Ö9(Ø9&Ø9&Ù8&Ú7&Ù8&Õ8%Õ:&Ö;'Õ=(Ô=(Ô=*Ô=,Ô<.Ñ7/Ú;8ÿ^eÿaqÿPi÷<[ÿAiÿ4_ÿ4`û1YôKlÛYq>NZ%-C),:2/-0)08+7@/:B+<<"A<UH(`[5{
S£lª¾¨¾¥wo[aK^F`DcBeDjGoNpPoSoSoNlIiIgGiLiLiOhNf
JeIdHeIg
IhHg
Ge
DiIiKlN+1%.4*470893>:7B=:HA;KD<NH<NG=OJDWSR_^ffeugggfba[YQQ
NORS[^£ei³lo¾uwÊz|ÑÖ
ØÙ×ÕÓËÈ
Ë
Î
Ð
ÒÒÐ
Ò
Ë
Á
¸
«{v|jzVcPVnUQd^P[eMXbIb^EsXCOE´WRÐUZÚSZç\cèagågjèpoìyræqh÷|tósjþxmæ\QÄ;+¾5#Â;'Á=(Á=(Ã<(Ä;(È;)Ë9*Ï7*Ö5+Ø7-Ô:.Î:,Ç:)Ä8'Æ:)Ê=,Ï=.Ö@2ÙA4Ö>1Î8*È4&Ê8)Ë<,É:,È:,É;/É;-Ê:/È9+È5+Ç5(Ê6,Ï;/Ò>4Ó?3Ö?6Õ>3Î7.É,#Ò+%Ü-*ç02ð39ö1;ú0<ý0?ý0?ù0@÷1@÷1@ö0=÷/<÷-9ú,9ú*7ý/<ù/;õ0:ð3:í6;æ69ß55Ù42Ü94Ý:5ß:6â:7å95ç85ê65ì44ò59ò59ð67í76æ74ß6/Ú6-Ö6*Õ7+Ô8)Ô8)Ô9'Õ8'Õ8%×7'Ô9%Ð9$Î<%Ï=&Ï?'Î@(Î@*Ð?.Ò;0Ñ61ëHIÿfrÿOdÿHfû7[ÿAmý/]ÿ7aò4XãPj¼Ufm19E(*E697325406906=-3;#38CCja:
T®w©ÁµÎ¯Ç®}vbeQ`F`
BcBgFmJrOrRqUpToNlKhHfFhKiLiNiOgKf
JeIf
IhIiHiGfCjJkMnP(0#+1'/4-350764<85@=8C>8IE<HE<KHCRPQ[[eabtbb|``_^ZXTTTT\] gi³psÄvxÍ{Ø~ÛÞÝ
ØÖ
Ô
ÑË
ÈËÍÑ
ÔÕÓ
ÒȾ²¤|wpveo~U[|PQnUNf_O]eMZdIaaGq]ETF]TÈZ[ÔVZâ[aæ]déaeîllõzsírj÷xoÞYPå[PÒD8Ã5'Ç:)Å:'Ä<&Å='È=(Ê;*Í:*Ð8*Ô6*Ó0'Ô3)Ò8,Í;,Ç;*Â;(À;(Ã<)È;*ÕC4áK=ÞH:Ó=/Ê4&É5'Í;,È9)È9)È9+È9)Ê8+Ê8)Ë7+Ë7)Í6+Ò<.×?4Ø@3Ú@6ÛA5×:1Ò1)Ü0.å14î49õ6>ù4>ù1>ú0@ø/?ò.<ï/<í/9í07ï-5ï,2ò+2ñ*1õ2:õ3;ò5;ì59å57á55Þ65Ü75Ü86Ý97ß:6ã:7æ87é77ê67ì46ô5:ô5:ñ7:î87æ74à70Ú6-Ô6*Ó7*Ñ8*Ð8*Ð9(Ð9(Ð9&Ñ8(Ð9&Ë9"È:"È>$Ç?%È@(È@*Ì=-Ï;1×96üU\ÿ^qÿGcÿ?aÿ:aÿ7gþ3bû8`íFdÅNa@IS12A64@:<:46?56<7179+4="9CSZ.P¢§q±Å¯Ë°Ì¦Ã®}{egQ_E^@c@iDoJsPsSqUoSnNkJgGeEgJhKiNiNfKdIdIeHgJhIiHfEjLlNoQ&.!(0%-2+13.331764:95<;6GD=DD<GFBOOQZZd_ap^`y\\~`_\ZYX\\ggqsÀz|ÑÜá
ä
ã
áÛÕÒÎÌÉÌÎ
ÓÖ×Ô
ÐÄ·«
xsnuqbevWUtSLjVKf_MbfM_eIcbFp^FzQ?[M·ZSÅSR×VZâW\êY`òce÷rmñnf÷qhÑD;ÔA7Å1%È4&ÔC2Ç9%Ç:&É;'Í<)Ð:+Ó:,Ø8,Ù7,Ï,#Î0%Î6)Ë<,Ç@-Á>*¾;'¼7$À4#ÑB2ãOAäN@ØB4Ë7)Ë7)Ð>/Ê;+É:*Ç8(Æ7'È6'Ê6(Î8*Ð8+Ó;.Õ;/Õ9-Ò6*Õ7,Ú<1Ý<2Ü71è88ñ8=÷:Aû9Bú4Aõ/<ò,;ï,:í/;ê19ê38ë48í57ñ56ô36ó57ð37ï6;í9<é69â45Ý33ß76à;9Ý86Þ97á96ã:7æ87é77ê67ì46ô5:ô5:ñ7:ì89æ95ß82Ø7/Ó7+Ð8+Í:*Í9+Ì;*Í:*Í:(Í:*Ì;(Å9"Â:"Ã=$Â>%Ã?(Æ?+Ê<.Ï81ß<?ÿ\fÿQhÿIfÿ9]ÿ=hù.]ý<hé;\å\p¦LV^..G83BC><89?48E26C41=:)>E&FU*bs?a½±Ë«É¦Ãº¬z{efPZ|@^?a>hCoJrOrRpTnRnNjIfFdDfIhKiNiNfKeJdGeFgHhGhGeDkLmOpR(0!'/"(-&).(.0-3317839:4==5?@8DE@JLKORYVXeZ\s]^}YX[Y^]ee£nn¶wxÈØ
âîðìäÜÖÓÎÈÇËÎÐÓÒÏż¯}xwozkegf]Xm[Qm[Mi\Lf^Kd_IeaHhaGo_FoP;
UA¥]O¿aYÑYXÝQTîS[ø\`ùheæYPÔD<Î70Ñ7/×:1Ö=/Ô;+Ï9(Í:&Ï9(Ñ:)Ô8)Ø8*Ü5,Ü5,Ð/%Í3)Ì8,Ê>/Å@/Á@-¾=*¼9'Â9)¾0"éWJßK?Ã/#Ñ=1Î</Ç8(Ê;+É:)È9(Ç8'È7&É6&Ë5&Ì4&Ð7)×;.Ü>2Ü<0Ù7,Ú8-â>4ìC<õBEò9?ð2<ö4?ö2@ñ-;í-:í2=ì7>æ5;ä68å78ë99ð:9ñ78ï77ò;=î<<ê::æ87á85ß74Ü75Ü75Þ97á98ã99æ::é9;ì9<í9<ï8<ô7;ó6:ð8:í9:ç;9à;5×90Ï7,Ê8+È9)Ç9+Æ:)Ç:)Ç:(È;*Ç<)Á9#Ä='¾:#¶4¼9%ÉD3Ï?6Ê1,ÿ^eÿVgÿIbÿ<\ø1X÷0Yû6cõBiçYo¬FQo33N3,B?6>C<@78@-1L/3K2.A9&DJ(Zn=~_¸w¨Å¬Ê¾¶²~ nfRXvBY{?]>cAiDnImLlNkOlNiIfDcBcBfIhKfLdJgMhNgKfHeEfEjIkJqQrSt U*0")/#).').(-/,130561782;<4>?7AD=HJGOPTSUaXYkZ\u\Z^]dbkj¤utº~Îßéïðë
âØ~ÒÏÌ
ÉÈËÎÏÎÌ
ȼ±|¡x{stknlb`e]Re`Me^Kf^Kh]Ki\Ij^Hk_Gn^Ew_G[CYFZLÇVPÞRSõQXÿX_ðUSãLEÙ>9Õ60Ù6/Ü90Û9,Ö9(Ó8&Ñ8&Ñ8(Ô8)×7)Ü6*ß4,Ý5,Î0'É5)È9+Æ=-ÄA/Á@-¿<*¾9(Ä8)Ë<.äREÜH<È4(Ì:-È:,Â4&Ê=,Ë<+Ê;*Ê;*Ë:)Ì9)Î8)Ï6(Ó7*Ö8,Ù7,×3)Õ1'Ø1(Þ7.ç<5øDGñ8>í/9ï/:ð0=î.;ë1<ë6?ä5:Ü36Ø22ß:8îEBøIFøDCó?>é:7ç98å97â96á85à85á98á98à87â88å99ç9:é9;ì9<í9<î7;ó6:ò59î68ê88ä;8Ü:5Ó9/Ë7+Æ8*Ã:*Â:*À;*À;*Á<)Á<+Á<)½9$Á?)»:%³5¹:'Á;/Ê:2Ø<=ÿ^gÿPdÿA[ù8Wö6[õ;`ô>dãIe«?L?>_:2G;/:>08>2F<:R>=N0.S8/VK5ciEx[°pÂ}¡Æ¹}¹¶©xr^YuETp=\{B_@b@iCmHlKkLiMiMgGeCcBcDgJiLhNgMiOiMiKgGgFfElImLpQoRt U-1"-1#,/&,.)//-11/34/45-9;0<>1@B7EHAKMLQRWUUaVWi\Yt^]fdpn zx·
ÎßêïíçßÓ|Ë}ÈÃ
ÇÆÊÉÉÅ¿·|¡v{pujpndbi_Vc]M_aL_aKc^Jg\Jl[In\Ho]Gq]EwaIxX?S=£VDÇXOãUSøOTþMSâ><Þ<7Ý84Þ71á6/á6.Ý7+Ú7(Ô7&Ó8$Ó8&Õ8'Ø6)Ý5*à3,Ý5,Ë3(Ä6(Â9)Á<+Â?-Â?-Á<+À8(Ã5'ÜJ=ÚF:ÕA5Î</Ä6(Ä;+¾6&Æ:)Ç:)Ç:)É:*Ê8)Ë7)Ì6(Í3'Õ9-Õ7,Ö3*×3*Ú3+ß6/å:3é<8ð<=í49ë07ì18î3<í4<ë7@ê=CÝ7;áAAìNKøYUýZUúQLïB>å84â62à72à72à72á85â96ä;8ä;8á77ä88æ8:è8;ë8<ë8<ë8<ì8;ï58î47ì57ç77â:7Ù:4Ï8/Ç7,Â8+¿:+½;+»<+»<+»<)»<+»<)¸9&½@*³9$±6$¶;+µ0'Ã40ìPTÿ[iÿJ`õ:Uð7Vñ@]ïHfçHdÍNa89e?6R@2DA09=,57)>6+K9/E-#R=,g]B_«t»{Áz¿{³x¸
´
m\uKHb5Nh8[xB_}?c@hDlGjIhJgLfKdDdCcDeFhKkNkOjNiOiOiMhJgHhHlKoMs¡Vs£Wv¤Y24&04&01)01+12-23.34.46+9;-;>-?A3DF9IJDMONRQWSS]XVd\Zoda~nlzw¬ÃÖãêëâ
ÙÌ|Ã|¿~½Á
ÁÂÿ
¸®
}¤
{vyn~rgmmaak^Vi[Pc\J]`K]aJc^Jh[JmZKqZJtZIv[FsWAxR;Q=ªYFÍ[PãTPðFIñ>AÛ2/Ü5/á51ã60ã5.á5+à6)Û8)Ö7$Ó8$Ñ8&Ô9'Ø6)Ü6*à3,Ú6-È6)½8'¼7&½:(¿>+Â?-Ã;+Ä8)Æ4'éUIÓ<1Ì8,ÑB4¾5%À=+À=+À8(Ä8'Å9(Ç:)È9)Ë7)Ì6(Í3'Ò6*Ô3)Õ2)Û4,ã:3é>7ì?9ì=:è45ì59ï6;î5;ê2:æ39ä7=â<@óUVübbÿmjÿidóVQäA<ß63Ý4/ß61Þ71Þ71ß82á85â96å97æ:8å78æ89è8;é9<ë8<ë8<ë8<ì7<î5:î68ê67å97ß<7Ö<4Ì9/Å9,¾9*º;*¶;)µ<)µ<+´=)³;*³<(³:'·@,8&8'³;-«+"Ã54ý`gÿTdúG\ð<Uë=XçG_áOdÒO_´SZvGAXH9KD2FE1BE0=?*:8#;3?3PG*nkHf¬t´t·sºx»
¡¸§}l[K_:AW0Lc7Wr?_{@d@iCkFiHgGdHeJbBcBdEgHjMlOmQnRjPjNjLhJgGiGmKpOv¥Wv¦Zx¨\78(68*66,56.56056067/68+;>-=@-@C.DG4IK>MNFQPNRRRVUSYX]a_lkius}²ÇÓáâÜÓÄ}º|µ|³~·º¹
·²¨zxsznzrfjm_^j[Ti[PjZKfZJb_Lb_Le^Li\Kn[Lr[Kw\K{ZG~UAR=RA¶VFÎRHÚG@â88å33Ý1-ß3/â5/ã5.á3,ß3)Ý5(Ü9(Ó8$Ð9$Ï:&Ñ:'Ô8)Ù7*Ý5,Ø7-Ä;+¹:)µ6%·8'½;+Â=.Ç;.Ç7,Ð90õ\TÖ=5É5+ÏA5¸3$·:(¼?+¿:)Ã:*Æ:+È:,Ê;-Ì:-Ï8-Ñ7-Ð3*Ò1)Ö1+Þ71å<7ê>:è;7æ74é75ï;<ð<?ê69ä15ä5:èBFíMOÿxwÿqnñ`[ÝJCÑ83Ñ2.Ü73ç@:à93à91à72à72â62ã73å76å76æ68ç79ê7;ë8<ë8>ë8>è7=ê7;î7;î79ê7:ä::ß=:Ö=7Ë;2Ã;/º8*µ:*³;*¯<)¯<*¬<(¬;)¬;)ª;(¬=*¦8'§9*ª8-¬/)Ë@CÿhrôM^óH[íDYåH[ÙO^ÉT]·TWXUdM?OL9LG4JE1FD-?B'=D#>H#KV.\g<xTf¤m©n²r¹}¶§udRcC?P0BS1Oa9Vl=b{BeBiCjEiFeFbHcGbBfCgHiJkNmPnRoSjNkOjMiKiIjInKrOv¥Wv§Xw¨Y?=.=>.==1==3==5;<4;=2;=/?B/@D-CG.FJ3KL:NOAQQIRRHYWJZZN_^\gerqn{y¡·
ÄÑÓÏ
Ǻ~y¯zw¦yv¥{v¬|y®|®}©}£x|tzrvksrffm_\j\Sk[NlZLl[Kk[Ki]Mg^Mi]Mj]Mn]Ms^Mz]MZI`OVG§N@¸J=Å@7Ï6.Ø1+Þ1+á51á6/â5.â4-à2)Þ4'Ü6&Ú;(Ñ9$Í;$Ì;&Î;'Ñ:)Õ9*Ù7,Ó9-Á>,´;(°5#²5#»9)Ä<.É;/Ë7-Ù?7ø[TãIAÎ:0Ì@3¸6&¬3 µ<)¼9'¿7'À7'Ã7(Å7)É7*Î7,Ñ7-Ù<3Û:2Þ93å<7ê>:ê=9ç85ã41è96ë<9ì::è8:ì>@øPPÿbcÿppùheâTPÊ=6À1+É40Ö;7ß=:à;7â;5á:2â94á83ã73ä73å55æ66é69é69ê7;ë8<ë8>ê7=è7=é6:ï8<ì89è8:ã;:Ý>:Ó>7É<2À</¶8)²:)®;)ª;(©<(¨;'¥:&¥:(¥<) 9( ;) 9*¢6*µ>8ÛTXûepîK\ïI]éJ\ÛM[ÉQZ´VV ZR`RPI7HM9NI5H@+;567>O%Lf6lTw\edf£kt°|mn}\Q`C<J09F,AP1O_;Wj=czDeBjDkFiFeFaFcGcCiFjKlMlOlOmQnRmQmOmPlLkJmJrNs¢Q{¬]{¬]z«\DA0DB3DB6CC9CC;CC;BB6BC3DF0EH-GJ-JM2ON9RQ?TREUSD\ZC\\D\]Oaaaihxrq{z¦~µ¿ÃÁº{®ys¡toomplrn¡vpwrwrto
skzrinmb`l_Wj\Qk[Lm\Lo\Mo\Kq[Mq[No\Nm]Nl_Om`Os`Oz_NZM_S¤PE®B8º;2Æ6-Î1(Ö2)Ý5,â70á6/á4-à3,à4*Ý5(Ø7%Ô9%Ï:"Ê="É=$Ê>'Í<)Ò;*Õ9,Ï;-¿@-±<(¬5!®3!º8(Ä<.Ê:/Î5-Ø93ðNIñTMÙB9ÌB5¾?.¦1³<(¾<,Á9+Á7*Â6)Å7+É9.Ï;1Ô;3áD=ãA<ä?;ç>;é=;é;:è88ç85ç85æ95æ74é;:ôJJÿ\[ÿdcøc_Ì=9Á82½4.Ã81ÕA=ÞE@ß=;Ù42â;5â;3â94â94ä84å84ç77é77ê69ë7:ë6;ë8<ë8>è7=è7=é6:ë7:é69æ89à;9Û>9Ñ>6Æ<1¾<.³8)®;)ª;(¦;'¤;(£:'£:' 9&¡>+7%=+9)2'ÃPKíkmî\fìP^éJ\ßHWÍKS¹RS¤[RcQjUJM8DL7JB/H9$B7FH#Up=gV~³o³q¥h}YYcd|_XfCGT89E-6B*:D,=J0JX7Wh>e|FhClElFiGcFaGaGfFlImNnOlOkNkOmQpTqSpSpPoNqNt£Rw¦U|^z^y¬]IC3JD6IE9IE:IG;IG;HF9HG5IH3JJ2LL2NN4RP;TQ>XRDYTA]Y>[Z>\YH^[Tdahnk~xs}x {§}«
|¦}wunoi
kgiejfmhmimh|lfrkbgj`^g]Th\Nh[Kk\In]Kq_Kq_Kp]Lp]Np]Op]Ns]Ow]N~]N\LXL¡UH¤F<«9/º7-Ê7/Ó6-Ú6-Þ6-ß6/ß4-ß4,ß4,ß7,Ý7)Ø6'Ñ6$Ï:$Ì<$Ê<&Ë='Î;)Ñ;*Ó:,Î<-¾A/¯<'¨3!¬3 ¶9'Á=.É;/Ì8.Ì2*àA;ø[TàI@ÐD7ÊF7«2¹>,ÊF7ÌB5Ê@3Ë?2Í?3ÔA7ÜE<ãF?â@;â=9ã:7â64ã54ä65å97å<9ä?9à=6Ü:5ß@:êMHêQLÓ@9¸)#¸-&¾5-É>7Ñ@;Ö>9Ú;8ã;;ç==â96â96â96ä86å95ç:6é99ê::ê88ê88ë8;ë8;é9<è8;ç7:ç7:é6:æ68â88Þ:8Ö=8Ì=5Â<1¹;-®9(ª;*¦;)¢;( ;';&:(:'?-5"=.8*/&Í\X÷y|ßX_æXdÚQ[ÊKR¹LO©VP`UgUnVPW8?J*<;C=UQ+lvD¢fÁ~¼v¸s|anMu~Q^u}V[b@;D)4<%5=(=D2<E29C+CP2Ue>g{HiFlGmGjGfGbGcGhJlMoPnPlMiKjJjLsTsUsSrQrOs¢Rw¦Uz«Zv¦Zu¥[s£YRK;RK;RJ=RJ=RJ=RJ=RJ=RK;UN<VO=WP>XQ?YR@[TD\UE\UEb[HaZHaYLbYRe][kaiqftuj{zn|pss|puj{mbre]jc`k`_g_\c_Z^^ZY^YUaZRbZOe[Og[Ki\Kk\Ik\Gm]Fm]Fj^HicMqfTqZJuOBWJ\P£YL¬ZL¥N=¦E4§<,±7(Â8-Ñ80Ü41Ý1-ß6/Þ7.Þ7.Þ7.Þ7.Û7+Ø6)×7)Õ8)Ô8)Ò9)Ò9)Ò9+Ò9+Ô8+Í;,½;+¶>-®9(©1 «2!·9*À</Ã9.È5+Î5-Ô:0ÛC8ÝK>ÔH9Â=,·2#ÝPFØJ@ÔF<ÔD;ÚG?ÞG@àC>à<:à74æ87ì::ì::ç77â64à93Ü=7ÙF>ÏB9Ä:/¼4(·1&¹5)¿;/Ã?3Ã:0É<3Ò?7Ú?:â=;ç;9ì89í9:ç7:å8:å8:å99å97å97å95å95à40á51ä65å76æ89ç9:ç9:ç9;ë;>æ9;ß99Ü=:ÖA=ÍB;ÁA6·?1©:)£<+ =*<(:&:%8&8&A0<-/#/&¼LJämoçloÍVZ½LNµNOªQM¢UOXO]RaTjSWZ/:M7FTa)~P°o¼y½xµs~ahL\mCYdBT]BHP9?D0:=,@C2<@1:>0<C3:C0AN2Rd>]sBgHpKoKlGjIiKgJlPmSoSlPmMkJmJmIqLqMrNr¡Pt£Rv§UyªYzª^y¦cmZbOWN?WN?WN?WN?WN?WN?WN?WN?XO@YPAYPA[RC\SD]TE^UF_VGd[JcZIcYMcYOf[Uj_]nbdpdhreltgpvirvirsfmm`gg[_bXY^[VZZRYVOWTKXTIXTH\VH^WGcZKcZIf[Ig\Hi]Gj^Fk_Gh`IcbMngTv\MSFVM«VO°RJ·QE¯H9¬C0¬=,±9)¾8,Ë80Õ62Ù40Ý6.Ü8.Ü8.Ü8.Û7-Ú8-Ù7,×7+×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Î:,¾<.¶>.®9(¦1 §2 ²:)¹>.¾<.Æ:-Ç4*Ë4)Ò;0ÜE:áOBßQCÝOCÛF?Ø@;Ó<5Ò;4Ö=7Ú=8Ü86Ý33ç77ë78î79ë78ç77å97â=9ÛB:ÊA7¿?4¸:,±6'¯5&²8)¸=-¿@1ÅA4Í@6×@7ß=8ã:7é77ï56ñ7:é6:ç6<ç7:æ89æ87å95å95ã:5â92ã:3ã:5ä;6ä;8ä;8å99å99ä:;ã;;ß<=Ù?=ÐA;Ä?6·=2¬;-¥;+ =*=+<);(:&8%:%9'8)5*<5¿QP×eeÑ^a·MM¬NL¤TMYP\Q^S^S_VfQ`_/Sg*^r3zO¯n¥¾|²p bjHauBTe;JX7FP7?H59?158-:</AB4=?4:=2=A3:C0@M3Rd>^tEgHqMpLnHkHkLhKmQnTmSmQkLkHlHmHpJpJp Ls¢Qu¦Tx©Xx©Xx¨^mXbQYH]TE]TE]TE]TE]TE]TE]TE]TE[RC\SD]TE^UF_VG`WHaXIaXGe]Je]Hd[Jd[Le[Qf[Uh]Yh][i]]j^^k__k__i^\f[YbWS_VQZVMWTKUQHRNCQMBSOCWQCXRB^WG^WEaYFc[Fg\Hi^Hk`JhbLbaMngUy_PXN¢[U±VQ²IE¸E@¹@7¸>1·;/¸8+¼8+Ã9,É;/Ñ:/Ù8.Û7-Û7-Û9.Ú8-Ù7,Ù7,×7+×7+Õ7+Õ7+Ô8+Ô8+Ô8+Ò9+Í;,À>0¶>.:(£2 £3ª:&³>,¹>.Ä?0Ä8+Å2(È4*Ð<0ØF9ÜM?âNDÙ:6Ø43Ô20Ö42Û97á=<æ<<é;<í9<î5:ë27é26è58å99á<:Ù@:¾8-µ:+±6'®4%5%°8(µ<+»=.ÈD5ÏC6ÖB8Ü=7â94è64í55ï79ê69é69é69ç77ç77æ95å95å:3ã:3ä;4ä;6ã<6ã;8â:9á99Þ88Ý9:Ü<<Ú@>ÓB=È?9¹:17+¥7(¡;,<+<+;):(9&7%9&z6#y6%9, F=¹SOÀWT¸PO«IF¢MHSLYP^SaWaW_VePsrFzV¦n¤¹«À³{|[[o<?R$AS+AP/?L2:C06<.69058/9;.@A3=?49<1=A39B/@M3Qc=`vGi
JsOrNpJmJmNkNpTqUoSnPlKlIlHnIpLpLpNu¤Sx©Xyª[u¦Wq X_JVEOx>aXIaXIaXIaXIaXIaXIaXIaXI_VG`WH`WHaXIbYJcZKd[Ld[Je]Hf^Gf^Ig_Lg^Of\Pf\Rf\Sh]Wh]Wh]Wh^Ug]Te[QdZPc[N]YMZVJVRFRNBPL@PM>TN@UO?WQAYTA[VC]XDaZGd]Jf_LfaMdcQleUv\O[Q©b\¸ZX¶FD¹<:Ã<8Æ;6Ä:0Â8-½8)¼:*¾?.Ç?/Ó9-Ù7,Ú8-Ù9-Ú8-Ø8,Ø8,Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+Ô8+Ò9+Í;,Á?1¶>.¬9'¢3 3¢8"¬=)µ@.¼?-¿:+Ã7*Å5*Ë7+Î:.Î</Ó:2Þ65à24Û12Ý34à88å;<ê=?ì<>î7<ì38é06æ25å58á77Ú65Î61·5(¯7'®6&¬7&¬7&®9(²:)µ:*ÃA1ÊB4ÔA7Ü?8â;5æ95ë76î87í68ë78ë78ê86ê86è94ç:4æ;4â92á:2ß:4à;7Þ:8Ü:8Û97Ù99Ö<:Õ@<ÒC=ÊA;»;2¯6+¤6'7(;*;););(:&8$7#9%=*v5#5'E:ªPH¬MG©LG¦QLPJULZO^RaVaVaWgT
_©x½¦¸¡tsYN`8/A->3B%:F.=F3;A3:=2:=4<=599-?@2<>39<1<@29B/?L2Pb<awHjKtPsOrLoLoPmOpTsUpRoPmJmHnJpKqMrNt£Sy¨X{¬]w§[mSeM[
FS|BNw=cZKcZKcZKcZKcZKcZKcZKcZKcZKcZKd[Ld[Le\Mf]Nf]Nf]Lf^Gg_Hh`IiaLiaNi`Oh_Pg^Oj`Ti`Qi`Qh_Nh_Nh`Mh`MhaNd^N`ZL[UGVPBPM>NK:NK:NK:PM<RO>TQ@VS@XWC[ZF]\H^]Kb`Qf^QmWJ[R¬ic¾c`ÁMMÈBCÐ;=Ô89Ó84Ì70Á9+º=)µC+¼B+Î;+×7)Ø8*×:+Ù9+Ö9*Ö9*Ô8)Ô8)Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Í;,Á?1¶>0«:(¡6"47 £=&¯B-³;*º;,Â:,Ç9-Ë8.Î:0Ð<0Ù:4é9<ì4<æ39ã28â38á48â38â25é6<é49ç4:ç7:ã9<Û76Ð21À0(´6(:(:(«:(«:(«:(¬9&¯7&¸:+Á;/Î>3Ø?7à=8ä;8è96ì87î66î66î66í74ê84è:3ç:3ä<3á:2ß;2ß<5Ü=7Û=:Ù><×=;Ô>=Ï@<ËB<ÅB:¹=57-£5(7(:*;)<);*:(9&8%7$8%@-u4"{3%G:¤QI¡NFNG¡WNULXLZN\N]R`UaWhWf¥z©j]kHDS42@&$2-:&0;*5=.9?3<?4=?4:;3::099->?1;=28;0;?18A.>K1Pb<bxIkLuQtPsMqNqRoQrSrSrQpMmKmIpLsOt Qv¢Sx§Y{©^z¨_qVdJYC]JW~GRyBe\Me\Me\Me\Me\Me\Me\Me\Me\Mf]Nf]Nf]Ng^Og^Oh_Ph_Ng_Jh`IiaLjbMjbOjbOjaPjaPjaPiaNh`Mh`Kh`Kh`IiaJjbKf_Mb]J^XHXRBSM=MJ9KH7IH6KJ8LK9LM;NO=PQ?QTASVESVE[YL^VIcQEzXN¡ha¶eaÄVUÖQRÙ@Cß:>Ü87Ô70Ç;.¼?+±C*µA(Ê;*Ô7(Õ8)Õ9*Ö9*Õ9*Õ9*Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Ò9)Ò9)Í;,Á?1µ=/«<)¢9$65;"§A*²B.¹@/¿;,Ã7*Å2(Ë4+Ò;0ß=8ê5:î3<ë6=é8>ç:>ä;>ã:=â9<ß58á7:â9>á=>Û=>Ñ96Ã2/¶0'¯9+«>*«>*©>*ª=)©<(©:'«8%¯6%¹7)Å;0Ð=3Ù<5ß<7ä;8è;7î87ï75ï75î85ë:4é;4ç<4ä=4â>5à?7ÞA:ÚA;ÙA>ÕA?Ñ@=ÍB?Ã?:»@8³=3ª8-¡5(5'8(<*<(<)<(:&9'7%6$6%}:)t3!~9*OA£YNRGOEVJYN[MZM[M\Q_T`WgW~xXy^r|ZU`B;E,/;%0;*0<.3=24<16<2<?6@A9?A6<<077+89+>?1:<17:/:>07@-=J0Oa;bxIkLuQuQtNqNrSpRrQsPrOpKnJpLsOv¡Ry¥X{§Zz¨]x¦]qWgO]EXB`NYISzCg^Og^Og^Og^Og^Og^Og^Og^Og^Og^Og^Oh_Ph_Ph_Ph_Pi`OjaPjbOjbOjbOi`Oi`OiaNiaNiaNh`Kh`Kh`Ih`IhaGhaGhaGf_Le^Kb[I\WDWR?PM:LI8IH6IH6GH6GJ9GK:HL;IM<HO?JN?PQCXRF[OCiRDYMVL°SLÔZYÛIJâ?Bá99Ú72Ï;1Â?-´B*³<$É:)Ó7(Ô8)Ó:*Õ9*Ó:*Ó:*Ó:*Ò9)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Í;,Á=0µ=/¬=,£<)8 49 ¡A)C-¶A/¿=/À6+Â/%Ç0'Ð6.Þ:8è59î6>ì;Aê@CæAEàBCÜ@AÙ??Í12Ð66Ó:<Ñ=;É;9¾71µ4.4)ª<-¥>+¥>+¥@,¥>+¤>(¦;'©:'ª7%²7'¼8+Å8.Ì70Ô94Ü=9æ>;é:7ì95ì95ë:4é;4è;4å=4â>4àB7ÝC9ÚC<ÕB;ÏA=Ê?<Ç=;¿>9±<3©:/¢8+6(7'8):):(=)<*<):'9(7&6%}6$x3#x5%
B2UEWKPCPDZLYMZN\Q\Q[T\U[VbUkbEV`=JS4=G,6?*2=,4>35?66=68?8=B;CF=EG<CD6@>/;9*78*=>0:<17:/:>06?,=J0N`:awHkLuQuQtNrOrSpPqOrNqMpLoKrNu¡Ty¥X«`~©az¥]qUfL_G]E^IbPYISzCh_Ph_Ph_Ph_Ph_Ph_Ph_Ph_Pg^Oh_Ph_Ph_Ph_Ph_Pi`Qi`QmdUlcTjaRi`Qh_Pg^Og^Mh`MiaNiaLiaLiaLh`Ih`IhaGh`IgaKf_Le^Kb[H\WDUR?PM<ML:EF4DG4DH7DH7BI9BK:BK:CJ:IK>SQDSPAXL<eK:tE5H>ÂYSÙROàDEà::Ü75Õ;3Ê>/º=)µ8"É:)Ï8'Ð9(Ò;*Ò;*Ò;*Ò;*Ò;*Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Í;,Á;0¶:.<,§>+9#37?'£9#°;)À>0Æ<1Ì8.Ð7/Ù<5ã?=ì=Bî?DéCEâDCØ@?Ê;7À50»1.¹/,¼51¾:6»<6³:2ª8.¤8,¡:+¡=->+ ?,¡@-¡@-¡A+£>*¦=*©;*:(²7(¹5)¿5+É90Ô?9àC>ä=7è;5è;5ç<4å<5ä=4á>5Þ@5ÜD9ØD:ÒC;ÊA9Ä?:¼;6¸85°93¢7-8(5'6':)<*:)
8&=*
<+<*<)~:'|8%{6&{6&y1#8*G8SCPBL=RE_SWLYN[R]T]V\VYT^QaX;EM(6@8A&>G2<E43=2-7.1817>6BE<GJ?HI;BC1?>*;:&78(=>09;069.:>06?,<I/N`:awHjKuQtPtNrOrSpPqMqLqLpKpLsOw£V{§\e«dx£\jP]EYA^HePcQZJSzCi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Sj`Wj`Wj`Wj`Wj`Vj`Vj`TjaRjaRjaPjaPjbOjbOjbOjbMjbMg_Jg_Jf^Ie_Ib]IZXCSP=ML:HI7EH7AE6@D5?E7?G8?G8>F7GK=IK=AE4KJ6\Q;aE/J9Àj]Üg`ãUSäFEåA@àA=Õ>5É=0Æ=-Æ4%Ë5&Ì6'Í7(Í7(Î8)Ñ;,Ó=.Ò<-Ò<-Ò<-Ò<-Ñ;,Ñ;,Ñ;,Î<-»2(¶7.±;/¨:)7"579"®A-³;+º6)Á4*Í6/×<7âC?êHEèDEèEHÝCCÉ:6»61´80®8.©4+«9/©9.¤8. 8-9,:+<+<+=+=*>+?,@-A, A-£@-¢;*¥:(«7(°6)¶6+¾8-Ä;3Ì<4Ú=6à=6â?8âA7âA9ÞB6Ú@6×@5ØH=ÒE;ÇA8»;2²5/ª3-¦1*2+9-;*9+:*:););+
<+9'}8(|9(|9(|9({8'y6&x3$w- A4OCMAL@QEUJRG\R\RUMTLZUXSWTgZ]T5IQ*AK(BK,>H/7@+2=-4?14<1HPCZ^PW[JMO:DF.AA'==%:;)>?1;=2:=2;?14=*;H.Pb<cyJlMuQsOrLpMrSqQpLqKrNrNsPv¢U{§\ªbfx£^jO`G^EaJfPhTdS[LTyEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Sj_Yj_[j_[j_Yj_Yj`Wj`Vj`Tj`TjaRjaRjaRjaRjaRjaPjaPh`Mh`Kg_Jg_Jd]J^YEUR?ON:IJ:EH7BD6@D5?E7>F7>F7=E6@F8>E5>F1HL5MI0U?'Q:¼sbËcXà_ZëUTçGGâ@>àA=Ø?9Î:0Í9+Î=,Ï=.Ï>-Ï;-Î;+Í9+Í:*Î:,Ð:+Ð:,Ð:+Ð:,Ð:+Ð:,Í;.É?5ÅB:¼B7®=/6#112¨5#´6(Ã;/ÑA8ÞE?æIDéJFêKHÞCAÛEDÐB>¼<3¯9/©=0¥?1=0?1>2>0>/=/>.@.?,=*;*<+=,?+>+>,>,@.¡=-¤:,¨8,¬8+±8-¶:0¼9/Ê<2Ð<2Ó?5ÕA7×C9ÖC9ÔD9ÑE8ÊB6ÃA4¹=3°:0©6/¤5.4,7,:.=,;,;+:*;*<*<,~;*|;){9)y:)x9(w8'u6'w4$4'D7NCK?J>QDTIRGSJXOUOVP]XWRSOcT]W5Xc9_jBZfBIT66C)4@*<H4OXGYbQ_fTW\FJN7BE*??#<<"9:(=>0:<19<1<@25>+;H.Pb<dzKlMuQtPrLqNrSqQs OrLpLqMt Qx¤W|§_ªc{¦aoUcJ]DaJeNeNcOdS[LTyEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`Qi_Uj_[j^^j^^j_]j_Yj`Wj`Vj`Tj`Tj`Tj`Tj`Tj`Tj`Tj`Vj`TlaOk`LiaNiaNf_La\HYVCSR>MK<HI9DF8AE6AE6?F6>D6<D5=F57@-@H1IK3F?%W?'ZC·s`¶VJÙbZðebìTSæFHëGHæCDØ;6Ë7+É:*É:,É:*Ë9,Ê8)È6)È6'Ê8+Ë7)Ë7+Ë7)Ë7+Ì8*Ì8,Ë8.Â3-¾5/¶6-3(¡0"/ 1 §3$¼A2ÇC7ÖG?áLFçLGéJFåFBßD@×CAÏDAÁ@:±;1¤</¡A1E4E3D3D4B2A0
@0A/~A.@.:*9+:);*<+<+=*<*?.=-;+9* 8+¥9-©;.®9/¸:.¾90Á;0Ä>3Å?3ÅA4ÃA3ÁA4¶;,²:,ª8-£7+6+6,7.:/;/<,;-;,:+;+;+<,};+z;*z;,w9*v8)u7(t6)v4&;1F<NBJ=H<OBSHRIOITOSQVS]ZYU[Tl[}X~^alxRLX46D#=J.LZ@eqYeoW]eMPU>EI0?C(=@#:<$89';<.8:/9<1=A36?,<I/Pb<dzKmNvRtPsMqNrSpPu¢Qp LnLpOu¤Vy§\}¨`|§`pUfM\E\EeMiQfN_
HcRZLSxEi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QjaRjaRjaRjaRjaRjaRjaRj`Vk`\k__k`^k`\k`ZkaXkaWkaUkaUkaUkaUkaUkaWkaWkaXkaWnbRmbPjbOjbOhaNe^K_ZGYVERO>MK<GH:DF8CE7BD6@D5<C3<H49B-FJ3LF0O:%qL9cOª^N¡A5ÆSLçc_ð^^íSUëJOéDHáAAÌ91Ç9-Å7+Å7+È8-Ê:/Ë;0Í:0Ñ>4Ñ>4Ò>4Ò>4Ó?5Ó?5Ó?5Ó>7Ó?;ÑB>ËD>ÆF=ÂF<ÃI>ÇM@ÎPDÙSHÝPGâMGäIEäGBâC?àA=ÛB=ÕFBÉD?º?7«=0>.C0G3I6F4E3C3
B1A0}@.zA.|?-:,8,
9+:,:,;-;+;+:+:)8)8*9,;/=/¢<0ª:/8.¯9/°:.°:.°:,¯9+®8*¨7)¥7(6)6*7+8-9/<0<.
<-;,9*:*~9*}:*};+|:,z;,y;,w9*s8*q6(r7)u5)D8H=K?H:I<ODTKTLQLTPQOSO\X_Xh^~jp
fuWYh?CR+?O*P`<crQetU\iKNX=CL1?E+>B)=A(;='78(:;-79.9<1=A37@-<I/Oa;bxIlMvRuQtNrOrSoPq OoMoMs¢Rz¨]|ªaz¥^u [cJ^E[D_HgOjPfL`HbQY~KRwDi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QjaRjaRjaRjaRjaRjaRjaRj`Tk`Zk`\k`ZkaXkaWkaUkbSkbSkbSkbSkbSkaUkaWkaWkaXkaWocUnbRkbQkbQkbQhaOd]M`ZJXRBRO>NK<IG8GE6DE5BC3>B1=I1?G/LG1S>+g=-ZL_S>43+¶?9ØXUóigödeëRUæJNèNPÙIAÓF<Í@6Ë>4Î@6ÒD:ÕG=×G>ÚJAÚJAÝJBÝJBÞKCÞKCàKDàKEëSRèTTãSRÜROØSLØSLÛULàUNàLHáIFãEBâC@äB@âC@äEBàFDÙJFÊE@¹>7¬=2¡?2B1E3G4E3C3B3@0?1~?0z?/|>/:.9.9.9.;-;-;-;-9*9*
9+:*:+;-<.;/;/9-9- :,¡9,¢8+¢8*¢8*8)8)8(8)9*:,:-;-:-:,9+8*}8)}7+|8+{9+z8,y9-x:-v8+q5*o5)q7+t9+H;I<I=I;
K?RFWMXOQMUQRPVQ`YbWg[zdnrQZi@JY0AR(IZ0Wi?dvNj|VXiEL[:?L.:D)<D,>C-<A-:=,89+:;-68-8;0>B47@-;H.L^8_uFi
JtPtPtNrOsTpQnMmLp¡Pw¨Y|ªaz¨`rXiQZA\EaIeMgMgKhJfLcPY{IRtBi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkaUlbYlbYlbYlbVlbVlcRlcRldQldQldQlcRlcTlbVlbXlbXlbXocUnbRkbQlcRlcRkbQg`Pd]M^WGYSCSM?MJ;KH9GE6EB3?B/;H.?H-OC-a=-E:«XR´NJ,+²:9¹=;ÓSRòpnþvvñehëX^ð^_ãUQÚPFÔG@ÐC:ÑD=ÔG>ÖGAÖG?ÙHCÚJBÜHDÝJCÞJFÞKDàKGàKGâHHáGIÜHHÙGGÖHD×HDØGBÛFBàBAäABæBAèBBçCBäB@ßA>ÛA?ÛJGÊC?¹<6®>3¢@3A0A0C3A2@1?1
=1<0<1=1=1;1;1:3;1;1</<1=/</=-<-;,:,9*8+7):.8.9-:/;.=.</>.9)9(:*:+;,;+;,:+:,9+7)~6({5){5){5)z6)x6*x8,w9,s8*p4)o5)r:-v<0M@K<J<M=
QCVHXMWNNITOVR\Ue\{^PfVF`^GEO->N)?O(J\2_rEk~QexKXj@M_7@Q-6E&7D*=F1=D4:>07;-8:,:;-68-8;0>B47@-9F,I[5[qBeFrNsOsMrOsTpQmLo Os¤Ux¨\z¨`s [iQ`HYB^GeMgMfJeGgGhLaNXzHQsAi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkbSlbXlbVlbVlcRlcRldOldOldMldMldMldOldQlcRlcTlbVlbVocUmaSkbSlcTmdUlcTi`Qf_Ob[K^WGXQARL<OI9JG6IC3AC.:G+@F*U@+xG9£PL´HH¶8<º39ÈAEÄ?@ÊJIßb`ñqpðnpçbeâZ\ÛQNÕLDÏD?ÍB;ÏD?ÐE>ÐB>Í@9ÒC?ÒC=ÔC@ÕD?×CAØD@ÙECÚDCÝADÝADÞDFÝGHßIHàJIãIIåGHçACêADìBEìBEçAAâ@>Û=:Õ=:ÚFFÉ=<¹83°;2¦@4?1>0@1</<0;1:08193
:4;4;3<3:4<3<3}=1}=3|<0|<0|=.|=.{<-|:,{9)z8*{7*:.9.9-9.9.;.<.=-9):):*;*;+<*;+~;*8*8,~6*}5)|4(z4(z4*y5*u2)v6,v8-r6+o3)o5*s:/x@3PBN?N=Q@
VFXIUJRIOITNTO\VfZn[JPK7EK1AN0KZ9WgC`rJgyOdzLVl>G]/AV-7H$1@!6B*=F5<D98=67:39;.;<.68-9<1?C57@-7D*FX2Vl=a}BoKqMsMrOtUqRoPq¢Qu¦Wv¦Zs¡YjRbJ[
E^H`IcKeKfJfHfFeI`MWyGPr@i`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkbSlbVlcTlcTlcRldQldOldOldMldMldOldOldQlcRlcTlcTlcTnbTmaSmaSmaSmdUlcTjaRg`Pd]M`YIZSCUN>PK8MH5ID1DC.@F*DD([B,TG¯\X«>A¬/3ÎINÆ?EÀ;>»;<ÄFGØZ[ãefÛY[ÌGHÑJGÐEBÍB?ÐB>ÔFBÔFBÐB>É>7ÏD=ÏD=ÒD@ÔEAÖEBÙECÚDEÝDFÞ?Cß@DÞBEßEEáGGàFFàBCá>?èBDé@Cè>Aç=>ä>>ãA?áC@ßECÖBBÅ98¶50°;4¦?6>3=/?2</:0:081838394;592:2:2;2~<0~<0|<0|<0x8,y9-z:.z:.{<-{<-z;,z;,};/9/7.7,6*
5*7*7(8*9*;+
<-<-=,~<,};+}9,}7-|6,y5*z4*x4)x4)x5,r2(u5+v8-r6+n4)n5*t;0xB6UGPBO@SDWIVJRGNGTNUNRKXMdSeZDGK2=J,IX9ZkIgxTcxQYnESh=Nc8J_4:L&0?,95>)=C5<B8:<79<5;=2;=079.9<1?C58?-8B)EU1Uh;azCnMrNrNrQsSqRr Uu£Xv¤[t¢ZoUfN^H[DdNaK`HcIfJgKeEa
E`MWyGPr@i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbQkbQkbQkbQlcRlcRlcRlcRlcTlcTlcTnbTk]Pp`QtdWrdWnbVj`Th`ShbTgaSgaQc]M[VCVQ=SN8NH2GA)KG,I?$bI3gW¶xm»le¸YW¹OO¶BE½BEÂDGÈFHÍHKÐJKÒLMÓKMÏEEÐDEÓEDÖFEÕFBÒC=ÎC<ÏF<ÈD8ÉE9ÊE<ÌE?ÒD@×CCÚADÛ?CáBFâBDáCDàDEàDEáFDãEDäDDãCCäB@ä@?ã?>ã?>â@=â@=ÞC?ÓB?Å>:¶93ª70:0=2>3>2?2?3=2;393938192
;0<.<.;-;/:.:.:.~:-~:-~:-~:-};/};/};/};/}90}90~80~8.7.7.7.~8,8,~8,}9,|8-{9-z8,x8,x8,x8.x8.w7-v8-v6,t6+s5*q5+m1'r6,n4)m3(o6+m4)q8-I=
SH
SJRGRHPHQJQKRLTMTK[NcQo_HYU:MV7O_;j~YbxQYoHUjCRg@Mb;IY5CR17D&4>#2:#6;'<>0@B5@@6<>358-39-4:.7:/9=/;?.=B,<E(S_;arFnRsUrQrSsSrUuZ~§e~§epYbK^G^H^G`IbKdMfNeMcK`H^G_LTvDKm;i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTrbSqaRrbUqcVrfZogZmeXjdVgcWkhYoiYlgThcOc^H[U=RL4PJ0H>%Q?)kP=XGNBE=D?±WV¸TT»QQÀPOÀNMÁMMÂLJÃKJÐTTÈHGÂ=>Ä=:ÐB@ÓEAÏB;Ç>4ÊD9ÉE9ËF=ÍG>ÔFBØDDÜAEÝAEáBFáCDáCDâDEâDCáFDáFDáFDàEAßD@àB?ßA>àA=àA=àA=ÞC?ÔE?ÈC<º>6¬:0 90:/<0<0A2~@3~>4<3:3918190;.
<-;,;,;-:,:,:,9-9-9-9-~:/~:/~:/~:/}90}90}90}90}90}90|90|90|90z:0z:0y9/y9/y9/w9.w9.w8/w8/t8.s7-r6,r6,p6+p6+k1&q7,m4)l3(o6+l3(p7,~H>RI
SLQJPJQLPMQNSOOG
SH[K{ePsiPhkLfqQgxT^tMXnGPf?La:K_:K\:GV7CP4<F-8@)6;'7:)<=/?@2>>2;=04:03;05;16<0:</<?.>A,>D*Q[9^mDkRpRpSqRsSsVx^|¢exakT`I]F]F\E`IaJcLeNdMbK`I^I]LRtBIk9i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTqdTo_Pm]Pm_RqeYog\ldYhbVfbWpl`{xi~{jyizubpiVe`JTT<FF.C>(MB.S@/U8(]7*l=3n70u91~;5@:IBPJ¥XPZR»^YºSN·GE¼B?ÈDBÑFCÓD@Ï@:ÐA;ÐC<ÒE>ÔG@ÖGCÚFFÛEFÞDFßCDßCDßCDßCDàDEßEEßECßECÞDBÞDBÜD?ÛC>ÜC=ÜC=ÜC=ÛC>ÖE@ÎE?ÃB<³>5¢:18-9,;-@2@1~>2=1:19181:0;.;,;,;,:,:,:.:.9-9-~:/~:/~:/~:/~:/~:/}90}90}90}90|90{8/{8/{8/{;1{;1z:0y;0x:/x:/x:/x:/t8.t8.s7-s7-r6,q5+o5*o5*j1&o6+m4)k2'l6*i3'm7+}G=PIPIPJQLRMSNUPVPWO[P~^OtbNoiQorUlwYfwUQeBK_:EY6DU3EV6GV9GT8ER8?I0<D-9>*7;*:<.<>0;=/9;.6<25=26<26<0:</<>0=@-=C)MW5Zi@f|MlNnQqRuUtWz¡`w`nWcL\E\E\EZC_
HaJbKdMcLaJ_
H]H[}JPr@Gi7i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTrdWoaTm_Rk_SkaWlcZle[jf]jf]xtix~r}zg`cNOT>DG2FE1HC0F=,L<,VC4P9+R6*V4*Y5)\6+a9/e=1m=1KBSJ®UO¶NK¼FDÆABÒDCØFFÔ@>ÕA?ÖB>ÖE@ÙECÚFDÛEDÝEDÞDDßCDßCDÞDDÞDDÝEDÝEBÞFCÛFBÚEAÙD>ØE>×D<×D<ÙD=ØE>ÔD<ÓF?ÉF>ºA8§;18,9+
<-@0@1~?0=/:1:/9/:.:-;,;,:+:,:,9-9-9-9-~:/~:/~:/~:/~:/~:/}90|90}90{8/{8/{8/{8/x8.{;1y;0y;0y;0x:/x:/x:/v:/s7-s7-s7-r6,q5+o5*o5*m4)j1&o6+l3(h2&k5)h2&l6*|F<OGOJPKRMSNVPWPZQ]R
aUy_PiZGd_IdhO\fKN]@EU8AQ4=M0<K.?M3CQ7FR:GS;BL4>G2:A/9=,9=.9=.8<-7;-7=36=56;46<2:<1;=/<?,<A*JS4Ve>bxIjLnQsTw¡Wx¢Z{¢ar[eN\EZC\E\EZC_
H`IaJbKaJ`I^G]HY{HNp>Eg5haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcTrfXth\sg[mcYjaXle]snhzwp~w ¨¥«§¨¤£z{kcfSOR?GJ7EH5BE2BE2EH5KL<JH9GD5D>0A9,A7+@6*F4(S5*qB8PHPK¯IG¿GIÌEIÓBEÖ@BÙ@BÚBAÛCBÚEAÚEAÜDAÜDAÞDDÞDFÞDFÞDFÞDDÝEDÝEDÚDCÚFB×FAÖF>ÔE=ÔE=ÓF=ÔE=ÕF>ÔA:ÓC;ÎE=ÁB9®>39-;.</?0?/>.=-;/:-:-;.:-;-:,:,:,9+9-9-~:/~:/~:/~:/}:1}:1}:1}:1|91z:1|91y90y90x8/x8/v7.y:1y:1x90v:0v:0u9/u9/t:/r7/q6.q6.p5-o4,n3+n3+m4+j1(m7-j4*h2(j4*f2'j6+}D;NGNHQJTLUOWPYR[Q{YMv\OkZJ]UBYXDY^HOYA?K3:H/7E.4B+5A+8D.=I3CL7EN9BK6?H5<E2:A/8?/7>.5<,4:,5<45<56;56;49;0:</;>-;@)GP1Ra:`vGi
KoRuVy£Yy£[x`nW`IZ}C[~D^G^G]F`IaJb
Kb
KaJ`I_H^IW|ILp@Bf6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcTkaUndZpf\lcZkd\rmg|§£ µ±®ÄÁ¼ÉÆÁÉľÅÀºÀ¹±¹²¨¤rfcTPQ?FI8>E3;D1:F28E38E38C2:B3<B4@C8CE:GE9>4(P:/e?6EA¡PO¿X[ÊQVÊCIÕFJ×EFÚFFÛEDÝEBÞDBÝD?ÞCAÞDDÞDFÞDFÞDFÜDCÜDCÜDCÚDCÙEA×FAÕF@ÓF=ÒE<ÐF<ÑG=ÔE=Ô?8Õ@9ÐC:ÆC9¶A7¥=0=/=.>/?/>.=-<-;-:-
;.:,:,:,:,9+:+9-~8,~:/~:/~:/~:/}:1}:1}:1}:1z:1z:1y90y90x8/v7.v7.t8.w8/u9/u9/s9.t8.s9.r8-r8-q6.q6.p5-o4,n3+m4+l3*j4*h2(l6,i3)f2'h4)e1&i5*{B9MGMHPJTLVOXNYO|\Qs\Nk[L`WFVSBPSBJQ?@I64@,3<+2;*09(09(2;*5>-9B1<E4?H7?H5>G4:F2:C25@/3>-1<,3:33954954928919;.;>-;@*CL/O^7]sDiMpSwYy£Yw¡YqYfOZ}CX{A\E]F]F^G`I`I`I`I`I_H^G]JV{HJn@Ae7haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVj`VjaXkdZkg^upj
°°®ÃÂÀÓÒÐâáßçæäçãàãÞÚÞÖÓÙÎÈμ²¸¥zym]_YIKL:@E1;D/>J6=H7=F5;C4;>5:;3983880==3C<2N71a84HH¯]_Å`dÊWZÍQSÓNO×MKÛKJÞHGáFDãDAâBBßCDÞDFÞDFÝCEÝCEÜBDÜBBÛCBÚDCØD@ÕD?ÓF?ÒE<ÐF<ÐG=ÔE=Ù@:Ù@:ÑB:ÈC:¼C:¬@4;/9+=/>.>-=,<,;,;,<-:,:,:,9+9-9-~8.}9.~:/~:/}:1}:1}:1}:1}:1}:1z:1y:1x90x90w8/t8.s7-r8-t8.s9.r8-q8-r8-p7,p7,p7,o6-o6-n5,n5,m4+l3*k2)i3)g1'k7,h4)e1&h4)b0%f4)zA8MGMHPJULXNYOxZOr\Nk^N^WGRPAKN=CJ:9B12:+08)17+17-06,/5+/5)08+2:+4<-9D4;F5=H7<I7;F56C13@,1>-.800621622717829;0:<.:?)?H+KY5[qChLqVw[w¡YsVgP^IUx@WzB[~F[~F[~F]H_J_J_J_J^I^I]H]JUvIJk@@a6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVpg^ng_lgatqj¡ ¼¼ºÎÐÏÏÏÏàààòòòúøùû÷ö÷óðñìéðâßèÐÆÝÁµÁ«¢}ub^\GKM7CH2AI2AI4@G5BD7AA7B=9C97?:69<5>?7B71J.+d66QR³giÆnmÀ\\ÇZWÐVS×QNÜLKâHHæCDåBCßCFÝDFÝDFÝCEÝCEÜBDÜBBÜBBÜDCÙCB×C?ÓD>ÒE>ÐF<ÐF<ÔE=ÜC=ÛA9ÒB:ÊD;¿E:°A6:-5&</
=.=-=,<,<,<*<-:,:,:,:+9-~8,}9.}9.~:/~:/}:1}:1}:1}:1}:1{;1y:1w;1x90u9/t8.s9.r8-q7,r8-q8-p7,n8,p7,m7+o6+o6+o6-o6-n5,m4+l3*j4*i3)h4)f2'k7,h4)c1&e3(b0%e3(xB8MGOIRJUMXOzZOq[Mh\LZTDIJ:?C4>D69A208+/7*6<247058157247025.06,08-19,6A3:E5=J9>K9<I77F32A,1>-,6..400511606718:/:<.:?+<E*IW4YoAgMpVv\uXpU`IX{CSv>WzB[~FY|DY|D\G_J_J^I^I^I]H]H]LStIHhA?]7icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUldWibZgd]vsn¯¯ÄÆÅÚÜÛêîïóôöö÷ùüüþÿÿÿÿÿýÿûúü÷ôýòì÷áÔòØÇàʵƶª ibbFEH-DH/CG0FE1GD5F<3C60F42H:9>=9>?:B:7I75cGFjjÅè©ÒÇtnÀ]XÆSPÕONßJLçFKéFKßEGßIKÚDFÔ;>Ø>@áGIàDGÖ:=Ú@@Ú@@ÙA@ÖB>ÔC>ÑB<ÐA;ÑA9ÞC>ÛA9Ó@9ÊA9¾B8°@5:.8*=0>/>.>-=,<+=*<,:+9-9-~8,~8.|8-|8-|8-|90|90|90|90z:1z:1z:1z:1y=5w<4w;3u:2t91q8/p7.p7.o6-m7-m7-l8-m7-l8-m7-m7-i2+m6/p92o81k4-g2*g2*h3+e0(i7.d2)]-#`0&_/%b2(s>6OJPKQJRJ}YMv_QfYITN>DE5>E5:C25@04</3;04:04:068378366446135016//6..6+.9+2=-6C2:G6:I68G44C.1?.*4+,2.-2..3-45/79.:</:?+6>&DR1WlChRs]w_rWkR[~DXyDTu@Tu@WxCZ{F[|GZ{F^JbNbN^J\}H_K`L^~MTsJFd@<W4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUldYgd]onj
¤¤¢ÁÃÂÖÚÛêîï÷ûü÷ûþøüÿüýÿþþþÿÿýÿþúÿüùÿúóÿðàûëÔíßÅ×ͲÀ»¤£cgjKLQ3GJ/EC.GB/H>2I:3L95K<9?:7BA?MHE]RPyjg£Î²®èÅ¿ÿ×Ñ쳪Í|Àc^ÊVVØRSßHMÚADÖDEÕEEØHHÜJKÛEFÕ<>Ö<>ÛACÙ??Ù??ÙA@×A@ÖB>ÓB=ÒA<Ó@9ÜA<Û@;Ó@9ËB:¿C;±A6 ;18-=0>/>.>-=,<+<,<,:+9-9-~8,}9.|8-|8-|8-|90|90|90|90z:1{;2{;2z;2w<4u<3u:2s:1r90n8.o6-m7-m7-l8-l8-l8-l8-j8-l8-l8-k6.n70o81n91l7/i4,g2*e3*c1(d4*_/%^.$b2(^.$`0&p>5JERLXR~XOrVKdRDQJ:>?/:A16A05@03>04<14<15;17:379477577557246116//6./7,.9+1<.4A08E49H58G44E24B1.8/.5..3--2+23+46+8:-9=,7?(DQ3WlEhUt`wbpYgPY|DWxCTu@Tu@VwBYzEYzEYzE[|G_K_K\}H[|G^J^J^{MSnKF_A9R4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUneVneVlfZed_y{x²¶·ÍÑÒäéìôùüúÿÿûÿÿüÿÿýþÿþþþÿþüÿÿûÿÿúÿÿôþüçúùÝïðÑáåÄÒØ´¼Ä ¨l`gEQX7DG,DC.JD4LD7KA8I>:C;9SJKia_wv¾³¯ÙÎÈêÜÓþèÝÿóéÿäÛð©£ÃecµBEÇDIÚRVÛUTÑMKÊDAÍCAÔFE×EFØDDÙCDÖ=?×>@Ø@?Ö@?ÖB@ÓB?ÓB=ÔA:Ù@:Ù@:ÒB:ËE<ÀD<²B7¡<29.<0=0>/>.=-~<,=-=-9-9-~:/}9.}9.|8-{8/{8/}:1}:1{;2{;2{;2{;2z;4x<4t;2q;1r90o9/n8.l8-l6,k7,l8-j8-j8-j8-j8-i9-j8-j8-n91m80m80m80m80i7.f4+c1(d2)a1']-#_0&c4*\-#_0&sD<}PJVP~YQpTI^J?OC7?<-46(2;*0;+1<.2=/4<14<15;17:379479668357257227007/08-.9+0;-2?.6C27E48G48G49F54>33:2/4-,2(/0(13(57*6:)6>'DQ5YmJkZwfwflZ_KWxCWuCTr@Tr@VtBXvDYwEYwEZxF]{I_}K]{I]{I_}K^|JZwKPgJAW@3I2icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUneVneVneVneVmg[jkf£§¨¹¾ÁÐÕØåíïóûýõýÿûÿÿûÿÿüÿÿüþûýþùþýøÿþ÷ÿÿóøýæôýÞî÷ØæòÎÝéÃÎÚ´¶Á¡«efmLMQ6FH0HJ5KI:HD9D@7OGDj`_¤·¯¬ËÆÂÞÛÔêæÝúñèÿûñÿ÷íÿÝÕû¶±åÊcd°@?ÃPKÉTMÉPHÃF@ÈGBÔMJÖKHÐ@?Ò>>Ó??Õ?>ÕA?ÕA?ÓB?ÓB=ÓB=Ö>9Õ@:ÒC=ÌE?ÀE>²A9¢=5;2<1=0>/>.=/~<,=-=-9-9-~:/}9.}9.|8-{8/{8/~;2~;2|<3{;2{;2{;2z;4x<4r90o9/o9/m9.l8-k7,j6+h6+i7,i7,i7,h8,h8,h8,h8,h8,m;2l7/j5-i7.j8/j8/f4+a1'e5+a2(].$a2(b3)Y* a2(yNE\VvWRiNGWC:I<3@:.:;-8<.08)/:*3;.4</5=25;169069079468368349238139/19.19..9+/:,0=,2?.5B17E4;H6<I89C87?428.-3'.0%/1$24&48'4<'ER8]pPrd{nwifXU|ESsATr@Sq?Sq?Tr@UsAVtBVtBWuC[yG]{I\zH^|J_}K\zHWrIJ^E<M;.?-gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUneVneVofWofWng]qqo¤©¬·¿ÂÍÕØãíïòüþôþÿøÿÿúÿÿûÿüýÿúüýõúüñùùíöøêöÿèóÿäðýáîùÙéôÒÞèÅÊÒ¶¾£}bY]BGL5FK7FJ9CG9AC8c^X
}z«¡Á·µÌÂÁ×ÏÍæáÝñîéú÷ðüõëÿñæÿòéÿôìÿåß騤·hc¦LAµPDÁYNÇ[QÆQH¿D=ÂA<ËDAË@=Î@>Ð@?ÑA@ÒC?ÑC?ÑC?ÒC=Ó?;ÒA<ÐE@ÉE@½C>¯@9 >5=3<1<2=1=0=1~<.=/=/~:/~:/~:/}9.|90{8/{8/{8/|<3|<3|<3{;2z;4y:3y:3w;3n70m80l7/l7/k6.h6-h6-h6-i7.h8.h8.g8.g8.g8.g8.h8.k92h6/f4-g5.i70h70e4-b1*c2+b3+_0(]1(]1(V*!b6-{ULtYRaNHN?8A7.=6,;9-9;.9<139-3;.5;/6<06<07:/58-47.69049238139/39/2:/19.19,.9+.9+/:,0;-3>.6C2:E5<G7=E8:B55;/06(02%/1$13%15$2:%GS;buWwk|rqg\QJp=Oo>Qn>Qn>Qn>Qn>Qn>Sp@Sp@WtD[xH]zJ]zJ_|L_|LZwGRlECU?6D7(6)gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXpgXng]lnmz
«µ·ÄÎÐÜæèí÷ùôþÿõþýöÿüúÿúûÿùûþóøúíõöèñôãôýêôýèôüåóùßòöÛéìÍØ×¹ÅÄ¥±°regOMP;GK:FM=GOBKQG{{sž¸ØÎÌßÓÓçÛÛóëéü÷ôðïêüüôÿÿöÿýóÿùïÿóêÿçÞÿ×ËظeS£J:´TF½WIµF;·@8ÈKEÇC>ÊC?ÌB?ÎC@ÎC>ÎC>ÍD>ÍB=ÑB<ÒC?ÎDAÅD?¸A=ª=8;5<4;3<2=3=2=1~<0=1=/~:/~:/~:/}9.|90{8/{8/{8/|<3{;2{;2z:1y:3x92w81u91n70l7/l7/j8/i7.i7.h6-g7-g7-g7-f7-f7-f7-f7-f7-f7-h70h6/g5.g5.g6/h70g6/f5.a2*e6.^2)\0'`4+a5,i=4uSJXG@E>6<5/95,;8/8:/57,36+69.5;/7:/69.69.58-57,36+28,19,28.19,19.19,19,19,.9+.9+.9+/:,0;+3>.6A17B2<D5:C28?/5;-46)24'13%04%07%HT>ex\umtlf_RwKBh9Kk<Nk;Pm=Pm=Nk;Nk;Ol<Qn>VsCZwG]zJ^{K_|L_|LVsCNg@<J9/:2$.&gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXqhYoh^hikmtz
£¬±¿ÈÍÓÞâåðòðüüòüûõþùøÿ÷úÿöüÿòúýìøùçö÷çööê÷÷ëú÷èüöæýõâ÷ìÖçØÃÕƯÀ±}un[ZWFPQCSVK[bZeld²²¨ÕÎÆèÝÙóããúêëÿñôÿ÷ùÿþûþýùùúôøúïüüðÿÿóÿÿñÿûêÿæÑñª¼o[©VD®RCµPD»LA¿JAÂG?ÆE?ÉE@ÊE@ÊE>ÉD=ÈC<ÉB<ÑC?ÐE@ÌEAÂC=³=9¦;5;5<6<3=4
<5=4<3~<0=1=1~:/~:/~:/}9.|90{8/{8/{8/{;2{;2y:3x92w81v70v70s7/n70j8/j8/j8/j8/h8.h8.h8.g7-f7-f7-f7-d8-d8-d8-f7-g6/h70i81i81h70i81j;3l=5g80k<4b6-a5,oC:xLCtI@nMDC9056.45/8918;247.14+25,58-58-57,46+46+46+46)37)/7(.9)08+.9).9+.9)08)08)19*08)08+/7*08+19,3;.4<-9B1:C0;B0:A1:<.68*24&/3$29'IU?cu[mgfbWyTInE?d8Hg;Li;Nk=Nk=Li;Li;Mj<Ol>UrDYvH[xJ]zL^{M\yKQn@G_;6B4+4/#)%gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSjcSjbUlbVlbVmcWmdUmdUmdUleUmfVngWogZnh\oh^mjekormtz¥®³ÃÌÑÕßáæîñôüþôýú÷ýùùþ÷úÿôüÿòüÿñüÿîýþðûøïþúñÿùïÿúíÿùéÿòßïàËÝηÁ²¢|ubb_NXZL]cWmwn|}¦¬¢¾ÀµÚÕÏîäâüîîÿôôÿô÷þôõÿùùûúøûýøüÿúøÿõôüñ÷ýñÿÿñÿùèÿôãÿÌ»½pQD©SFµSH²C:ÀJ@ÄH@ÇG>ÉF>ÈE=ÇD<ÆC;ÆC;ÍG>ÌG>ÇG>¼C;>5:2:3>6=5=4=5=4<3;0;1;1~:/~:/~:1}90|90{8/{8/{8/z:1z:1x92w81v70u6/u6/q6.m80k90j8/j8/i9/i9/i9/h8.g7-f7-g7-f7-f7-f7-f7-f7-f5.j81m;4k:3j92j:0m>4oC8l@5oD;d<2c=2zVJdZyWMbLA>:13814927<54:0/5+25,9<336+25*24)03(13(25*46+47,.6),7)/7*-8*/7*/7*/7*/7*19,08+08-/7,/7,/7,08-08+7?09B1<E4=D4;A38<.26'-4$2;*JVBcr[h|a]vXOmKFfAAa:Hd;Kh<Nk?Nk?Kh<Jg9Li=Nk=TqEWtHZwK[xL]zNZvMNjAC[;2>4*00!''heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjdXldYlcZmeZmeXmfVg`NjeRnkXol]he\feasqr¡«³¶ÃÈËØÝàêîïö÷ùùûúüþýþþüÿÿúýþöúýòùüñúýòûþóùúòúúòùùíüúëþüçù÷ÞéåÊÕÔ¶º¹|qtY_dMbkXr}l´¹²ËÌÇãâÞòîë÷óòû÷öýùøüø÷ÿþüþþüþþüýÿúýÿúýÿúýÿúýÿúúü÷ÿÿúÿûöÿêåا £`XD=µNE¿MCÂF<ÄD9ÊE<ÎI@ÎKAËH@ÇG<ÆG8ÃH8½J8³H8¦E5B4B5C5B5B6@4>3<2:1919191~:1|91{80z7/z7/w7.v6-w7.w7.w8/w8/v7.u6-q5+n3+l7/i81i81h70h70g6/g6/g6/f5.g6/i70i81h70g6/e4-e3,h3-j5/m80k90j:0i;.i=0kA3gB2jI:dH:v_O~k\xjoRJ=79.4:04:039/39/39/28.28.17-17-36-06,25,/5+14+/5+/4-.5-/4-.5-/4-/4-/4-/4-05./4-/4-.3,.3,/4-/4-/6.1;23=26@58B79D67B45@03>-4?.DQ=WeN[kQPbHEX<@T8BW6Ic>Ke>Kf=Kf=Je<Je:Lg>Oj?UpGYtK\vO]wP]wRWqNHb?;O6&1+&+.$),heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVidQjhSmjWjk[gg_lll~¨¯µ¸ÂÄÑÖÙâçêòóõûüþÿþÿÿþÿþýûÿþúÿÿúþÿùûüôøûòöüò÷ýó÷úñøúïøúí÷úéùûåòõÚßâÃÌЯ´¸vkqUYaI_kUto§¿Á¼ÓÓÑççåóóñ÷÷õûûùüüúûûùþþüþþüþþüþþüþþüþþüþþüûÿþõÿÿõÿÿþÿÿÿûúÿíêð¿ºÂ~uKA¯M@¹K>ÂL@ÅK>ÃE9¼=4¾?6ÃE9ÄF7ÃJ7½L:³J7¦F6C2C6E7
C7B8A7>5<4:39193~92}:2z:1z:1y90x8/v7.v7.u6-v7.t8.t8.t8.r6,o5*m4+l7/i81j81h70i70h70g6/g6/e3,e3,g5.h6/j81j81j81k92k60l71k90k;1k;/j>1j@0iD2gH6kP=gRAufSue
srKL<69.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4..3-.3-.3-.3-/4./6/.80/:21=34@66B66B66B45B16C1CP>P]IR`IIW@AO6BP7EU:Jb@Jd?Ke@Ke>Ic<Hc:Id;Je<SnEXrK\vQ]wT[tTTmOC\>6I5&1-',0$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVmhUkiTmjWjk[kkcwww§¬²¿ÆÌÒÜÞìñô÷üÿþÿÿþÿÿÿþÿÿþÿþýûÿþúÿÿúýþøúûóõøïñ÷ëñ÷ëô÷ìõùëöøêõøåõ÷áîîÔÛÛ¿ÉÊ«°±yuy`kpZt{i§®µÍÏÊÞÞÜïïíøøöûûùþþüþþüýýûþþüþþüþþüþþüþþüþþüþþüýÿþûÿÿûÿÿÿÿÿÿûùÿúôÿ÷íýÑÆØL=¥RB©L;§@1·G;ÏYMÏUJ¼@4ÄD7ÆH:ÃK=¹I;ªB7?3@7E;@9A9A8?6~>5}=4<4}=4z;4x<4w;3w;3u:2t91t91t91r90r90r90r90o9/n8.l6,k5+l7/j81l71j81k60i70i70h6/g5.g5.f5.g6/h70i81k:3k:3l;4j;3i:0h<1k?2jC4iD2fE2fI7lVAjYGujVm{mEF658-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4./4./4..3--2,-2,.3-/4..5.+5-+6.-9//;12>24@46B47D38E3?L:ER>CQ:;I28F->L3DT9J_@Jb@LdBKc?Ia=G`9F_8G`9RkDXpL]uS^vVZqTPgK=T8.A.&1-',0%*.heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVniVljUlkWlm]pqi¡¦¹¾ÄÄËÑÛåçõúýûÿÿüýÿüýÿþüýüûùÿþüÿÿûÿþùûüôõöîîñæéïãçíßíñâðôåñôãñôßòñÜêêÐØؼÇÇ«²±¡¡}ª¢¶»´ÀÅ¿ÜÜÚééçööôûûùýýûÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüþþþûûýÿþÿÿþÿ÷òïüóìÿüóÿûíÿôäìñ¹pP@¢O?¸XJ·M?µE9ÀG<ÁA6ÈE;ÅI?½G=¯@9¡<4=6A<?;@<@:}@;z?9y@9x?8x?8v=4v=4v=4u<3s=3r<2r<2q;1o;0o;0o;0n:/k9.j8-j8-i7.m82n72m61l71l71k60i70i70l:3j92h70f7/f7/f7/h91f:1j?6f>4e=1f>2hC3iE5fG3cG2cJ6hV@i\IskV
ozpq_9=,47,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3-.3-.3--2,-2,-2,-2,.3--4-*4,)4,*6,+7-.:.1=14@25A36C2:G5<I78E12?+2@)8F/>N4DX<E]=K`AJb@K`?G_;H^:F^:SiEXpN`uV^uXZnSLcI9M4):(%.+%*.$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVlgTkiTnmYop`tum
¤§¬¿ÄÊÎÕÛæðòûÿÿûÿÿûüþýþÿÿþÿþýûÿÿýÿÿûþýø÷øðïðèçêßàæÚÞåÕçëÚêïÛíðÛìðÙîîÖèèÐÚØ¿Ìʱ½§·µ ±®¶´§Á¾µÉÈÃÒÓÎÙÙ×èèæòòðúúøüüúýýûÿÿýÿÿýüüúþþüþþüþþüþþüþþüþþüþþüÿþüÿüÿÿüÿÿûúüû÷ýÿùþÿøþÿôÿÿíÿþìøßËÅbPJ:¥L<´P@¼L>¿@7ÆC;ÅF?¿D=±>;¦:7:8>;=;?<@=}@=xA<tB;rC;rC;q?6s>6s>6r=5r=5r=5p>5o=4n>4m=3l<2k;1j;1i:0i:0j:0n72p62p62m61m61l71i70i70l;4k:3h91e90e90e90e:1d<2fB6cA5cC4dD5dG5dI6bI3_I2^L6eV?jbMrmWor[`L3:(28,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3--2,-2,,1+,1+,1+,1+-2,,3,,6.+5-*4+*4++5,.8-0;-2=/2=-5@/6A05A-1=)1=)5A-8F/=O5@T8FY=H\@J]?I^=K^>K`?TgG[pQcvZauZYkSJ]G6G4&4%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZlfVjgTkjUlnYorasvm
¤¨¸¿ÇÖßäí÷ùûÿÿûÿÿûüÿþÿÿÿþÿþýûÿÿûÿÿúüüôóõêëíâãçÙÝãÕÜãÑäéÓçìÕéíÖêìÔëëÓèæÏßÚÄÓθÓκÌƶËøÐÉÁ×ÒÎàÛØêæåðïíóòðùù÷ýýûýýûýýûÿÿýþþüüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿûüÿøùÿþýþÿýùÿýôÿøïÿõ÷ÿöð÷çÿÿíÿîÛͧ¤kX¢[GªWEL;¹D:ÀD<ÀE>¼E?´A>ª=:¢:9;9=<?=
?=}@;wB<rC;oD;oD;p?8q?6q?6q?6q?6p>5o?5o?5o@6n?5m>4k<2h<1h<1h<1l<2o83q62p62p62m61l71j81i81h70g80e90e:1d<2e?4f@5dB6^B4aG8cL:dM;cM8`K6]K3]M4]Q9bX?mhRss[nv{eFO:4=*39-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0*+0*+0*,1+,3,.5.,6.*4+*4+*4++5,-7,.9+-8*0;+4?/5@/4?.3?+3>-3@,7F/9K3@O8BT:GW<H[?M]BM`DUeJ\oSdtZ`rZXgRGXE4B1$2%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVliVlkVkmXkn]lrhy} ®·¾ÒÛàêóøûÿÿùþÿùúþþÿÿÿþÿúù÷ÿÿûþýøùùññóèéëÞãçØßæÖàèÓäéÒçíÓèìÓçéÑèèÐçåÎàÛÇ×оÚÓÃÙÑÆÞÔËæÝØîäãóéêúñôÿùûúù÷þþüÿÿýýýûýýûÿÿýÿÿýüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿùøÿúùÿþýüÿý÷ÿþîÿùñÿÿòÿýõÿúóùëÿýíÿúèôλ«wbQ:ª\H²N>¸J=¹I>¸I@´G@¯D>¥=::7=9>:?9A:xA:tD:pF:pE<p?8q?8q?8q?8q?8q?8p?8p?8qB:pA9n?7l=5i=4j>5j>5n=6o83r73p62p62n72l71j81i81d8/d90c;1d>3d@4cA5cA5_C5ZE4_N<gVBhWCcS<^O8[O5\R7]V<]Y>nlUtv^|kcmU2>(6B.3;.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1+,1++0**/)*/)+0*,1++2+-4-+5-*4,*4,+5,+5,,6+-7,,6+/:,2=/6A17B27B15@04?.2?-4C.:G3=L5AO8DT:JX?L\BTbI\kTcqZ^mXUbPDRA2>0#/%&/,&,,$**heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVolYmlWjlWgkZflbr{x¨±¸ÊÓØãìñøýÿ÷üÿúûÿþÿÿÿþÿúùõÿÿúýýõøøîðòåéëÝåéØãêØåíÖæìÒéíÒêíÒèèÎèæÏèãÏáÚÈØÐÃØÎÄÝÒÌêßÛøíëÿôöÿõùÿõûÿùüþüýÿÿýÿÿýþþüþþüÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüÿþúÿýûÿýûýüúùýüøÿÿõÿÿóÿÿíýúóÿûûÿúÿÿôÿöæÿóßÿãÍשoY¨WD®Q@¬O>¯OA±OBK@¤C<<5>7?6?8A7{B7uD6qE8qE8p?8q?8s>8q?8q?8q?8q?8p?8sB;qB:o@8m>6l=5j>5m>6o>7o83q73o83m82m82i81h91f:1f;2d>3d@4bB5`C5]A3\@2WB1TG4[S>f^Gi^HbX?ZS9ZS7\W:ZV;XW;kmUsw^u}fUaI&28D03;.4:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0**/)*/)+0*+0*,1++2+)3+*4,+5-+5,,6--7.-7,,6+.8-2<16A39D69D47B46A10;+2?-5B09F2<I5@N7FT=JX?R`I[hTanZ\iWQ^MBN@/;/",#+1-(.,&,,heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWkdZle[md]ne\mg[mgWqn[kmWknYkr`jrgpyvª°»ÄÉÐÙÞêïóöûþüýÿþÿÿÿþÿþýùÿÿúþþöúúðöøëôöèðôãêñßçïØðöÚíòÔëîÑììÒèæÑáÜÉÝÕÈÞÔÊáÔÎèÚÙòääúëîþòôÿ÷ûÿùÿÿüÿÿýþþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþÿúÿþúÿþúþþüýÿþûÿÿúÿÿúÿÿûÿÿþÿÿÿÿýÿûõÿûñÿüìÿûåÿóÛÿêѺi¦bKO9T?¨ZF£RAJ: M?<0=0>2=/x=/t?/sB3tD6r=5r=7t=8s>8u@:u@:t?9q?8sA:q@9q@9q@9p?8n?7o>7o>7k92m82l:3l;4l;4h<3g<3c=2c?3^>1dG9cG9T=-N9(M8'@1WQ;PN7KI0OK2]Y>ieJeaDVU7XX<]`CosZzfdlU=I1-9#2>*4</5;14:04:04:039/39/39/39/39/39/28.17-17-17-06,16016005/05//4./4./4./4.,1+,1+,1+,1+,1+,1++0*+0*.5.-4--4-,3,-4--4,.5-.5-+2*-4,07/5=29A6=E8?G<?J<7B25@/3>-1=)2>*9E/BN8IU?O[GVbN]hWYdTLWI<F;/9.)3*)/+(.*'-+heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWkdZle[md]ne\mg[khWonZjlVknYkr`jtiq|x£®´¾ÇÌÒÛàëðô÷üÿýþÿþÿÿÿþüþýùÿÿúþþôûûï÷ùëô÷æðõáêòÝèíÖêïÑæëËäçÊææÌãáÌßÙÉÞÔÊßÔÎçÙØíßßöçêûïóÿôøÿ÷ûÿúþÿüÿÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüûÿúûÿúýÿüýþÿþýÿÿüÿÿüÿÿûÿÿüÿÿüÿÿûùÿüõÿþñÿÿíÿûåÿòÙÿëÑ౧u\[CZBYCVCR@G5F6E4D3|C2wB0s@/o>/u@8s>8u>9u@:t?9o=6p>7sA:q?8p?8p?8n?7o>7m>6n=6m>6k<4l=5m>6k?6j?6gA6eA5bB5dG9[A2^G7^I8N=+F7$G8%>6!LL4GK2DG,DD*MM1\[?baC`aBYY=dgJsw^sy_X`I:D,/;%7C/6>16<26<26<25;15;15;15;15;15;15;14:04:039/39/39/27127127116016016005/05/.3-.3--2,-2,,1+,1++0*+0**1**1*)0))0))0)*1*+2*,3+.5--4,.5-07/4;39A6?F>BJ?;F8:E57B14?.3?+6B.<H2@L6LXDS_KYdTWbRLVK=G<1;2+5,+2+*0,)/+heVheVheVheVheVheVheVheVifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]ne\mg[khWmlXimVjoYktaiuiq}y¥²¸¿ÊÐÔÝâíòö÷üÿüýÿýÿþÿþüþýøÿÿ÷ýýóúûí÷úéô÷äïôÞçïØåëÑâçÉÞáÂÝÝÁÞÞÆÞÛÈÝ×ËàÕÏäÙ×îââóçëúîòÿôøÿ÷ûÿùüÿúýÿýýÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿüøÿüûÿþþþþÿüÿÿúÿÿùÿÿøÿÿùÿÿúÿÿúúÿýøÿÿöÿÿóýÿïÿúæÿôÜÿøàÿìÓ㿧¬jYB
Q;[F]IS?F2u>)r>)s@+tD0vE4q?4n<3q<4tB9sA8o?5qA7xH>n>4m>4m>4k?4l=3j>3l=3j>3g?5gA6gA6gC7eC7cC6`C5^D5bK;UB1ZI7`S@RG3C;&E=(FA+AE,BH.AE*<@%?B%NN2_`AijKaaEnqTvzagmSJO94<%4=(=F38>28>48>48>47=37=37=36<28>48>47=37=37=36<26<26<25:449349349338238238227105/05//4..3--2,,1++0*+0*).().().().().(*/)+0*,1+160/4.,1+,1+/4.6;4=B<AH@@K=>K:<I78E34A-2?+3A*5C,DQ=KXDQ^MQ^MHTH<H<2>4.8/-4--4-,3,gdUgdUheVheVheVheVifWifWifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]mf\mg[jiWkmXimVjoYjs`hthm|w¦³¹¿ÊÐÓÜãëðööûÿüýÿýÿþÿÿýÿþùþþöýýñúûí÷úçô÷âîóÜåíÕâèÎÛàÀ×Ú»ÖÖ¼Ù×ÂÝ×ÇÞ×ÍåÛÙìààøìðûðöÿõûÿùþÿúýÿûûÿûûÿýüÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿþøÿþûÿþþþþÿüþÿúÿÿùÿÿøþÿúýÿùüÿùùÿýúÿÿøÿÿøûÿõüþðÿÿíÿüéÿñßÿðÝÿïÚñÒ½´z{R>tJ4uH3vI4zM8}P;yL7nA.e7'{M@sD:qB8sD:oC8g;0d8-g=1i?3i?3i?3g?3f>2f>2f>2e?2b@4bB5`C5_C5_C5[D4ZE4WD3XI6OB/\T?oiSc^HMK4IG0IK3>D*?H-@F*<B&<A#FI,XY:deFmmQxx\tv^[_F@C.6;%8@+<C19?39?59?58>48>47=37=37=39?58>48>48>48>48>48>48>47<67<67<66;56;56;55:45:438238216005//4.-2,,1+,1++0*+0**/)*/)+0*,1+-2,-2,05/.3-+0*+0*-2.2718=9;B:@K=@M;@M;=J68E13@,1?(0>'<I5BO;HUCIVEDPB;G;2>4.:0,6..5.-4-gdUgdUgdUheVheVifWifWifWifWifWifWifWifWifWifWifWkeWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_drejyt
£²·½ÈÎÒÛâêïõôùýûüÿýÿþÿÿýÿÿúÿÿøÿÿóþÿñûþë÷úåðõÞæîÖâèÌÙÜ¿ÕÕ¹ÒйÔѾÚÔÈàÙÑêàßôéíþóùÿ÷üÿûÿÿýÿÿþÿÿþüÿþúÿþúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿþúÿÿúÿÿûÿÿþþþÿýþÿüüÿûüÿûúÿúøÿù÷ÿú÷ÿýøÿÿûÿÿûýÿúýþùùôîÿþöÿýôÿüóÿûîÿ÷çûæÕéÒÀÏ´¡¶
uawVCjI6lI6rM;uP>mF7iB3gB2jE5nI9nJ:oK;oK;eA1cB1cB1cB1cB1cB1bC1`C3]F6\G6\G6ZG6ZG6WH5TG4RG3PH3NH2fdM~~frrZVX@JL4GM3<E*<F+?H+AG+AF(DG*MN/TU6xw[{z^nnVUU=CB.?A,>A.:>-;>39?59?58>48>47=37=37=38>48>48>48>48>48>48>48>49>89>89>88=78=78=77<67<66;55:449338227105//4./4.-2.-2.,1-+0,+0,,1--2.-2.,1-,1-,1-,1-.210513764;4;G9=L9@O<@O:<K67F/4C,2A*6E.:I4@O<BP??M>8F71?2-9-,6--4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_bpcgxr£²·ÀËÑÔÝäëðöõúþûüÿýÿþÿÿýÿÿúÿÿøÿÿôÿÿóÿÿïúýèò÷àçðÕâèÌ×Ú½ÑѵÍË´Î˺ÖÏÅÞ×Ñìâã÷îóÿöþÿúÿÿýÿÿþÿÿÿýþÿúþÿùþÿúþÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþýþÿýþÿýþÿýÿþýÿüþÿúþÿùÿÿ÷ýýóýýõþýøþýùÿþüþþþÿýÿÿþÿþùÿÿüÿÿûüûöóÿøòÿýôÿþñÿýíÿúéÿòà÷äÓçÒ¿Ò»©¹srb|]K}^LtUCaD2W:(Y<*[>,X=*`E2`E2`E2_F2`G3`G3`G3]H3\K7\M:\M:YL9XM9UM8RL6QL6NL5QQ9ikS|gmqXSY?FL2>G,<F+<F+?H+DJ.EJ,DG*HI*LM.yx\tsWfdMTR;LI6KJ6FE3<=-<?49?59?59?58>48>48>48>47=37=38>48>48>48>49?59?5:?9:?9:?9:?99>89>89>88=78=78=77<66;55:4493382382/40.3/-2.,1-+0,+0,+0,+0,+0,,1--10.21/32/32/32-4-3?17F3=L7@O:?N7<K49H18G05D-8G0<K6>M:<J97E61?2-9-+5,-4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWjlWhmVhrZfs_cqdhys
¥·»ÇÒØÚãêðõûøýÿüýÿýÿþÿÿýÿþùÿÿõÿÿòÿÿðüÿìøûæïôÝâëÐÝãÇÕÕ¹Î̳ÉÄ°ÊÄ´ÐÉ¿ÚÒÏéàãöíòÿ÷ÿÿúÿÿýÿÿþÿÿÿýýÿúüÿøüÿøýÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþÿüÿÿüÿþýÿýÿþúÿúøÿùøÿõøÿóøÿóøÿõüÿøýÿúÿýþÿüÿÿüÿÿûÿý÷ÿÿúÿÿüÿÿýÿÿþÿþýûûûóúøìÿÿñÿÿïÿÿíÿþíÿýíÿöçÿîàýêÛúãÑÿæÐãÊ´¥xt^GeO8bL5\H0^J2\J2\J2]K3]K3^L4^L4\M6YN8WO:WO:VP:UO9SN8PN7NN6MO7PT;`fLfoTU^CEO4AK0<F+?I.?I.CL/HN2HM/FI,OP1YX:qmRjfKa\F[V@YTATQ>MJ9BC3=@5;A7;A7;A7:@6:@6:@69?58>48>48>49?59?5:@6:@6:@6;@:;@:;@::?9:?99>89>89>8:?9:?99>89>88=78=77<67<6495273162/40-2.,1-+/.+/.,0/,0/-10.21.23.23-12+1-+9*/@-6H2;M7=O7<N4:L2:L25G/7I1:L6<M::K96G70@3-;.,6--4,,3+cdRcdRdeSefTgeVhfWigXigXhfWifWifWifWifWifWifWkeWkeWkeWldYle[md]mf\kg[jiWikVhmWhrZgt`dqgj{uª¼ÀÍØÞàçíôùÿúÿÿûÿÿýÿüþÿúþþöúúîúûíúûéøúåóöáêî×ßãÊÙÜÁÓѸÌDZž¬Æ¾±ÌüÖÎËæÝàôêòþ÷ÿÿúÿÿþÿÿÿÿþþþýÿúüÿúüÿúýÿüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüÿþüÿþüÿþüÿýþÿüÿÿüÿÿýÿýÿþûÿüøÿù÷ÿ÷÷ÿõøÿöùÿöüÿøÿÿûÿþýÿüÿÿûÿÿúÿÿúÿÿûÿÿüÿÿþÿþýÿûýüüþûþÿúùúòúüñýûïþúîÿùìÿûìÿýïÿýìÿðÛÿûâìÜÃu`P7RB)XH/XH.[M3[M3ZN4ZN4[O5[O5\P6[Q8UO7TO9TO9QO8PN7NN6KM5IM4JN5LR8S\APY<@I,;F(AL.?J,DM0EN1JQ2MR4JM0LL0YY=kjNhdIb^E^ZA_ZD`[GZUAQO:KJ8AB4@B5@B5>A6>A6>A6=@7=@79?59?59?5:@6:@6:B7:B7:B7;@9;@9;@::?8:?99>79>89>7;@:;@9;@:;@9:?9:?8:?9:?98?87=94;4382160/4..3/.3/.21.21,2.,2.+2++2*,4))6%$6)=!2F+8L1;O6;M5;M5;M58J29K3;M5<N6<N87H51B0.<--7,.5--4,]eN^fO_gP`hQdiUfiVgjWijXfgUhgUheVheVjdVkeWkeYlfXlfXkhYmg[kg\mf^jf[ieYgeVghVfkUenYbo]dqhs¨¬¹ÈÏÒÛââéïò÷û÷üÿùýüüþùüÿöüþñ÷øêùúêø÷åòñÝîíÙëêÖàßÊ×Ò¾×ϼËÀ®½´¥½³©Â·±ÌÂÁÛÒ×êàèúóûüöÿþûÿÿþÿþýÿüýÿüþýüþýþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüþýùþýùÿüùÿýúÿþûÿþûÿþÿÿýþÿüýÿýþÿÿÿþÿýýÿüûýøÿÿûüý÷ÿýøÿþúÿýøÿúöÿ÷ôÿùùÿúÿÿüÿÿýÿÿÿÿÿÿÿýÿüýÿþüþýþÿÿÿÿÿÿþüÿþùÿþóÿþîÿýêÿýæúôÜÿúàçàÆlUN2WN1TK.SJ+WN1WN1UN1UN1TO2TO2TN4SO4QM2RN5QO6PP6MO7KO6HM6GL5JP6FO4AJ-=F'>H&DK*FM+EL*PV4PT3KN/HK,TT8bbFccIZZ@[Y@\ZA][B][B[Y@XV=US:SQ8HF1GD1DA0A?0@>1>>2??5>@5;>59?59?59A69A48C58C58C5:B79A69@88@58?79A69@8:B7:A9:B79@8:B7;B:<D9=D<>E=8B:8B:7A88@56>14</39/271.40/51-7/-9-.;)0@&6G'7M';V+:W+;U0;T4;R8=P:>O<>P::L6@R8EW=FY=DX=@T;5H2+<),6+,3++2*ZgM[hN\hP]iQbjSckTglXhkXghVghVifWifWkeWlfXmeZmgYmgYkhYkg[kg\jf]jf[hfZefVhiWglVfo\erajwnz«²ºÈÑÐÙàáéìò÷ûøþþùþúúÿøûþóùýïøùë÷øæõôâíìØéæÓåâÏÜ×ÄÒ˹ʿÁ´¤¹¡¼¯¦Á¶²ËÁÀÛÐÖæßæûóþý÷ÿþûÿÿþÿþýÿüýÿüýÿüýÿþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿüùÿüùÿýúÿýùÿþúÿþýÿýüÿüýÿýþÿþÿÿþÿÿýþýûüÿþýÿþûÿüúÿøóøíçòåÝöèßûðêÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿýÿÿþüÿþõÿÿîÿþèÿÿäúöÝýûâäàÇlRM0SN0QK+QK+UO/UO/TO1TO1SO2SO2QP4QP4QM2PO3PN5NQ6MO7JP6HM6EM5HQ6EN1BK.?I'BI(FM+JP,KQ-NR/PT1VZ7^bA_bCY\?TW<UU=VV>WU>XV=YW>XV=XW;WV:XT9QK3OI3LG4ID1DA2B@3A?3>@5<=59?59?59A67B48C57D37D3:B79A69A68@58@59A69A6:B7:B7:B7:B7:B7;C8<D9=E:<F;=G?<H><F;;F6<D5:B39?38=67>74>63=40>-3C)9M*BY/Ga1Op;Ln;Li=Fa>BY?<R=;L::K8=O9DV<K^BM`BL`DH\@:Q71D.+5*+2*)0(ZgM[hN\hP^jRbjSdlUglXilYijXijXkhYkhYlfXmgYnf[nhZmgYkhYkg[jf[jf]ieZhfZfgWhiWejTdmZgtco|s¬³¶ÄÍÍÖÝÞæéñöúøþþúþýùþøøûòôøêóôæðñßêé×áàÌÜÙÆ×ÔÁÐ˸ÇÀ®¿³£½° ¼°¤Ã¶®ËÀ¼ÕËÊãØÞëäëüôÿý÷ÿþûÿÿþÿþýÿüýÿüýÿýÿþþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿýúÿüùÿüùÿüøÿüøÿýüÿüûÿûüÿüýÿþÿÿþÿÿýþþüýÿþýÿþûÿýûüóîêßÙâÕÍëÝÔ÷ìæÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿþÿÿÿýÿþõÿþíÿýçÿþãû÷ÞþüããßÆ
jPK.QL.QK+QK+TN.UO/TO1UP2TP3SO2QP4PO3QM2ON2PN5MP5MO7JP6IN7FN6HQ6FO2CL/CM+FM,JQ/OU1SY5QY2W_8jpJy[qvVY^@KO4MP5QQ9QQ9RP9SQ8TR9UT8YU:ZV;XR:VP:RM:NI6HE6DB5CA5?A6<=59?5:@69A67B47B47D37D3:B7:B79A69A69A69A6:B7:B7:B7:B7:B7:B7;C8<D9>F;<F;?IA>J@?I>>I9?G8>F7>D8=B;>E>9C;6@74B19I/BV3Pg=XrB^J[}JXuIMhECZ@9O:6G54E2<N8EW=NaESfHSgKNbF@W=6I3/9./6.-4,ZgM[hN\hP^jRblTemVhmYinZklZklZlj[liZnhZnhZog\oi[liZkhYjfZjf[ie\ieZhfZfgWfgUbgQajWerao|s~¥¬«¹ÂÇÐ×Úáçîó÷öüüøüûõúôóöíîòäéêÜãäÒÜÛÉÓÒ¾Î˸ÉƳþ«½¶¤Ã·§Ç¹¬ÍÁµÖÉÁßÔÐéßÞóèîøñøýõÿþøÿÿüÿþýÿýüÿüýÿüþýýÿþþþþþþþþþþþþþþþþþþþÿþüÿþüþýûÿþüÿýúÿýúÿýúÿüùÿû÷ÿû÷ÿýüÿüûþúûÿûüÿýþÿþÿÿýþþüýÿüûÿþûÿýûýôïíâÜæÙÑðâÙüñëÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿýþÿýþÿÿþÿÿÿýÿþõÿþíÿüæÿüáþùãÿþçäßÉmPJ0RM0SL/SM-TN.UO/UP2UP2TP3SO2PO3ON2PL1NM1OM4LO4LN6JP6JO8HP8JS8GP3GP3IS1MT3OV4V\8\d=grHtUis
lnuTZaBRV;LN6NN6MM5NL5OM6RP7WS:YU<ZT>XR<TO<QL9KH9GE8EC7@B7=>6:@6:@69A67B47B46C26C2;C8:B79A69A69A69A6:B7;C8;C8:B7:B7;C8;C8=E:>F;=G<=G?<H>>H=>I9?G8>F7>D8=B;=D=9C;6@74B19I/DX5Ri?[uEZ{FWyFTqEIdA=T:2H3/@.->+6H2@R8L_CReGSgKOcG@W=6I30:/07/-4,YgMZhN\hP^jRblTemVinZjo[mn\lm[mk\mj[nhZnhZoi]oi[liZkhYjfZieZie\ieZig[ghXghVchRajWerao|s{¦¢°¹ÁËÔÔÝäéñôòúüôúøñöðíðçèìÞâãÕÚÛÉÒÑ¿ÌɶÉıþ«¿¸¦¼³¢Ê¾®ÓŸÜÐÄæÙÑíâàöìíÿôúÿùÿÿ÷ÿÿúÿÿüÿþýÿýüÿûüþüþýþÿÿþþþþþþþþþþþþþþþþþþÿþüÿþüþýûþýûÿýúÿýúÿýúÿûøÿúöþùõÿýüÿûúýùúþúûþüýÿýþÿþÿÿýþÿüûÿýúÿüúÿøó÷ìæòåÝøêáÿôîÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿüýÿýþÿÿþÿÿÿýÿþõÿýìÿûãþúßÿüæÿÿéçâÌoRL2TO2TM0UN1TN.UO/VQ3VQ3UQ4SO2ON2NM1PL1NM1NL3KN3LN6KQ7KP9JR:LU:IR5JS6OY7SZ9T[9]c?fnGc¦s±ª¡zpr{\\bFLP7KM5LK6KI4LJ5PK5TN8VP:WQ;VP:SN;QL9LI:IG:GE9CE:=>6:@6:@69A67B47B46C26C2;C8;C8:B79A69A6:B7;C8;C8;C8;C8;C8;C8<D9=E:>F;=G<=G?<H>=G<=H8>F7=E6=C7=B;:A:7A95?64B19I/BV3Ne;Uo?Tu@RtAPmAE`=9P6-C.+<*+<)1C-<N4H[?PcERfJNbF@W=5H2,6++2*'.&
\ No newline at end of file
diff --git a/testimgp.jpg b/testimgp.jpg
deleted file mode 100644
index 8cbb658..0000000
--- a/testimgp.jpg
+++ /dev/null
Binary files differ
diff --git a/testorig.jpg b/testorig.jpg
deleted file mode 100644
index 9816a0c..0000000
--- a/testorig.jpg
+++ /dev/null
Binary files differ
diff --git a/testprog.jpg b/testprog.jpg
deleted file mode 100644
index 920fee2..0000000
--- a/testprog.jpg
+++ /dev/null
Binary files differ
diff --git a/transupp.c b/transupp.c
deleted file mode 100644
index e5ec564..0000000
--- a/transupp.c
+++ /dev/null
@@ -1,928 +0,0 @@
-/*
- * transupp.c
- *
- * Copyright (C) 1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains image transformation routines and other utility code
- * used by the jpegtran sample application. These are NOT part of the core
- * JPEG library. But we keep these routines separate from jpegtran.c to
- * ease the task of maintaining jpegtran-like programs that have other user
- * interfaces.
- */
-
-/* Although this file really shouldn't have access to the library internals,
- * it's helpful to let it call jround_up() and jcopy_block_row().
- */
-#define JPEG_INTERNALS
-
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "transupp.h" /* My own external interface */
-
-
-#if TRANSFORMS_SUPPORTED
-
-/*
- * Lossless image transformation routines. These routines work on DCT
- * coefficient arrays and thus do not require any lossy decompression
- * or recompression of the image.
- * Thanks to Guido Vollbeding for the initial design and code of this feature.
- *
- * Horizontal flipping is done in-place, using a single top-to-bottom
- * pass through the virtual source array. It will thus be much the
- * fastest option for images larger than main memory.
- *
- * The other routines require a set of destination virtual arrays, so they
- * need twice as much memory as jpegtran normally does. The destination
- * arrays are always written in normal scan order (top to bottom) because
- * the virtual array manager expects this. The source arrays will be scanned
- * in the corresponding order, which means multiple passes through the source
- * arrays for most of the transforms. That could result in much thrashing
- * if the image is larger than main memory.
- *
- * Some notes about the operating environment of the individual transform
- * routines:
- * 1. Both the source and destination virtual arrays are allocated from the
- * source JPEG object, and therefore should be manipulated by calling the
- * source's memory manager.
- * 2. The destination's component count should be used. It may be smaller
- * than the source's when forcing to grayscale.
- * 3. Likewise the destination's sampling factors should be used. When
- * forcing to grayscale the destination's sampling factors will be all 1,
- * and we may as well take that as the effective iMCU size.
- * 4. When "trim" is in effect, the destination's dimensions will be the
- * trimmed values but the source's will be untrimmed.
- * 5. All the routines assume that the source and destination buffers are
- * padded out to a full iMCU boundary. This is true, although for the
- * source buffer it is an undocumented property of jdcoefct.c.
- * Notes 2,3,4 boil down to this: generally we should use the destination's
- * dimensions and ignore the source's.
- */
-
-
-LOCAL(void)
-do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays)
-/* Horizontal flip; done in-place, so no separate dest array is required */
-{
- JDIMENSION MCU_cols, comp_width, blk_x, blk_y;
- int ci, k, offset_y;
- JBLOCKARRAY buffer;
- JCOEFPTR ptr1, ptr2;
- JCOEF temp1, temp2;
- jpeg_component_info *compptr;
-
- /* Horizontal mirroring of DCT blocks is accomplished by swapping
- * pairs of blocks in-place. Within a DCT block, we perform horizontal
- * mirroring by changing the signs of odd-numbered columns.
- * Partial iMCUs at the right edge are left untouched.
- */
- MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
-
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- compptr = dstinfo->comp_info + ci;
- comp_width = MCU_cols * compptr->h_samp_factor;
- for (blk_y = 0; blk_y < compptr->height_in_blocks;
- blk_y += compptr->v_samp_factor) {
- buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y,
- (JDIMENSION) compptr->v_samp_factor, TRUE);
- for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
- for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) {
- ptr1 = buffer[offset_y][blk_x];
- ptr2 = buffer[offset_y][comp_width - blk_x - 1];
- /* this unrolled loop doesn't need to know which row it's on... */
- for (k = 0; k < DCTSIZE2; k += 2) {
- temp1 = *ptr1; /* swap even column */
- temp2 = *ptr2;
- *ptr1++ = temp2;
- *ptr2++ = temp1;
- temp1 = *ptr1; /* swap odd column with sign change */
- temp2 = *ptr2;
- *ptr1++ = -temp2;
- *ptr2++ = -temp1;
- }
- }
- }
- }
- }
-}
-
-
-LOCAL(void)
-do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jvirt_barray_ptr *dst_coef_arrays)
-/* Vertical flip */
-{
- JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
- int ci, i, j, offset_y;
- JBLOCKARRAY src_buffer, dst_buffer;
- JBLOCKROW src_row_ptr, dst_row_ptr;
- JCOEFPTR src_ptr, dst_ptr;
- jpeg_component_info *compptr;
-
- /* We output into a separate array because we can't touch different
- * rows of the source virtual array simultaneously. Otherwise, this
- * is a pretty straightforward analog of horizontal flip.
- * Within a DCT block, vertical mirroring is done by changing the signs
- * of odd-numbered rows.
- * Partial iMCUs at the bottom edge are copied verbatim.
- */
- MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
-
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- compptr = dstinfo->comp_info + ci;
- comp_height = MCU_rows * compptr->v_samp_factor;
- for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
- dst_blk_y += compptr->v_samp_factor) {
- dst_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
- (JDIMENSION) compptr->v_samp_factor, TRUE);
- if (dst_blk_y < comp_height) {
- /* Row is within the mirrorable area. */
- src_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci],
- comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor,
- (JDIMENSION) compptr->v_samp_factor, FALSE);
- } else {
- /* Bottom-edge blocks will be copied verbatim. */
- src_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y,
- (JDIMENSION) compptr->v_samp_factor, FALSE);
- }
- for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
- if (dst_blk_y < comp_height) {
- /* Row is within the mirrorable area. */
- dst_row_ptr = dst_buffer[offset_y];
- src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1];
- for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
- dst_blk_x++) {
- dst_ptr = dst_row_ptr[dst_blk_x];
- src_ptr = src_row_ptr[dst_blk_x];
- for (i = 0; i < DCTSIZE; i += 2) {
- /* copy even row */
- for (j = 0; j < DCTSIZE; j++)
- *dst_ptr++ = *src_ptr++;
- /* copy odd row with sign change */
- for (j = 0; j < DCTSIZE; j++)
- *dst_ptr++ = - *src_ptr++;
- }
- }
- } else {
- /* Just copy row verbatim. */
- jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y],
- compptr->width_in_blocks);
- }
- }
- }
- }
-}
-
-
-LOCAL(void)
-do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jvirt_barray_ptr *dst_coef_arrays)
-/* Transpose source into destination */
-{
- JDIMENSION dst_blk_x, dst_blk_y;
- int ci, i, j, offset_x, offset_y;
- JBLOCKARRAY src_buffer, dst_buffer;
- JCOEFPTR src_ptr, dst_ptr;
- jpeg_component_info *compptr;
-
- /* Transposing pixels within a block just requires transposing the
- * DCT coefficients.
- * Partial iMCUs at the edges require no special treatment; we simply
- * process all the available DCT blocks for every component.
- */
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- compptr = dstinfo->comp_info + ci;
- for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
- dst_blk_y += compptr->v_samp_factor) {
- dst_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
- (JDIMENSION) compptr->v_samp_factor, TRUE);
- for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
- for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
- dst_blk_x += compptr->h_samp_factor) {
- src_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
- (JDIMENSION) compptr->h_samp_factor, FALSE);
- for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
- src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
- dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
- for (i = 0; i < DCTSIZE; i++)
- for (j = 0; j < DCTSIZE; j++)
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- }
- }
- }
- }
- }
-}
-
-
-LOCAL(void)
-do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jvirt_barray_ptr *dst_coef_arrays)
-/* 90 degree rotation is equivalent to
- * 1. Transposing the image;
- * 2. Horizontal mirroring.
- * These two steps are merged into a single processing routine.
- */
-{
- JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y;
- int ci, i, j, offset_x, offset_y;
- JBLOCKARRAY src_buffer, dst_buffer;
- JCOEFPTR src_ptr, dst_ptr;
- jpeg_component_info *compptr;
-
- /* Because of the horizontal mirror step, we can't process partial iMCUs
- * at the (output) right edge properly. They just get transposed and
- * not mirrored.
- */
- MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
-
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- compptr = dstinfo->comp_info + ci;
- comp_width = MCU_cols * compptr->h_samp_factor;
- for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
- dst_blk_y += compptr->v_samp_factor) {
- dst_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
- (JDIMENSION) compptr->v_samp_factor, TRUE);
- for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
- for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
- dst_blk_x += compptr->h_samp_factor) {
- src_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
- (JDIMENSION) compptr->h_samp_factor, FALSE);
- for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
- src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
- if (dst_blk_x < comp_width) {
- /* Block is within the mirrorable area. */
- dst_ptr = dst_buffer[offset_y]
- [comp_width - dst_blk_x - offset_x - 1];
- for (i = 0; i < DCTSIZE; i++) {
- for (j = 0; j < DCTSIZE; j++)
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- i++;
- for (j = 0; j < DCTSIZE; j++)
- dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
- }
- } else {
- /* Edge blocks are transposed but not mirrored. */
- dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
- for (i = 0; i < DCTSIZE; i++)
- for (j = 0; j < DCTSIZE; j++)
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- }
- }
- }
- }
- }
- }
-}
-
-
-LOCAL(void)
-do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jvirt_barray_ptr *dst_coef_arrays)
-/* 270 degree rotation is equivalent to
- * 1. Horizontal mirroring;
- * 2. Transposing the image.
- * These two steps are merged into a single processing routine.
- */
-{
- JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
- int ci, i, j, offset_x, offset_y;
- JBLOCKARRAY src_buffer, dst_buffer;
- JCOEFPTR src_ptr, dst_ptr;
- jpeg_component_info *compptr;
-
- /* Because of the horizontal mirror step, we can't process partial iMCUs
- * at the (output) bottom edge properly. They just get transposed and
- * not mirrored.
- */
- MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
-
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- compptr = dstinfo->comp_info + ci;
- comp_height = MCU_rows * compptr->v_samp_factor;
- for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
- dst_blk_y += compptr->v_samp_factor) {
- dst_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
- (JDIMENSION) compptr->v_samp_factor, TRUE);
- for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
- for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
- dst_blk_x += compptr->h_samp_factor) {
- src_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
- (JDIMENSION) compptr->h_samp_factor, FALSE);
- for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
- dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
- if (dst_blk_y < comp_height) {
- /* Block is within the mirrorable area. */
- src_ptr = src_buffer[offset_x]
- [comp_height - dst_blk_y - offset_y - 1];
- for (i = 0; i < DCTSIZE; i++) {
- for (j = 0; j < DCTSIZE; j++) {
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- j++;
- dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
- }
- }
- } else {
- /* Edge blocks are transposed but not mirrored. */
- src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
- for (i = 0; i < DCTSIZE; i++)
- for (j = 0; j < DCTSIZE; j++)
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- }
- }
- }
- }
- }
- }
-}
-
-
-LOCAL(void)
-do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jvirt_barray_ptr *dst_coef_arrays)
-/* 180 degree rotation is equivalent to
- * 1. Vertical mirroring;
- * 2. Horizontal mirroring.
- * These two steps are merged into a single processing routine.
- */
-{
- JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y;
- int ci, i, j, offset_y;
- JBLOCKARRAY src_buffer, dst_buffer;
- JBLOCKROW src_row_ptr, dst_row_ptr;
- JCOEFPTR src_ptr, dst_ptr;
- jpeg_component_info *compptr;
-
- MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
- MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
-
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- compptr = dstinfo->comp_info + ci;
- comp_width = MCU_cols * compptr->h_samp_factor;
- comp_height = MCU_rows * compptr->v_samp_factor;
- for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
- dst_blk_y += compptr->v_samp_factor) {
- dst_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
- (JDIMENSION) compptr->v_samp_factor, TRUE);
- if (dst_blk_y < comp_height) {
- /* Row is within the vertically mirrorable area. */
- src_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci],
- comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor,
- (JDIMENSION) compptr->v_samp_factor, FALSE);
- } else {
- /* Bottom-edge rows are only mirrored horizontally. */
- src_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y,
- (JDIMENSION) compptr->v_samp_factor, FALSE);
- }
- for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
- if (dst_blk_y < comp_height) {
- /* Row is within the mirrorable area. */
- dst_row_ptr = dst_buffer[offset_y];
- src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1];
- /* Process the blocks that can be mirrored both ways. */
- for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) {
- dst_ptr = dst_row_ptr[dst_blk_x];
- src_ptr = src_row_ptr[comp_width - dst_blk_x - 1];
- for (i = 0; i < DCTSIZE; i += 2) {
- /* For even row, negate every odd column. */
- for (j = 0; j < DCTSIZE; j += 2) {
- *dst_ptr++ = *src_ptr++;
- *dst_ptr++ = - *src_ptr++;
- }
- /* For odd row, negate every even column. */
- for (j = 0; j < DCTSIZE; j += 2) {
- *dst_ptr++ = - *src_ptr++;
- *dst_ptr++ = *src_ptr++;
- }
- }
- }
- /* Any remaining right-edge blocks are only mirrored vertically. */
- for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
- dst_ptr = dst_row_ptr[dst_blk_x];
- src_ptr = src_row_ptr[dst_blk_x];
- for (i = 0; i < DCTSIZE; i += 2) {
- for (j = 0; j < DCTSIZE; j++)
- *dst_ptr++ = *src_ptr++;
- for (j = 0; j < DCTSIZE; j++)
- *dst_ptr++ = - *src_ptr++;
- }
- }
- } else {
- /* Remaining rows are just mirrored horizontally. */
- dst_row_ptr = dst_buffer[offset_y];
- src_row_ptr = src_buffer[offset_y];
- /* Process the blocks that can be mirrored. */
- for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) {
- dst_ptr = dst_row_ptr[dst_blk_x];
- src_ptr = src_row_ptr[comp_width - dst_blk_x - 1];
- for (i = 0; i < DCTSIZE2; i += 2) {
- *dst_ptr++ = *src_ptr++;
- *dst_ptr++ = - *src_ptr++;
- }
- }
- /* Any remaining right-edge blocks are only copied. */
- for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) {
- dst_ptr = dst_row_ptr[dst_blk_x];
- src_ptr = src_row_ptr[dst_blk_x];
- for (i = 0; i < DCTSIZE2; i++)
- *dst_ptr++ = *src_ptr++;
- }
- }
- }
- }
- }
-}
-
-
-LOCAL(void)
-do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jvirt_barray_ptr *dst_coef_arrays)
-/* Transverse transpose is equivalent to
- * 1. 180 degree rotation;
- * 2. Transposition;
- * or
- * 1. Horizontal mirroring;
- * 2. Transposition;
- * 3. Horizontal mirroring.
- * These steps are merged into a single processing routine.
- */
-{
- JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y;
- int ci, i, j, offset_x, offset_y;
- JBLOCKARRAY src_buffer, dst_buffer;
- JCOEFPTR src_ptr, dst_ptr;
- jpeg_component_info *compptr;
-
- MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE);
- MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE);
-
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- compptr = dstinfo->comp_info + ci;
- comp_width = MCU_cols * compptr->h_samp_factor;
- comp_height = MCU_rows * compptr->v_samp_factor;
- for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks;
- dst_blk_y += compptr->v_samp_factor) {
- dst_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y,
- (JDIMENSION) compptr->v_samp_factor, TRUE);
- for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) {
- for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks;
- dst_blk_x += compptr->h_samp_factor) {
- src_buffer = (*srcinfo->mem->access_virt_barray)
- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x,
- (JDIMENSION) compptr->h_samp_factor, FALSE);
- for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) {
- if (dst_blk_y < comp_height) {
- src_ptr = src_buffer[offset_x]
- [comp_height - dst_blk_y - offset_y - 1];
- if (dst_blk_x < comp_width) {
- /* Block is within the mirrorable area. */
- dst_ptr = dst_buffer[offset_y]
- [comp_width - dst_blk_x - offset_x - 1];
- for (i = 0; i < DCTSIZE; i++) {
- for (j = 0; j < DCTSIZE; j++) {
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- j++;
- dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
- }
- i++;
- for (j = 0; j < DCTSIZE; j++) {
- dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
- j++;
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- }
- }
- } else {
- /* Right-edge blocks are mirrored in y only */
- dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
- for (i = 0; i < DCTSIZE; i++) {
- for (j = 0; j < DCTSIZE; j++) {
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- j++;
- dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
- }
- }
- }
- } else {
- src_ptr = src_buffer[offset_x][dst_blk_y + offset_y];
- if (dst_blk_x < comp_width) {
- /* Bottom-edge blocks are mirrored in x only */
- dst_ptr = dst_buffer[offset_y]
- [comp_width - dst_blk_x - offset_x - 1];
- for (i = 0; i < DCTSIZE; i++) {
- for (j = 0; j < DCTSIZE; j++)
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- i++;
- for (j = 0; j < DCTSIZE; j++)
- dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j];
- }
- } else {
- /* At lower right corner, just transpose, no mirroring */
- dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x];
- for (i = 0; i < DCTSIZE; i++)
- for (j = 0; j < DCTSIZE; j++)
- dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j];
- }
- }
- }
- }
- }
- }
- }
-}
-
-
-/* Request any required workspace.
- *
- * We allocate the workspace virtual arrays from the source decompression
- * object, so that all the arrays (both the original data and the workspace)
- * will be taken into account while making memory management decisions.
- * Hence, this routine must be called after jpeg_read_header (which reads
- * the image dimensions) and before jpeg_read_coefficients (which realizes
- * the source's virtual arrays).
- */
-
-GLOBAL(void)
-jtransform_request_workspace (j_decompress_ptr srcinfo,
- jpeg_transform_info *info)
-{
- jvirt_barray_ptr *coef_arrays = NULL;
- jpeg_component_info *compptr;
- int ci;
-
- if (info->force_grayscale &&
- srcinfo->jpeg_color_space == JCS_YCbCr &&
- srcinfo->num_components == 3) {
- /* We'll only process the first component */
- info->num_components = 1;
- } else {
- /* Process all the components */
- info->num_components = srcinfo->num_components;
- }
-
- switch (info->transform) {
- case JXFORM_NONE:
- case JXFORM_FLIP_H:
- /* Don't need a workspace array */
- break;
- case JXFORM_FLIP_V:
- case JXFORM_ROT_180:
- /* Need workspace arrays having same dimensions as source image.
- * Note that we allocate arrays padded out to the next iMCU boundary,
- * so that transform routines need not worry about missing edge blocks.
- */
- coef_arrays = (jvirt_barray_ptr *)
- (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE,
- SIZEOF(jvirt_barray_ptr) * info->num_components);
- for (ci = 0; ci < info->num_components; ci++) {
- compptr = srcinfo->comp_info + ci;
- coef_arrays[ci] = (*srcinfo->mem->request_virt_barray)
- ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE,
- (JDIMENSION) jround_up((long) compptr->width_in_blocks,
- (long) compptr->h_samp_factor),
- (JDIMENSION) jround_up((long) compptr->height_in_blocks,
- (long) compptr->v_samp_factor),
- (JDIMENSION) compptr->v_samp_factor);
- }
- break;
- case JXFORM_TRANSPOSE:
- case JXFORM_TRANSVERSE:
- case JXFORM_ROT_90:
- case JXFORM_ROT_270:
- /* Need workspace arrays having transposed dimensions.
- * Note that we allocate arrays padded out to the next iMCU boundary,
- * so that transform routines need not worry about missing edge blocks.
- */
- coef_arrays = (jvirt_barray_ptr *)
- (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE,
- SIZEOF(jvirt_barray_ptr) * info->num_components);
- for (ci = 0; ci < info->num_components; ci++) {
- compptr = srcinfo->comp_info + ci;
- coef_arrays[ci] = (*srcinfo->mem->request_virt_barray)
- ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE,
- (JDIMENSION) jround_up((long) compptr->height_in_blocks,
- (long) compptr->v_samp_factor),
- (JDIMENSION) jround_up((long) compptr->width_in_blocks,
- (long) compptr->h_samp_factor),
- (JDIMENSION) compptr->h_samp_factor);
- }
- break;
- }
- info->workspace_coef_arrays = coef_arrays;
-}
-
-
-/* Transpose destination image parameters */
-
-LOCAL(void)
-transpose_critical_parameters (j_compress_ptr dstinfo)
-{
- int tblno, i, j, ci, itemp;
- jpeg_component_info *compptr;
- JQUANT_TBL *qtblptr;
- JDIMENSION dtemp;
- UINT16 qtemp;
-
- /* Transpose basic image dimensions */
- dtemp = dstinfo->image_width;
- dstinfo->image_width = dstinfo->image_height;
- dstinfo->image_height = dtemp;
-
- /* Transpose sampling factors */
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- compptr = dstinfo->comp_info + ci;
- itemp = compptr->h_samp_factor;
- compptr->h_samp_factor = compptr->v_samp_factor;
- compptr->v_samp_factor = itemp;
- }
-
- /* Transpose quantization tables */
- for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) {
- qtblptr = dstinfo->quant_tbl_ptrs[tblno];
- if (qtblptr != NULL) {
- for (i = 0; i < DCTSIZE; i++) {
- for (j = 0; j < i; j++) {
- qtemp = qtblptr->quantval[i*DCTSIZE+j];
- qtblptr->quantval[i*DCTSIZE+j] = qtblptr->quantval[j*DCTSIZE+i];
- qtblptr->quantval[j*DCTSIZE+i] = qtemp;
- }
- }
- }
- }
-}
-
-
-/* Trim off any partial iMCUs on the indicated destination edge */
-
-LOCAL(void)
-trim_right_edge (j_compress_ptr dstinfo)
-{
- int ci, max_h_samp_factor;
- JDIMENSION MCU_cols;
-
- /* We have to compute max_h_samp_factor ourselves,
- * because it hasn't been set yet in the destination
- * (and we don't want to use the source's value).
- */
- max_h_samp_factor = 1;
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- int h_samp_factor = dstinfo->comp_info[ci].h_samp_factor;
- max_h_samp_factor = MAX(max_h_samp_factor, h_samp_factor);
- }
- MCU_cols = dstinfo->image_width / (max_h_samp_factor * DCTSIZE);
- if (MCU_cols > 0) /* can't trim to 0 pixels */
- dstinfo->image_width = MCU_cols * (max_h_samp_factor * DCTSIZE);
-}
-
-LOCAL(void)
-trim_bottom_edge (j_compress_ptr dstinfo)
-{
- int ci, max_v_samp_factor;
- JDIMENSION MCU_rows;
-
- /* We have to compute max_v_samp_factor ourselves,
- * because it hasn't been set yet in the destination
- * (and we don't want to use the source's value).
- */
- max_v_samp_factor = 1;
- for (ci = 0; ci < dstinfo->num_components; ci++) {
- int v_samp_factor = dstinfo->comp_info[ci].v_samp_factor;
- max_v_samp_factor = MAX(max_v_samp_factor, v_samp_factor);
- }
- MCU_rows = dstinfo->image_height / (max_v_samp_factor * DCTSIZE);
- if (MCU_rows > 0) /* can't trim to 0 pixels */
- dstinfo->image_height = MCU_rows * (max_v_samp_factor * DCTSIZE);
-}
-
-
-/* Adjust output image parameters as needed.
- *
- * This must be called after jpeg_copy_critical_parameters()
- * and before jpeg_write_coefficients().
- *
- * The return value is the set of virtual coefficient arrays to be written
- * (either the ones allocated by jtransform_request_workspace, or the
- * original source data arrays). The caller will need to pass this value
- * to jpeg_write_coefficients().
- */
-
-GLOBAL(jvirt_barray_ptr *)
-jtransform_adjust_parameters (j_decompress_ptr srcinfo,
- j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jpeg_transform_info *info)
-{
- /* If force-to-grayscale is requested, adjust destination parameters */
- if (info->force_grayscale) {
- /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed
- * properly. Among other things, the target h_samp_factor & v_samp_factor
- * will get set to 1, which typically won't match the source.
- * In fact we do this even if the source is already grayscale; that
- * provides an easy way of coercing a grayscale JPEG with funny sampling
- * factors to the customary 1,1. (Some decoders fail on other factors.)
- */
- if ((dstinfo->jpeg_color_space == JCS_YCbCr &&
- dstinfo->num_components == 3) ||
- (dstinfo->jpeg_color_space == JCS_GRAYSCALE &&
- dstinfo->num_components == 1)) {
- /* We have to preserve the source's quantization table number. */
- int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no;
- jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE);
- dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no;
- } else {
- /* Sorry, can't do it */
- ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL);
- }
- }
-
- /* Correct the destination's image dimensions etc if necessary */
- switch (info->transform) {
- case JXFORM_NONE:
- /* Nothing to do */
- break;
- case JXFORM_FLIP_H:
- if (info->trim)
- trim_right_edge(dstinfo);
- break;
- case JXFORM_FLIP_V:
- if (info->trim)
- trim_bottom_edge(dstinfo);
- break;
- case JXFORM_TRANSPOSE:
- transpose_critical_parameters(dstinfo);
- /* transpose does NOT have to trim anything */
- break;
- case JXFORM_TRANSVERSE:
- transpose_critical_parameters(dstinfo);
- if (info->trim) {
- trim_right_edge(dstinfo);
- trim_bottom_edge(dstinfo);
- }
- break;
- case JXFORM_ROT_90:
- transpose_critical_parameters(dstinfo);
- if (info->trim)
- trim_right_edge(dstinfo);
- break;
- case JXFORM_ROT_180:
- if (info->trim) {
- trim_right_edge(dstinfo);
- trim_bottom_edge(dstinfo);
- }
- break;
- case JXFORM_ROT_270:
- transpose_critical_parameters(dstinfo);
- if (info->trim)
- trim_bottom_edge(dstinfo);
- break;
- }
-
- /* Return the appropriate output data set */
- if (info->workspace_coef_arrays != NULL)
- return info->workspace_coef_arrays;
- return src_coef_arrays;
-}
-
-
-/* Execute the actual transformation, if any.
- *
- * This must be called *after* jpeg_write_coefficients, because it depends
- * on jpeg_write_coefficients to have computed subsidiary values such as
- * the per-component width and height fields in the destination object.
- *
- * Note that some transformations will modify the source data arrays!
- */
-
-GLOBAL(void)
-jtransform_execute_transformation (j_decompress_ptr srcinfo,
- j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jpeg_transform_info *info)
-{
- jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays;
-
- switch (info->transform) {
- case JXFORM_NONE:
- break;
- case JXFORM_FLIP_H:
- do_flip_h(srcinfo, dstinfo, src_coef_arrays);
- break;
- case JXFORM_FLIP_V:
- do_flip_v(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
- break;
- case JXFORM_TRANSPOSE:
- do_transpose(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
- break;
- case JXFORM_TRANSVERSE:
- do_transverse(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
- break;
- case JXFORM_ROT_90:
- do_rot_90(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
- break;
- case JXFORM_ROT_180:
- do_rot_180(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
- break;
- case JXFORM_ROT_270:
- do_rot_270(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays);
- break;
- }
-}
-
-#endif /* TRANSFORMS_SUPPORTED */
-
-
-/* Setup decompression object to save desired markers in memory.
- * This must be called before jpeg_read_header() to have the desired effect.
- */
-
-GLOBAL(void)
-jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option)
-{
-#ifdef SAVE_MARKERS_SUPPORTED
- int m;
-
- /* Save comments except under NONE option */
- if (option != JCOPYOPT_NONE) {
- jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF);
- }
- /* Save all types of APPn markers iff ALL option */
- if (option == JCOPYOPT_ALL) {
- for (m = 0; m < 16; m++)
- jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF);
- }
-#endif /* SAVE_MARKERS_SUPPORTED */
-}
-
-/* Copy markers saved in the given source object to the destination object.
- * This should be called just after jpeg_start_compress() or
- * jpeg_write_coefficients().
- * Note that those routines will have written the SOI, and also the
- * JFIF APP0 or Adobe APP14 markers if selected.
- */
-
-GLOBAL(void)
-jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- JCOPY_OPTION option)
-{
- jpeg_saved_marker_ptr marker;
-
- /* In the current implementation, we don't actually need to examine the
- * option flag here; we just copy everything that got saved.
- * But to avoid confusion, we do not output JFIF and Adobe APP14 markers
- * if the encoder library already wrote one.
- */
- for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) {
- if (dstinfo->write_JFIF_header &&
- marker->marker == JPEG_APP0 &&
- marker->data_length >= 5 &&
- GETJOCTET(marker->data[0]) == 0x4A &&
- GETJOCTET(marker->data[1]) == 0x46 &&
- GETJOCTET(marker->data[2]) == 0x49 &&
- GETJOCTET(marker->data[3]) == 0x46 &&
- GETJOCTET(marker->data[4]) == 0)
- continue; /* reject duplicate JFIF */
- if (dstinfo->write_Adobe_marker &&
- marker->marker == JPEG_APP0+14 &&
- marker->data_length >= 5 &&
- GETJOCTET(marker->data[0]) == 0x41 &&
- GETJOCTET(marker->data[1]) == 0x64 &&
- GETJOCTET(marker->data[2]) == 0x6F &&
- GETJOCTET(marker->data[3]) == 0x62 &&
- GETJOCTET(marker->data[4]) == 0x65)
- continue; /* reject duplicate Adobe */
-#ifdef NEED_FAR_POINTERS
- /* We could use jpeg_write_marker if the data weren't FAR... */
- {
- unsigned int i;
- jpeg_write_m_header(dstinfo, marker->marker, marker->data_length);
- for (i = 0; i < marker->data_length; i++)
- jpeg_write_m_byte(dstinfo, marker->data[i]);
- }
-#else
- jpeg_write_marker(dstinfo, marker->marker,
- marker->data, marker->data_length);
-#endif
- }
-}
diff --git a/transupp.h b/transupp.h
deleted file mode 100644
index 5c2d32a..0000000
--- a/transupp.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * transupp.h
- *
- * Copyright (C) 1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains declarations for image transformation routines and
- * other utility code used by the jpegtran sample application. These are
- * NOT part of the core JPEG library. But we keep these routines separate
- * from jpegtran.c to ease the task of maintaining jpegtran-like programs
- * that have other user interfaces.
- *
- * NOTE: all the routines declared here have very specific requirements
- * about when they are to be executed during the reading and writing of the
- * source and destination files. See the comments in transupp.c, or see
- * jpegtran.c for an example of correct usage.
- */
-
-/* If you happen not to want the image transform support, disable it here */
-#ifndef TRANSFORMS_SUPPORTED
-#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */
-#endif
-
-/* Short forms of external names for systems with brain-damaged linkers. */
-
-#ifdef NEED_SHORT_EXTERNAL_NAMES
-#define jtransform_request_workspace jTrRequest
-#define jtransform_adjust_parameters jTrAdjust
-#define jtransform_execute_transformation jTrExec
-#define jcopy_markers_setup jCMrkSetup
-#define jcopy_markers_execute jCMrkExec
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
-
-
-/*
- * Codes for supported types of image transformations.
- */
-
-typedef enum {
- JXFORM_NONE, /* no transformation */
- JXFORM_FLIP_H, /* horizontal flip */
- JXFORM_FLIP_V, /* vertical flip */
- JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */
- JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */
- JXFORM_ROT_90, /* 90-degree clockwise rotation */
- JXFORM_ROT_180, /* 180-degree rotation */
- JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */
-} JXFORM_CODE;
-
-/*
- * Although rotating and flipping data expressed as DCT coefficients is not
- * hard, there is an asymmetry in the JPEG format specification for images
- * whose dimensions aren't multiples of the iMCU size. The right and bottom
- * image edges are padded out to the next iMCU boundary with junk data; but
- * no padding is possible at the top and left edges. If we were to flip
- * the whole image including the pad data, then pad garbage would become
- * visible at the top and/or left, and real pixels would disappear into the
- * pad margins --- perhaps permanently, since encoders & decoders may not
- * bother to preserve DCT blocks that appear to be completely outside the
- * nominal image area. So, we have to exclude any partial iMCUs from the
- * basic transformation.
- *
- * Transpose is the only transformation that can handle partial iMCUs at the
- * right and bottom edges completely cleanly. flip_h can flip partial iMCUs
- * at the bottom, but leaves any partial iMCUs at the right edge untouched.
- * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched.
- * The other transforms are defined as combinations of these basic transforms
- * and process edge blocks in a way that preserves the equivalence.
- *
- * The "trim" option causes untransformable partial iMCUs to be dropped;
- * this is not strictly lossless, but it usually gives the best-looking
- * result for odd-size images. Note that when this option is active,
- * the expected mathematical equivalences between the transforms may not hold.
- * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim
- * followed by -rot 180 -trim trims both edges.)
- *
- * We also offer a "force to grayscale" option, which simply discards the
- * chrominance channels of a YCbCr image. This is lossless in the sense that
- * the luminance channel is preserved exactly. It's not the same kind of
- * thing as the rotate/flip transformations, but it's convenient to handle it
- * as part of this package, mainly because the transformation routines have to
- * be aware of the option to know how many components to work on.
- */
-
-typedef struct {
- /* Options: set by caller */
- JXFORM_CODE transform; /* image transform operator */
- boolean trim; /* if TRUE, trim partial MCUs as needed */
- boolean force_grayscale; /* if TRUE, convert color image to grayscale */
-
- /* Internal workspace: caller should not touch these */
- int num_components; /* # of components in workspace */
- jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */
-} jpeg_transform_info;
-
-
-#if TRANSFORMS_SUPPORTED
-
-/* Request any required workspace */
-EXTERN(void) jtransform_request_workspace
- JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
-/* Adjust output image parameters */
-EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jpeg_transform_info *info));
-/* Execute the actual transformation, if any */
-EXTERN(void) jtransform_execute_transformation
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- jvirt_barray_ptr *src_coef_arrays,
- jpeg_transform_info *info));
-
-#endif /* TRANSFORMS_SUPPORTED */
-
-
-/*
- * Support for copying optional markers from source to destination file.
- */
-
-typedef enum {
- JCOPYOPT_NONE, /* copy no optional markers */
- JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */
- JCOPYOPT_ALL /* copy all optional markers */
-} JCOPY_OPTION;
-
-#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */
-
-/* Setup decompression object to save desired markers in memory */
-EXTERN(void) jcopy_markers_setup
- JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option));
-/* Copy markers saved in the given source object to the destination object */
-EXTERN(void) jcopy_markers_execute
- JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
- JCOPY_OPTION option));
diff --git a/unused/jconfig.bcc b/unused/jconfig.bcc
deleted file mode 100644
index c6c53ff..0000000
--- a/unused/jconfig.bcc
+++ /dev/null
@@ -1,48 +0,0 @@
-/* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#ifdef __MSDOS__
-#define NEED_FAR_POINTERS /* for small or medium memory model */
-#endif
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#ifdef __MSDOS__
-#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */
-#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */
-#define USE_FMEM /* Borland has _fmemcpy() and _fmemset() */
-#endif
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define USE_SETMODE /* Borland has setmode() */
-#ifdef __MSDOS__
-#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */
-#endif
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/unused/jconfig.mac b/unused/jconfig.mac
deleted file mode 100644
index 0de3efe..0000000
--- a/unused/jconfig.mac
+++ /dev/null
@@ -1,43 +0,0 @@
-/* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define USE_MAC_MEMMGR /* Define this if you use jmemmac.c */
-
-#define ALIGN_TYPE long /* Needed for 680x0 Macs */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define USE_CCOMMAND /* Command line reader for Macintosh */
-#define TWO_FILE_COMMANDLINE /* Binary I/O thru stdin/stdout doesn't work */
-
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/unused/jconfig.manx b/unused/jconfig.manx
deleted file mode 100644
index 6dd0d00..0000000
--- a/unused/jconfig.manx
+++ /dev/null
@@ -1,43 +0,0 @@
-/* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */
-
-#define SHORTxSHORT_32 /* produces better DCT code with Aztec C */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#define signal_catcher _abort /* hack for Aztec C naming requirements */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/unused/jconfig.mc6 b/unused/jconfig.mc6
deleted file mode 100644
index c55082d..0000000
--- a/unused/jconfig.mc6
+++ /dev/null
@@ -1,52 +0,0 @@
-/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#define NEED_FAR_POINTERS /* for small or medium memory model */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */
-
-#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */
-
-#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */
-
-#define NEED_FHEAPMIN /* far heap management routines are broken */
-
-#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */
-/* Note: the above define is known to improve the code with Microsoft C 6.00A.
- * I do not know whether it is good for later compiler versions.
- * Please report any info on this point to jpeg-info@uunet.uu.net.
- */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define USE_SETMODE /* Microsoft has setmode() */
-#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/unused/jconfig.sas b/unused/jconfig.sas
deleted file mode 100644
index efdac22..0000000
--- a/unused/jconfig.sas
+++ /dev/null
@@ -1,43 +0,0 @@
-/* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */
-
-#define NO_MKTEMP /* SAS C doesn't have mktemp() */
-
-#define SHORTxSHORT_32 /* produces better DCT code with SAS C */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE
-#define NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/unused/jconfig.st b/unused/jconfig.st
deleted file mode 100644
index 4421b7a..0000000
--- a/unused/jconfig.st
+++ /dev/null
@@ -1,42 +0,0 @@
-/* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#define INCOMPLETE_TYPES_BROKEN /* suppress undefined-structure warnings */
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#define ALIGN_TYPE long /* apparently double is a weird size? */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE /* optional -- undef if you like Unix style */
-/* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define
- * USE_SETMODE. Some Atari compilers require it, some do not.
- */
-#define NEED_SIGNAL_CATCHER /* needed if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/unused/jconfig.vms b/unused/jconfig.vms
deleted file mode 100644
index 55a6ffb..0000000
--- a/unused/jconfig.vms
+++ /dev/null
@@ -1,37 +0,0 @@
-/* jconfig.vms --- jconfig.h for use on Digital VMS. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE /* Needed on VMS */
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/unused/jconfig.wat b/unused/jconfig.wat
deleted file mode 100644
index 6cc545b..0000000
--- a/unused/jconfig.wat
+++ /dev/null
@@ -1,38 +0,0 @@
-/* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#define CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE /* optional */
-#define USE_SETMODE /* Needed to make one-file style work in Watcom */
-#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/unused/jmemdos.c b/unused/jmemdos.c
deleted file mode 100644
index 60b45c6..0000000
--- a/unused/jmemdos.c
+++ /dev/null
@@ -1,638 +0,0 @@
-/*
- * jmemdos.c
- *
- * Copyright (C) 1992-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file provides an MS-DOS-compatible implementation of the system-
- * dependent portion of the JPEG memory manager. Temporary data can be
- * stored in extended or expanded memory as well as in regular DOS files.
- *
- * If you use this file, you must be sure that NEED_FAR_POINTERS is defined
- * if you compile in a small-data memory model; it should NOT be defined if
- * you use a large-data memory model. This file is not recommended if you
- * are using a flat-memory-space 386 environment such as DJGCC or Watcom C.
- * Also, this code will NOT work if struct fields are aligned on greater than
- * 2-byte boundaries.
- *
- * Based on code contributed by Ge' Weijers.
- */
-
-/*
- * If you have both extended and expanded memory, you may want to change the
- * order in which they are tried in jopen_backing_store. On a 286 machine
- * expanded memory is usually faster, since extended memory access involves
- * an expensive protected-mode-and-back switch. On 386 and better, extended
- * memory is usually faster. As distributed, the code tries extended memory
- * first (what? not everyone has a 386? :-).
- *
- * You can disable use of extended/expanded memory entirely by altering these
- * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0).
- */
-
-#ifndef XMS_SUPPORTED
-#define XMS_SUPPORTED 1
-#endif
-#ifndef EMS_SUPPORTED
-#define EMS_SUPPORTED 1
-#endif
-
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h" /* import the system-dependent declarations */
-
-#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare these */
-extern void * malloc JPP((size_t size));
-extern void free JPP((void *ptr));
-extern char * getenv JPP((const char * name));
-#endif
-
-#ifdef NEED_FAR_POINTERS
-
-#ifdef __TURBOC__
-/* These definitions work for Borland C (Turbo C) */
-#include <alloc.h> /* need farmalloc(), farfree() */
-#define far_malloc(x) farmalloc(x)
-#define far_free(x) farfree(x)
-#else
-/* These definitions work for Microsoft C and compatible compilers */
-#include <malloc.h> /* need _fmalloc(), _ffree() */
-#define far_malloc(x) _fmalloc(x)
-#define far_free(x) _ffree(x)
-#endif
-
-#else /* not NEED_FAR_POINTERS */
-
-#define far_malloc(x) malloc(x)
-#define far_free(x) free(x)
-
-#endif /* NEED_FAR_POINTERS */
-
-#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
-#define READ_BINARY "r"
-#else
-#define READ_BINARY "rb"
-#endif
-
-#ifndef USE_MSDOS_MEMMGR /* make sure user got configuration right */
- You forgot to define USE_MSDOS_MEMMGR in jconfig.h. /* deliberate syntax error */
-#endif
-
-#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */
- MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */
-#endif
-
-
-/*
- * Declarations for assembly-language support routines (see jmemdosa.asm).
- *
- * The functions are declared "far" as are all their pointer arguments;
- * this ensures the assembly source code will work regardless of the
- * compiler memory model. We assume "short" is 16 bits, "long" is 32.
- */
-
-typedef void far * XMSDRIVER; /* actually a pointer to code */
-typedef struct { /* registers for calling XMS driver */
- unsigned short ax, dx, bx;
- void far * ds_si;
- } XMScontext;
-typedef struct { /* registers for calling EMS driver */
- unsigned short ax, dx, bx;
- void far * ds_si;
- } EMScontext;
-
-extern short far jdos_open JPP((short far * handle, char far * filename));
-extern short far jdos_close JPP((short handle));
-extern short far jdos_seek JPP((short handle, long offset));
-extern short far jdos_read JPP((short handle, void far * buffer,
- unsigned short count));
-extern short far jdos_write JPP((short handle, void far * buffer,
- unsigned short count));
-extern void far jxms_getdriver JPP((XMSDRIVER far *));
-extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *));
-extern short far jems_available JPP((void));
-extern void far jems_calldriver JPP((EMScontext far *));
-
-
-/*
- * Selection of a file name for a temporary file.
- * This is highly system-dependent, and you may want to customize it.
- */
-
-static int next_file_num; /* to distinguish among several temp files */
-
-LOCAL(void)
-select_file_name (char * fname)
-{
- const char * env;
- char * ptr;
- FILE * tfile;
-
- /* Keep generating file names till we find one that's not in use */
- for (;;) {
- /* Get temp directory name from environment TMP or TEMP variable;
- * if none, use "."
- */
- if ((env = (const char *) getenv("TMP")) == NULL)
- if ((env = (const char *) getenv("TEMP")) == NULL)
- env = ".";
- if (*env == '\0') /* null string means "." */
- env = ".";
- ptr = fname; /* copy name to fname */
- while (*env != '\0')
- *ptr++ = *env++;
- if (ptr[-1] != '\\' && ptr[-1] != '/')
- *ptr++ = '\\'; /* append backslash if not in env variable */
- /* Append a suitable file name */
- next_file_num++; /* advance counter */
- sprintf(ptr, "JPG%03d.TMP", next_file_num);
- /* Probe to see if file name is already in use */
- if ((tfile = fopen(fname, READ_BINARY)) == NULL)
- break;
- fclose(tfile); /* oops, it's there; close tfile & try again */
- }
-}
-
-
-/*
- * Near-memory allocation and freeing are controlled by the regular library
- * routines malloc() and free().
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
- return (void *) malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
- free(object);
-}
-
-
-/*
- * "Large" objects are allocated in far memory, if possible
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
- return (void FAR *) far_malloc(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
- far_free(object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- * It's impossible to do this in a portable way; our current solution is
- * to make the user tell us (with a default value set at compile time).
- * If you can actually get the available space, it's a good idea to subtract
- * a slop factor of 5% or so.
- */
-
-#ifndef DEFAULT_MAX_MEM /* so can override from makefile */
-#define DEFAULT_MAX_MEM 300000L /* for total usage about 450K */
-#endif
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
- long max_bytes_needed, long already_allocated)
-{
- return cinfo->mem->max_memory_to_use - already_allocated;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Backing store objects are only used when the value returned by
- * jpeg_mem_available is less than the total space needed. You can dispense
- * with these routines if you have plenty of virtual memory; see jmemnobs.c.
- */
-
-/*
- * For MS-DOS we support three types of backing storage:
- * 1. Conventional DOS files. We access these by direct DOS calls rather
- * than via the stdio package. This provides a bit better performance,
- * but the real reason is that the buffers to be read or written are FAR.
- * The stdio library for small-data memory models can't cope with that.
- * 2. Extended memory, accessed per the XMS V2.0 specification.
- * 3. Expanded memory, accessed per the LIM/EMS 4.0 specification.
- * You'll need copies of those specs to make sense of the related code.
- * The specs are available by Internet FTP from the SIMTEL archives
- * (oak.oakland.edu and its various mirror sites). See files
- * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip.
- */
-
-
-/*
- * Access methods for a DOS file.
- */
-
-
-METHODDEF(void)
-read_file_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- if (jdos_seek(info->handle.file_handle, file_offset))
- ERREXIT(cinfo, JERR_TFILE_SEEK);
- /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */
- if (byte_count > 65535L) /* safety check */
- ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
- if (jdos_read(info->handle.file_handle, buffer_address,
- (unsigned short) byte_count))
- ERREXIT(cinfo, JERR_TFILE_READ);
-}
-
-
-METHODDEF(void)
-write_file_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- if (jdos_seek(info->handle.file_handle, file_offset))
- ERREXIT(cinfo, JERR_TFILE_SEEK);
- /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */
- if (byte_count > 65535L) /* safety check */
- ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK);
- if (jdos_write(info->handle.file_handle, buffer_address,
- (unsigned short) byte_count))
- ERREXIT(cinfo, JERR_TFILE_WRITE);
-}
-
-
-METHODDEF(void)
-close_file_store (j_common_ptr cinfo, backing_store_ptr info)
-{
- jdos_close(info->handle.file_handle); /* close the file */
- remove(info->temp_name); /* delete the file */
-/* If your system doesn't have remove(), try unlink() instead.
- * remove() is the ANSI-standard name for this function, but
- * unlink() was more common in pre-ANSI systems.
- */
- TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name);
-}
-
-
-LOCAL(boolean)
-open_file_store (j_common_ptr cinfo, backing_store_ptr info,
- long total_bytes_needed)
-{
- short handle;
-
- select_file_name(info->temp_name);
- if (jdos_open((short far *) & handle, (char far *) info->temp_name)) {
- /* might as well exit since jpeg_open_backing_store will fail anyway */
- ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
- return FALSE;
- }
- info->handle.file_handle = handle;
- info->read_backing_store = read_file_store;
- info->write_backing_store = write_file_store;
- info->close_backing_store = close_file_store;
- TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
- return TRUE; /* succeeded */
-}
-
-
-/*
- * Access methods for extended memory.
- */
-
-#if XMS_SUPPORTED
-
-static XMSDRIVER xms_driver; /* saved address of XMS driver */
-
-typedef union { /* either long offset or real-mode pointer */
- long offset;
- void far * ptr;
- } XMSPTR;
-
-typedef struct { /* XMS move specification structure */
- long length;
- XMSH src_handle;
- XMSPTR src;
- XMSH dst_handle;
- XMSPTR dst;
- } XMSspec;
-
-#define ODD(X) (((X) & 1L) != 0)
-
-
-METHODDEF(void)
-read_xms_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- XMScontext ctx;
- XMSspec spec;
- char endbuffer[2];
-
- /* The XMS driver can't cope with an odd length, so handle the last byte
- * specially if byte_count is odd. We don't expect this to be common.
- */
-
- spec.length = byte_count & (~ 1L);
- spec.src_handle = info->handle.xms_handle;
- spec.src.offset = file_offset;
- spec.dst_handle = 0;
- spec.dst.ptr = buffer_address;
-
- ctx.ds_si = (void far *) & spec;
- ctx.ax = 0x0b00; /* EMB move */
- jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
- if (ctx.ax != 1)
- ERREXIT(cinfo, JERR_XMS_READ);
-
- if (ODD(byte_count)) {
- read_xms_store(cinfo, info, (void FAR *) endbuffer,
- file_offset + byte_count - 1L, 2L);
- ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0];
- }
-}
-
-
-METHODDEF(void)
-write_xms_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- XMScontext ctx;
- XMSspec spec;
- char endbuffer[2];
-
- /* The XMS driver can't cope with an odd length, so handle the last byte
- * specially if byte_count is odd. We don't expect this to be common.
- */
-
- spec.length = byte_count & (~ 1L);
- spec.src_handle = 0;
- spec.src.ptr = buffer_address;
- spec.dst_handle = info->handle.xms_handle;
- spec.dst.offset = file_offset;
-
- ctx.ds_si = (void far *) & spec;
- ctx.ax = 0x0b00; /* EMB move */
- jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
- if (ctx.ax != 1)
- ERREXIT(cinfo, JERR_XMS_WRITE);
-
- if (ODD(byte_count)) {
- read_xms_store(cinfo, info, (void FAR *) endbuffer,
- file_offset + byte_count - 1L, 2L);
- endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L];
- write_xms_store(cinfo, info, (void FAR *) endbuffer,
- file_offset + byte_count - 1L, 2L);
- }
-}
-
-
-METHODDEF(void)
-close_xms_store (j_common_ptr cinfo, backing_store_ptr info)
-{
- XMScontext ctx;
-
- ctx.dx = info->handle.xms_handle;
- ctx.ax = 0x0a00;
- jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
- TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle);
- /* we ignore any error return from the driver */
-}
-
-
-LOCAL(boolean)
-open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
- long total_bytes_needed)
-{
- XMScontext ctx;
-
- /* Get address of XMS driver */
- jxms_getdriver((XMSDRIVER far *) & xms_driver);
- if (xms_driver == NULL)
- return FALSE; /* no driver to be had */
-
- /* Get version number, must be >= 2.00 */
- ctx.ax = 0x0000;
- jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
- if (ctx.ax < (unsigned short) 0x0200)
- return FALSE;
-
- /* Try to get space (expressed in kilobytes) */
- ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10);
- ctx.ax = 0x0900;
- jxms_calldriver(xms_driver, (XMScontext far *) & ctx);
- if (ctx.ax != 1)
- return FALSE;
-
- /* Succeeded, save the handle and away we go */
- info->handle.xms_handle = ctx.dx;
- info->read_backing_store = read_xms_store;
- info->write_backing_store = write_xms_store;
- info->close_backing_store = close_xms_store;
- TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx);
- return TRUE; /* succeeded */
-}
-
-#endif /* XMS_SUPPORTED */
-
-
-/*
- * Access methods for expanded memory.
- */
-
-#if EMS_SUPPORTED
-
-/* The EMS move specification structure requires word and long fields aligned
- * at odd byte boundaries. Some compilers will align struct fields at even
- * byte boundaries. While it's usually possible to force byte alignment,
- * that causes an overall performance penalty and may pose problems in merging
- * JPEG into a larger application. Instead we accept some rather dirty code
- * here. Note this code would fail if the hardware did not allow odd-byte
- * word & long accesses, but all 80x86 CPUs do.
- */
-
-typedef void far * EMSPTR;
-
-typedef union { /* EMS move specification structure */
- long length; /* It's easy to access first 4 bytes */
- char bytes[18]; /* Misaligned fields in here! */
- } EMSspec;
-
-/* Macros for accessing misaligned fields */
-#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset])))
-#define SRC_TYPE(spec) FIELD_AT(spec,4,char)
-#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH)
-#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short)
-#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short)
-#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR)
-#define DST_TYPE(spec) FIELD_AT(spec,11,char)
-#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH)
-#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short)
-#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short)
-#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR)
-
-#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */
-
-#define HIBYTE(W) (((W) >> 8) & 0xFF)
-#define LOBYTE(W) ((W) & 0xFF)
-
-
-METHODDEF(void)
-read_ems_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- EMScontext ctx;
- EMSspec spec;
-
- spec.length = byte_count;
- SRC_TYPE(spec) = 1;
- SRC_HANDLE(spec) = info->handle.ems_handle;
- SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE);
- SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE);
- DST_TYPE(spec) = 0;
- DST_HANDLE(spec) = 0;
- DST_PTR(spec) = buffer_address;
-
- ctx.ds_si = (void far *) & spec;
- ctx.ax = 0x5700; /* move memory region */
- jems_calldriver((EMScontext far *) & ctx);
- if (HIBYTE(ctx.ax) != 0)
- ERREXIT(cinfo, JERR_EMS_READ);
-}
-
-
-METHODDEF(void)
-write_ems_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- EMScontext ctx;
- EMSspec spec;
-
- spec.length = byte_count;
- SRC_TYPE(spec) = 0;
- SRC_HANDLE(spec) = 0;
- SRC_PTR(spec) = buffer_address;
- DST_TYPE(spec) = 1;
- DST_HANDLE(spec) = info->handle.ems_handle;
- DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE);
- DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE);
-
- ctx.ds_si = (void far *) & spec;
- ctx.ax = 0x5700; /* move memory region */
- jems_calldriver((EMScontext far *) & ctx);
- if (HIBYTE(ctx.ax) != 0)
- ERREXIT(cinfo, JERR_EMS_WRITE);
-}
-
-
-METHODDEF(void)
-close_ems_store (j_common_ptr cinfo, backing_store_ptr info)
-{
- EMScontext ctx;
-
- ctx.ax = 0x4500;
- ctx.dx = info->handle.ems_handle;
- jems_calldriver((EMScontext far *) & ctx);
- TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle);
- /* we ignore any error return from the driver */
-}
-
-
-LOCAL(boolean)
-open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
- long total_bytes_needed)
-{
- EMScontext ctx;
-
- /* Is EMS driver there? */
- if (! jems_available())
- return FALSE;
-
- /* Get status, make sure EMS is OK */
- ctx.ax = 0x4000;
- jems_calldriver((EMScontext far *) & ctx);
- if (HIBYTE(ctx.ax) != 0)
- return FALSE;
-
- /* Get version, must be >= 4.0 */
- ctx.ax = 0x4600;
- jems_calldriver((EMScontext far *) & ctx);
- if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40)
- return FALSE;
-
- /* Try to allocate requested space */
- ctx.ax = 0x4300;
- ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE);
- jems_calldriver((EMScontext far *) & ctx);
- if (HIBYTE(ctx.ax) != 0)
- return FALSE;
-
- /* Succeeded, save the handle and away we go */
- info->handle.ems_handle = ctx.dx;
- info->read_backing_store = read_ems_store;
- info->write_backing_store = write_ems_store;
- info->close_backing_store = close_ems_store;
- TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx);
- return TRUE; /* succeeded */
-}
-
-#endif /* EMS_SUPPORTED */
-
-
-/*
- * Initial opening of a backing-store object.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- long total_bytes_needed)
-{
- /* Try extended memory, then expanded memory, then regular file. */
-#if XMS_SUPPORTED
- if (open_xms_store(cinfo, info, total_bytes_needed))
- return;
-#endif
-#if EMS_SUPPORTED
- if (open_ems_store(cinfo, info, total_bytes_needed))
- return;
-#endif
- if (open_file_store(cinfo, info, total_bytes_needed))
- return;
- ERREXITS(cinfo, JERR_TFILE_CREATE, "");
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
- next_file_num = 0; /* initialize temp file name generator */
- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
- /* Microsoft C, at least in v6.00A, will not successfully reclaim freed
- * blocks of size > 32Kbytes unless we give it a kick in the rear, like so:
- */
-#ifdef NEED_FHEAPMIN
- _fheapmin();
-#endif
-}
diff --git a/unused/jmemdosa.asm b/unused/jmemdosa.asm
deleted file mode 100644
index ecd4372..0000000
--- a/unused/jmemdosa.asm
+++ /dev/null
@@ -1,379 +0,0 @@
-;
-; jmemdosa.asm
-;
-; Copyright (C) 1992, Thomas G. Lane.
-; This file is part of the Independent JPEG Group's software.
-; For conditions of distribution and use, see the accompanying README file.
-;
-; This file contains low-level interface routines to support the MS-DOS
-; backing store manager (jmemdos.c). Routines are provided to access disk
-; files through direct DOS calls, and to access XMS and EMS drivers.
-;
-; This file should assemble with Microsoft's MASM or any compatible
-; assembler (including Borland's Turbo Assembler). If you haven't got
-; a compatible assembler, better fall back to jmemansi.c or jmemname.c.
-;
-; To minimize dependence on the C compiler's register usage conventions,
-; we save and restore all 8086 registers, even though most compilers only
-; require SI,DI,DS to be preserved. Also, we use only 16-bit-wide return
-; values, which everybody returns in AX.
-;
-; Based on code contributed by Ge' Weijers.
-;
-
-JMEMDOSA_TXT segment byte public 'CODE'
-
- assume cs:JMEMDOSA_TXT
-
- public _jdos_open
- public _jdos_close
- public _jdos_seek
- public _jdos_read
- public _jdos_write
- public _jxms_getdriver
- public _jxms_calldriver
- public _jems_available
- public _jems_calldriver
-
-;
-; short far jdos_open (short far * handle, char far * filename)
-;
-; Create and open a temporary file
-;
-_jdos_open proc far
- push bp ; linkage
- mov bp,sp
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- mov cx,0 ; normal file attributes
- lds dx,dword ptr [bp+10] ; get filename pointer
- mov ah,3ch ; create file
- int 21h
- jc open_err ; if failed, return error code
- lds bx,dword ptr [bp+6] ; get handle pointer
- mov word ptr [bx],ax ; save the handle
- xor ax,ax ; return zero for OK
-open_err: pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- pop bp
- ret
-_jdos_open endp
-
-
-;
-; short far jdos_close (short handle)
-;
-; Close the file handle
-;
-_jdos_close proc far
- push bp ; linkage
- mov bp,sp
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- mov bx,word ptr [bp+6] ; file handle
- mov ah,3eh ; close file
- int 21h
- jc close_err ; if failed, return error code
- xor ax,ax ; return zero for OK
-close_err: pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- pop bp
- ret
-_jdos_close endp
-
-
-;
-; short far jdos_seek (short handle, long offset)
-;
-; Set file position
-;
-_jdos_seek proc far
- push bp ; linkage
- mov bp,sp
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- mov bx,word ptr [bp+6] ; file handle
- mov dx,word ptr [bp+8] ; LS offset
- mov cx,word ptr [bp+10] ; MS offset
- mov ax,4200h ; absolute seek
- int 21h
- jc seek_err ; if failed, return error code
- xor ax,ax ; return zero for OK
-seek_err: pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- pop bp
- ret
-_jdos_seek endp
-
-
-;
-; short far jdos_read (short handle, void far * buffer, unsigned short count)
-;
-; Read from file
-;
-_jdos_read proc far
- push bp ; linkage
- mov bp,sp
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- mov bx,word ptr [bp+6] ; file handle
- lds dx,dword ptr [bp+8] ; buffer address
- mov cx,word ptr [bp+12] ; number of bytes
- mov ah,3fh ; read file
- int 21h
- jc read_err ; if failed, return error code
- cmp ax,word ptr [bp+12] ; make sure all bytes were read
- je read_ok
- mov ax,1 ; else return 1 for not OK
- jmp short read_err
-read_ok: xor ax,ax ; return zero for OK
-read_err: pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- pop bp
- ret
-_jdos_read endp
-
-
-;
-; short far jdos_write (short handle, void far * buffer, unsigned short count)
-;
-; Write to file
-;
-_jdos_write proc far
- push bp ; linkage
- mov bp,sp
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- mov bx,word ptr [bp+6] ; file handle
- lds dx,dword ptr [bp+8] ; buffer address
- mov cx,word ptr [bp+12] ; number of bytes
- mov ah,40h ; write file
- int 21h
- jc write_err ; if failed, return error code
- cmp ax,word ptr [bp+12] ; make sure all bytes written
- je write_ok
- mov ax,1 ; else return 1 for not OK
- jmp short write_err
-write_ok: xor ax,ax ; return zero for OK
-write_err: pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- pop bp
- ret
-_jdos_write endp
-
-
-;
-; void far jxms_getdriver (XMSDRIVER far *)
-;
-; Get the address of the XMS driver, or NULL if not available
-;
-_jxms_getdriver proc far
- push bp ; linkage
- mov bp,sp
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- mov ax,4300h ; call multiplex interrupt with
- int 2fh ; a magic cookie, hex 4300
- cmp al,80h ; AL should contain hex 80
- je xmsavail
- xor dx,dx ; no XMS driver available
- xor ax,ax ; return a nil pointer
- jmp short xmsavail_done
-xmsavail: mov ax,4310h ; fetch driver address with
- int 2fh ; another magic cookie
- mov dx,es ; copy address to dx:ax
- mov ax,bx
-xmsavail_done: les bx,dword ptr [bp+6] ; get pointer to return value
- mov word ptr es:[bx],ax
- mov word ptr es:[bx+2],dx
- pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- pop bp
- ret
-_jxms_getdriver endp
-
-
-;
-; void far jxms_calldriver (XMSDRIVER, XMScontext far *)
-;
-; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers.
-; These are loaded, the XMS call is performed, and the new values of the
-; AX,DX,BX registers are written back to the context structure.
-;
-_jxms_calldriver proc far
- push bp ; linkage
- mov bp,sp
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- les bx,dword ptr [bp+10] ; get XMScontext pointer
- mov ax,word ptr es:[bx] ; load registers
- mov dx,word ptr es:[bx+2]
- mov si,word ptr es:[bx+6]
- mov ds,word ptr es:[bx+8]
- mov bx,word ptr es:[bx+4]
- call dword ptr [bp+6] ; call the driver
- mov cx,bx ; save returned BX for a sec
- les bx,dword ptr [bp+10] ; get XMScontext pointer
- mov word ptr es:[bx],ax ; put back ax,dx,bx
- mov word ptr es:[bx+2],dx
- mov word ptr es:[bx+4],cx
- pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- pop bp
- ret
-_jxms_calldriver endp
-
-
-;
-; short far jems_available (void)
-;
-; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs)
-;
-_jems_available proc far
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- mov ax,3567h ; get interrupt vector 67h
- int 21h
- push cs
- pop ds
- mov di,000ah ; check offs 10 in returned seg
- lea si,ASCII_device_name ; against literal string
- mov cx,8
- cld
- repe cmpsb
- jne no_ems
- mov ax,1 ; match, it's there
- jmp short avail_done
-no_ems: xor ax,ax ; it's not there
-avail_done: pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- ret
-
-ASCII_device_name db "EMMXXXX0"
-
-_jems_available endp
-
-
-;
-; void far jems_calldriver (EMScontext far *)
-;
-; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers.
-; These are loaded, the EMS trap is performed, and the new values of the
-; AX,DX,BX registers are written back to the context structure.
-;
-_jems_calldriver proc far
- push bp ; linkage
- mov bp,sp
- push si ; save all registers for safety
- push di
- push bx
- push cx
- push dx
- push es
- push ds
- les bx,dword ptr [bp+6] ; get EMScontext pointer
- mov ax,word ptr es:[bx] ; load registers
- mov dx,word ptr es:[bx+2]
- mov si,word ptr es:[bx+6]
- mov ds,word ptr es:[bx+8]
- mov bx,word ptr es:[bx+4]
- int 67h ; call the EMS driver
- mov cx,bx ; save returned BX for a sec
- les bx,dword ptr [bp+6] ; get EMScontext pointer
- mov word ptr es:[bx],ax ; put back ax,dx,bx
- mov word ptr es:[bx+2],dx
- mov word ptr es:[bx+4],cx
- pop ds ; restore registers and exit
- pop es
- pop dx
- pop cx
- pop bx
- pop di
- pop si
- pop bp
- ret
-_jems_calldriver endp
-
-JMEMDOSA_TXT ends
-
- end
diff --git a/unused/jmemmac.c b/unused/jmemmac.c
deleted file mode 100644
index 106f9be..0000000
--- a/unused/jmemmac.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * jmemmac.c
- *
- * Copyright (C) 1992-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * jmemmac.c provides an Apple Macintosh implementation of the system-
- * dependent portion of the JPEG memory manager.
- *
- * If you use jmemmac.c, then you must define USE_MAC_MEMMGR in the
- * JPEG_INTERNALS part of jconfig.h.
- *
- * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr
- * instead of malloc and free. It accurately determines the amount of
- * memory available by using CompactMem. Notice that if left to its
- * own devices, this code can chew up all available space in the
- * application's zone, with the exception of the rather small "slop"
- * factor computed in jpeg_mem_available(). The application can ensure
- * that more space is left over by reducing max_memory_to_use.
- *
- * Large images are swapped to disk using temporary files and System 7.0+'s
- * temporary folder functionality.
- *
- * Note that jmemmac.c depends on two features of MacOS that were first
- * introduced in System 7: FindFolder and the FSSpec-based calls.
- * If your application uses jmemmac.c and is run under System 6 or earlier,
- * and the jpeg library decides it needs a temporary file, it will abort,
- * printing error messages about requiring System 7. (If no temporary files
- * are created, it will run fine.)
- *
- * If you want to use jmemmac.c in an application that might be used with
- * System 6 or earlier, then you should remove dependencies on FindFolder
- * and the FSSpec calls. You will need to replace FindFolder with some
- * other mechanism for finding a place to put temporary files, and you
- * should replace the FSSpec calls with their HFS equivalents:
- *
- * FSpDelete -> HDelete
- * FSpGetFInfo -> HGetFInfo
- * FSpCreate -> HCreate
- * FSpOpenDF -> HOpen *** Note: not HOpenDF ***
- * FSMakeFSSpec -> (fill in spec by hand.)
- *
- * (Use HOpen instead of HOpenDF. HOpen is just a glue-interface to PBHOpen,
- * which is on all HFS macs. HOpenDF is a System 7 addition which avoids the
- * ages-old problem of names starting with a period.)
- *
- * Contributed by Sam Bushell (jsam@iagu.on.net) and
- * Dan Gildor (gyld@in-touch.com).
- */
-
-#define JPEG_INTERNALS
-#include "jinclude.h"
-#include "jpeglib.h"
-#include "jmemsys.h" /* import the system-dependent declarations */
-
-#ifndef USE_MAC_MEMMGR /* make sure user got configuration right */
- You forgot to define USE_MAC_MEMMGR in jconfig.h. /* deliberate syntax error */
-#endif
-
-#include <Memory.h> /* we use the MacOS memory manager */
-#include <Files.h> /* we use the MacOS File stuff */
-#include <Folders.h> /* we use the MacOS HFS stuff */
-#include <Script.h> /* for smSystemScript */
-#include <Gestalt.h> /* we use Gestalt to test for specific functionality */
-
-#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */
-#define TEMP_FILE_NAME "JPG%03d.TMP"
-#endif
-
-static int next_file_num; /* to distinguish among several temp files */
-
-
-/*
- * Memory allocation and freeing are controlled by the MacOS library
- * routines NewPtr() and DisposePtr(), which allocate fixed-address
- * storage. Unfortunately, the IJG library isn't smart enough to cope
- * with relocatable storage.
- */
-
-GLOBAL(void *)
-jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
-{
- return (void *) NewPtr(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
-{
- DisposePtr((Ptr) object);
-}
-
-
-/*
- * "Large" objects are treated the same as "small" ones.
- * NB: we include FAR keywords in the routine declarations simply for
- * consistency with the rest of the IJG code; FAR should expand to empty
- * on rational architectures like the Mac.
- */
-
-GLOBAL(void FAR *)
-jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
-{
- return (void FAR *) NewPtr(sizeofobject);
-}
-
-GLOBAL(void)
-jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
-{
- DisposePtr((Ptr) object);
-}
-
-
-/*
- * This routine computes the total memory space available for allocation.
- */
-
-GLOBAL(long)
-jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
- long max_bytes_needed, long already_allocated)
-{
- long limit = cinfo->mem->max_memory_to_use - already_allocated;
- long slop, mem;
-
- /* Don't ask for more than what application has told us we may use */
- if (max_bytes_needed > limit && limit > 0)
- max_bytes_needed = limit;
- /* Find whether there's a big enough free block in the heap.
- * CompactMem tries to create a contiguous block of the requested size,
- * and then returns the size of the largest free block (which could be
- * much more or much less than we asked for).
- * We add some slop to ensure we don't use up all available memory.
- */
- slop = max_bytes_needed / 16 + 32768L;
- mem = CompactMem(max_bytes_needed + slop) - slop;
- if (mem < 0)
- mem = 0; /* sigh, couldn't even get the slop */
- /* Don't take more than the application says we can have */
- if (mem > limit && limit > 0)
- mem = limit;
- return mem;
-}
-
-
-/*
- * Backing store (temporary file) management.
- * Backing store objects are only used when the value returned by
- * jpeg_mem_available is less than the total space needed. You can dispense
- * with these routines if you have plenty of virtual memory; see jmemnobs.c.
- */
-
-
-METHODDEF(void)
-read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- long bytes = byte_count;
- long retVal;
-
- if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr )
- ERREXIT(cinfo, JERR_TFILE_SEEK);
-
- retVal = FSRead ( info->temp_file, &bytes,
- (unsigned char *) buffer_address );
- if ( retVal != noErr || bytes != byte_count )
- ERREXIT(cinfo, JERR_TFILE_READ);
-}
-
-
-METHODDEF(void)
-write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- void FAR * buffer_address,
- long file_offset, long byte_count)
-{
- long bytes = byte_count;
- long retVal;
-
- if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr )
- ERREXIT(cinfo, JERR_TFILE_SEEK);
-
- retVal = FSWrite ( info->temp_file, &bytes,
- (unsigned char *) buffer_address );
- if ( retVal != noErr || bytes != byte_count )
- ERREXIT(cinfo, JERR_TFILE_WRITE);
-}
-
-
-METHODDEF(void)
-close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
-{
- FSClose ( info->temp_file );
- FSpDelete ( &(info->tempSpec) );
-}
-
-
-/*
- * Initial opening of a backing-store object.
- *
- * This version uses FindFolder to find the Temporary Items folder,
- * and puts the temporary file in there.
- */
-
-GLOBAL(void)
-jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- long total_bytes_needed)
-{
- short tmpRef, vRefNum;
- long dirID;
- FInfo finderInfo;
- FSSpec theSpec;
- Str255 fName;
- OSErr osErr;
- long gestaltResponse = 0;
-
- /* Check that FSSpec calls are available. */
- osErr = Gestalt( gestaltFSAttr, &gestaltResponse );
- if ( ( osErr != noErr )
- || !( gestaltResponse & (1<<gestaltHasFSSpecCalls) ) )
- ERREXITS(cinfo, JERR_TFILE_CREATE, "- System 7.0 or later required");
- /* TO DO: add a proper error message to jerror.h. */
-
- /* Check that FindFolder is available. */
- osErr = Gestalt( gestaltFindFolderAttr, &gestaltResponse );
- if ( ( osErr != noErr )
- || !( gestaltResponse & (1<<gestaltFindFolderPresent) ) )
- ERREXITS(cinfo, JERR_TFILE_CREATE, "- System 7.0 or later required.");
- /* TO DO: add a proper error message to jerror.h. */
-
- osErr = FindFolder ( kOnSystemDisk, kTemporaryFolderType, kCreateFolder,
- &vRefNum, &dirID );
- if ( osErr != noErr )
- ERREXITS(cinfo, JERR_TFILE_CREATE, "- temporary items folder unavailable");
- /* TO DO: Try putting the temp files somewhere else. */
-
- /* Keep generating file names till we find one that's not in use */
- for (;;) {
- next_file_num++; /* advance counter */
-
- sprintf(info->temp_name, TEMP_FILE_NAME, next_file_num);
- strcpy ( (Ptr)fName+1, info->temp_name );
- *fName = strlen (info->temp_name);
- osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec );
-
- if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr )
- break;
- }
-
- osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript );
- if ( osErr != noErr )
- ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
-
- osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(info->temp_file) );
- if ( osErr != noErr )
- ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name);
-
- info->tempSpec = theSpec;
-
- info->read_backing_store = read_backing_store;
- info->write_backing_store = write_backing_store;
- info->close_backing_store = close_backing_store;
- TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name);
-}
-
-
-/*
- * These routines take care of any system-dependent initialization and
- * cleanup required.
- */
-
-GLOBAL(long)
-jpeg_mem_init (j_common_ptr cinfo)
-{
- next_file_num = 0;
-
- /* max_memory_to_use will be initialized to FreeMem()'s result;
- * the calling application might later reduce it, for example
- * to leave room to invoke multiple JPEG objects.
- * Note that FreeMem returns the total number of free bytes;
- * it may not be possible to allocate a single block of this size.
- */
- return FreeMem();
-}
-
-GLOBAL(void)
-jpeg_mem_term (j_common_ptr cinfo)
-{
- /* no work */
-}
diff --git a/unused/makcjpeg.st b/unused/makcjpeg.st
deleted file mode 100644
index fc72c89..0000000
--- a/unused/makcjpeg.st
+++ /dev/null
@@ -1,38 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de),
-; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de),
-; and Guido Vollbeding (guivol@esc.de).
-;
-; To use this file, rename it to cjpeg.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-; * * * Output file * * *
-cjpeg.ttp
-;
-; * * * COMPILER OPTIONS * * *
-.C[-P] ; absolute calls
-.C[-M] ; and no string merging, folks
-.C[-w-cln] ; no "constant is long" warnings
-.C[-w-par] ; no "parameter xxxx unused"
-.C[-w-rch] ; no "unreachable code"
-.C[-wsig] ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * *
-pcstart.o
-cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h)
-cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-libjpeg.lib ; built by libjpeg.prj
-pcfltlib.lib ; floating point library
-; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED
-pcstdlib.lib ; standard library
-pcextlib.lib ; extended library
diff --git a/unused/makdjpeg.st b/unused/makdjpeg.st
deleted file mode 100644
index 3226726..0000000
--- a/unused/makdjpeg.st
+++ /dev/null
@@ -1,38 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de),
-; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de),
-; and Guido Vollbeding (guivol@esc.de).
-;
-; To use this file, rename it to djpeg.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-; * * * Output file * * *
-djpeg.ttp
-;
-; * * * COMPILER OPTIONS * * *
-.C[-P] ; absolute calls
-.C[-M] ; and no string merging, folks
-.C[-w-cln] ; no "constant is long" warnings
-.C[-w-par] ; no "parameter xxxx unused"
-.C[-w-rch] ; no "unreachable code"
-.C[-wsig] ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * *
-pcstart.o
-djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h)
-cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-libjpeg.lib ; built by libjpeg.prj
-pcfltlib.lib ; floating point library
-; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED
-pcstdlib.lib ; standard library
-pcextlib.lib ; extended library
diff --git a/unused/makeapps.ds b/unused/makeapps.ds
deleted file mode 100644
index bedd038..0000000
--- a/unused/makeapps.ds
+++ /dev/null
@@ -1,828 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-!IF "$(CFG)" == ""
-CFG=cjpeg - Win32
-!MESSAGE No configuration specified. Defaulting to cjpeg - Win32.
-!ENDIF
-
-!IF "$(CFG)" != "cjpeg - Win32" && "$(CFG)" != "djpeg - Win32" &&\
- "$(CFG)" != "jpegtran - Win32" && "$(CFG)" != "rdjpgcom - Win32" &&\
- "$(CFG)" != "wrjpgcom - Win32"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "apps.mak" CFG="cjpeg - Win32"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "cjpeg - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE "djpeg - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE "jpegtran - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE "rdjpgcom - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE "wrjpgcom - Win32" (based on "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "cjpeg - Win32"
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "cjpeg - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "cjpeg\Release"
-# PROP BASE Intermediate_Dir "cjpeg\Release"
-# PROP BASE Target_Dir "cjpeg"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "cjpeg\Release"
-# PROP Intermediate_Dir "cjpeg\Release"
-# PROP Target_Dir "cjpeg"
-OUTDIR=.\cjpeg\Release
-INTDIR=.\cjpeg\Release
-
-ALL : "$(OUTDIR)\cjpeg.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\cjpeg.obj"
- -@erase "$(INTDIR)\rdppm.obj"
- -@erase "$(INTDIR)\rdgif.obj"
- -@erase "$(INTDIR)\rdtarga.obj"
- -@erase "$(INTDIR)\rdrle.obj"
- -@erase "$(INTDIR)\rdbmp.obj"
- -@erase "$(INTDIR)\rdswitch.obj"
- -@erase "$(INTDIR)\cdjpeg.obj"
- -@erase "$(OUTDIR)\cjpeg.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/cjpeg.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\cjpeg\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/cjpeg.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/cjpeg.pdb" /machine:I386 /out:"$(OUTDIR)/cjpeg.exe"
-LINK32_OBJS= \
- "$(INTDIR)\cjpeg.obj" \
- "$(INTDIR)\rdppm.obj" \
- "$(INTDIR)\rdgif.obj" \
- "$(INTDIR)\rdtarga.obj" \
- "$(INTDIR)\rdrle.obj" \
- "$(INTDIR)\rdbmp.obj" \
- "$(INTDIR)\rdswitch.obj" \
- "$(INTDIR)\cdjpeg.obj" \
-
-
-"$(OUTDIR)\cjpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "djpeg - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "djpeg\Release"
-# PROP BASE Intermediate_Dir "djpeg\Release"
-# PROP BASE Target_Dir "djpeg"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "djpeg\Release"
-# PROP Intermediate_Dir "djpeg\Release"
-# PROP Target_Dir "djpeg"
-OUTDIR=.\djpeg\Release
-INTDIR=.\djpeg\Release
-
-ALL : "$(OUTDIR)\djpeg.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\djpeg.obj"
- -@erase "$(INTDIR)\wrppm.obj"
- -@erase "$(INTDIR)\wrgif.obj"
- -@erase "$(INTDIR)\wrtarga.obj"
- -@erase "$(INTDIR)\wrrle.obj"
- -@erase "$(INTDIR)\wrbmp.obj"
- -@erase "$(INTDIR)\rdcolmap.obj"
- -@erase "$(INTDIR)\cdjpeg.obj"
- -@erase "$(OUTDIR)\djpeg.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/djpeg.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\djpeg\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/djpeg.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/djpeg.pdb" /machine:I386 /out:"$(OUTDIR)/djpeg.exe"
-LINK32_OBJS= \
- "$(INTDIR)\djpeg.obj" \
- "$(INTDIR)\wrppm.obj" \
- "$(INTDIR)\wrgif.obj" \
- "$(INTDIR)\wrtarga.obj" \
- "$(INTDIR)\wrrle.obj" \
- "$(INTDIR)\wrbmp.obj" \
- "$(INTDIR)\rdcolmap.obj" \
- "$(INTDIR)\cdjpeg.obj" \
-
-
-"$(OUTDIR)\djpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "jpegtran - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "jpegtran\Release"
-# PROP BASE Intermediate_Dir "jpegtran\Release"
-# PROP BASE Target_Dir "jpegtran"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "jpegtran\Release"
-# PROP Intermediate_Dir "jpegtran\Release"
-# PROP Target_Dir "jpegtran"
-OUTDIR=.\jpegtran\Release
-INTDIR=.\jpegtran\Release
-
-ALL : "$(OUTDIR)\jpegtran.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\jpegtran.obj"
- -@erase "$(INTDIR)\rdswitch.obj"
- -@erase "$(INTDIR)\cdjpeg.obj"
- -@erase "$(INTDIR)\transupp.obj"
- -@erase "$(OUTDIR)\jpegtran.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/jpegtran.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\jpegtran\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/jpegtran.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/jpegtran.pdb" /machine:I386 /out:"$(OUTDIR)/jpegtran.exe"
-LINK32_OBJS= \
- "$(INTDIR)\jpegtran.obj" \
- "$(INTDIR)\rdswitch.obj" \
- "$(INTDIR)\cdjpeg.obj" \
- "$(INTDIR)\transupp.obj" \
-
-
-"$(OUTDIR)\jpegtran.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "rdjpgcom - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "rdjpgcom\Release"
-# PROP BASE Intermediate_Dir "rdjpgcom\Release"
-# PROP BASE Target_Dir "rdjpgcom"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "rdjpgcom\Release"
-# PROP Intermediate_Dir "rdjpgcom\Release"
-# PROP Target_Dir "rdjpgcom"
-OUTDIR=.\rdjpgcom\Release
-INTDIR=.\rdjpgcom\Release
-
-ALL : "$(OUTDIR)\rdjpgcom.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\rdjpgcom.obj"
- -@erase "$(OUTDIR)\rdjpgcom.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/rdjpgcom.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\rdjpgcom\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/rdjpgcom.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/rdjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)/rdjpgcom.exe"
-LINK32_OBJS= \
- "$(INTDIR)\rdjpgcom.obj"
-
-"$(OUTDIR)\rdjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "wrjpgcom - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "wrjpgcom\Release"
-# PROP BASE Intermediate_Dir "wrjpgcom\Release"
-# PROP BASE Target_Dir "wrjpgcom"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "wrjpgcom\Release"
-# PROP Intermediate_Dir "wrjpgcom\Release"
-# PROP Target_Dir "wrjpgcom"
-OUTDIR=.\wrjpgcom\Release
-INTDIR=.\wrjpgcom\Release
-
-ALL : "$(OUTDIR)\wrjpgcom.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\wrjpgcom.obj"
- -@erase "$(OUTDIR)\wrjpgcom.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/wrjpgcom.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\wrjpgcom\Release/
-CPP_SBRS=.\.
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/wrjpgcom.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/wrjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)/wrjpgcom.exe"
-LINK32_OBJS= \
- "$(INTDIR)\wrjpgcom.obj"
-
-"$(OUTDIR)\wrjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-################################################################################
-# Begin Target
-
-# Name "cjpeg - Win32"
-
-!IF "$(CFG)" == "cjpeg - Win32"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE="cjpeg.c"
-DEP_CPP_CJPEG=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
- "jversion.h"\
-
-
-"$(INTDIR)\cjpeg.obj" : $(SOURCE) $(DEP_CPP_CJPEG) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="cdjpeg.c"
-DEP_CPP_CDJPE=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdswitch.c"
-DEP_CPP_RDSWI=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\rdswitch.obj" : $(SOURCE) $(DEP_CPP_RDSWI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdppm.c"
-DEP_CPP_RDPPM=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\rdppm.obj" : $(SOURCE) $(DEP_CPP_RDPPM) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdgif.c"
-DEP_CPP_RDGIF=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\rdgif.obj" : $(SOURCE) $(DEP_CPP_RDGIF) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdtarga.c"
-DEP_CPP_RDTAR=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\rdtarga.obj" : $(SOURCE) $(DEP_CPP_RDTAR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdbmp.c"
-DEP_CPP_RDBMP=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\rdbmp.obj" : $(SOURCE) $(DEP_CPP_RDBMP) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdrle.c"
-DEP_CPP_RDRLE=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\rdrle.obj" : $(SOURCE) $(DEP_CPP_RDRLE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "djpeg - Win32"
-
-!IF "$(CFG)" == "djpeg - Win32"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE="djpeg.c"
-DEP_CPP_DJPEG=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
- "jversion.h"\
-
-
-"$(INTDIR)\djpeg.obj" : $(SOURCE) $(DEP_CPP_DJPEG) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="cdjpeg.c"
-DEP_CPP_CDJPE=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdcolmap.c"
-DEP_CPP_RDCOL=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\rdcolmap.obj" : $(SOURCE) $(DEP_CPP_RDCOL) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrppm.c"
-DEP_CPP_WRPPM=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\wrppm.obj" : $(SOURCE) $(DEP_CPP_WRPPM) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrgif.c"
-DEP_CPP_WRGIF=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\wrgif.obj" : $(SOURCE) $(DEP_CPP_WRGIF) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrtarga.c"
-DEP_CPP_WRTAR=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\wrtarga.obj" : $(SOURCE) $(DEP_CPP_WRTAR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrbmp.c"
-DEP_CPP_WRBMP=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\wrbmp.obj" : $(SOURCE) $(DEP_CPP_WRBMP) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="wrrle.c"
-DEP_CPP_WRRLE=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\wrrle.obj" : $(SOURCE) $(DEP_CPP_WRRLE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "jpegtran - Win32"
-
-!IF "$(CFG)" == "jpegtran - Win32"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE="jpegtran.c"
-DEP_CPP_JPEGT=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
- "transupp.h"\
- "jversion.h"\
-
-
-"$(INTDIR)\jpegtran.obj" : $(SOURCE) $(DEP_CPP_JPEGT) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="cdjpeg.c"
-DEP_CPP_CDJPE=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="rdswitch.c"
-DEP_CPP_RDSWI=\
- "cdjpeg.h"\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
- "cderror.h"\
-
-
-"$(INTDIR)\rdswitch.obj" : $(SOURCE) $(DEP_CPP_RDSWI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="transupp.c"
-DEP_CPP_TRANS=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "transupp.h"\
-
-
-"$(INTDIR)\transupp.obj" : $(SOURCE) $(DEP_CPP_TRANS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "rdjpgcom - Win32"
-
-!IF "$(CFG)" == "rdjpgcom - Win32"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE="rdjpgcom.c"
-DEP_CPP_RDJPG=\
- "jinclude.h"\
- "jconfig.h"\
-
-
-"$(INTDIR)\rdjpgcom.obj" : $(SOURCE) $(DEP_CPP_RDJPG) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "wrjpgcom - Win32"
-
-!IF "$(CFG)" == "wrjpgcom - Win32"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE="wrjpgcom.c"
-DEP_CPP_WRJPG=\
- "jinclude.h"\
- "jconfig.h"\
-
-
-"$(INTDIR)\wrjpgcom.obj" : $(SOURCE) $(DEP_CPP_WRJPG) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
-
diff --git a/unused/makefile.bcc b/unused/makefile.bcc
deleted file mode 100644
index a1cfcde..0000000
--- a/unused/makefile.bcc
+++ /dev/null
@@ -1,285 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Borland C on MS-DOS or OS/2.
-# It works with Borland C++ for DOS, revision 3.0 or later,
-# and has been tested with Borland C++ for OS/2.
-# Watch out for optimization bugs in the OS/2 compilers --- see notes below!
-# Thanks to Tom Wright and Ge' Weijers (original DOS) and
-# Ken Porter (OS/2) for this file.
-
-# Read installation instructions before saying "make" !!
-
-# Are we under DOS or OS/2?
-!if !$d(DOS) && !$d(OS2)
-!if $d(__OS2__)
-OS2=1
-!else
-DOS=1
-!endif
-!endif
-
-# The name of your C compiler:
-CC= bcc
-
-# You may need to adjust these cc options:
-!if $d(DOS)
-CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch
-!else
-CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch
-!endif
-# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z).
-# -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 there for now.
-# If you have Borland OS/2 C++ revision 1.0, use -O or no optimization at all.
-# -mm selects medium memory model (near data, far code pointers; DOS only!)
-# -w-par suppresses warnings about unused function parameters
-# -w-stu suppresses warnings about incomplete structures
-# -w-ccc suppresses warnings about compile-time-constant conditions
-# -w-rch suppresses warnings about unreachable code
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-!if $d(DOS)
-LDFLAGS= -mm
-# memory model option here must match CFLAGS!
-!else
-LDFLAGS=
-# -lai full-screen app
-# -lc case-significant link
-!endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.
-# For DOS, we recommend jmemdos.c and jmemdosa.asm.
-# For OS/2, we recommend jmemnobs.c (flat memory!)
-# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
-!if $d(DOS)
-SYSDEPMEM= jmemdos.obj jmemdosa.obj
-SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
-!else
-SYSDEPMEM= jmemnobs.obj
-SYSDEPMEMLIB= +jmemnobs.obj
-!endif
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
- jquant1.obj jquant2.obj jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
- - del libjpeg.lib
- tlib libjpeg.lib /E /C @&&|
-+jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj +jdatadst.obj &
-+jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj +jcprepct.obj &
-+jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj &
-+jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj &
-+jdapistd.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj &
-+jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj +jdcoefct.obj &
-+jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj &
-+jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj &
-+jdmerge.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj &
-$(SYSDEPMEMLIB)
-|
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib
-
-rdjpgcom.exe: rdjpgcom.c
-!if $d(DOS)
- $(CC) -ms -O rdjpgcom.c
-!else
- $(CC) $(CFLAGS) rdjpgcom.c
-!endif
-
-# On DOS, wrjpgcom needs large model so it can malloc a 64K chunk
-wrjpgcom.exe: wrjpgcom.c
-!if $d(DOS)
- $(CC) -ml -O wrjpgcom.c
-!else
- $(CC) $(CFLAGS) wrjpgcom.c
-!endif
-
-# This "{}" syntax allows Borland Make to "batch" source files.
-# In this way, each run of the compiler can build many modules.
-.c.obj:
- $(CC) $(CFLAGS) -c{ $<}
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- - del *.obj
- - del libjpeg.lib
- - del cjpeg.exe
- - del djpeg.exe
- - del jpegtran.exe
- - del rdjpgcom.exe
- - del wrjpgcom.exe
- - del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- - del testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
-!if $d(DOS)
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-!else
- echo n > n.tmp
- comp testimg.ppm testout.ppm < n.tmp
- comp testimg.bmp testout.bmp < n.tmp
- comp testimg.jpg testout.jpg < n.tmp
- comp testimg.ppm testoutp.ppm < n.tmp
- comp testimgp.jpg testoutp.jpg < n.tmp
- comp testorig.jpg testoutt.jpg < n.tmp
- del n.tmp
-!endif
-
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-jmemdosa.obj: jmemdosa.asm
- tasm /mx jmemdosa.asm
diff --git a/unused/makefile.manx b/unused/makefile.manx
deleted file mode 100644
index 4cb42d1..0000000
--- a/unused/makefile.manx
+++ /dev/null
@@ -1,214 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Amiga systems using Manx Aztec C ver 5.x.
-# Thanks to D.J. James (djjames@cup.portal.com) for this version.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-# Uncomment for generic 68000 code (will work on any Amiga)
-ARCHFLAGS= -sn
-
-# Uncomment for 68020/68030 code (faster, but won't run on 68000 CPU)
-#ARCHFLAGS= -c2
-
-CFLAGS= -MC -MD $(ARCHFLAGS) -spfam -r4
-
-# Link-time cc options:
-LDFLAGS= -g
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= -lml -lcl
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Amiga we recommend jmemname.o.
-SYSDEPMEM= jmemname.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= ln
-# file deletion command
-RM= delete quiet
-# library (.lib) file creation command
-AR= lb
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
- jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
- jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.lib cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-libjpeg.lib: $(LIBOBJECTS)
- -$(RM) libjpeg.lib
- $(AR) libjpeg.lib $(LIBOBJECTS)
-
-cjpeg: $(COBJECTS) libjpeg.lib
- $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.lib $(LDLIBS)
-
-djpeg: $(DOBJECTS) libjpeg.lib
- $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.lib $(LDLIBS)
-
-jpegtran: $(TROBJECTS) libjpeg.lib
- $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.lib $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- -$(RM) *.o cjpeg djpeg jpegtran libjpeg.lib rdjpgcom wrjpgcom
- -$(RM) core testout*.*
-
-test: cjpeg djpeg jpegtran
- -$(RM) testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.bmp testout.bmp
- cmp testimg.jpg testout.jpg
- cmp testimg.ppm testoutp.ppm
- cmp testimgp.jpg testoutp.jpg
- cmp testorig.jpg testoutt.jpg
-
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/unused/makefile.mc6 b/unused/makefile.mc6
deleted file mode 100644
index 6aff054..0000000
--- a/unused/makefile.mc6
+++ /dev/null
@@ -1,249 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Microsoft C for MS-DOS, version 6.00A and up.
-# Use NMAKE, not Microsoft's brain-damaged MAKE.
-# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd.
-
-# Read installation instructions before saying "nmake" !!
-
-# You may need to adjust these compiler options:
-CFLAGS = -AM -Oecigt -Gs -W3
-# -AM medium memory model (or use -AS for small model, if you remove features)
-# -Oecigt -Gs maximum safe optimisation (-Ol has bugs in MSC 6.00A)
-# -W3 warning level 3
-# You might also want to add -G2 if you have an 80286, etc.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Jan-Herman Buining suggests the following switches for MS C 8.0 and a 486:
-# CFLAGS = /AM /f- /FPi87 /G3 /Gs /Gy /Ob1 /Oc /Oe /Og /Oi /Ol /On /Oo /Ot \
-# /OV4 /W3
-# except for jquant1.c, which must be compiled with /Oo- to avoid a compiler
-# crash.
-
-# Ingar Steinsland suggests the following switches when building
-# a 16-bit Windows DLL:
-# CFLAGS = -ALw -Gsw -Zpe -W3 -O2 -Zi -Zd
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm.
-# (But not for Windows; see install.doc if you use this makefile for Windows.)
-SYSDEPMEM= jmemdos.obj jmemdosa.obj
-# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
-SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
- jquant1.obj jquant2.obj jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-# need linker response file because file list > 128 chars
-RFILE = libjpeg.ans
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS) $(RFILE)
- del libjpeg.lib
- lib @$(RFILE)
-
-# linker response file for building libjpeg.lib
-$(RFILE) : makefile
- del $(RFILE)
- echo libjpeg.lib >$(RFILE)
-# silly want-to-create-it prompt:
- echo y >>$(RFILE)
- echo +jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj & >>$(RFILE)
- echo +jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj & >>$(RFILE)
- echo +jcmainct.obj +jcprepct.obj +jccoefct.obj & >>$(RFILE)
- echo +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & >>$(RFILE)
- echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE)
- echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE)
- echo +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & >>$(RFILE)
- echo +jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj & >>$(RFILE)
- echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE)
- echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE)
- echo +jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE)
- echo +jquant2.obj +jdmerge.obj +jcomapi.obj +jutils.obj & >>$(RFILE)
- echo +jerror.obj +jmemmgr.obj & >>$(RFILE)
- echo $(SYSDEPMEMLIB) ; >>$(RFILE)
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- echo $(COBJECTS) >cjpeg.lst
- link /STACK:4096 /EXEPACK @cjpeg.lst, cjpeg.exe, , libjpeg.lib, ;
- del cjpeg.lst
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- echo $(DOBJECTS) >djpeg.lst
- link /STACK:4096 /EXEPACK @djpeg.lst, djpeg.exe, , libjpeg.lib, ;
- del djpeg.lst
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- link /STACK:4096 /EXEPACK $(TROBJECTS), jpegtran.exe, , libjpeg.lib, ;
-
-rdjpgcom.exe: rdjpgcom.c
- $(CC) -AS -O -W3 rdjpgcom.c
-
-# wrjpgcom needs large model so it can malloc a 64K chunk
-wrjpgcom.exe: wrjpgcom.c
- $(CC) -AL -O -W3 wrjpgcom.c
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- del *.obj
- del libjpeg.lib
- del cjpeg.exe
- del djpeg.exe
- del jpegtran.exe
- del rdjpgcom.exe
- del wrjpgcom.exe
- del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- del testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-jmemdosa.obj : jmemdosa.asm
- masm /mx $*;
diff --git a/unused/makefile.mms b/unused/makefile.mms
deleted file mode 100644
index cf130e5..0000000
--- a/unused/makefile.mms
+++ /dev/null
@@ -1,218 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for use with MMS on Digital VMS systems.
-# Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu)
-# and Tim Bell (tbell@netcom.com) for their help.
-
-# Read installation instructions before saying "MMS" !!
-
-# You may need to adjust these cc options:
-CFLAGS= $(CFLAGS) /NoDebug /Optimize
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via /Define switches here.
-.ifdef ALPHA
-OPT=
-.else
-OPT= ,Sys$Disk:[]MAKVMS.OPT/Option
-.endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \
- jquant1.obj jquant2.obj jdmerge.obj
-# These objectfiles are included in libjpeg.olb
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-# objectfile lists with commas --- what a crock
-COBJLIST= cjpeg.obj,rdppm.obj,rdgif.obj,rdtarga.obj,rdrle.obj,rdbmp.obj,\
- rdswitch.obj,cdjpeg.obj
-DOBJLIST= djpeg.obj,wrppm.obj,wrgif.obj,wrtarga.obj,wrrle.obj,wrbmp.obj,\
- rdcolmap.obj,cdjpeg.obj
-TROBJLIST= jpegtran.obj,rdswitch.obj,cdjpeg.obj,transupp.obj
-LIBOBJLIST= jcapimin.obj,jcapistd.obj,jctrans.obj,jcparam.obj,jdatadst.obj,\
- jcinit.obj,jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,\
- jccoefct.obj,jccolor.obj,jcsample.obj,jchuff.obj,jcphuff.obj,\
- jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,jdapimin.obj,\
- jdapistd.obj,jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,\
- jdmarker.obj,jdhuff.obj,jdphuff.obj,jdmainct.obj,jdcoefct.obj,\
- jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,jidctint.obj,\
- jidctred.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\
- jdmerge.obj,jcomapi.obj,jutils.obj,jerror.obj,jmemmgr.obj,$(SYSDEPMEM)
-
-
-.first
- @- Define /NoLog Sys Sys$Library
-
-ALL : libjpeg.olb cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
- @ Continue
-
-libjpeg.olb : $(LIBOBJECTS)
- Library /Create libjpeg.olb $(LIBOBJLIST)
-
-cjpeg.exe : $(COBJECTS) libjpeg.olb
- $(LINK) $(LFLAGS) /Executable = cjpeg.exe $(COBJLIST),libjpeg.olb/Library$(OPT)
-
-djpeg.exe : $(DOBJECTS) libjpeg.olb
- $(LINK) $(LFLAGS) /Executable = djpeg.exe $(DOBJLIST),libjpeg.olb/Library$(OPT)
-
-jpegtran.exe : $(TROBJECTS) libjpeg.olb
- $(LINK) $(LFLAGS) /Executable = jpegtran.exe $(TROBJLIST),libjpeg.olb/Library$(OPT)
-
-rdjpgcom.exe : rdjpgcom.obj
- $(LINK) $(LFLAGS) /Executable = rdjpgcom.exe rdjpgcom.obj$(OPT)
-
-wrjpgcom.exe : wrjpgcom.obj
- $(LINK) $(LFLAGS) /Executable = wrjpgcom.exe wrjpgcom.obj$(OPT)
-
-jconfig.h : jconfig.vms
- @- Copy jconfig.vms jconfig.h
-
-clean :
- @- Set Protection = Owner:RWED *.*;-1
- @- Set Protection = Owner:RWED *.OBJ
- - Purge /NoLog /NoConfirm *.*
- - Delete /NoLog /NoConfirm *.OBJ;
-
-test : cjpeg.exe djpeg.exe jpegtran.exe
- mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm
- mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg
- - Backup /Compare/Log testimg.ppm testout.ppm
- - Backup /Compare/Log testimg.bmp testout.bmp
- - Backup /Compare/Log testimg.jpg testout.jpg
- - Backup /Compare/Log testimg.ppm testoutp.ppm
- - Backup /Compare/Log testimgp.jpg testoutp.jpg
- - Backup /Compare/Log testorig.jpg testoutt.jpg
-
-
-jcapimin.obj : jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj : jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj : jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj : jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj : jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj : jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj : jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj : jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj : jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj : jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj : jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj : jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj : cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj : rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj : transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/unused/makefile.sas b/unused/makefile.sas
deleted file mode 100644
index f296faf..0000000
--- a/unused/makefile.sas
+++ /dev/null
@@ -1,252 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Amiga systems using SAS C 6.0 and up.
-# Thanks to Ed Hanway, Mark Rinfret, and Jim Zepeda.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= sc
-
-# You may need to adjust these cc options:
-# Uncomment the following lines for generic 680x0 version
-ARCHFLAGS= cpu=any
-SUFFIX=
-
-# Uncomment the following lines for 68030-only version
-#ARCHFLAGS= cpu=68030
-#SUFFIX=.030
-
-CFLAGS= nostackcheck data=near parms=register optimize $(ARCHFLAGS) \
- ignore=104 ignore=304 ignore=306
-# ignore=104 disables warnings for mismatched const qualifiers
-# ignore=304 disables warnings for variables being optimized out
-# ignore=306 disables warnings for the inlining of functions
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via define switches here.
-
-# Link-time cc options:
-LDFLAGS= SC SD ND BATCH
-
-# To link any special libraries, add the necessary commands here.
-LDLIBS= LIB:scm.lib LIB:sc.lib
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Amiga we recommend jmemname.o.
-SYSDEPMEM= jmemname.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= slink
-# file deletion command
-RM= delete quiet
-# library (.lib) file creation command
-AR= oml
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
- jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
- jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
- jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
- jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
- jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
- jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.lib cjpeg$(SUFFIX) djpeg$(SUFFIX) jpegtran$(SUFFIX) rdjpgcom$(SUFFIX) wrjpgcom$(SUFFIX)
-
-# note: do several AR steps to avoid command line length limitations
-
-libjpeg.lib: $(LIBOBJECTS)
- -$(RM) libjpeg.lib
- $(AR) libjpeg.lib r $(CLIBOBJECTS)
- $(AR) libjpeg.lib r $(DLIBOBJECTS)
- $(AR) libjpeg.lib r $(COMOBJECTS)
-
-cjpeg$(SUFFIX): $(COBJECTS) libjpeg.lib
- $(LN) <WITH <
-$(LDFLAGS)
-TO cjpeg$(SUFFIX)
-FROM LIB:c.o $(COBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-djpeg$(SUFFIX): $(DOBJECTS) libjpeg.lib
- $(LN) <WITH <
-$(LDFLAGS)
-TO djpeg$(SUFFIX)
-FROM LIB:c.o $(DOBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-jpegtran$(SUFFIX): $(TROBJECTS) libjpeg.lib
- $(LN) <WITH <
-$(LDFLAGS)
-TO jpegtran$(SUFFIX)
-FROM LIB:c.o $(TROBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-rdjpgcom$(SUFFIX): rdjpgcom.o
- $(LN) <WITH <
-$(LDFLAGS)
-TO rdjpgcom$(SUFFIX)
-FROM LIB:c.o rdjpgcom.o
-LIB $(LDLIBS)
-<
-
-wrjpgcom$(SUFFIX): wrjpgcom.o
- $(LN) <WITH <
-$(LDFLAGS)
-TO wrjpgcom$(SUFFIX)
-FROM LIB:c.o wrjpgcom.o
-LIB $(LDLIBS)
-<
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean:
- -$(RM) *.o cjpeg djpeg jpegtran cjpeg.030 djpeg.030 jpegtran.030
- -$(RM) rdjpgcom wrjpgcom rdjpgcom.030 wrjpgcom.030
- -$(RM) libjpeg.lib core testout*.*
-
-test: cjpeg djpeg jpegtran
- -$(RM) testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.bmp testout.bmp
- cmp testimg.jpg testout.jpg
- cmp testimg.ppm testoutp.ppm
- cmp testimgp.jpg testoutp.jpg
- cmp testorig.jpg testoutt.jpg
-
-
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/unused/makefile.vms b/unused/makefile.vms
deleted file mode 100644
index a42358d..0000000
--- a/unused/makefile.vms
+++ /dev/null
@@ -1,142 +0,0 @@
-$! Makefile for Independent JPEG Group's software
-$!
-$! This is a command procedure for Digital VMS systems that do not have MMS.
-$! It builds the JPEG software by brute force, recompiling everything whether
-$! or not it is necessary. It then runs the basic self-test.
-$! Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu)
-$! and Tim Bell (tbell@netcom.com) for their help.
-$!
-$! Read installation instructions before running this!!
-$!
-$ If F$Mode () .eqs. "INTERACTIVE"
-$ Then
-$ VERIFY = F$Verify (0)
-$ Else
-$ VERIFY = F$Verify (1)
-$ EndIf
-$ On Control_Y Then GoTo End
-$ On Error Then GoTo End
-$
-$ If F$GetSyi ("HW_MODEL") .gt. 1023
-$ Then
-$ OPT = ""
-$ Else
-$ OPT = ",Sys$Disk:[]makvms.opt/Option"
-$ EndIf
-$
-$ DoCompile := CC /NoDebug /Optimize /NoList
-$!
-$ DoCompile jcapimin.c
-$ DoCompile jcapistd.c
-$ DoCompile jctrans.c
-$ DoCompile jcparam.c
-$ DoCompile jdatadst.c
-$ DoCompile jcinit.c
-$ DoCompile jcmaster.c
-$ DoCompile jcmarker.c
-$ DoCompile jcmainct.c
-$ DoCompile jcprepct.c
-$ DoCompile jccoefct.c
-$ DoCompile jccolor.c
-$ DoCompile jcsample.c
-$ DoCompile jchuff.c
-$ DoCompile jcphuff.c
-$ DoCompile jcdctmgr.c
-$ DoCompile jfdctfst.c
-$ DoCompile jfdctflt.c
-$ DoCompile jfdctint.c
-$ DoCompile jdapimin.c
-$ DoCompile jdapistd.c
-$ DoCompile jdtrans.c
-$ DoCompile jdatasrc.c
-$ DoCompile jdmaster.c
-$ DoCompile jdinput.c
-$ DoCompile jdmarker.c
-$ DoCompile jdhuff.c
-$ DoCompile jdphuff.c
-$ DoCompile jdmainct.c
-$ DoCompile jdcoefct.c
-$ DoCompile jdpostct.c
-$ DoCompile jddctmgr.c
-$ DoCompile jidctfst.c
-$ DoCompile jidctflt.c
-$ DoCompile jidctint.c
-$ DoCompile jidctred.c
-$ DoCompile jdsample.c
-$ DoCompile jdcolor.c
-$ DoCompile jquant1.c
-$ DoCompile jquant2.c
-$ DoCompile jdmerge.c
-$ DoCompile jcomapi.c
-$ DoCompile jutils.c
-$ DoCompile jerror.c
-$ DoCompile jmemmgr.c
-$ DoCompile jmemnobs.c
-$!
-$ Library /Create libjpeg.olb jcapimin.obj,jcapistd.obj,jctrans.obj, -
- jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj, -
- jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj, -
- jchuff.obj,jcphuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj, -
- jfdctint.obj,jdapimin.obj,jdapistd.obj,jdtrans.obj,jdatasrc.obj, -
- jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdphuff.obj, -
- jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj, -
- jidctflt.obj,jidctint.obj,jidctred.obj,jdsample.obj,jdcolor.obj, -
- jquant1.obj,jquant2.obj,jdmerge.obj,jcomapi.obj,jutils.obj, -
- jerror.obj,jmemmgr.obj,jmemnobs.obj
-$!
-$ DoCompile cjpeg.c
-$ DoCompile rdppm.c
-$ DoCompile rdgif.c
-$ DoCompile rdtarga.c
-$ DoCompile rdrle.c
-$ DoCompile rdbmp.c
-$ DoCompile rdswitch.c
-$ DoCompile cdjpeg.c
-$!
-$ Link /NoMap /Executable = cjpeg.exe cjpeg.obj,rdppm.obj,rdgif.obj, -
- rdtarga.obj,rdrle.obj,rdbmp.obj,rdswitch.obj,cdjpeg.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile djpeg.c
-$ DoCompile wrppm.c
-$ DoCompile wrgif.c
-$ DoCompile wrtarga.c
-$ DoCompile wrrle.c
-$ DoCompile wrbmp.c
-$ DoCompile rdcolmap.c
-$ DoCompile cdjpeg.c
-$!
-$ Link /NoMap /Executable = djpeg.exe djpeg.obj,wrppm.obj,wrgif.obj, -
- wrtarga.obj,wrrle.obj,wrbmp.obj,rdcolmap.obj,cdjpeg.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile jpegtran.c
-$ DoCompile rdswitch.c
-$ DoCompile cdjpeg.c
-$ DoCompile transupp.c
-$!
-$ Link /NoMap /Executable = jpegtran.exe jpegtran.obj,rdswitch.obj, -
- cdjpeg.obj,transupp.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile rdjpgcom.c
-$ Link /NoMap /Executable = rdjpgcom.exe rdjpgcom.obj'OPT'
-$!
-$ DoCompile wrjpgcom.c
-$ Link /NoMap /Executable = wrjpgcom.exe wrjpgcom.obj'OPT'
-$!
-$! Run the self-test
-$!
-$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
-$ mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
-$ mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm
-$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-$ mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-$ mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg
-$ Backup /Compare/Log testimg.ppm testout.ppm
-$ Backup /Compare/Log testimg.bmp testout.bmp
-$ Backup /Compare/Log testimg.jpg testout.jpg
-$ Backup /Compare/Log testimg.ppm testoutp.ppm
-$ Backup /Compare/Log testimgp.jpg testoutp.jpg
-$ Backup /Compare/Log testorig.jpg testoutt.jpg
-$!
-$End:
-$ If Verify Then Set Verify
-$ Exit
diff --git a/unused/makefile.wat b/unused/makefile.wat
deleted file mode 100644
index d953e46..0000000
--- a/unused/makefile.wat
+++ /dev/null
@@ -1,233 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using
-# dos4g extender), OS/2, and Windows NT console mode.
-# Thanks to Janos Haide, jhaide@btrvtech.com.
-
-# Read installation instructions before saying "wmake" !!
-
-# Uncomment line for desired system
-SYSTEM=DOS
-#SYSTEM=OS2
-#SYSTEM=NT
-
-# The name of your C compiler:
-CC= wcl386
-
-# You may need to adjust these cc options:
-CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM)
-# Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-!ifeq SYSTEM DOS
-LDFLAGS= -zq -l=dos4g
-!else ifeq SYSTEM OS2
-LDFLAGS= -zq -l=os2v2
-!else ifeq SYSTEM NT
-LDFLAGS= -zq -l=nt
-!endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. jmemnobs should work fine for dos4g or OS/2 environment.
-SYSDEPMEM= jmemnobs.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c &
- jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c &
- jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c &
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c &
- jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c &
- jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c &
- jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c &
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c &
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c &
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h &
- jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
- wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc &
- coderules.doc filelist.doc change.log
-MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc &
- makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds &
- makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st &
- maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms &
- makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat &
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas &
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
-OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg &
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj &
- jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj &
- jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj &
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj &
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj &
- jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj &
- jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj &
- jquant1.obj jquant2.obj jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj &
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj &
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
- - del libjpeg.lib
- * wlib -n libjpeg.lib $(LIBOBJECTS)
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib
-
-rdjpgcom.exe: rdjpgcom.c
- $(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c
-
-wrjpgcom.exe: wrjpgcom.c
- $(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c
-
-.c.obj:
- $(CC) $(CFLAGS) -c $<
-
-jconfig.h: jconfig.doc
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.doc.
- exit 1
-
-clean: .SYMBOLIC
- - del *.obj
- - del libjpeg.lib
- - del cjpeg.exe
- - del djpeg.exe
- - del jpegtran.exe
- - del rdjpgcom.exe
- - del wrjpgcom.exe
- - del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC
- - del testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
-!ifeq SYSTEM DOS
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-!else
- echo n > n.tmp
- comp testimg.ppm testout.ppm < n.tmp
- comp testimg.bmp testout.bmp < n.tmp
- comp testimg.jpg testout.jpg < n.tmp
- comp testimg.ppm testoutp.ppm < n.tmp
- comp testimgp.jpg testoutp.jpg < n.tmp
- comp testorig.jpg testoutt.jpg < n.tmp
- del n.tmp
-!endif
-
-
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/unused/makelib.ds b/unused/makelib.ds
deleted file mode 100644
index c7ad36d..0000000
--- a/unused/makelib.ds
+++ /dev/null
@@ -1,1046 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-!IF "$(CFG)" == ""
-CFG=jpeg - Win32
-!MESSAGE No configuration specified. Defaulting to jpeg - Win32.
-!ENDIF
-
-!IF "$(CFG)" != "jpeg - Win32"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "jpeg - Win32" (based on "Win32 (x86) Static Library")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "jpeg - Win32"
-CPP=cl.exe
-
-!IF "$(CFG)" == "jpeg - Win32"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-OUTDIR=.\Release
-INTDIR=.\Release
-
-ALL : "$(OUTDIR)\jpeg.lib"
-
-CLEAN :
- -@erase "$(INTDIR)\jcapimin.obj"
- -@erase "$(INTDIR)\jcapistd.obj"
- -@erase "$(INTDIR)\jctrans.obj"
- -@erase "$(INTDIR)\jcparam.obj"
- -@erase "$(INTDIR)\jdatadst.obj"
- -@erase "$(INTDIR)\jcinit.obj"
- -@erase "$(INTDIR)\jcmaster.obj"
- -@erase "$(INTDIR)\jcmarker.obj"
- -@erase "$(INTDIR)\jcmainct.obj"
- -@erase "$(INTDIR)\jcprepct.obj"
- -@erase "$(INTDIR)\jccoefct.obj"
- -@erase "$(INTDIR)\jccolor.obj"
- -@erase "$(INTDIR)\jcsample.obj"
- -@erase "$(INTDIR)\jchuff.obj"
- -@erase "$(INTDIR)\jcphuff.obj"
- -@erase "$(INTDIR)\jcdctmgr.obj"
- -@erase "$(INTDIR)\jfdctfst.obj"
- -@erase "$(INTDIR)\jfdctflt.obj"
- -@erase "$(INTDIR)\jfdctint.obj"
- -@erase "$(INTDIR)\jdapimin.obj"
- -@erase "$(INTDIR)\jdapistd.obj"
- -@erase "$(INTDIR)\jdtrans.obj"
- -@erase "$(INTDIR)\jdatasrc.obj"
- -@erase "$(INTDIR)\jdmaster.obj"
- -@erase "$(INTDIR)\jdinput.obj"
- -@erase "$(INTDIR)\jdmarker.obj"
- -@erase "$(INTDIR)\jdhuff.obj"
- -@erase "$(INTDIR)\jdphuff.obj"
- -@erase "$(INTDIR)\jdmainct.obj"
- -@erase "$(INTDIR)\jdcoefct.obj"
- -@erase "$(INTDIR)\jdpostct.obj"
- -@erase "$(INTDIR)\jddctmgr.obj"
- -@erase "$(INTDIR)\jidctfst.obj"
- -@erase "$(INTDIR)\jidctflt.obj"
- -@erase "$(INTDIR)\jidctint.obj"
- -@erase "$(INTDIR)\jidctred.obj"
- -@erase "$(INTDIR)\jdsample.obj"
- -@erase "$(INTDIR)\jdcolor.obj"
- -@erase "$(INTDIR)\jquant1.obj"
- -@erase "$(INTDIR)\jquant2.obj"
- -@erase "$(INTDIR)\jdmerge.obj"
- -@erase "$(INTDIR)\jcomapi.obj"
- -@erase "$(INTDIR)\jutils.obj"
- -@erase "$(INTDIR)\jerror.obj"
- -@erase "$(INTDIR)\jmemmgr.obj"
- -@erase "$(INTDIR)\jmemnobs.obj"
- -@erase "$(OUTDIR)\jpeg.lib"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
- /Fp"$(INTDIR)/jpeg.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\Release/
-CPP_SBRS=.\.
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/jpeg.bsc"
-BSC32_SBRS= \
-
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-LIB32_FLAGS=/nologo /out:"$(OUTDIR)/jpeg.lib"
-LIB32_OBJS= \
- "$(INTDIR)\jcapimin.obj" \
- "$(INTDIR)\jcapistd.obj" \
- "$(INTDIR)\jctrans.obj" \
- "$(INTDIR)\jcparam.obj" \
- "$(INTDIR)\jdatadst.obj" \
- "$(INTDIR)\jcinit.obj" \
- "$(INTDIR)\jcmaster.obj" \
- "$(INTDIR)\jcmarker.obj" \
- "$(INTDIR)\jcmainct.obj" \
- "$(INTDIR)\jcprepct.obj" \
- "$(INTDIR)\jccoefct.obj" \
- "$(INTDIR)\jccolor.obj" \
- "$(INTDIR)\jcsample.obj" \
- "$(INTDIR)\jchuff.obj" \
- "$(INTDIR)\jcphuff.obj" \
- "$(INTDIR)\jcdctmgr.obj" \
- "$(INTDIR)\jfdctfst.obj" \
- "$(INTDIR)\jfdctflt.obj" \
- "$(INTDIR)\jfdctint.obj" \
- "$(INTDIR)\jdapimin.obj" \
- "$(INTDIR)\jdapistd.obj" \
- "$(INTDIR)\jdtrans.obj" \
- "$(INTDIR)\jdatasrc.obj" \
- "$(INTDIR)\jdmaster.obj" \
- "$(INTDIR)\jdinput.obj" \
- "$(INTDIR)\jdmarker.obj" \
- "$(INTDIR)\jdhuff.obj" \
- "$(INTDIR)\jdphuff.obj" \
- "$(INTDIR)\jdmainct.obj" \
- "$(INTDIR)\jdcoefct.obj" \
- "$(INTDIR)\jdpostct.obj" \
- "$(INTDIR)\jddctmgr.obj" \
- "$(INTDIR)\jidctfst.obj" \
- "$(INTDIR)\jidctflt.obj" \
- "$(INTDIR)\jidctint.obj" \
- "$(INTDIR)\jidctred.obj" \
- "$(INTDIR)\jdsample.obj" \
- "$(INTDIR)\jdcolor.obj" \
- "$(INTDIR)\jquant1.obj" \
- "$(INTDIR)\jquant2.obj" \
- "$(INTDIR)\jdmerge.obj" \
- "$(INTDIR)\jcomapi.obj" \
- "$(INTDIR)\jutils.obj" \
- "$(INTDIR)\jerror.obj" \
- "$(INTDIR)\jmemmgr.obj" \
- "$(INTDIR)\jmemnobs.obj"
-
-"$(OUTDIR)\jpeg.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
- $(LIB32) @<<
- $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-!ENDIF
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-################################################################################
-# Begin Target
-
-# Name "jpeg - Win32"
-
-!IF "$(CFG)" == "jpeg - Win32"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE="jcapimin.c"
-DEP_CPP_JCAPI=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcapimin.obj" : $(SOURCE) $(DEP_CPP_JCAPI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcapistd.c"
-DEP_CPP_JCAPIS=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcapistd.obj" : $(SOURCE) $(DEP_CPP_JCAPIS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jccoefct.c"
-DEP_CPP_JCCOE=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jccoefct.obj" : $(SOURCE) $(DEP_CPP_JCCOE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jccolor.c"
-DEP_CPP_JCCOL=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jccolor.obj" : $(SOURCE) $(DEP_CPP_JCCOL) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcdctmgr.c"
-DEP_CPP_JCDCT=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jcdctmgr.obj" : $(SOURCE) $(DEP_CPP_JCDCT) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jchuff.c"
-DEP_CPP_JCHUF=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jchuff.h"\
-
-
-"$(INTDIR)\jchuff.obj" : $(SOURCE) $(DEP_CPP_JCHUF) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcinit.c"
-DEP_CPP_JCINI=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcinit.obj" : $(SOURCE) $(DEP_CPP_JCINI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcmainct.c"
-DEP_CPP_JCMAI=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcmainct.obj" : $(SOURCE) $(DEP_CPP_JCMAI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcmarker.c"
-DEP_CPP_JCMAR=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcmarker.obj" : $(SOURCE) $(DEP_CPP_JCMAR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcmaster.c"
-DEP_CPP_JCMAS=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcmaster.obj" : $(SOURCE) $(DEP_CPP_JCMAS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcomapi.c"
-DEP_CPP_JCOMA=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcomapi.obj" : $(SOURCE) $(DEP_CPP_JCOMA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcparam.c"
-DEP_CPP_JCPAR=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcparam.obj" : $(SOURCE) $(DEP_CPP_JCPAR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcphuff.c"
-DEP_CPP_JCPHU=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jchuff.h"\
-
-
-"$(INTDIR)\jcphuff.obj" : $(SOURCE) $(DEP_CPP_JCPHU) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcprepct.c"
-DEP_CPP_JCPRE=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcprepct.obj" : $(SOURCE) $(DEP_CPP_JCPRE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jcsample.c"
-DEP_CPP_JCSAM=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jcsample.obj" : $(SOURCE) $(DEP_CPP_JCSAM) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jctrans.c"
-DEP_CPP_JCTRA=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jctrans.obj" : $(SOURCE) $(DEP_CPP_JCTRA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdapimin.c"
-DEP_CPP_JDAPI=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdapimin.obj" : $(SOURCE) $(DEP_CPP_JDAPI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdapistd.c"
-DEP_CPP_JDAPIS=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdapistd.obj" : $(SOURCE) $(DEP_CPP_JDAPIS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdatadst.c"
-DEP_CPP_JDATA=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdatadst.obj" : $(SOURCE) $(DEP_CPP_JDATA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdatasrc.c"
-DEP_CPP_JDATAS=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdatasrc.obj" : $(SOURCE) $(DEP_CPP_JDATAS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdcoefct.c"
-DEP_CPP_JDCOE=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdcoefct.obj" : $(SOURCE) $(DEP_CPP_JDCOE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdcolor.c"
-DEP_CPP_JDCOL=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdcolor.obj" : $(SOURCE) $(DEP_CPP_JDCOL) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jddctmgr.c"
-DEP_CPP_JDDCT=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jddctmgr.obj" : $(SOURCE) $(DEP_CPP_JDDCT) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdhuff.c"
-DEP_CPP_JDHUF=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdhuff.h"\
-
-
-"$(INTDIR)\jdhuff.obj" : $(SOURCE) $(DEP_CPP_JDHUF) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdinput.c"
-DEP_CPP_JDINP=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdinput.obj" : $(SOURCE) $(DEP_CPP_JDINP) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdmainct.c"
-DEP_CPP_JDMAI=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdmainct.obj" : $(SOURCE) $(DEP_CPP_JDMAI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdmarker.c"
-DEP_CPP_JDMAR=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdmarker.obj" : $(SOURCE) $(DEP_CPP_JDMAR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdmaster.c"
-DEP_CPP_JDMAS=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdmaster.obj" : $(SOURCE) $(DEP_CPP_JDMAS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdmerge.c"
-DEP_CPP_JDMER=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdmerge.obj" : $(SOURCE) $(DEP_CPP_JDMER) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdphuff.c"
-DEP_CPP_JDPHU=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdhuff.h"\
-
-
-"$(INTDIR)\jdphuff.obj" : $(SOURCE) $(DEP_CPP_JDPHU) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdpostct.c"
-DEP_CPP_JDPOS=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdpostct.obj" : $(SOURCE) $(DEP_CPP_JDPOS) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdsample.c"
-DEP_CPP_JDSAM=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdsample.obj" : $(SOURCE) $(DEP_CPP_JDSAM) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jdtrans.c"
-DEP_CPP_JDTRA=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jdtrans.obj" : $(SOURCE) $(DEP_CPP_JDTRA) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jerror.c"
-DEP_CPP_JERRO=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jversion.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jerror.obj" : $(SOURCE) $(DEP_CPP_JERRO) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jfdctflt.c"
-DEP_CPP_JFDCT=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jfdctflt.obj" : $(SOURCE) $(DEP_CPP_JFDCT) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jfdctfst.c"
-DEP_CPP_JFDCTF=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jfdctfst.obj" : $(SOURCE) $(DEP_CPP_JFDCTF) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jfdctint.c"
-DEP_CPP_JFDCTI=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jfdctint.obj" : $(SOURCE) $(DEP_CPP_JFDCTI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jidctflt.c"
-DEP_CPP_JIDCT=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jidctflt.obj" : $(SOURCE) $(DEP_CPP_JIDCT) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jidctfst.c"
-DEP_CPP_JIDCTF=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jidctfst.obj" : $(SOURCE) $(DEP_CPP_JIDCTF) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jidctint.c"
-DEP_CPP_JIDCTI=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jidctint.obj" : $(SOURCE) $(DEP_CPP_JIDCTI) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jidctred.c"
-DEP_CPP_JIDCTR=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jdct.h"\
-
-
-"$(INTDIR)\jidctred.obj" : $(SOURCE) $(DEP_CPP_JIDCTR) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jquant1.c"
-DEP_CPP_JQUAN=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jquant1.obj" : $(SOURCE) $(DEP_CPP_JQUAN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jquant2.c"
-DEP_CPP_JQUANT=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jquant2.obj" : $(SOURCE) $(DEP_CPP_JQUANT) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jutils.c"
-DEP_CPP_JUTIL=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
-
-
-"$(INTDIR)\jutils.obj" : $(SOURCE) $(DEP_CPP_JUTIL) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jmemmgr.c"
-DEP_CPP_JMEMM=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jmemsys.h"\
-
-
-"$(INTDIR)\jmemmgr.obj" : $(SOURCE) $(DEP_CPP_JMEMM) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-################################################################################
-# Begin Source File
-
-SOURCE="jmemnobs.c"
-DEP_CPP_JMEMN=\
- "jinclude.h"\
- "jconfig.h"\
- "jpeglib.h"\
- "jmorecfg.h"\
- "jpegint.h"\
- "jerror.h"\
- "jmemsys.h"\
-
-
-"$(INTDIR)\jmemnobs.obj" : $(SOURCE) $(DEP_CPP_JMEMN) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
-
diff --git a/unused/makeproj.mac b/unused/makeproj.mac
deleted file mode 100644
index ed277c8..0000000
--- a/unused/makeproj.mac
+++ /dev/null
@@ -1,213 +0,0 @@
---
--- makeproj.mac
---
--- This AppleScript builds Code Warrior PRO Release 2 project files for the
--- libjpeg library as well as the test programs 'cjpeg', 'djpeg', 'jpegtran'.
--- (We'd distribute real project files, except they're not text
--- and would create maintenance headaches.)
---
--- The script then compiles and links the library and the test programs.
--- NOTE: if you haven't already created a 'jconfig.h' file, the script
--- automatically copies 'jconfig.mac' to 'jconfig.h'.
---
--- To use this script, you must have AppleScript 1.1 or later installed
--- and a suitable AppleScript editor like Script Editor or Script Debugger
--- (http://www.latenightsw.com). Open this file with your AppleScript
--- editor and execute the "run" command to build the projects.
---
--- Thanks to Dan Sears and Don Agro for this script.
--- Questions about this script can be addressed to dogpark@interlog.com
---
-
-on run
-
- choose folder with prompt ">>> Select IJG source folder <<<"
- set ijg_folder to result
-
- choose folder with prompt ">>> Select MetroWerks folder <<<"
- set cw_folder to result
-
- -- if jconfig.h doesn't already exist, copy jconfig.mac
-
- tell application "Finder"
- if not (exists file "jconfig.h" of ijg_folder) then
- duplicate {file "jconfig.mac" of folder ijg_folder}
- select file "jconfig.mac copy" of folder ijg_folder
- set name of selection to "jconfig.h"
- end if
- end tell
-
- tell application "CodeWarrior IDE 2.1"
- with timeout of 10000 seconds
-
- -- create libjpeg project
-
- activate
- Create Project (ijg_folder as string) & "libjpeg.proj"
- Set Preferences of panel "Target Settings" to {Target Name:"libjpeg"}
- Set Preferences of panel "PPC Project" to {File Name:"libjpeg"}
- Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
- Set Preferences of panel "PPC Project" to {Project Type:library}
- Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
- Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
- Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
- Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
- Add Files (ijg_folder as string) & "jcapimin.c" To Segment 1
- Add Files (ijg_folder as string) & "jcapistd.c" To Segment 1
- Add Files (ijg_folder as string) & "jctrans.c" To Segment 1
- Add Files (ijg_folder as string) & "jcparam.c" To Segment 1
- Add Files (ijg_folder as string) & "jdatadst.c" To Segment 1
- Add Files (ijg_folder as string) & "jcinit.c" To Segment 1
- Add Files (ijg_folder as string) & "jcmaster.c" To Segment 1
- Add Files (ijg_folder as string) & "jcmarker.c" To Segment 1
- Add Files (ijg_folder as string) & "jcmainct.c" To Segment 1
- Add Files (ijg_folder as string) & "jcprepct.c" To Segment 1
- Add Files (ijg_folder as string) & "jccoefct.c" To Segment 1
- Add Files (ijg_folder as string) & "jccolor.c" To Segment 1
- Add Files (ijg_folder as string) & "jcsample.c" To Segment 1
- Add Files (ijg_folder as string) & "jchuff.c" To Segment 1
- Add Files (ijg_folder as string) & "jcphuff.c" To Segment 1
- Add Files (ijg_folder as string) & "jcdctmgr.c" To Segment 1
- Add Files (ijg_folder as string) & "jfdctfst.c" To Segment 1
- Add Files (ijg_folder as string) & "jfdctflt.c" To Segment 1
- Add Files (ijg_folder as string) & "jfdctint.c" To Segment 1
- Add Files (ijg_folder as string) & "jdapimin.c" To Segment 1
- Add Files (ijg_folder as string) & "jdapistd.c" To Segment 1
- Add Files (ijg_folder as string) & "jdtrans.c" To Segment 1
- Add Files (ijg_folder as string) & "jdatasrc.c" To Segment 1
- Add Files (ijg_folder as string) & "jdmaster.c" To Segment 1
- Add Files (ijg_folder as string) & "jdinput.c" To Segment 1
- Add Files (ijg_folder as string) & "jdmarker.c" To Segment 1
- Add Files (ijg_folder as string) & "jdhuff.c" To Segment 1
- Add Files (ijg_folder as string) & "jdphuff.c" To Segment 1
- Add Files (ijg_folder as string) & "jdmainct.c" To Segment 1
- Add Files (ijg_folder as string) & "jdcoefct.c" To Segment 1
- Add Files (ijg_folder as string) & "jdpostct.c" To Segment 1
- Add Files (ijg_folder as string) & "jddctmgr.c" To Segment 1
- Add Files (ijg_folder as string) & "jidctfst.c" To Segment 1
- Add Files (ijg_folder as string) & "jidctflt.c" To Segment 1
- Add Files (ijg_folder as string) & "jidctint.c" To Segment 1
- Add Files (ijg_folder as string) & "jidctred.c" To Segment 1
- Add Files (ijg_folder as string) & "jdsample.c" To Segment 1
- Add Files (ijg_folder as string) & "jdcolor.c" To Segment 1
- Add Files (ijg_folder as string) & "jquant1.c" To Segment 1
- Add Files (ijg_folder as string) & "jquant2.c" To Segment 1
- Add Files (ijg_folder as string) & "jdmerge.c" To Segment 1
- Add Files (ijg_folder as string) & "jcomapi.c" To Segment 1
- Add Files (ijg_folder as string) & "jutils.c" To Segment 1
- Add Files (ijg_folder as string) & "jerror.c" To Segment 1
- Add Files (ijg_folder as string) & "jmemmgr.c" To Segment 1
- Add Files (ijg_folder as string) & "jmemmac.c" To Segment 1
-
- -- compile and link the library
-
- Make Project
- Close Project
-
- -- create cjpeg project
-
- activate
- Create Project (ijg_folder as string) & "cjpeg.proj"
- Set Preferences of panel "Target Settings" to {Target Name:"cjpeg"}
- Set Preferences of panel "PPC Project" to {File Name:"cjpeg"}
- Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
- Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
- Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
- Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
- Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
- Add Files (ijg_folder as string) & "cjpeg.c" To Segment 1
- Add Files (ijg_folder as string) & "rdppm.c" To Segment 1
- Add Files (ijg_folder as string) & "rdgif.c" To Segment 1
- Add Files (ijg_folder as string) & "rdtarga.c" To Segment 1
- Add Files (ijg_folder as string) & "rdrle.c" To Segment 1
- Add Files (ijg_folder as string) & "rdbmp.c" To Segment 1
- Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1
- Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
-
- Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
- -- compile and link cjpeg
-
- Make Project
- Close Project
-
- -- create djpeg project
-
- activate
- Create Project (ijg_folder as string) & "djpeg.proj"
- Set Preferences of panel "Target Settings" to {Target Name:"djpeg"}
- Set Preferences of panel "PPC Project" to {File Name:"djpeg"}
- Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
- Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
- Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
- Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
- Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
- Add Files (ijg_folder as string) & "djpeg.c" To Segment 1
- Add Files (ijg_folder as string) & "wrppm.c" To Segment 1
- Add Files (ijg_folder as string) & "wrgif.c" To Segment 1
- Add Files (ijg_folder as string) & "wrtarga.c" To Segment 1
- Add Files (ijg_folder as string) & "wrrle.c" To Segment 1
- Add Files (ijg_folder as string) & "wrbmp.c" To Segment 1
- Add Files (ijg_folder as string) & "rdcolmap.c" To Segment 1
- Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
-
- Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
- -- compile and link djpeg
-
- Make Project
- Close Project
-
- -- create jpegtran project
-
- activate
- Create Project (ijg_folder as string) & "jpegtran.proj"
- Set Preferences of panel "Target Settings" to {Target Name:"jpegtran"}
- Set Preferences of panel "PPC Project" to {File Name:"jpegtran"}
- Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
- Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
- Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
- Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
- Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
- Add Files (ijg_folder as string) & "jpegtran.c" To Segment 1
- Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1
- Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
- Add Files (ijg_folder as string) & "transupp.c" To Segment 1
-
- Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
- -- compile and link jpegtran
-
- Make Project
- Close Project
-
- quit
-
- end timeout
- end tell
-end run
diff --git a/unused/makljpeg.st b/unused/makljpeg.st
deleted file mode 100644
index 813493e..0000000
--- a/unused/makljpeg.st
+++ /dev/null
@@ -1,70 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de),
-; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de),
-; and Guido Vollbeding (guivol@esc.de).
-;
-; To use this file, rename it to libjpeg.prj.
-; Read installation instructions before trying to make the program!
-;
-;
-; * * * Output file * * *
-libjpeg.lib
-;
-; * * * COMPILER OPTIONS * * *
-.C[-P] ; absolute calls
-.C[-M] ; and no string merging, folks
-.C[-w-cln] ; no "constant is long" warnings
-.C[-w-par] ; no "parameter xxxx unused"
-.C[-w-rch] ; no "unreachable code"
-.C[-wsig] ; warn if significant digits may be lost
-.L[-J] ; link new Obj-format (so we get a library)
-=
-; * * * * List of modules * * * *
-jcapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jccoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jccolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcdctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jchuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h)
-jcinit.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcomapi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcparam.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h)
-jcprepct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jctrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdatadst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h)
-jdatasrc.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h)
-jdcoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdcolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jddctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jdhuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h)
-jdinput.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmerge.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h)
-jdpostct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdtrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jerror.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h)
-jfdctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jfdctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jfdctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctred.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jquant1.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jquant2.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jutils.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jmemmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h)
-jmemansi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h)
diff --git a/unused/maktjpeg.st b/unused/maktjpeg.st
deleted file mode 100644
index 31f4d16..0000000
--- a/unused/maktjpeg.st
+++ /dev/null
@@ -1,32 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de),
-; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de),
-; and Guido Vollbeding (guivol@esc.de).
-;
-; To use this file, rename it to jpegtran.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-; * * * Output file * * *
-jpegtran.ttp
-;
-; * * * COMPILER OPTIONS * * *
-.C[-P] ; absolute calls
-.C[-M] ; and no string merging, folks
-.C[-w-cln] ; no "constant is long" warnings
-.C[-w-par] ; no "parameter xxxx unused"
-.C[-w-rch] ; no "unreachable code"
-.C[-wsig] ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * *
-pcstart.o
-jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h)
-cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h)
-libjpeg.lib ; built by libjpeg.prj
-pcstdlib.lib ; standard library
-pcextlib.lib ; extended library
diff --git a/unused/makvms.opt b/unused/makvms.opt
deleted file mode 100644
index 675e8fe..0000000
--- a/unused/makvms.opt
+++ /dev/null
@@ -1,4 +0,0 @@
-! A pointer to the VAX/VMS C Run-Time Shareable Library.
-! This file is needed by makefile.mms and makefile.vms,
-! but only for the older VAX C compiler. DEC C does not need it.
-Sys$Library:VAXCRTL.EXE /Share
diff --git a/unused/rdgif.c b/unused/rdgif.c
deleted file mode 100644
index b27c167..0000000
--- a/unused/rdgif.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * rdgif.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to read input images in GIF format.
- *
- *****************************************************************************
- * NOTE: to avoid entanglements with Unisys' patent on LZW compression, *
- * the ability to read GIF files has been removed from the IJG distribution. *
- * Sorry about that. *
- *****************************************************************************
- *
- * We are required to state that
- * "The Graphics Interchange Format(c) is the Copyright property of
- * CompuServe Incorporated. GIF(sm) is a Service Mark property of
- * CompuServe Incorporated."
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef GIF_SUPPORTED
-
-/*
- * The module selection routine for GIF format input.
- */
-
-GLOBAL(cjpeg_source_ptr)
-jinit_read_gif (j_compress_ptr cinfo)
-{
- fprintf(stderr, "GIF input is unsupported for legal reasons. Sorry.\n");
- exit(EXIT_FAILURE);
- return NULL; /* keep compiler happy */
-}
-
-#endif /* GIF_SUPPORTED */
diff --git a/unused/wrgif.c b/unused/wrgif.c
deleted file mode 100644
index 5fe8328..0000000
--- a/unused/wrgif.c
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- * wrgif.c
- *
- * Copyright (C) 1991-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in GIF format.
- *
- **************************************************************************
- * NOTE: to avoid entanglements with Unisys' patent on LZW compression, *
- * this code has been modified to output "uncompressed GIF" files. *
- * There is no trace of the LZW algorithm in this file. *
- **************************************************************************
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume output to
- * an ordinary stdio stream.
- */
-
-/*
- * This code is loosely based on ppmtogif from the PBMPLUS distribution
- * of Feb. 1991. That file contains the following copyright notice:
- * Based on GIFENCODE by David Rowley <mgardi@watdscu.waterloo.edu>.
- * Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al.
- * Copyright (C) 1989 by Jef Poskanzer.
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation. This software is provided "as is" without express or
- * implied warranty.
- *
- * We are also required to state that
- * "The Graphics Interchange Format(c) is the Copyright property of
- * CompuServe Incorporated. GIF(sm) is a Service Mark property of
- * CompuServe Incorporated."
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef GIF_SUPPORTED
-
-
-/* Private version of data destination object */
-
-typedef struct {
- struct djpeg_dest_struct pub; /* public fields */
-
- j_decompress_ptr cinfo; /* back link saves passing separate parm */
-
- /* State for packing variable-width codes into a bitstream */
- int n_bits; /* current number of bits/code */
- int maxcode; /* maximum code, given n_bits */
- INT32 cur_accum; /* holds bits not yet output */
- int cur_bits; /* # of bits in cur_accum */
-
- /* State for GIF code assignment */
- int ClearCode; /* clear code (doesn't change) */
- int EOFCode; /* EOF code (ditto) */
- int code_counter; /* counts output symbols */
-
- /* GIF data packet construction buffer */
- int bytesinpkt; /* # of bytes in current packet */
- char packetbuf[256]; /* workspace for accumulating packet */
-
-} gif_dest_struct;
-
-typedef gif_dest_struct * gif_dest_ptr;
-
-/* Largest value that will fit in N bits */
-#define MAXCODE(n_bits) ((1 << (n_bits)) - 1)
-
-
-/*
- * Routines to package finished data bytes into GIF data blocks.
- * A data block consists of a count byte (1..255) and that many data bytes.
- */
-
-LOCAL(void)
-flush_packet (gif_dest_ptr dinfo)
-/* flush any accumulated data */
-{
- if (dinfo->bytesinpkt > 0) { /* never write zero-length packet */
- dinfo->packetbuf[0] = (char) dinfo->bytesinpkt++;
- if (JFWRITE(dinfo->pub.output_file, dinfo->packetbuf, dinfo->bytesinpkt)
- != (size_t) dinfo->bytesinpkt)
- ERREXIT(dinfo->cinfo, JERR_FILE_WRITE);
- dinfo->bytesinpkt = 0;
- }
-}
-
-
-/* Add a character to current packet; flush to disk if necessary */
-#define CHAR_OUT(dinfo,c) \
- { (dinfo)->packetbuf[++(dinfo)->bytesinpkt] = (char) (c); \
- if ((dinfo)->bytesinpkt >= 255) \
- flush_packet(dinfo); \
- }
-
-
-/* Routine to convert variable-width codes into a byte stream */
-
-LOCAL(void)
-output (gif_dest_ptr dinfo, int code)
-/* Emit a code of n_bits bits */
-/* Uses cur_accum and cur_bits to reblock into 8-bit bytes */
-{
- dinfo->cur_accum |= ((INT32) code) << dinfo->cur_bits;
- dinfo->cur_bits += dinfo->n_bits;
-
- while (dinfo->cur_bits >= 8) {
- CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF);
- dinfo->cur_accum >>= 8;
- dinfo->cur_bits -= 8;
- }
-}
-
-
-/* The pseudo-compression algorithm.
- *
- * In this module we simply output each pixel value as a separate symbol;
- * thus, no compression occurs. In fact, there is expansion of one bit per
- * pixel, because we use a symbol width one bit wider than the pixel width.
- *
- * GIF ordinarily uses variable-width symbols, and the decoder will expect
- * to ratchet up the symbol width after a fixed number of symbols.
- * To simplify the logic and keep the expansion penalty down, we emit a
- * GIF Clear code to reset the decoder just before the width would ratchet up.
- * Thus, all the symbols in the output file will have the same bit width.
- * Note that emitting the Clear codes at the right times is a mere matter of
- * counting output symbols and is in no way dependent on the LZW patent.
- *
- * With a small basic pixel width (low color count), Clear codes will be
- * needed very frequently, causing the file to expand even more. So this
- * simplistic approach wouldn't work too well on bilevel images, for example.
- * But for output of JPEG conversions the pixel width will usually be 8 bits
- * (129 to 256 colors), so the overhead added by Clear symbols is only about
- * one symbol in every 256.
- */
-
-LOCAL(void)
-compress_init (gif_dest_ptr dinfo, int i_bits)
-/* Initialize pseudo-compressor */
-{
- /* init all the state variables */
- dinfo->n_bits = i_bits;
- dinfo->maxcode = MAXCODE(dinfo->n_bits);
- dinfo->ClearCode = (1 << (i_bits - 1));
- dinfo->EOFCode = dinfo->ClearCode + 1;
- dinfo->code_counter = dinfo->ClearCode + 2;
- /* init output buffering vars */
- dinfo->bytesinpkt = 0;
- dinfo->cur_accum = 0;
- dinfo->cur_bits = 0;
- /* GIF specifies an initial Clear code */
- output(dinfo, dinfo->ClearCode);
-}
-
-
-LOCAL(void)
-compress_pixel (gif_dest_ptr dinfo, int c)
-/* Accept and "compress" one pixel value.
- * The given value must be less than n_bits wide.
- */
-{
- /* Output the given pixel value as a symbol. */
- output(dinfo, c);
- /* Issue Clear codes often enough to keep the reader from ratcheting up
- * its symbol size.
- */
- if (dinfo->code_counter < dinfo->maxcode) {
- dinfo->code_counter++;
- } else {
- output(dinfo, dinfo->ClearCode);
- dinfo->code_counter = dinfo->ClearCode + 2; /* reset the counter */
- }
-}
-
-
-LOCAL(void)
-compress_term (gif_dest_ptr dinfo)
-/* Clean up at end */
-{
- /* Send an EOF code */
- output(dinfo, dinfo->EOFCode);
- /* Flush the bit-packing buffer */
- if (dinfo->cur_bits > 0) {
- CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF);
- }
- /* Flush the packet buffer */
- flush_packet(dinfo);
-}
-
-
-/* GIF header construction */
-
-
-LOCAL(void)
-put_word (gif_dest_ptr dinfo, unsigned int w)
-/* Emit a 16-bit word, LSB first */
-{
- putc(w & 0xFF, dinfo->pub.output_file);
- putc((w >> 8) & 0xFF, dinfo->pub.output_file);
-}
-
-
-LOCAL(void)
-put_3bytes (gif_dest_ptr dinfo, int val)
-/* Emit 3 copies of same byte value --- handy subr for colormap construction */
-{
- putc(val, dinfo->pub.output_file);
- putc(val, dinfo->pub.output_file);
- putc(val, dinfo->pub.output_file);
-}
-
-
-LOCAL(void)
-emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap)
-/* Output the GIF file header, including color map */
-/* If colormap==NULL, synthesize a gray-scale colormap */
-{
- int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte;
- int cshift = dinfo->cinfo->data_precision - 8;
- int i;
-
- if (num_colors > 256)
- ERREXIT1(dinfo->cinfo, JERR_TOO_MANY_COLORS, num_colors);
- /* Compute bits/pixel and related values */
- BitsPerPixel = 1;
- while (num_colors > (1 << BitsPerPixel))
- BitsPerPixel++;
- ColorMapSize = 1 << BitsPerPixel;
- if (BitsPerPixel <= 1)
- InitCodeSize = 2;
- else
- InitCodeSize = BitsPerPixel;
- /*
- * Write the GIF header.
- * Note that we generate a plain GIF87 header for maximum compatibility.
- */
- putc('G', dinfo->pub.output_file);
- putc('I', dinfo->pub.output_file);
- putc('F', dinfo->pub.output_file);
- putc('8', dinfo->pub.output_file);
- putc('7', dinfo->pub.output_file);
- putc('a', dinfo->pub.output_file);
- /* Write the Logical Screen Descriptor */
- put_word(dinfo, (unsigned int) dinfo->cinfo->output_width);
- put_word(dinfo, (unsigned int) dinfo->cinfo->output_height);
- FlagByte = 0x80; /* Yes, there is a global color table */
- FlagByte |= (BitsPerPixel-1) << 4; /* color resolution */
- FlagByte |= (BitsPerPixel-1); /* size of global color table */
- putc(FlagByte, dinfo->pub.output_file);
- putc(0, dinfo->pub.output_file); /* Background color index */
- putc(0, dinfo->pub.output_file); /* Reserved (aspect ratio in GIF89) */
- /* Write the Global Color Map */
- /* If the color map is more than 8 bits precision, */
- /* we reduce it to 8 bits by shifting */
- for (i=0; i < ColorMapSize; i++) {
- if (i < num_colors) {
- if (colormap != NULL) {
- if (dinfo->cinfo->out_color_space == JCS_RGB) {
- /* Normal case: RGB color map */
- putc(GETJSAMPLE(colormap[0][i]) >> cshift, dinfo->pub.output_file);
- putc(GETJSAMPLE(colormap[1][i]) >> cshift, dinfo->pub.output_file);
- putc(GETJSAMPLE(colormap[2][i]) >> cshift, dinfo->pub.output_file);
- } else {
- /* Grayscale "color map": possible if quantizing grayscale image */
- put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift);
- }
- } else {
- /* Create a gray-scale map of num_colors values, range 0..255 */
- put_3bytes(dinfo, (i * 255 + (num_colors-1)/2) / (num_colors-1));
- }
- } else {
- /* fill out the map to a power of 2 */
- put_3bytes(dinfo, 0);
- }
- }
- /* Write image separator and Image Descriptor */
- putc(',', dinfo->pub.output_file); /* separator */
- put_word(dinfo, 0); /* left/top offset */
- put_word(dinfo, 0);
- put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); /* image size */
- put_word(dinfo, (unsigned int) dinfo->cinfo->output_height);
- /* flag byte: not interlaced, no local color map */
- putc(0x00, dinfo->pub.output_file);
- /* Write Initial Code Size byte */
- putc(InitCodeSize, dinfo->pub.output_file);
-
- /* Initialize for "compression" of image data */
- compress_init(dinfo, InitCodeSize+1);
-}
-
-
-/*
- * Startup: write the file header.
- */
-
-METHODDEF(void)
-start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- gif_dest_ptr dest = (gif_dest_ptr) dinfo;
-
- if (cinfo->quantize_colors)
- emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap);
- else
- emit_header(dest, 256, (JSAMPARRAY) NULL);
-}
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-{
- gif_dest_ptr dest = (gif_dest_ptr) dinfo;
- register JSAMPROW ptr;
- register JDIMENSION col;
-
- ptr = dest->pub.buffer[0];
- for (col = cinfo->output_width; col > 0; col--) {
- compress_pixel(dest, GETJSAMPLE(*ptr++));
- }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- gif_dest_ptr dest = (gif_dest_ptr) dinfo;
-
- /* Flush "compression" mechanism */
- compress_term(dest);
- /* Write a zero-length data block to end the series */
- putc(0, dest->pub.output_file);
- /* Write the GIF terminator mark */
- putc(';', dest->pub.output_file);
- /* Make sure we wrote the output file OK */
- fflush(dest->pub.output_file);
- if (ferror(dest->pub.output_file))
- ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for GIF format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_gif (j_decompress_ptr cinfo)
-{
- gif_dest_ptr dest;
-
- /* Create module interface object, fill in method pointers */
- dest = (gif_dest_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(gif_dest_struct));
- dest->cinfo = cinfo; /* make back link for subroutines */
- dest->pub.start_output = start_output_gif;
- dest->pub.put_pixel_rows = put_pixel_rows;
- dest->pub.finish_output = finish_output_gif;
-
- if (cinfo->out_color_space != JCS_GRAYSCALE &&
- cinfo->out_color_space != JCS_RGB)
- ERREXIT(cinfo, JERR_GIF_COLORSPACE);
-
- /* Force quantization if color or if > 8 bits input */
- if (cinfo->out_color_space != JCS_GRAYSCALE || cinfo->data_precision > 8) {
- /* Force quantization to at most 256 colors */
- cinfo->quantize_colors = TRUE;
- if (cinfo->desired_number_of_colors > 256)
- cinfo->desired_number_of_colors = 256;
- }
-
- /* Calculate output image dimensions so we can allocate space */
- jpeg_calc_output_dimensions(cinfo);
-
- if (cinfo->output_components != 1) /* safety check: just one component? */
- ERREXIT(cinfo, JERR_GIF_BUG);
-
- /* Create decompressor output buffer. */
- dest->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) 1);
- dest->pub.buffer_height = 1;
-
- return (djpeg_dest_ptr) dest;
-}
-
-#endif /* GIF_SUPPORTED */
diff --git a/usage.doc b/usage.doc
deleted file mode 100644
index 8c4970a..0000000
--- a/usage.doc
+++ /dev/null
@@ -1,562 +0,0 @@
-USAGE instructions for the Independent JPEG Group's JPEG software
-=================================================================
-
-This file describes usage of the JPEG conversion programs cjpeg and djpeg,
-as well as the utility programs jpegtran, rdjpgcom and wrjpgcom. (See
-the other documentation files if you wish to use the JPEG library within
-your own programs.)
-
-If you are on a Unix machine you may prefer to read the Unix-style manual
-pages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1.
-
-
-INTRODUCTION
-
-These programs implement JPEG image compression and decompression. JPEG
-(pronounced "jay-peg") is a standardized compression method for full-color
-and gray-scale images. JPEG is designed to handle "real-world" scenes,
-for example scanned photographs. Cartoons, line drawings, and other
-non-realistic images are not JPEG's strong suit; on that sort of material
-you may get poor image quality and/or little compression.
-
-JPEG is lossy, meaning that the output image is not necessarily identical to
-the input image. Hence you should not use JPEG if you have to have identical
-output bits. However, on typical real-world images, very good compression
-levels can be obtained with no visible change, and amazingly high compression
-is possible if you can tolerate a low-quality image. You can trade off image
-quality against file size by adjusting the compressor's "quality" setting.
-
-
-GENERAL USAGE
-
-We provide two programs, cjpeg to compress an image file into JPEG format,
-and djpeg to decompress a JPEG file back into a conventional image format.
-
-On Unix-like systems, you say:
- cjpeg [switches] [imagefile] >jpegfile
-or
- djpeg [switches] [jpegfile] >imagefile
-The programs read the specified input file, or standard input if none is
-named. They always write to standard output (with trace/error messages to
-standard error). These conventions are handy for piping images between
-programs.
-
-On most non-Unix systems, you say:
- cjpeg [switches] imagefile jpegfile
-or
- djpeg [switches] jpegfile imagefile
-i.e., both the input and output files are named on the command line. This
-style is a little more foolproof, and it loses no functionality if you don't
-have pipes. (You can get this style on Unix too, if you prefer, by defining
-TWO_FILE_COMMANDLINE when you compile the programs; see install.doc.)
-
-You can also say:
- cjpeg [switches] -outfile jpegfile imagefile
-or
- djpeg [switches] -outfile imagefile jpegfile
-This syntax works on all systems, so it is useful for scripts.
-
-The currently supported image file formats are: PPM (PBMPLUS color format),
-PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkit
-format). (RLE is supported only if the URT library is available.)
-cjpeg recognizes the input image format automatically, with the exception
-of some Targa-format files. You have to tell djpeg which format to generate.
-
-JPEG files are in the defacto standard JFIF file format. There are other,
-less widely used JPEG-based file formats, but we don't support them.
-
-All switch names may be abbreviated; for example, -grayscale may be written
--gray or -gr. Most of the "basic" switches can be abbreviated to as little as
-one letter. Upper and lower case are equivalent (-BMP is the same as -bmp).
-British spellings are also accepted (e.g., -greyscale), though for brevity
-these are not mentioned below.
-
-
-CJPEG DETAILS
-
-The basic command line switches for cjpeg are:
-
- -quality N Scale quantization tables to adjust image quality.
- Quality is 0 (worst) to 100 (best); default is 75.
- (See below for more info.)
-
- -grayscale Create monochrome JPEG file from color input.
- Be sure to use this switch when compressing a grayscale
- BMP file, because cjpeg isn't bright enough to notice
- whether a BMP file uses only shades of gray. By
- saying -grayscale, you'll get a smaller JPEG file that
- takes less time to process.
-
- -optimize Perform optimization of entropy encoding parameters.
- Without this, default encoding parameters are used.
- -optimize usually makes the JPEG file a little smaller,
- but cjpeg runs somewhat slower and needs much more
- memory. Image quality and speed of decompression are
- unaffected by -optimize.
-
- -progressive Create progressive JPEG file (see below).
-
- -targa Input file is Targa format. Targa files that contain
- an "identification" field will not be automatically
- recognized by cjpeg; for such files you must specify
- -targa to make cjpeg treat the input as Targa format.
- For most Targa files, you won't need this switch.
-
-The -quality switch lets you trade off compressed file size against quality of
-the reconstructed image: the higher the quality setting, the larger the JPEG
-file, and the closer the output image will be to the original input. Normally
-you want to use the lowest quality setting (smallest file) that decompresses
-into something visually indistinguishable from the original image. For this
-purpose the quality setting should be between 50 and 95; the default of 75 is
-often about right. If you see defects at -quality 75, then go up 5 or 10
-counts at a time until you are happy with the output image. (The optimal
-setting will vary from one image to another.)
-
--quality 100 will generate a quantization table of all 1's, minimizing loss
-in the quantization step (but there is still information loss in subsampling,
-as well as roundoff error). This setting is mainly of interest for
-experimental purposes. Quality values above about 95 are NOT recommended for
-normal use; the compressed file size goes up dramatically for hardly any gain
-in output image quality.
-
-In the other direction, quality values below 50 will produce very small files
-of low image quality. Settings around 5 to 10 might be useful in preparing an
-index of a large image library, for example. Try -quality 2 (or so) for some
-amusing Cubist effects. (Note: quality values below about 25 generate 2-byte
-quantization tables, which are considered optional in the JPEG standard.
-cjpeg emits a warning message when you give such a quality value, because some
-other JPEG programs may be unable to decode the resulting file. Use -baseline
-if you need to ensure compatibility at low quality values.)
-
-The -progressive switch creates a "progressive JPEG" file. In this type of
-JPEG file, the data is stored in multiple scans of increasing quality. If the
-file is being transmitted over a slow communications link, the decoder can use
-the first scan to display a low-quality image very quickly, and can then
-improve the display with each subsequent scan. The final image is exactly
-equivalent to a standard JPEG file of the same quality setting, and the total
-file size is about the same --- often a little smaller. CAUTION: progressive
-JPEG is not yet widely implemented, so many decoders will be unable to view a
-progressive JPEG file at all.
-
-Switches for advanced users:
-
- -dct int Use integer DCT method (default).
- -dct fast Use fast integer DCT (less accurate).
- -dct float Use floating-point DCT method.
- The float method is very slightly more accurate than
- the int method, but is much slower unless your machine
- has very fast floating-point hardware. Also note that
- results of the floating-point method may vary slightly
- across machines, while the integer methods should give
- the same results everywhere. The fast integer method
- is much less accurate than the other two.
-
- -restart N Emit a JPEG restart marker every N MCU rows, or every
- N MCU blocks if "B" is attached to the number.
- -restart 0 (the default) means no restart markers.
-
- -smooth N Smooth the input image to eliminate dithering noise.
- N, ranging from 1 to 100, indicates the strength of
- smoothing. 0 (the default) means no smoothing.
-
- -maxmemory N Set limit for amount of memory to use in processing
- large images. Value is in thousands of bytes, or
- millions of bytes if "M" is attached to the number.
- For example, -max 4m selects 4000000 bytes. If more
- space is needed, temporary files will be used.
-
- -verbose Enable debug printout. More -v's give more printout.
- or -debug Also, version information is printed at startup.
-
-The -restart option inserts extra markers that allow a JPEG decoder to
-resynchronize after a transmission error. Without restart markers, any damage
-to a compressed file will usually ruin the image from the point of the error
-to the end of the image; with restart markers, the damage is usually confined
-to the portion of the image up to the next restart marker. Of course, the
-restart markers occupy extra space. We recommend -restart 1 for images that
-will be transmitted across unreliable networks such as Usenet.
-
-The -smooth option filters the input to eliminate fine-scale noise. This is
-often useful when converting dithered images to JPEG: a moderate smoothing
-factor of 10 to 50 gets rid of dithering patterns in the input file, resulting
-in a smaller JPEG file and a better-looking image. Too large a smoothing
-factor will visibly blur the image, however.
-
-Switches for wizards:
-
- -baseline Force baseline-compatible quantization tables to be
- generated. This clamps quantization values to 8 bits
- even at low quality settings. (This switch is poorly
- named, since it does not ensure that the output is
- actually baseline JPEG. For example, you can use
- -baseline and -progressive together.)
-
- -qtables file Use the quantization tables given in the specified
- text file.
-
- -qslots N[,...] Select which quantization table to use for each color
- component.
-
- -sample HxV[,...] Set JPEG sampling factors for each color component.
-
- -scans file Use the scan script given in the specified text file.
-
-The "wizard" switches are intended for experimentation with JPEG. If you
-don't know what you are doing, DON'T USE THEM. These switches are documented
-further in the file wizard.doc.
-
-
-DJPEG DETAILS
-
-The basic command line switches for djpeg are:
-
- -colors N Reduce image to at most N colors. This reduces the
- or -quantize N number of colors used in the output image, so that it
- can be displayed on a colormapped display or stored in
- a colormapped file format. For example, if you have
- an 8-bit display, you'd need to reduce to 256 or fewer
- colors. (-colors is the recommended name, -quantize
- is provided only for backwards compatibility.)
-
- -fast Select recommended processing options for fast, low
- quality output. (The default options are chosen for
- highest quality output.) Currently, this is equivalent
- to "-dct fast -nosmooth -onepass -dither ordered".
-
- -grayscale Force gray-scale output even if JPEG file is color.
- Useful for viewing on monochrome displays; also,
- djpeg runs noticeably faster in this mode.
-
- -scale M/N Scale the output image by a factor M/N. Currently
- the scale factor must be 1/1, 1/2, 1/4, or 1/8.
- Scaling is handy if the image is larger than your
- screen; also, djpeg runs much faster when scaling
- down the output.
-
- -bmp Select BMP output format (Windows flavor). 8-bit
- colormapped format is emitted if -colors or -grayscale
- is specified, or if the JPEG file is gray-scale;
- otherwise, 24-bit full-color format is emitted.
-
- -gif Select GIF output format. Since GIF does not support
- more than 256 colors, -colors 256 is assumed (unless
- you specify a smaller number of colors). If you
- specify -fast, the default number of colors is 216.
-
- -os2 Select BMP output format (OS/2 1.x flavor). 8-bit
- colormapped format is emitted if -colors or -grayscale
- is specified, or if the JPEG file is gray-scale;
- otherwise, 24-bit full-color format is emitted.
-
- -pnm Select PBMPLUS (PPM/PGM) output format (this is the
- default format). PGM is emitted if the JPEG file is
- gray-scale or if -grayscale is specified; otherwise
- PPM is emitted.
-
- -rle Select RLE output format. (Requires URT library.)
-
- -targa Select Targa output format. Gray-scale format is
- emitted if the JPEG file is gray-scale or if
- -grayscale is specified; otherwise, colormapped format
- is emitted if -colors is specified; otherwise, 24-bit
- full-color format is emitted.
-
-Switches for advanced users:
-
- -dct int Use integer DCT method (default).
- -dct fast Use fast integer DCT (less accurate).
- -dct float Use floating-point DCT method.
- The float method is very slightly more accurate than
- the int method, but is much slower unless your machine
- has very fast floating-point hardware. Also note that
- results of the floating-point method may vary slightly
- across machines, while the integer methods should give
- the same results everywhere. The fast integer method
- is much less accurate than the other two.
-
- -dither fs Use Floyd-Steinberg dithering in color quantization.
- -dither ordered Use ordered dithering in color quantization.
- -dither none Do not use dithering in color quantization.
- By default, Floyd-Steinberg dithering is applied when
- quantizing colors; this is slow but usually produces
- the best results. Ordered dither is a compromise
- between speed and quality; no dithering is fast but
- usually looks awful. Note that these switches have
- no effect unless color quantization is being done.
- Ordered dither is only available in -onepass mode.
-
- -map FILE Quantize to the colors used in the specified image
- file. This is useful for producing multiple files
- with identical color maps, or for forcing a predefined
- set of colors to be used. The FILE must be a GIF
- or PPM file. This option overrides -colors and
- -onepass.
-
- -nosmooth Use a faster, lower-quality upsampling routine.
-
- -onepass Use one-pass instead of two-pass color quantization.
- The one-pass method is faster and needs less memory,
- but it produces a lower-quality image. -onepass is
- ignored unless you also say -colors N. Also,
- the one-pass method is always used for gray-scale
- output (the two-pass method is no improvement then).
-
- -maxmemory N Set limit for amount of memory to use in processing
- large images. Value is in thousands of bytes, or
- millions of bytes if "M" is attached to the number.
- For example, -max 4m selects 4000000 bytes. If more
- space is needed, temporary files will be used.
-
- -verbose Enable debug printout. More -v's give more printout.
- or -debug Also, version information is printed at startup.
-
-
-HINTS FOR CJPEG
-
-Color GIF files are not the ideal input for JPEG; JPEG is really intended for
-compressing full-color (24-bit) images. In particular, don't try to convert
-cartoons, line drawings, and other images that have only a few distinct
-colors. GIF works great on these, JPEG does not. If you want to convert a
-GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options
-to get a satisfactory conversion. -smooth 10 or so is often helpful.
-
-Avoid running an image through a series of JPEG compression/decompression
-cycles. Image quality loss will accumulate; after ten or so cycles the image
-may be noticeably worse than it was after one cycle. It's best to use a
-lossless format while manipulating an image, then convert to JPEG format when
-you are ready to file the image away.
-
-The -optimize option to cjpeg is worth using when you are making a "final"
-version for posting or archiving. It's also a win when you are using low
-quality settings to make very small JPEG files; the percentage improvement
-is often a lot more than it is on larger files. (At present, -optimize
-mode is always selected when generating progressive JPEG files.)
-
-GIF input files are no longer supported, to avoid the Unisys LZW patent.
-Use a Unisys-licensed program if you need to read a GIF file. (Conversion
-of GIF files to JPEG is usually a bad idea anyway.)
-
-
-HINTS FOR DJPEG
-
-To get a quick preview of an image, use the -grayscale and/or -scale switches.
-"-grayscale -scale 1/8" is the fastest case.
-
-Several options are available that trade off image quality to gain speed.
-"-fast" turns on the recommended settings.
-
-"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality.
-When producing a color-quantized image, "-onepass -dither ordered" is fast but
-much lower quality than the default behavior. "-dither none" may give
-acceptable results in two-pass mode, but is seldom tolerable in one-pass mode.
-
-If you are fortunate enough to have very fast floating point hardware,
-"-dct float" may be even faster than "-dct fast". But on most machines
-"-dct float" is slower than "-dct int"; in this case it is not worth using,
-because its theoretical accuracy advantage is too small to be significant
-in practice.
-
-Two-pass color quantization requires a good deal of memory; on MS-DOS machines
-it may run out of memory even with -maxmemory 0. In that case you can still
-decompress, with some loss of image quality, by specifying -onepass for
-one-pass quantization.
-
-To avoid the Unisys LZW patent, djpeg produces uncompressed GIF files. These
-are larger than they should be, but are readable by standard GIF decoders.
-
-
-HINTS FOR BOTH PROGRAMS
-
-If more space is needed than will fit in the available main memory (as
-determined by -maxmemory), temporary files will be used. (MS-DOS versions
-will try to get extended or expanded memory first.) The temporary files are
-often rather large: in typical cases they occupy three bytes per pixel, for
-example 3*800*600 = 1.44Mb for an 800x600 image. If you don't have enough
-free disk space, leave out -progressive and -optimize (for cjpeg) or specify
--onepass (for djpeg).
-
-On MS-DOS, the temporary files are created in the directory named by the TMP
-or TEMP environment variable, or in the current directory if neither of those
-exist. Amiga implementations put the temp files in the directory named by
-JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free
-space.
-
-The default memory usage limit (-maxmemory) is set when the software is
-compiled. If you get an "insufficient memory" error, try specifying a smaller
--maxmemory value, even -maxmemory 0 to use the absolute minimum space. You
-may want to recompile with a smaller default value if this happens often.
-
-On machines that have "environment" variables, you can define the environment
-variable JPEGMEM to set the default memory limit. The value is specified as
-described for the -maxmemory switch. JPEGMEM overrides the default value
-specified when the program was compiled, and itself is overridden by an
-explicit -maxmemory switch.
-
-On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to
-use. (Extended or expanded memory is also used if available.) Most
-DOS-specific versions of this software do their own memory space estimation
-and do not need you to specify -maxmemory.
-
-
-JPEGTRAN
-
-jpegtran performs various useful transformations of JPEG files.
-It can translate the coded representation from one variant of JPEG to another,
-for example from baseline JPEG to progressive JPEG or vice versa. It can also
-perform some rearrangements of the image data, for example turning an image
-from landscape to portrait format by rotation.
-
-jpegtran works by rearranging the compressed data (DCT coefficients), without
-ever fully decoding the image. Therefore, its transformations are lossless:
-there is no image degradation at all, which would not be true if you used
-djpeg followed by cjpeg to accomplish the same conversion. But by the same
-token, jpegtran cannot perform lossy operations such as changing the image
-quality.
-
-jpegtran uses a command line syntax similar to cjpeg or djpeg.
-On Unix-like systems, you say:
- jpegtran [switches] [inputfile] >outputfile
-On most non-Unix systems, you say:
- jpegtran [switches] inputfile outputfile
-where both the input and output files are JPEG files.
-
-To specify the coded JPEG representation used in the output file,
-jpegtran accepts a subset of the switches recognized by cjpeg:
- -optimize Perform optimization of entropy encoding parameters.
- -progressive Create progressive JPEG file.
- -restart N Emit a JPEG restart marker every N MCU rows, or every
- N MCU blocks if "B" is attached to the number.
- -scans file Use the scan script given in the specified text file.
-See the previous discussion of cjpeg for more details about these switches.
-If you specify none of these switches, you get a plain baseline-JPEG output
-file. The quality setting and so forth are determined by the input file.
-
-The image can be losslessly transformed by giving one of these switches:
- -flip horizontal Mirror image horizontally (left-right).
- -flip vertical Mirror image vertically (top-bottom).
- -rotate 90 Rotate image 90 degrees clockwise.
- -rotate 180 Rotate image 180 degrees.
- -rotate 270 Rotate image 270 degrees clockwise (or 90 ccw).
- -transpose Transpose image (across UL-to-LR axis).
- -transverse Transverse transpose (across UR-to-LL axis).
-
-The transpose transformation has no restrictions regarding image dimensions.
-The other transformations operate rather oddly if the image dimensions are not
-a multiple of the iMCU size (usually 8 or 16 pixels), because they can only
-transform complete blocks of DCT coefficient data in the desired way.
-
-jpegtran's default behavior when transforming an odd-size image is designed
-to preserve exact reversibility and mathematical consistency of the
-transformation set. As stated, transpose is able to flip the entire image
-area. Horizontal mirroring leaves any partial iMCU column at the right edge
-untouched, but is able to flip all rows of the image. Similarly, vertical
-mirroring leaves any partial iMCU row at the bottom edge untouched, but is
-able to flip all columns. The other transforms can be built up as sequences
-of transpose and flip operations; for consistency, their actions on edge
-pixels are defined to be the same as the end result of the corresponding
-transpose-and-flip sequence.
-
-For practical use, you may prefer to discard any untransformable edge pixels
-rather than having a strange-looking strip along the right and/or bottom edges
-of a transformed image. To do this, add the -trim switch:
- -trim Drop non-transformable edge blocks.
-Obviously, a transformation with -trim is not reversible, so strictly speaking
-jpegtran with this switch is not lossless. Also, the expected mathematical
-equivalences between the transformations no longer hold. For example,
-"-rot 270 -trim" trims only the bottom edge, but "-rot 90 -trim" followed by
-"-rot 180 -trim" trims both edges.
-
-Another not-strictly-lossless transformation switch is:
- -grayscale Force grayscale output.
-This option discards the chrominance channels if the input image is YCbCr
-(ie, a standard color JPEG), resulting in a grayscale JPEG file. The
-luminance channel is preserved exactly, so this is a better method of reducing
-to grayscale than decompression, conversion, and recompression. This switch
-is particularly handy for fixing a monochrome picture that was mistakenly
-encoded as a color JPEG. (In such a case, the space savings from getting rid
-of the near-empty chroma channels won't be large; but the decoding time for
-a grayscale JPEG is substantially less than that for a color JPEG.)
-
-jpegtran also recognizes these switches that control what to do with "extra"
-markers, such as comment blocks:
- -copy none Copy no extra markers from source file. This setting
- suppresses all comments and other excess baggage
- present in the source file.
- -copy comments Copy only comment markers. This setting copies
- comments from the source file, but discards
- any other inessential data.
- -copy all Copy all extra markers. This setting preserves
- miscellaneous markers found in the source file, such
- as JFIF thumbnails and Photoshop settings. In some
- files these extra markers can be sizable.
-The default behavior is -copy comments. (Note: in IJG releases v6 and v6a,
-jpegtran always did the equivalent of -copy none.)
-
-Additional switches recognized by jpegtran are:
- -outfile filename
- -maxmemory N
- -verbose
- -debug
-These work the same as in cjpeg or djpeg.
-
-
-THE COMMENT UTILITIES
-
-The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
-Although the standard doesn't actually define what COM blocks are for, they
-are widely used to hold user-supplied text strings. This lets you add
-annotations, titles, index terms, etc to your JPEG files, and later retrieve
-them as text. COM blocks do not interfere with the image stored in the JPEG
-file. The maximum size of a COM block is 64K, but you can have as many of
-them as you like in one JPEG file.
-
-We provide two utility programs to display COM block contents and add COM
-blocks to a JPEG file.
-
-rdjpgcom searches a JPEG file and prints the contents of any COM blocks on
-standard output. The command line syntax is
- rdjpgcom [-verbose] [inputfilename]
-The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG
-image dimensions. If you omit the input file name from the command line,
-the JPEG file is read from standard input. (This may not work on some
-operating systems, if binary data can't be read from stdin.)
-
-wrjpgcom adds a COM block, containing text you provide, to a JPEG file.
-Ordinarily, the COM block is added after any existing COM blocks, but you
-can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG
-file; it does not modify the input file. DO NOT try to overwrite the input
-file by directing wrjpgcom's output back into it; on most systems this will
-just destroy your file.
-
-The command line syntax for wrjpgcom is similar to cjpeg's. On Unix-like
-systems, it is
- wrjpgcom [switches] [inputfilename]
-The output file is written to standard output. The input file comes from
-the named file, or from standard input if no input file is named.
-
-On most non-Unix systems, the syntax is
- wrjpgcom [switches] inputfilename outputfilename
-where both input and output file names must be given explicitly.
-
-wrjpgcom understands three switches:
- -replace Delete any existing COM blocks from the file.
- -comment "Comment text" Supply new COM text on command line.
- -cfile name Read text for new COM block from named file.
-(Switch names can be abbreviated.) If you have only one line of comment text
-to add, you can provide it on the command line with -comment. The comment
-text must be surrounded with quotes so that it is treated as a single
-argument. Longer comments can be read from a text file.
-
-If you give neither -comment nor -cfile, then wrjpgcom will read the comment
-text from standard input. (In this case an input image file name MUST be
-supplied, so that the source JPEG file comes from somewhere else.) You can
-enter multiple lines, up to 64KB worth. Type an end-of-file indicator
-(usually control-D or control-Z) to terminate the comment text entry.
-
-wrjpgcom will not add a COM block if the provided comment string is empty.
-Therefore -replace -comment "" can be used to delete all COM blocks from a
-file.
-
-These utility programs do not depend on the IJG JPEG library. In
-particular, the source code for rdjpgcom is intended as an illustration of
-the minimum amount of code required to parse a JPEG file header correctly.
diff --git a/vc6proj/apptest.dsp b/vc6proj/apptest.dsp
deleted file mode 100644
index 0f5c35b..0000000
--- a/vc6proj/apptest.dsp
+++ /dev/null
@@ -1,242 +0,0 @@
-# Microsoft Developer Studio Project File - Name="apptest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** ÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤ **
-
-# TARGTYPE "Win32 (x86) Generic Project" 0x010a
-
-CFG=apptest - Win32 Debug
-!MESSAGE ¤³¤ì¤Ï͸ú¤ÊÒ²¸Ì§²Ù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤³¤ÎÌßÛ¼Þª¸Ä¤òËÞÙÄÞ¤¹¤ë¤¿¤á¤Ë¤Ï NMAKE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-!MESSAGE [Ò²¸Ì§²Ù¤Î´¸½Îß°Ä] ºÏÝÄÞ¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤
-!MESSAGE
-!MESSAGE NMAKE /f "apptest.mak".
-!MESSAGE
-!MESSAGE NMAKE ¤Î¼Â¹Ô»þ¤Ë¹½À®¤ò»ØÄê¤Ç¤¤Þ¤¹
-!MESSAGE ºÏÝÄÞ ×²Ý¾å¤ÇϸۤÎÀßÄê¤òÄêµÁ¤·¤Þ¤¹¡£Îã:
-!MESSAGE
-!MESSAGE NMAKE /f "apptest.mak" CFG="apptest - Win32 Debug"
-!MESSAGE
-!MESSAGE ÁªÂò²Äǽ¤ÊËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "apptest - Win32 Release" ("Win32 (x86) Generic Project" ÍÑ)
-!MESSAGE "apptest - Win32 Debug" ("Win32 (x86) Generic Project" ÍÑ)
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-MTL=midl.exe
-
-!IF "$(CFG)" == "apptest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# Begin Special Build Tool
-OutDir=.\Release
-SOURCE="$(InputPath)"
-PostBuild_Cmds=fc /b .\testimg.ppm $(OutDir)\testout.ppm fc /b .\testimg.bmp $(OutDir)\testout.bmp fc /b .\testimg.jpg $(OutDir)\testout.jpg fc /b .\testimg.ppm $(OutDir)\testoutp.ppm fc /b .\testimgp.jpg $(OutDir)\testoutp.jpg fc /b .\testorig.jpg $(OutDir)\testoutt.jpg
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "apptest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# Begin Special Build Tool
-OutDir=.\Debug
-SOURCE="$(InputPath)"
-PostBuild_Cmds=fc /b .\testimg.ppm $(OutDir)\testout.ppm fc /b .\testimg.bmp $(OutDir)\testout.bmp fc /b .\testimg.jpg $(OutDir)\testout.jpg fc /b .\testimg.ppm $(OutDir)\testoutp.ppm fc /b .\testimgp.jpg $(OutDir)\testoutp.jpg fc /b .\testorig.jpg $(OutDir)\testoutt.jpg
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "apptest - Win32 Release"
-# Name "apptest - Win32 Debug"
-# Begin Group "Test Image Files"
-
-# PROP Default_Filter "*.jpg;*.bmp;*.ppm"
-# Begin Source File
-
-SOURCE=.\testimg.bmp
-# End Source File
-# Begin Source File
-
-SOURCE=.\testimg.jpg
-# End Source File
-# Begin Source File
-
-SOURCE=.\testimg.ppm
-
-!IF "$(CFG)" == "apptest - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-# Begin Custom Build
-InputDir=.
-OutDir=.\Release
-InputPath=.\testimg.ppm
-
-BuildCmds= \
- echo $(OutDir)\cjpeg -dct int -outfile $(OutDir)\testout.jpg .\testimg.ppm \
- $(OutDir)\cjpeg -dct int -outfile $(OutDir)\testout.jpg .\testimg.ppm \
- echo $(OutDir)\cjpeg -dct int -progressive -opt -outfile $(OutDir)\testoutp.jpg .\testimg.ppm \
- $(OutDir)\cjpeg -dct int -progressive -opt -outfile $(OutDir)\testoutp.jpg .\testimg.ppm \
-
-
-"$(OutDir)\testout.jpg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(OutDir)\testoutp.jpg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "apptest - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-# Begin Custom Build - Testing - $(InputPath)
-InputDir=.
-OutDir=.\Debug
-InputPath=.\testimg.ppm
-
-BuildCmds= \
- echo $(OutDir)\cjpeg -dct int -outfile $(OutDir)\testout.jpg .\testimg.ppm \
- $(OutDir)\cjpeg -dct int -outfile $(OutDir)\testout.jpg .\testimg.ppm \
- echo $(OutDir)\cjpeg -dct int -progressive -opt -outfile $(OutDir)\testoutp.jpg .\testimg.ppm \
- $(OutDir)\cjpeg -dct int -progressive -opt -outfile $(OutDir)\testoutp.jpg .\testimg.ppm \
-
-
-"$(OutDir)\testout.jpg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(OutDir)\testoutp.jpg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\testimgp.jpg
-# End Source File
-# Begin Source File
-
-SOURCE=.\testorig.jpg
-
-!IF "$(CFG)" == "apptest - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-# Begin Custom Build
-InputDir=.
-OutDir=.\Release
-InputPath=.\testorig.jpg
-
-BuildCmds= \
- echo $(OutDir)\djpeg -dct int -ppm -outfile $(OutDir)\testout.ppm .\testorig.jpg \
- $(OutDir)\djpeg -dct int -ppm -outfile $(OutDir)\testout.ppm .\testorig.jpg \
- echo $(OutDir)\djpeg -dct int -bmp -colors 256 -outfile $(OutDir)\testout.bmp .\testorig.jpg \
- $(OutDir)\djpeg -dct int -bmp -colors 256 -outfile $(OutDir)\testout.bmp .\testorig.jpg \
-
-
-"$(OutDir)\testout.ppm" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(OutDir)\testout.bmp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "apptest - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-# Begin Custom Build - Testing - $(InputPath)
-InputDir=.
-OutDir=.\Debug
-InputPath=.\testorig.jpg
-
-BuildCmds= \
- echo $(OutDir)\djpeg -dct int -ppm -outfile $(OutDir)\testout.ppm .\testorig.jpg \
- $(OutDir)\djpeg -dct int -ppm -outfile $(OutDir)\testout.ppm .\testorig.jpg \
- echo $(OutDir)\djpeg -dct int -bmp -colors 256 -outfile $(OutDir)\testout.bmp .\testorig.jpg \
- $(OutDir)\djpeg -dct int -bmp -colors 256 -outfile $(OutDir)\testout.bmp .\testorig.jpg \
-
-
-"$(OutDir)\testout.ppm" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(OutDir)\testout.bmp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\testprog.jpg
-
-!IF "$(CFG)" == "apptest - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-# Begin Custom Build
-InputDir=.
-OutDir=.\Release
-InputPath=.\testprog.jpg
-
-BuildCmds= \
- echo $(OutDir)\djpeg -dct int -ppm -outfile $(OutDir)\testoutp.ppm .\testprog.jpg \
- $(OutDir)\djpeg -dct int -ppm -outfile $(OutDir)\testoutp.ppm .\testprog.jpg \
- echo $(OutDir)\jpegtran -outfile $(OutDir)\testoutt.jpg .\testprog.jpg \
- $(OutDir)\jpegtran -outfile $(OutDir)\testoutt.jpg .\testprog.jpg \
-
-
-"$(OutDir)\testoutp.ppm" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(OutDir)\testoutt.jpg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "apptest - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-# Begin Custom Build - Testing - $(InputPath)
-InputDir=.
-OutDir=.\Debug
-InputPath=.\testprog.jpg
-
-BuildCmds= \
- echo $(OutDir)\djpeg -dct int -ppm -outfile $(OutDir)\testoutp.ppm .\testprog.jpg \
- $(OutDir)\djpeg -dct int -ppm -outfile $(OutDir)\testoutp.ppm .\testprog.jpg \
- echo $(OutDir)\jpegtran -outfile $(OutDir)\testoutt.jpg .\testprog.jpg \
- $(OutDir)\jpegtran -outfile $(OutDir)\testoutt.jpg .\testprog.jpg \
-
-
-"$(OutDir)\testoutp.ppm" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(OutDir)\testoutt.jpg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/vc6proj/cjpeg.dsp b/vc6proj/cjpeg.dsp
deleted file mode 100644
index 573e619..0000000
--- a/vc6proj/cjpeg.dsp
+++ /dev/null
@@ -1,164 +0,0 @@
-# Microsoft Developer Studio Project File - Name="cjpeg" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** ÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤ **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=cjpeg - Win32 Debug
-!MESSAGE ¤³¤ì¤Ï͸ú¤ÊÒ²¸Ì§²Ù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤³¤ÎÌßÛ¼Þª¸Ä¤òËÞÙÄÞ¤¹¤ë¤¿¤á¤Ë¤Ï NMAKE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-!MESSAGE [Ò²¸Ì§²Ù¤Î´¸½Îß°Ä] ºÏÝÄÞ¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤
-!MESSAGE
-!MESSAGE NMAKE /f "cjpeg.mak".
-!MESSAGE
-!MESSAGE NMAKE ¤Î¼Â¹Ô»þ¤Ë¹½À®¤ò»ØÄê¤Ç¤¤Þ¤¹
-!MESSAGE ºÏÝÄÞ ×²Ý¾å¤ÇϸۤÎÀßÄê¤òÄêµÁ¤·¤Þ¤¹¡£Îã:
-!MESSAGE
-!MESSAGE NMAKE /f "cjpeg.mak" CFG="cjpeg - Win32 Debug"
-!MESSAGE
-!MESSAGE ÁªÂò²Äǽ¤ÊËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "cjpeg - Win32 Release" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE "cjpeg - Win32 Debug" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "cjpeg - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD CPP /nologo /W3 /O2 /GF /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 libjpeg.lib kernel32.lib /nologo /subsystem:console /machine:I386 /libpath:"Release" /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "cjpeg - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libjpeg.lib kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Debug" /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "cjpeg - Win32 Release"
-# Name "cjpeg - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\cdjpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\cjpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdbmp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdgif.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdppm.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdrle.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdswitch.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdtarga.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\cderror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cdjpeg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jversion.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/vc6proj/djpeg.dsp b/vc6proj/djpeg.dsp
deleted file mode 100644
index 156b378..0000000
--- a/vc6proj/djpeg.dsp
+++ /dev/null
@@ -1,164 +0,0 @@
-# Microsoft Developer Studio Project File - Name="djpeg" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** ÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤ **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=djpeg - Win32 Debug
-!MESSAGE ¤³¤ì¤Ï͸ú¤ÊÒ²¸Ì§²Ù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤³¤ÎÌßÛ¼Þª¸Ä¤òËÞÙÄÞ¤¹¤ë¤¿¤á¤Ë¤Ï NMAKE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-!MESSAGE [Ò²¸Ì§²Ù¤Î´¸½Îß°Ä] ºÏÝÄÞ¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤
-!MESSAGE
-!MESSAGE NMAKE /f "djpeg.mak".
-!MESSAGE
-!MESSAGE NMAKE ¤Î¼Â¹Ô»þ¤Ë¹½À®¤ò»ØÄê¤Ç¤¤Þ¤¹
-!MESSAGE ºÏÝÄÞ ×²Ý¾å¤ÇϸۤÎÀßÄê¤òÄêµÁ¤·¤Þ¤¹¡£Îã:
-!MESSAGE
-!MESSAGE NMAKE /f "djpeg.mak" CFG="djpeg - Win32 Debug"
-!MESSAGE
-!MESSAGE ÁªÂò²Äǽ¤ÊËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "djpeg - Win32 Release" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE "djpeg - Win32 Debug" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "djpeg - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD CPP /nologo /W3 /O2 /GF /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 libjpeg.lib kernel32.lib /nologo /subsystem:console /machine:I386 /libpath:"Release" /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "djpeg - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libjpeg.lib kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Debug" /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "djpeg - Win32 Release"
-# Name "djpeg - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\cdjpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\djpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdcolmap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrbmp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrgif.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrppm.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrrle.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrtarga.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\cderror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cdjpeg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jversion.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/vc6proj/jconfig.h b/vc6proj/jconfig.h
deleted file mode 100644
index d5bc9f9..0000000
--- a/vc6proj/jconfig.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES
-#define HAVE_UNSIGNED_CHAR
-#define HAVE_UNSIGNED_SHORT
-/* #define void char */
-/* #define const */
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H
-#define HAVE_STDLIB_H
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */
-#undef NEED_SHORT_EXTERNAL_NAMES
-#undef INCOMPLETE_TYPES_BROKEN
-
-/* Define "boolean" as unsigned char, not int, per Windows custom */
-#define TYPEDEF_UCHAR_BOOLEAN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-
-#endif /* JPEG_INTERNALS */
-
-#if defined(JPEG_INTERNALS) || defined(JPEG_INTERNAL_OPTIONS)
-#undef JSIMD_MMX_NOT_SUPPORTED
-#undef JSIMD_3DNOW_NOT_SUPPORTED
-#undef JSIMD_SSE_NOT_SUPPORTED
-#undef JSIMD_SSE2_NOT_SUPPORTED
-#endif
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED /* BMP image file format */
-#define GIF_SUPPORTED /* GIF image file format */
-#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED /* Utah RLE image file format */
-#define TARGA_SUPPORTED /* Targa image file format */
-
-#define TWO_FILE_COMMANDLINE /* optional */
-#define USE_SETMODE /* Microsoft has setmode() */
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/vc6proj/jpegtran.dsp b/vc6proj/jpegtran.dsp
deleted file mode 100644
index 8dc38d4..0000000
--- a/vc6proj/jpegtran.dsp
+++ /dev/null
@@ -1,156 +0,0 @@
-# Microsoft Developer Studio Project File - Name="jpegtran" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** ÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤ **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=jpegtran - Win32 Debug
-!MESSAGE ¤³¤ì¤Ï͸ú¤ÊÒ²¸Ì§²Ù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤³¤ÎÌßÛ¼Þª¸Ä¤òËÞÙÄÞ¤¹¤ë¤¿¤á¤Ë¤Ï NMAKE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-!MESSAGE [Ò²¸Ì§²Ù¤Î´¸½Îß°Ä] ºÏÝÄÞ¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤
-!MESSAGE
-!MESSAGE NMAKE /f "jpegtran.mak".
-!MESSAGE
-!MESSAGE NMAKE ¤Î¼Â¹Ô»þ¤Ë¹½À®¤ò»ØÄê¤Ç¤¤Þ¤¹
-!MESSAGE ºÏÝÄÞ ×²Ý¾å¤ÇϸۤÎÀßÄê¤òÄêµÁ¤·¤Þ¤¹¡£Îã:
-!MESSAGE
-!MESSAGE NMAKE /f "jpegtran.mak" CFG="jpegtran - Win32 Debug"
-!MESSAGE
-!MESSAGE ÁªÂò²Äǽ¤ÊËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "jpegtran - Win32 Release" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE "jpegtran - Win32 Debug" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "jpegtran - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD CPP /nologo /W3 /O2 /GF /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 libjpeg.lib kernel32.lib /nologo /subsystem:console /machine:I386 /libpath:"Release" /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "jpegtran - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 libjpeg.lib kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"Debug" /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "jpegtran - Win32 Release"
-# Name "jpegtran - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\cdjpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpegtran.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdswitch.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\transupp.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\cderror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cdjpeg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpegint.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jversion.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\transupp.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/vc6proj/libjpeg.dsp b/vc6proj/libjpeg.dsp
deleted file mode 100644
index 59647d0..0000000
--- a/vc6proj/libjpeg.dsp
+++ /dev/null
@@ -1,1751 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libjpeg" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** ÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤ **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=libjpeg - Win32 Debug
-!MESSAGE ¤³¤ì¤Ï͸ú¤ÊÒ²¸Ì§²Ù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤³¤ÎÌßÛ¼Þª¸Ä¤òËÞÙÄÞ¤¹¤ë¤¿¤á¤Ë¤Ï NMAKE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-!MESSAGE [Ò²¸Ì§²Ù¤Î´¸½Îß°Ä] ºÏÝÄÞ¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤
-!MESSAGE
-!MESSAGE NMAKE /f "libjpeg.mak".
-!MESSAGE
-!MESSAGE NMAKE ¤Î¼Â¹Ô»þ¤Ë¹½À®¤ò»ØÄê¤Ç¤¤Þ¤¹
-!MESSAGE ºÏÝÄÞ ×²Ý¾å¤ÇϸۤÎÀßÄê¤òÄêµÁ¤·¤Þ¤¹¡£Îã:
-!MESSAGE
-!MESSAGE NMAKE /f "libjpeg.mak" CFG="libjpeg - Win32 Debug"
-!MESSAGE
-!MESSAGE ÁªÂò²Äǽ¤ÊËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "libjpeg - Win32 Release" ("Win32 (x86) Static Library" ÍÑ)
-!MESSAGE "libjpeg - Win32 Debug" ("Win32 (x86) Static Library" ÍÑ)
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_LIB" /YX /Zl /FD /GF /c
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_LIB" /YX /Zl /FD /GZ /c
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "libjpeg - Win32 Release"
-# Name "libjpeg - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\jcapimin.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcapistd.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jccoefct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jccolor.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcdctmgr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jchuff.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcinit.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcmainct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcmarker.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcmaster.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcomapi.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcparam.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcphuff.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcprepct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcsample.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jctrans.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdapimin.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdapistd.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdatadst.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdatasrc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdcoefct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdcolor.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jddctmgr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdhuff.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdinput.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmainct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmarker.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmaster.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmerge.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdphuff.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdpostct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdsample.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdtrans.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmemmgr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmemnobs.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jquant1.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jquant2.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jutils.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\jchuff.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcolsamp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdct.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdhuff.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmemsys.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpegint.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jversion.h
-# End Source File
-# End Group
-# Begin Group "NASM Source"
-
-# PROP Default_Filter "asm"
-# Begin Source File
-
-SOURCE=.\jccolmmx.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCCOL="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jccolmmx.asm
-InputName=jccolmmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCCOL="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jccolmmx.asm
-InputName=jccolmmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jccolss2.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCCOLS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jccolss2.asm
-InputName=jccolss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCCOLS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jccolss2.asm
-InputName=jccolss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcqnt3dn.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNT="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcqnt3dn.asm
-InputName=jcqnt3dn
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNT="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcqnt3dn.asm
-InputName=jcqnt3dn
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcqntflt.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTF="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcqntflt.asm
-InputName=jcqntflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTF="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcqntflt.asm
-InputName=jcqntflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcqntint.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcqntint.asm
-InputName=jcqntint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcqntint.asm
-InputName=jcqntint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcqntmmx.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTM="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcqntmmx.asm
-InputName=jcqntmmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTM="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcqntmmx.asm
-InputName=jcqntmmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcqnts2f.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcqnts2f.asm
-InputName=jcqnts2f
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcqnts2f.asm
-InputName=jcqnts2f
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcqnts2i.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTS2="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcqnts2i.asm
-InputName=jcqnts2i
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTS2="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcqnts2i.asm
-InputName=jcqnts2i
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcqntsse.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTSS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcqntsse.asm
-InputName=jcqntsse
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCQNTSS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcqntsse.asm
-InputName=jcqntsse
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcsammmx.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCSAM="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcsammmx.asm
-InputName=jcsammmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCSAM="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcsammmx.asm
-InputName=jcsammmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcsamss2.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCSAMS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jcsamss2.asm
-InputName=jcsamss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JCSAMS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jcsamss2.asm
-InputName=jcsamss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdcolmmx.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDCOL="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jdcolmmx.asm
-InputName=jdcolmmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDCOL="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jdcolmmx.asm
-InputName=jdcolmmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdcolss2.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDCOLS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jdcolss2.asm
-InputName=jdcolss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDCOLS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jdcolss2.asm
-InputName=jdcolss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmermmx.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDMER="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jdmermmx.asm
-InputName=jdmermmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDMER="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jdmermmx.asm
-InputName=jdmermmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmerss2.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDMERS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jdmerss2.asm
-InputName=jdmerss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDMERS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jdmerss2.asm
-InputName=jdmerss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdsammmx.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDSAM="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jdsammmx.asm
-InputName=jdsammmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDSAM="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jdsammmx.asm
-InputName=jdsammmx
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdsamss2.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDSAMS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jdsamss2.asm
-InputName=jdsamss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JDSAMS="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jcolsamp.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jdsamss2.asm
-InputName=jdsamss2
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jf3dnflt.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JF3DN="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jf3dnflt.asm
-InputName=jf3dnflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JF3DN="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jf3dnflt.asm
-InputName=jf3dnflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfdctflt.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFDCT="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jfdctflt.asm
-InputName=jfdctflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFDCT="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jfdctflt.asm
-InputName=jfdctflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfdctfst.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFDCTF="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jfdctfst.asm
-InputName=jfdctfst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFDCTF="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jfdctfst.asm
-InputName=jfdctfst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfdctint.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFDCTI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jfdctint.asm
-InputName=jfdctint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFDCTI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jfdctint.asm
-InputName=jfdctint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfmmxfst.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFMMX="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jfmmxfst.asm
-InputName=jfmmxfst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFMMX="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jfmmxfst.asm
-InputName=jfmmxfst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfmmxint.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFMMXI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jfmmxint.asm
-InputName=jfmmxint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFMMXI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jfmmxint.asm
-InputName=jfmmxint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfss2fst.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFSS2="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jfss2fst.asm
-InputName=jfss2fst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFSS2="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jfss2fst.asm
-InputName=jfss2fst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfss2int.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFSS2I="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jfss2int.asm
-InputName=jfss2int
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFSS2I="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jfss2int.asm
-InputName=jfss2int
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfsseflt.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFSSE="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jfsseflt.asm
-InputName=jfsseflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JFSSE="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jfsseflt.asm
-InputName=jfsseflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ji3dnflt.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JI3DN="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\ji3dnflt.asm
-InputName=ji3dnflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JI3DN="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\ji3dnflt.asm
-InputName=ji3dnflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jidctflt.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIDCT="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jidctflt.asm
-InputName=jidctflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIDCT="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jidctflt.asm
-InputName=jidctflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jidctfst.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIDCTF="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jidctfst.asm
-InputName=jidctfst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIDCTF="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jidctfst.asm
-InputName=jidctfst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jidctint.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIDCTI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jidctint.asm
-InputName=jidctint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIDCTI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jidctint.asm
-InputName=jidctint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jidctred.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIDCTR="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jidctred.asm
-InputName=jidctred
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIDCTR="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jidctred.asm
-InputName=jidctred
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jimmxfst.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIMMX="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jimmxfst.asm
-InputName=jimmxfst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIMMX="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jimmxfst.asm
-InputName=jimmxfst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jimmxint.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIMMXI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jimmxint.asm
-InputName=jimmxint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIMMXI="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jimmxint.asm
-InputName=jimmxint
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jimmxred.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIMMXR="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jimmxred.asm
-InputName=jimmxred
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JIMMXR="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jimmxred.asm
-InputName=jimmxred
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jiss2flt.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISS2="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jiss2flt.asm
-InputName=jiss2flt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISS2="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jiss2flt.asm
-InputName=jiss2flt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jiss2fst.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISS2F="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jiss2fst.asm
-InputName=jiss2fst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISS2F="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jiss2fst.asm
-InputName=jiss2fst
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jiss2int.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISS2I="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jiss2int.asm
-InputName=jiss2int
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISS2I="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jiss2int.asm
-InputName=jiss2int
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jiss2red.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISS2R="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jiss2red.asm
-InputName=jiss2red
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISS2R="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jiss2red.asm
-InputName=jiss2red
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jisseflt.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISSE="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jisseflt.asm
-InputName=jisseflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JISSE="$(IntDir)\jsimdcfg.inc" "jsimdext.inc" "jdct.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jisseflt.asm
-InputName=jisseflt
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jsimdcpu.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JSIMD="$(IntDir)\jsimdcfg.inc" "jsimdext.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jsimdcpu.asm
-InputName=jsimdcpu
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JSIMD="$(IntDir)\jsimdcfg.inc" "jsimdext.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jsimdcpu.asm
-InputName=jsimdcpu
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\jsimdw32.asm
-
-!IF "$(CFG)" == "libjpeg - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JSIMDW="$(IntDir)\jsimdcfg.inc" "jsimdext.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Release
-InputPath=.\jsimdw32.asm
-InputName=jsimdw32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__JSIMDW="$(IntDir)\jsimdcfg.inc" "jsimdext.inc"
-# Begin Custom Build - Assembling - $(InputPath)
-IntDir=.\Debug
-InputPath=.\jsimdw32.asm
-InputName=jsimdw32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- nasmw -Xvc -fwin32 -DWIN32 -I $(IntDir)\ -o $(IntDir)\$(InputName).obj $(InputPath)
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "NASM Header"
-
-# PROP Default_Filter "inc"
-# Begin Source File
-
-SOURCE=.\jcolsamp.inc
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdct.inc
-# End Source File
-# Begin Source File
-
-SOURCE=.\jsimdext.inc
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/vc6proj/libjpeg.dsw b/vc6proj/libjpeg.dsw
deleted file mode 100644
index 4ace153..0000000
--- a/vc6proj/libjpeg.dsw
+++ /dev/null
@@ -1,134 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# ·Ù¹ð: ¤³¤ÎÜ°¸½Íß°½ ̧²Ù ¤òÊÔ½¸¤Þ¤¿¤Ïºï½ü¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤!
-
-###############################################################################
-
-Project: "apptest"=".\apptest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name cjpeg
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name djpeg
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name jpegtran
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "cjpeg"=".\cjpeg.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libjpeg
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "djpeg"=".\djpeg.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libjpeg
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "jpegtran"=".\jpegtran.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libjpeg
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "libjpeg"=".\libjpeg.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name makecfg
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "makecfg"=".\makecfg.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "rdjpgcom"=".\rdjpgcom.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "wrjpgcom"=".\wrjpgcom.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/vc6proj/makecfg.dsp b/vc6proj/makecfg.dsp
deleted file mode 100644
index dbe914a..0000000
--- a/vc6proj/makecfg.dsp
+++ /dev/null
@@ -1,142 +0,0 @@
-# Microsoft Developer Studio Project File - Name="makecfg" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** ÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤ **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=makecfg - Win32 Debug
-!MESSAGE ¤³¤ì¤Ï͸ú¤ÊÒ²¸Ì§²Ù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤³¤ÎÌßÛ¼Þª¸Ä¤òËÞÙÄÞ¤¹¤ë¤¿¤á¤Ë¤Ï NMAKE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-!MESSAGE [Ò²¸Ì§²Ù¤Î´¸½Îß°Ä] ºÏÝÄÞ¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤
-!MESSAGE
-!MESSAGE NMAKE /f "makecfg.mak".
-!MESSAGE
-!MESSAGE NMAKE ¤Î¼Â¹Ô»þ¤Ë¹½À®¤ò»ØÄê¤Ç¤¤Þ¤¹
-!MESSAGE ºÏÝÄÞ ×²Ý¾å¤ÇϸۤÎÀßÄê¤òÄêµÁ¤·¤Þ¤¹¡£Îã:
-!MESSAGE
-!MESSAGE NMAKE /f "makecfg.mak" CFG="makecfg - Win32 Debug"
-!MESSAGE
-!MESSAGE ÁªÂò²Äǽ¤ÊËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "makecfg - Win32 Release" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE "makecfg - Win32 Debug" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "makecfg - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD CPP /nologo /W3 /O2 /GF /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-# Begin Custom Build - Generating - $(OutDir)\jsimdcfg.inc
-OutDir=.\Release
-InputPath=.\Release\makecfg.exe
-SOURCE="$(InputPath)"
-
-"$(OutDir)\jsimdcfg.inc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(TargetPath) > $(OutDir)\jsimdcfg.inc
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "makecfg - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-# Begin Custom Build - Generating - $(OutDir)\jsimdcfg.inc
-OutDir=.\Debug
-InputPath=.\Debug\makecfg.exe
-SOURCE="$(InputPath)"
-
-"$(OutDir)\jsimdcfg.inc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(TargetPath) > $(OutDir)\jsimdcfg.inc
-
-# End Custom Build
-
-!ENDIF
-
-# Begin Target
-
-# Name "makecfg - Win32 Release"
-# Name "makecfg - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\makecfg.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpegint.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/vc6proj/rdjpgcom.dsp b/vc6proj/rdjpgcom.dsp
deleted file mode 100644
index 7a5eda2..0000000
--- a/vc6proj/rdjpgcom.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="rdjpgcom" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** ÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤ **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=rdjpgcom - Win32 Debug
-!MESSAGE ¤³¤ì¤Ï͸ú¤ÊÒ²¸Ì§²Ù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤³¤ÎÌßÛ¼Þª¸Ä¤òËÞÙÄÞ¤¹¤ë¤¿¤á¤Ë¤Ï NMAKE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-!MESSAGE [Ò²¸Ì§²Ù¤Î´¸½Îß°Ä] ºÏÝÄÞ¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤
-!MESSAGE
-!MESSAGE NMAKE /f "rdjpgcom.mak".
-!MESSAGE
-!MESSAGE NMAKE ¤Î¼Â¹Ô»þ¤Ë¹½À®¤ò»ØÄê¤Ç¤¤Þ¤¹
-!MESSAGE ºÏÝÄÞ ×²Ý¾å¤ÇϸۤÎÀßÄê¤òÄêµÁ¤·¤Þ¤¹¡£Îã:
-!MESSAGE
-!MESSAGE NMAKE /f "rdjpgcom.mak" CFG="rdjpgcom - Win32 Debug"
-!MESSAGE
-!MESSAGE ÁªÂò²Äǽ¤ÊËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "rdjpgcom - Win32 Release" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE "rdjpgcom - Win32 Debug" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "rdjpgcom - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD CPP /nologo /W3 /O2 /GF /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib /nologo /subsystem:console /machine:I386 /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "rdjpgcom - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "rdjpgcom - Win32 Release"
-# Name "rdjpgcom - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\rdjpgcom.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/vc6proj/wrjpgcom.dsp b/vc6proj/wrjpgcom.dsp
deleted file mode 100644
index 7fdf9ec..0000000
--- a/vc6proj/wrjpgcom.dsp
+++ /dev/null
@@ -1,112 +0,0 @@
-# Microsoft Developer Studio Project File - Name="wrjpgcom" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** ÊÔ½¸¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤ **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=wrjpgcom - Win32 Debug
-!MESSAGE ¤³¤ì¤Ï͸ú¤ÊÒ²¸Ì§²Ù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤³¤ÎÌßÛ¼Þª¸Ä¤òËÞÙÄÞ¤¹¤ë¤¿¤á¤Ë¤Ï NMAKE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
-!MESSAGE [Ò²¸Ì§²Ù¤Î´¸½Îß°Ä] ºÏÝÄÞ¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤
-!MESSAGE
-!MESSAGE NMAKE /f "wrjpgcom.mak".
-!MESSAGE
-!MESSAGE NMAKE ¤Î¼Â¹Ô»þ¤Ë¹½À®¤ò»ØÄê¤Ç¤¤Þ¤¹
-!MESSAGE ºÏÝÄÞ ×²Ý¾å¤ÇϸۤÎÀßÄê¤òÄêµÁ¤·¤Þ¤¹¡£Îã:
-!MESSAGE
-!MESSAGE NMAKE /f "wrjpgcom.mak" CFG="wrjpgcom - Win32 Debug"
-!MESSAGE
-!MESSAGE ÁªÂò²Äǽ¤ÊËÞÙÄÞ Ó°ÄÞ:
-!MESSAGE
-!MESSAGE "wrjpgcom - Win32 Release" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE "wrjpgcom - Win32 Debug" ("Win32 (x86) Console Application" ÍÑ)
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "wrjpgcom - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD CPP /nologo /W3 /O2 /GF /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib /nologo /subsystem:console /machine:I386 /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "wrjpgcom - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /opt:nowin98
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "wrjpgcom - Win32 Release"
-# Name "wrjpgcom - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\wrjpgcom.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/jconfig.vc b/win/jconfig.h
similarity index 83%
rename from jconfig.vc
rename to win/jconfig.h
index d5bc9f9..7987ba6 100644
--- a/jconfig.vc
+++ b/win/jconfig.h
@@ -16,7 +16,12 @@
#undef INCOMPLETE_TYPES_BROKEN
/* Define "boolean" as unsigned char, not int, per Windows custom */
-#define TYPEDEF_UCHAR_BOOLEAN
+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
+typedef unsigned char boolean;
+#endif
+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
+
+#define inline __inline
#ifdef JPEG_INTERNALS
@@ -24,13 +29,6 @@
#endif /* JPEG_INTERNALS */
-#if defined(JPEG_INTERNALS) || defined(JPEG_INTERNAL_OPTIONS)
-#undef JSIMD_MMX_NOT_SUPPORTED
-#undef JSIMD_3DNOW_NOT_SUPPORTED
-#undef JSIMD_SSE_NOT_SUPPORTED
-#undef JSIMD_SSE2_NOT_SUPPORTED
-#endif
-
#ifdef JPEG_CJPEG_DJPEG
#define BMP_SUPPORTED /* BMP image file format */
diff --git a/wizard.doc b/wizard.doc
deleted file mode 100644
index 54170b2..0000000
--- a/wizard.doc
+++ /dev/null
@@ -1,211 +0,0 @@
-Advanced usage instructions for the Independent JPEG Group's JPEG software
-==========================================================================
-
-This file describes cjpeg's "switches for wizards".
-
-The "wizard" switches are intended for experimentation with JPEG by persons
-who are reasonably knowledgeable about the JPEG standard. If you don't know
-what you are doing, DON'T USE THESE SWITCHES. You'll likely produce files
-with worse image quality and/or poorer compression than you'd get from the
-default settings. Furthermore, these switches must be used with caution
-when making files intended for general use, because not all JPEG decoders
-will support unusual JPEG parameter settings.
-
-
-Quantization Table Adjustment
------------------------------
-
-Ordinarily, cjpeg starts with a default set of tables (the same ones given
-as examples in the JPEG standard) and scales them up or down according to
-the -quality setting. The details of the scaling algorithm can be found in
-jcparam.c. At very low quality settings, some quantization table entries
-can get scaled up to values exceeding 255. Although 2-byte quantization
-values are supported by the IJG software, this feature is not in baseline
-JPEG and is not supported by all implementations. If you need to ensure
-wide compatibility of low-quality files, you can constrain the scaled
-quantization values to no more than 255 by giving the -baseline switch.
-Note that use of -baseline will result in poorer quality for the same file
-size, since more bits than necessary are expended on higher AC coefficients.
-
-You can substitute a different set of quantization values by using the
--qtables switch:
-
- -qtables file Use the quantization tables given in the named file.
-
-The specified file should be a text file containing decimal quantization
-values. The file should contain one to four tables, each of 64 elements.
-The tables are implicitly numbered 0,1,etc. in order of appearance. Table
-entries appear in normal array order (NOT in the zigzag order in which they
-will be stored in the JPEG file).
-
-Quantization table files are free format, in that arbitrary whitespace can
-appear between numbers. Also, comments can be included: a comment starts
-with '#' and extends to the end of the line. Here is an example file that
-duplicates the default quantization tables:
-
- # Quantization tables given in JPEG spec, section K.1
-
- # This is table 0 (the luminance table):
- 16 11 10 16 24 40 51 61
- 12 12 14 19 26 58 60 55
- 14 13 16 24 40 57 69 56
- 14 17 22 29 51 87 80 62
- 18 22 37 56 68 109 103 77
- 24 35 55 64 81 104 113 92
- 49 64 78 87 103 121 120 101
- 72 92 95 98 112 100 103 99
-
- # This is table 1 (the chrominance table):
- 17 18 24 47 99 99 99 99
- 18 21 26 66 99 99 99 99
- 24 26 56 99 99 99 99 99
- 47 66 99 99 99 99 99 99
- 99 99 99 99 99 99 99 99
- 99 99 99 99 99 99 99 99
- 99 99 99 99 99 99 99 99
- 99 99 99 99 99 99 99 99
-
-If the -qtables switch is used without -quality, then the specified tables
-are used exactly as-is. If both -qtables and -quality are used, then the
-tables taken from the file are scaled in the same fashion that the default
-tables would be scaled for that quality setting. If -baseline appears, then
-the quantization values are constrained to the range 1-255.
-
-By default, cjpeg will use quantization table 0 for luminance components and
-table 1 for chrominance components. To override this choice, use the -qslots
-switch:
-
- -qslots N[,...] Select which quantization table to use for
- each color component.
-
-The -qslots switch specifies a quantization table number for each color
-component, in the order in which the components appear in the JPEG SOF marker.
-For example, to create a separate table for each of Y,Cb,Cr, you could
-provide a -qtables file that defines three quantization tables and say
-"-qslots 0,1,2". If -qslots gives fewer table numbers than there are color
-components, then the last table number is repeated as necessary.
-
-
-Sampling Factor Adjustment
---------------------------
-
-By default, cjpeg uses 2:1 horizontal and vertical downsampling when
-compressing YCbCr data, and no downsampling for all other color spaces.
-You can override this default with the -sample switch:
-
- -sample HxV[,...] Set JPEG sampling factors for each color
- component.
-
-The -sample switch specifies the JPEG sampling factors for each color
-component, in the order in which they appear in the JPEG SOF marker.
-If you specify fewer HxV pairs than there are components, the remaining
-components are set to 1x1 sampling. For example, the default YCbCr setting
-is equivalent to "-sample 2x2,1x1,1x1", which can be abbreviated to
-"-sample 2x2".
-
-There are still some JPEG decoders in existence that support only 2x1
-sampling (also called 4:2:2 sampling). Compatibility with such decoders can
-be achieved by specifying "-sample 2x1". This is not recommended unless
-really necessary, since it increases file size and encoding/decoding time
-with very little quality gain.
-
-
-Multiple Scan / Progression Control
------------------------------------
-
-By default, cjpeg emits a single-scan sequential JPEG file. The
--progressive switch generates a progressive JPEG file using a default series
-of progression parameters. You can create multiple-scan sequential JPEG
-files or progressive JPEG files with custom progression parameters by using
-the -scans switch:
-
- -scans file Use the scan sequence given in the named file.
-
-The specified file should be a text file containing a "scan script".
-The script specifies the contents and ordering of the scans to be emitted.
-Each entry in the script defines one scan. A scan definition specifies
-the components to be included in the scan, and for progressive JPEG it also
-specifies the progression parameters Ss,Se,Ah,Al for the scan. Scan
-definitions are separated by semicolons (';'). A semicolon after the last
-scan definition is optional.
-
-Each scan definition contains one to four component indexes, optionally
-followed by a colon (':') and the four progressive-JPEG parameters. The
-component indexes denote which color component(s) are to be transmitted in
-the scan. Components are numbered in the order in which they appear in the
-JPEG SOF marker, with the first component being numbered 0. (Note that these
-indexes are not the "component ID" codes assigned to the components, just
-positional indexes.)
-
-The progression parameters for each scan are:
- Ss Zigzag index of first coefficient included in scan
- Se Zigzag index of last coefficient included in scan
- Ah Zero for first scan of a coefficient, else Al of prior scan
- Al Successive approximation low bit position for scan
-If the progression parameters are omitted, the values 0,63,0,0 are used,
-producing a sequential JPEG file. cjpeg automatically determines whether
-the script represents a progressive or sequential file, by observing whether
-Ss and Se values other than 0 and 63 appear. (The -progressive switch is
-not needed to specify this; in fact, it is ignored when -scans appears.)
-The scan script must meet the JPEG restrictions on progression sequences.
-(cjpeg checks that the spec's requirements are obeyed.)
-
-Scan script files are free format, in that arbitrary whitespace can appear
-between numbers and around punctuation. Also, comments can be included: a
-comment starts with '#' and extends to the end of the line. For additional
-legibility, commas or dashes can be placed between values. (Actually, any
-single punctuation character other than ':' or ';' can be inserted.) For
-example, the following two scan definitions are equivalent:
- 0 1 2: 0 63 0 0;
- 0,1,2 : 0-63, 0,0 ;
-
-Here is an example of a scan script that generates a partially interleaved
-sequential JPEG file:
-
- 0; # Y only in first scan
- 1 2; # Cb and Cr in second scan
-
-Here is an example of a progressive scan script using only spectral selection
-(no successive approximation):
-
- # Interleaved DC scan for Y,Cb,Cr:
- 0,1,2: 0-0, 0, 0 ;
- # AC scans:
- 0: 1-2, 0, 0 ; # First two Y AC coefficients
- 0: 3-5, 0, 0 ; # Three more
- 1: 1-63, 0, 0 ; # All AC coefficients for Cb
- 2: 1-63, 0, 0 ; # All AC coefficients for Cr
- 0: 6-9, 0, 0 ; # More Y coefficients
- 0: 10-63, 0, 0 ; # Remaining Y coefficients
-
-Here is an example of a successive-approximation script. This is equivalent
-to the default script used by "cjpeg -progressive" for YCbCr images:
-
- # Initial DC scan for Y,Cb,Cr (lowest bit not sent)
- 0,1,2: 0-0, 0, 1 ;
- # First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits:
- 0: 1-5, 0, 2 ;
- # Send all Cr,Cb AC coefficients, minus lowest bit:
- # (chroma data is usually too small to be worth subdividing further;
- # but note we send Cr first since eye is least sensitive to Cb)
- 2: 1-63, 0, 1 ;
- 1: 1-63, 0, 1 ;
- # Send remaining Y AC coefficients, minus 2 lowest bits:
- 0: 6-63, 0, 2 ;
- # Send next-to-lowest bit of all Y AC coefficients:
- 0: 1-63, 2, 1 ;
- # At this point we've sent all but the lowest bit of all coefficients.
- # Send lowest bit of DC coefficients
- 0,1,2: 0-0, 1, 0 ;
- # Send lowest bit of AC coefficients
- 2: 1-63, 1, 0 ;
- 1: 1-63, 1, 0 ;
- # Y AC lowest bit scan is last; it's usually the largest scan
- 0: 1-63, 1, 0 ;
-
-It may be worth pointing out that this script is tuned for quality settings
-of around 50 to 75. For lower quality settings, you'd probably want to use
-a script with fewer stages of successive approximation (otherwise the
-initial scans will be really bad). For higher quality settings, you might
-want to use more stages of successive approximation (so that the initial
-scans are not too large).
diff --git a/wrbmp.c b/wrbmp.c
deleted file mode 100644
index 517441a..0000000
--- a/wrbmp.c
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * wrbmp.c
- *
- * Copyright (C) 1994-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * ---------------------------------------------------------------------
- * x86 SIMD extension for IJG JPEG library
- * Copyright (C) 1999-2006, MIYASAKA Masaru.
- * This file has been modified to improve performance.
- * Last Modified : October 19, 2004
- * ---------------------------------------------------------------------
- *
- * This file contains routines to write output images in Microsoft "BMP"
- * format (MS Windows 3.x and OS/2 1.x flavors).
- * Either 8-bit colormapped or 24-bit full-color format can be written.
- * No compression is supported.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume output to
- * an ordinary stdio stream.
- *
- * This code contributed by James Arthur Boucher.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef BMP_SUPPORTED
-
-
-/*
- * To support 12-bit JPEG data, we'd have to scale output down to 8 bits.
- * This is not yet implemented.
- */
-
-#if BITS_IN_JSAMPLE != 8
- Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
-#endif
-
-/*
- * Since BMP stores scanlines bottom-to-top, we have to invert the image
- * from JPEG's top-to-bottom order. To do this, we save the outgoing data
- * in a virtual array during put_pixel_row calls, then actually emit the
- * BMP file during finish_output. The virtual array contains one JSAMPLE per
- * pixel if the output is grayscale or colormapped, three if it is full color.
- */
-
-/* Private version of data destination object */
-
-typedef struct {
- struct djpeg_dest_struct pub; /* public fields */
-
- boolean is_os2; /* saves the OS2 format request flag */
-
- jvirt_sarray_ptr whole_image; /* needed to reverse row order */
- JDIMENSION data_width; /* JSAMPLEs per row */
- JDIMENSION row_width; /* physical width of one row in the BMP file */
- int pad_bytes; /* number of padding bytes needed per row */
- JDIMENSION cur_output_row; /* next row# to write to virtual array */
-} bmp_dest_struct;
-
-typedef bmp_dest_struct * bmp_dest_ptr;
-
-
-/* Forward declarations */
-LOCAL(void) write_colormap
- JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest,
- int map_colors, int map_entry_size));
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-/* This version is for writing 24-bit pixels */
-{
- bmp_dest_ptr dest = (bmp_dest_ptr) dinfo;
- JSAMPARRAY image_ptr;
- register JSAMPROW inptr, outptr;
- register JDIMENSION col;
- int pad;
-
- /* Access next row in virtual array */
- image_ptr = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, dest->whole_image,
- dest->cur_output_row, (JDIMENSION) 1, TRUE);
- dest->cur_output_row++;
-
- /* Transfer data. Note destination values must be in BGR order
- * (even though Microsoft's own documents say the opposite).
- */
- inptr = dest->pub.buffer[0];
- outptr = image_ptr[0];
- for (col = cinfo->output_width; col > 0; col--) {
- outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */
- outptr[1] = *inptr++;
- outptr[0] = *inptr++;
- outptr += 3;
- }
-
- /* Zero out the pad bytes. */
- pad = dest->pad_bytes;
- while (--pad >= 0)
- *outptr++ = 0;
-}
-
-METHODDEF(void)
-put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-/* This version is for grayscale OR quantized color output */
-{
- bmp_dest_ptr dest = (bmp_dest_ptr) dinfo;
- JSAMPARRAY image_ptr;
- register JSAMPROW inptr, outptr;
- register JDIMENSION col;
- int pad;
-
- /* Access next row in virtual array */
- image_ptr = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, dest->whole_image,
- dest->cur_output_row, (JDIMENSION) 1, TRUE);
- dest->cur_output_row++;
-
- /* Transfer data. */
- inptr = dest->pub.buffer[0];
- outptr = image_ptr[0];
- for (col = cinfo->output_width; col > 0; col--) {
- *outptr++ = *inptr++; /* can omit GETJSAMPLE() safely */
- }
-
- /* Zero out the pad bytes. */
- pad = dest->pad_bytes;
- while (--pad >= 0)
- *outptr++ = 0;
-}
-
-
-/*
- * Startup: normally writes the file header.
- * In this module we may as well postpone everything until finish_output.
- */
-
-METHODDEF(void)
-start_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- /* no work here */
-}
-
-
-/*
- * Finish up at the end of the file.
- *
- * Here is where we really output the BMP file.
- *
- * First, routines to write the Windows and OS/2 variants of the file header.
- */
-
-LOCAL(void)
-write_bmp_header (j_decompress_ptr cinfo, bmp_dest_ptr dest)
-/* Write a Windows-style BMP file header, including colormap if needed */
-{
- char bmpfileheader[14];
- char bmpinfoheader[40];
-#define PUT_2B(array,offset,value) \
- (array[offset] = (char) ((value) & 0xFF), \
- array[offset+1] = (char) (((value) >> 8) & 0xFF))
-#define PUT_4B(array,offset,value) \
- (array[offset] = (char) ((value) & 0xFF), \
- array[offset+1] = (char) (((value) >> 8) & 0xFF), \
- array[offset+2] = (char) (((value) >> 16) & 0xFF), \
- array[offset+3] = (char) (((value) >> 24) & 0xFF))
- INT32 headersize, bfSize;
- int bits_per_pixel, cmap_entries;
-
- /* Compute colormap size and total file size */
- if (cinfo->out_color_space == JCS_RGB) {
- if (cinfo->quantize_colors) {
- /* Colormapped RGB */
- bits_per_pixel = 8;
- cmap_entries = 256;
- } else {
- /* Unquantized, full color RGB */
- bits_per_pixel = 24;
- cmap_entries = 0;
- }
- } else {
- /* Grayscale output. We need to fake a 256-entry colormap. */
- bits_per_pixel = 8;
- cmap_entries = 256;
- }
- /* File size */
- headersize = 14 + 40 + cmap_entries * 4; /* Header and colormap */
- bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height;
-
- /* Set unused fields of header to 0 */
- MEMZERO(bmpfileheader, SIZEOF(bmpfileheader));
- MEMZERO(bmpinfoheader, SIZEOF(bmpinfoheader));
-
- /* Fill the file header */
- bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */
- bmpfileheader[1] = 0x4D;
- PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */
- /* we leave bfReserved1 & bfReserved2 = 0 */
- PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */
-
- /* Fill the info header (Microsoft calls this a BITMAPINFOHEADER) */
- PUT_2B(bmpinfoheader, 0, 40); /* biSize */
- PUT_4B(bmpinfoheader, 4, cinfo->output_width); /* biWidth */
- PUT_4B(bmpinfoheader, 8, cinfo->output_height); /* biHeight */
- PUT_2B(bmpinfoheader, 12, 1); /* biPlanes - must be 1 */
- PUT_2B(bmpinfoheader, 14, bits_per_pixel); /* biBitCount */
- /* we leave biCompression = 0, for none */
- /* we leave biSizeImage = 0; this is correct for uncompressed data */
- if (cinfo->density_unit == 2) { /* if have density in dots/cm, then */
- PUT_4B(bmpinfoheader, 24, (INT32) (cinfo->X_density*100)); /* XPels/M */
- PUT_4B(bmpinfoheader, 28, (INT32) (cinfo->Y_density*100)); /* XPels/M */
- }
- PUT_2B(bmpinfoheader, 32, cmap_entries); /* biClrUsed */
- /* we leave biClrImportant = 0 */
-
- if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14)
- ERREXIT(cinfo, JERR_FILE_WRITE);
- if (JFWRITE(dest->pub.output_file, bmpinfoheader, 40) != (size_t) 40)
- ERREXIT(cinfo, JERR_FILE_WRITE);
-
- if (cmap_entries > 0)
- write_colormap(cinfo, dest, cmap_entries, 4);
-}
-
-
-LOCAL(void)
-write_os2_header (j_decompress_ptr cinfo, bmp_dest_ptr dest)
-/* Write an OS2-style BMP file header, including colormap if needed */
-{
- char bmpfileheader[14];
- char bmpcoreheader[12];
- INT32 headersize, bfSize;
- int bits_per_pixel, cmap_entries;
-
- /* Compute colormap size and total file size */
- if (cinfo->out_color_space == JCS_RGB) {
- if (cinfo->quantize_colors) {
- /* Colormapped RGB */
- bits_per_pixel = 8;
- cmap_entries = 256;
- } else {
- /* Unquantized, full color RGB */
- bits_per_pixel = 24;
- cmap_entries = 0;
- }
- } else {
- /* Grayscale output. We need to fake a 256-entry colormap. */
- bits_per_pixel = 8;
- cmap_entries = 256;
- }
- /* File size */
- headersize = 14 + 12 + cmap_entries * 3; /* Header and colormap */
- bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height;
-
- /* Set unused fields of header to 0 */
- MEMZERO(bmpfileheader, SIZEOF(bmpfileheader));
- MEMZERO(bmpcoreheader, SIZEOF(bmpcoreheader));
-
- /* Fill the file header */
- bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */
- bmpfileheader[1] = 0x4D;
- PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */
- /* we leave bfReserved1 & bfReserved2 = 0 */
- PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */
-
- /* Fill the info header (Microsoft calls this a BITMAPCOREHEADER) */
- PUT_2B(bmpcoreheader, 0, 12); /* bcSize */
- PUT_2B(bmpcoreheader, 4, cinfo->output_width); /* bcWidth */
- PUT_2B(bmpcoreheader, 6, cinfo->output_height); /* bcHeight */
- PUT_2B(bmpcoreheader, 8, 1); /* bcPlanes - must be 1 */
- PUT_2B(bmpcoreheader, 10, bits_per_pixel); /* bcBitCount */
-
- if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14)
- ERREXIT(cinfo, JERR_FILE_WRITE);
- if (JFWRITE(dest->pub.output_file, bmpcoreheader, 12) != (size_t) 12)
- ERREXIT(cinfo, JERR_FILE_WRITE);
-
- if (cmap_entries > 0)
- write_colormap(cinfo, dest, cmap_entries, 3);
-}
-
-
-/*
- * Write the colormap.
- * Windows uses BGR0 map entries; OS/2 uses BGR entries.
- */
-
-LOCAL(void)
-write_colormap (j_decompress_ptr cinfo, bmp_dest_ptr dest,
- int map_colors, int map_entry_size)
-{
- JSAMPARRAY colormap = cinfo->colormap;
- int num_colors = cinfo->actual_number_of_colors;
- FILE * outfile = dest->pub.output_file;
- int i;
-
- if (colormap != NULL) {
- if (cinfo->out_color_components == 3) {
- /* Normal case with RGB colormap */
- for (i = 0; i < num_colors; i++) {
- putc(GETJSAMPLE(colormap[2][i]), outfile);
- putc(GETJSAMPLE(colormap[1][i]), outfile);
- putc(GETJSAMPLE(colormap[0][i]), outfile);
- if (map_entry_size == 4)
- putc(0, outfile);
- }
- } else {
- /* Grayscale colormap (only happens with grayscale quantization) */
- for (i = 0; i < num_colors; i++) {
- putc(GETJSAMPLE(colormap[0][i]), outfile);
- putc(GETJSAMPLE(colormap[0][i]), outfile);
- putc(GETJSAMPLE(colormap[0][i]), outfile);
- if (map_entry_size == 4)
- putc(0, outfile);
- }
- }
- } else {
- /* If no colormap, must be grayscale data. Generate a linear "map". */
- for (i = 0; i < 256; i++) {
- putc(i, outfile);
- putc(i, outfile);
- putc(i, outfile);
- if (map_entry_size == 4)
- putc(0, outfile);
- }
- }
- /* Pad colormap with zeros to ensure specified number of colormap entries */
- if (i > map_colors)
- ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i);
- for (; i < map_colors; i++) {
- putc(0, outfile);
- putc(0, outfile);
- putc(0, outfile);
- if (map_entry_size == 4)
- putc(0, outfile);
- }
-}
-
-
-METHODDEF(void)
-finish_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- bmp_dest_ptr dest = (bmp_dest_ptr) dinfo;
- register FILE * outfile = dest->pub.output_file;
- JSAMPARRAY image_ptr;
-#if (BITS_IN_JSAMPLE != 8) || defined(NEED_FAR_POINTERS)
- register JSAMPROW data_ptr;
- register JDIMENSION col;
-#endif
- JDIMENSION row;
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-
- /* Write the header and colormap */
- if (dest->is_os2)
- write_os2_header(cinfo, dest);
- else
- write_bmp_header(cinfo, dest);
-
- /* Write the file body from our virtual array */
- for (row = cinfo->output_height; row > 0; row--) {
- if (progress != NULL) {
- progress->pub.pass_counter = (long) (cinfo->output_height - row);
- progress->pub.pass_limit = (long) cinfo->output_height;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
- image_ptr = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, dest->whole_image, row-1, (JDIMENSION) 1, FALSE);
-#if (BITS_IN_JSAMPLE == 8) && !defined(NEED_FAR_POINTERS)
- if (JFWRITE(outfile, image_ptr[0], dest->row_width)
- != (size_t) dest->row_width)
- ERREXIT(cinfo, JERR_FILE_WRITE);
-#else
- data_ptr = image_ptr[0];
- for (col = dest->row_width; col > 0; col--) {
- putc(GETJSAMPLE(*data_ptr), outfile);
- data_ptr++;
- }
-#endif
- }
- if (progress != NULL)
- progress->completed_extra_passes++;
-
- /* Make sure we wrote the output file OK */
- fflush(outfile);
- if (ferror(outfile))
- ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for BMP format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2)
-{
- bmp_dest_ptr dest;
- JDIMENSION row_width;
-
- /* Create module interface object, fill in method pointers */
- dest = (bmp_dest_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(bmp_dest_struct));
- dest->pub.start_output = start_output_bmp;
- dest->pub.finish_output = finish_output_bmp;
- dest->is_os2 = is_os2;
-
- if (cinfo->out_color_space == JCS_GRAYSCALE) {
- dest->pub.put_pixel_rows = put_gray_rows;
- } else if (cinfo->out_color_space == JCS_RGB) {
- if (cinfo->quantize_colors)
- dest->pub.put_pixel_rows = put_gray_rows;
- else
- dest->pub.put_pixel_rows = put_pixel_rows;
- } else {
- ERREXIT(cinfo, JERR_BMP_COLORSPACE);
- }
-
- /* Calculate output image dimensions so we can allocate space */
- jpeg_calc_output_dimensions(cinfo);
-
- /* Determine width of rows in the BMP file (padded to 4-byte boundary). */
- row_width = cinfo->output_width * cinfo->output_components;
- dest->data_width = row_width;
- while ((row_width & 3) != 0) row_width++;
- dest->row_width = row_width;
- dest->pad_bytes = (int) (row_width - dest->data_width);
-
- /* Allocate space for inversion array, prepare for write pass */
- dest->whole_image = (*cinfo->mem->request_virt_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
- row_width, cinfo->output_height, (JDIMENSION) 1);
- dest->cur_output_row = 0;
- if (cinfo->progress != NULL) {
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
- progress->total_extra_passes++; /* count file input as separate pass */
- }
-
- /* Create decompressor output buffer. */
- dest->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, row_width, (JDIMENSION) 1);
- dest->pub.buffer_height = 1;
-
- return (djpeg_dest_ptr) dest;
-}
-
-#endif /* BMP_SUPPORTED */
diff --git a/wrgif.c b/wrgif.c
deleted file mode 100644
index 85cfaa8..0000000
--- a/wrgif.c
+++ /dev/null
@@ -1,505 +0,0 @@
-/*
- * wrgif.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- **************************************************************************
- * WARNING: You will need an LZW patent license from Unisys in order to *
- * use this file legally in any commercial or shareware application. *
- **************************************************************************
- *
- * This file contains routines to write output images in GIF format.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume output to
- * an ordinary stdio stream.
- */
-
-/*
- * This code is loosely based on ppmtogif from the PBMPLUS distribution
- * of Feb. 1991. That file contains the following copyright notice:
- * Based on GIFENCODE by David Rowley <mgardi@watdscu.waterloo.edu>.
- * Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al.
- * Copyright (C) 1989 by Jef Poskanzer.
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation. This software is provided "as is" without express or
- * implied warranty.
- *
- * We are also required to state that
- * "The Graphics Interchange Format(c) is the Copyright property of
- * CompuServe Incorporated. GIF(sm) is a Service Mark property of
- * CompuServe Incorporated."
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef GIF_SUPPORTED
-
-
-#define MAX_LZW_BITS 12 /* maximum LZW code size (4096 symbols) */
-
-typedef INT16 code_int; /* must hold -1 .. 2**MAX_LZW_BITS */
-
-#define LZW_TABLE_SIZE ((code_int) 1 << MAX_LZW_BITS)
-
-#define HSIZE 5003 /* hash table size for 80% occupancy */
-
-typedef int hash_int; /* must hold -2*HSIZE..2*HSIZE */
-
-#define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1)
-
-
-/*
- * The LZW hash table consists of two parallel arrays:
- * hash_code[i] code of symbol in slot i, or 0 if empty slot
- * hash_value[i] symbol's value; undefined if empty slot
- * where slot values (i) range from 0 to HSIZE-1. The symbol value is
- * its prefix symbol's code concatenated with its suffix character.
- *
- * Algorithm: use open addressing double hashing (no chaining) on the
- * prefix code / suffix character combination. We do a variant of Knuth's
- * algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime
- * secondary probe.
- *
- * The hash_value[] table is allocated from FAR heap space since it would
- * use up rather a lot of the near data space in a PC.
- */
-
-typedef INT32 hash_entry; /* must hold (code_int<<8) | byte */
-
-#define HASH_ENTRY(prefix,suffix) ((((hash_entry) (prefix)) << 8) | (suffix))
-
-
-/* Private version of data destination object */
-
-typedef struct {
- struct djpeg_dest_struct pub; /* public fields */
-
- j_decompress_ptr cinfo; /* back link saves passing separate parm */
-
- /* State for packing variable-width codes into a bitstream */
- int n_bits; /* current number of bits/code */
- code_int maxcode; /* maximum code, given n_bits */
- int init_bits; /* initial n_bits ... restored after clear */
- INT32 cur_accum; /* holds bits not yet output */
- int cur_bits; /* # of bits in cur_accum */
-
- /* LZW string construction */
- code_int waiting_code; /* symbol not yet output; may be extendable */
- boolean first_byte; /* if TRUE, waiting_code is not valid */
-
- /* State for LZW code assignment */
- code_int ClearCode; /* clear code (doesn't change) */
- code_int EOFCode; /* EOF code (ditto) */
- code_int free_code; /* first not-yet-used symbol code */
-
- /* LZW hash table */
- code_int *hash_code; /* => hash table of symbol codes */
- hash_entry FAR *hash_value; /* => hash table of symbol values */
-
- /* GIF data packet construction buffer */
- int bytesinpkt; /* # of bytes in current packet */
- char packetbuf[256]; /* workspace for accumulating packet */
-
-} gif_dest_struct;
-
-typedef gif_dest_struct * gif_dest_ptr;
-
-
-/*
- * Routines to package compressed data bytes into GIF data blocks.
- * A data block consists of a count byte (1..255) and that many data bytes.
- */
-
-LOCAL(void)
-flush_packet (gif_dest_ptr dinfo)
-/* flush any accumulated data */
-{
- if (dinfo->bytesinpkt > 0) { /* never write zero-length packet */
- dinfo->packetbuf[0] = (char) dinfo->bytesinpkt++;
- if (JFWRITE(dinfo->pub.output_file, dinfo->packetbuf, dinfo->bytesinpkt)
- != (size_t) dinfo->bytesinpkt)
- ERREXIT(dinfo->cinfo, JERR_FILE_WRITE);
- dinfo->bytesinpkt = 0;
- }
-}
-
-
-/* Add a character to current packet; flush to disk if necessary */
-#define CHAR_OUT(dinfo,c) \
- { (dinfo)->packetbuf[++(dinfo)->bytesinpkt] = (char) (c); \
- if ((dinfo)->bytesinpkt >= 255) \
- flush_packet(dinfo); \
- }
-
-
-/* Routine to convert variable-width codes into a byte stream */
-
-LOCAL(void)
-output (gif_dest_ptr dinfo, code_int code)
-/* Emit a code of n_bits bits */
-/* Uses cur_accum and cur_bits to reblock into 8-bit bytes */
-{
- dinfo->cur_accum |= ((INT32) code) << dinfo->cur_bits;
- dinfo->cur_bits += dinfo->n_bits;
-
- while (dinfo->cur_bits >= 8) {
- CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF);
- dinfo->cur_accum >>= 8;
- dinfo->cur_bits -= 8;
- }
-
- /*
- * If the next entry is going to be too big for the code size,
- * then increase it, if possible. We do this here to ensure
- * that it's done in sync with the decoder's codesize increases.
- */
- if (dinfo->free_code > dinfo->maxcode) {
- dinfo->n_bits++;
- if (dinfo->n_bits == MAX_LZW_BITS)
- dinfo->maxcode = LZW_TABLE_SIZE; /* free_code will never exceed this */
- else
- dinfo->maxcode = MAXCODE(dinfo->n_bits);
- }
-}
-
-
-/* The LZW algorithm proper */
-
-
-LOCAL(void)
-clear_hash (gif_dest_ptr dinfo)
-/* Fill the hash table with empty entries */
-{
- /* It's sufficient to zero hash_code[] */
- MEMZERO(dinfo->hash_code, HSIZE * SIZEOF(code_int));
-}
-
-
-LOCAL(void)
-clear_block (gif_dest_ptr dinfo)
-/* Reset compressor and issue a Clear code */
-{
- clear_hash(dinfo); /* delete all the symbols */
- dinfo->free_code = dinfo->ClearCode + 2;
- output(dinfo, dinfo->ClearCode); /* inform decoder */
- dinfo->n_bits = dinfo->init_bits; /* reset code size */
- dinfo->maxcode = MAXCODE(dinfo->n_bits);
-}
-
-
-LOCAL(void)
-compress_init (gif_dest_ptr dinfo, int i_bits)
-/* Initialize LZW compressor */
-{
- /* init all the state variables */
- dinfo->n_bits = dinfo->init_bits = i_bits;
- dinfo->maxcode = MAXCODE(dinfo->n_bits);
- dinfo->ClearCode = ((code_int) 1 << (i_bits - 1));
- dinfo->EOFCode = dinfo->ClearCode + 1;
- dinfo->free_code = dinfo->ClearCode + 2;
- dinfo->first_byte = TRUE; /* no waiting symbol yet */
- /* init output buffering vars */
- dinfo->bytesinpkt = 0;
- dinfo->cur_accum = 0;
- dinfo->cur_bits = 0;
- /* clear hash table */
- clear_hash(dinfo);
- /* GIF specifies an initial Clear code */
- output(dinfo, dinfo->ClearCode);
-}
-
-
-LOCAL(void)
-compress_byte (gif_dest_ptr dinfo, int c)
-/* Accept and compress one 8-bit byte */
-{
- register hash_int i;
- register hash_int disp;
- register hash_entry probe_value;
-
- if (dinfo->first_byte) { /* need to initialize waiting_code */
- dinfo->waiting_code = c;
- dinfo->first_byte = FALSE;
- return;
- }
-
- /* Probe hash table to see if a symbol exists for
- * waiting_code followed by c.
- * If so, replace waiting_code by that symbol and return.
- */
- i = ((hash_int) c << (MAX_LZW_BITS-8)) + dinfo->waiting_code;
- /* i is less than twice 2**MAX_LZW_BITS, therefore less than twice HSIZE */
- if (i >= HSIZE)
- i -= HSIZE;
-
- probe_value = HASH_ENTRY(dinfo->waiting_code, c);
-
- if (dinfo->hash_code[i] != 0) { /* is first probed slot empty? */
- if (dinfo->hash_value[i] == probe_value) {
- dinfo->waiting_code = dinfo->hash_code[i];
- return;
- }
- if (i == 0) /* secondary hash (after G. Knott) */
- disp = 1;
- else
- disp = HSIZE - i;
- for (;;) {
- i -= disp;
- if (i < 0)
- i += HSIZE;
- if (dinfo->hash_code[i] == 0)
- break; /* hit empty slot */
- if (dinfo->hash_value[i] == probe_value) {
- dinfo->waiting_code = dinfo->hash_code[i];
- return;
- }
- }
- }
-
- /* here when hashtable[i] is an empty slot; desired symbol not in table */
- output(dinfo, dinfo->waiting_code);
- if (dinfo->free_code < LZW_TABLE_SIZE) {
- dinfo->hash_code[i] = dinfo->free_code++; /* add symbol to hashtable */
- dinfo->hash_value[i] = probe_value;
- } else
- clear_block(dinfo);
- dinfo->waiting_code = c;
-}
-
-
-LOCAL(void)
-compress_term (gif_dest_ptr dinfo)
-/* Clean up at end */
-{
- /* Flush out the buffered code */
- if (! dinfo->first_byte)
- output(dinfo, dinfo->waiting_code);
- /* Send an EOF code */
- output(dinfo, dinfo->EOFCode);
- /* Flush the bit-packing buffer */
- if (dinfo->cur_bits > 0) {
- CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF);
- }
- /* Flush the packet buffer */
- flush_packet(dinfo);
-}
-
-
-/* GIF header construction */
-
-
-LOCAL(void)
-put_word (gif_dest_ptr dinfo, unsigned int w)
-/* Emit a 16-bit word, LSB first */
-{
- putc(w & 0xFF, dinfo->pub.output_file);
- putc((w >> 8) & 0xFF, dinfo->pub.output_file);
-}
-
-
-LOCAL(void)
-put_3bytes (gif_dest_ptr dinfo, int val)
-/* Emit 3 copies of same byte value --- handy subr for colormap construction */
-{
- putc(val, dinfo->pub.output_file);
- putc(val, dinfo->pub.output_file);
- putc(val, dinfo->pub.output_file);
-}
-
-
-LOCAL(void)
-emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap)
-/* Output the GIF file header, including color map */
-/* If colormap==NULL, synthesize a gray-scale colormap */
-{
- int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte;
- int cshift = dinfo->cinfo->data_precision - 8;
- int i;
-
- if (num_colors > 256)
- ERREXIT1(dinfo->cinfo, JERR_TOO_MANY_COLORS, num_colors);
- /* Compute bits/pixel and related values */
- BitsPerPixel = 1;
- while (num_colors > (1 << BitsPerPixel))
- BitsPerPixel++;
- ColorMapSize = 1 << BitsPerPixel;
- if (BitsPerPixel <= 1)
- InitCodeSize = 2;
- else
- InitCodeSize = BitsPerPixel;
- /*
- * Write the GIF header.
- * Note that we generate a plain GIF87 header for maximum compatibility.
- */
- putc('G', dinfo->pub.output_file);
- putc('I', dinfo->pub.output_file);
- putc('F', dinfo->pub.output_file);
- putc('8', dinfo->pub.output_file);
- putc('7', dinfo->pub.output_file);
- putc('a', dinfo->pub.output_file);
- /* Write the Logical Screen Descriptor */
- put_word(dinfo, (unsigned int) dinfo->cinfo->output_width);
- put_word(dinfo, (unsigned int) dinfo->cinfo->output_height);
- FlagByte = 0x80; /* Yes, there is a global color table */
- FlagByte |= (BitsPerPixel-1) << 4; /* color resolution */
- FlagByte |= (BitsPerPixel-1); /* size of global color table */
- putc(FlagByte, dinfo->pub.output_file);
- putc(0, dinfo->pub.output_file); /* Background color index */
- putc(0, dinfo->pub.output_file); /* Reserved (aspect ratio in GIF89) */
- /* Write the Global Color Map */
- /* If the color map is more than 8 bits precision, */
- /* we reduce it to 8 bits by shifting */
- for (i=0; i < ColorMapSize; i++) {
- if (i < num_colors) {
- if (colormap != NULL) {
- if (dinfo->cinfo->out_color_space == JCS_RGB) {
- /* Normal case: RGB color map */
- putc(GETJSAMPLE(colormap[0][i]) >> cshift, dinfo->pub.output_file);
- putc(GETJSAMPLE(colormap[1][i]) >> cshift, dinfo->pub.output_file);
- putc(GETJSAMPLE(colormap[2][i]) >> cshift, dinfo->pub.output_file);
- } else {
- /* Grayscale "color map": possible if quantizing grayscale image */
- put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift);
- }
- } else {
- /* Create a gray-scale map of num_colors values, range 0..255 */
- put_3bytes(dinfo, (i * 255 + (num_colors-1)/2) / (num_colors-1));
- }
- } else {
- /* fill out the map to a power of 2 */
- put_3bytes(dinfo, 0);
- }
- }
- /* Write image separator and Image Descriptor */
- putc(',', dinfo->pub.output_file); /* separator */
- put_word(dinfo, 0); /* left/top offset */
- put_word(dinfo, 0);
- put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); /* image size */
- put_word(dinfo, (unsigned int) dinfo->cinfo->output_height);
- /* flag byte: not interlaced, no local color map */
- putc(0x00, dinfo->pub.output_file);
- /* Write Initial Code Size byte */
- putc(InitCodeSize, dinfo->pub.output_file);
-
- /* Initialize for LZW compression of image data */
- compress_init(dinfo, InitCodeSize+1);
-}
-
-
-/*
- * Startup: write the file header.
- */
-
-METHODDEF(void)
-start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- gif_dest_ptr dest = (gif_dest_ptr) dinfo;
-
- if (cinfo->quantize_colors)
- emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap);
- else
- emit_header(dest, 256, (JSAMPARRAY) NULL);
-}
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-{
- gif_dest_ptr dest = (gif_dest_ptr) dinfo;
- register JSAMPROW ptr;
- register JDIMENSION col;
-
- ptr = dest->pub.buffer[0];
- for (col = cinfo->output_width; col > 0; col--) {
- compress_byte(dest, GETJSAMPLE(*ptr++));
- }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- gif_dest_ptr dest = (gif_dest_ptr) dinfo;
-
- /* Flush LZW mechanism */
- compress_term(dest);
- /* Write a zero-length data block to end the series */
- putc(0, dest->pub.output_file);
- /* Write the GIF terminator mark */
- putc(';', dest->pub.output_file);
- /* Make sure we wrote the output file OK */
- fflush(dest->pub.output_file);
- if (ferror(dest->pub.output_file))
- ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for GIF format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_gif (j_decompress_ptr cinfo)
-{
- gif_dest_ptr dest;
-
- /* Create module interface object, fill in method pointers */
- dest = (gif_dest_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(gif_dest_struct));
- dest->cinfo = cinfo; /* make back link for subroutines */
- dest->pub.start_output = start_output_gif;
- dest->pub.put_pixel_rows = put_pixel_rows;
- dest->pub.finish_output = finish_output_gif;
-
- if (cinfo->out_color_space != JCS_GRAYSCALE &&
- cinfo->out_color_space != JCS_RGB)
- ERREXIT(cinfo, JERR_GIF_COLORSPACE);
-
- /* Force quantization if color or if > 8 bits input */
- if (cinfo->out_color_space != JCS_GRAYSCALE || cinfo->data_precision > 8) {
- /* Force quantization to at most 256 colors */
- cinfo->quantize_colors = TRUE;
- if (cinfo->desired_number_of_colors > 256)
- cinfo->desired_number_of_colors = 256;
- }
-
- /* Calculate output image dimensions so we can allocate space */
- jpeg_calc_output_dimensions(cinfo);
-
- if (cinfo->output_components != 1) /* safety check: just one component? */
- ERREXIT(cinfo, JERR_GIF_BUG);
-
- /* Create decompressor output buffer. */
- dest->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) 1);
- dest->pub.buffer_height = 1;
-
- /* Allocate space for hash table */
- dest->hash_code = (code_int *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- HSIZE * SIZEOF(code_int));
- dest->hash_value = (hash_entry FAR *)
- (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- HSIZE * SIZEOF(hash_entry));
-
- return (djpeg_dest_ptr) dest;
-}
-
-#endif /* GIF_SUPPORTED */
diff --git a/wrjpgcom.1 b/wrjpgcom.1
deleted file mode 100644
index d419a99..0000000
--- a/wrjpgcom.1
+++ /dev/null
@@ -1,103 +0,0 @@
-.TH WRJPGCOM 1 "15 June 1995"
-.SH NAME
-wrjpgcom \- insert text comments into a JPEG file
-.SH SYNOPSIS
-.B wrjpgcom
-[
-.B \-replace
-]
-[
-.BI \-comment " text"
-]
-[
-.BI \-cfile " name"
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B wrjpgcom
-reads the named JPEG/JFIF file, or the standard input if no file is named,
-and generates a new JPEG/JFIF file on standard output. A comment block is
-added to the file.
-.PP
-The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file.
-Although the standard doesn't actually define what COM blocks are for, they
-are widely used to hold user-supplied text strings. This lets you add
-annotations, titles, index terms, etc to your JPEG files, and later retrieve
-them as text. COM blocks do not interfere with the image stored in the JPEG
-file. The maximum size of a COM block is 64K, but you can have as many of
-them as you like in one JPEG file.
-.PP
-.B wrjpgcom
-adds a COM block, containing text you provide, to a JPEG file.
-Ordinarily, the COM block is added after any existing COM blocks; but you
-can delete the old COM blocks if you wish.
-.SH OPTIONS
-Switch names may be abbreviated, and are not case sensitive.
-.TP
-.B \-replace
-Delete any existing COM blocks from the file.
-.TP
-.BI \-comment " text"
-Supply text for new COM block on command line.
-.TP
-.BI \-cfile " name"
-Read text for new COM block from named file.
-.PP
-If you have only one line of comment text to add, you can provide it on the
-command line with
-.BR \-comment .
-The comment text must be surrounded with quotes so that it is treated as a
-single argument. Longer comments can be read from a text file.
-.PP
-If you give neither
-.B \-comment
-nor
-.BR \-cfile ,
-then
-.B wrjpgcom
-will read the comment text from standard input. (In this case an input image
-file name MUST be supplied, so that the source JPEG file comes from somewhere
-else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file
-indicator (usually control-D) to terminate the comment text entry.
-.PP
-.B wrjpgcom
-will not add a COM block if the provided comment string is empty. Therefore
-\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file.
-.SH EXAMPLES
-.LP
-Add a short comment to in.jpg, producing out.jpg:
-.IP
-.B wrjpgcom \-c
-\fI"View of my back yard" in.jpg
-.B >
-.I out.jpg
-.PP
-Attach a long comment previously stored in comment.txt:
-.IP
-.B wrjpgcom
-.I in.jpg
-.B <
-.I comment.txt
-.B >
-.I out.jpg
-.PP
-or equivalently
-.IP
-.B wrjpgcom
-.B -cfile
-.I comment.txt
-.B <
-.I in.jpg
-.B >
-.I out.jpg
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR djpeg (1),
-.BR jpegtran (1),
-.BR rdjpgcom (1)
-.SH AUTHOR
-Independent JPEG Group
diff --git a/wrjpgcom.c b/wrjpgcom.c
deleted file mode 100644
index 8c04b05..0000000
--- a/wrjpgcom.c
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- * wrjpgcom.c
- *
- * Copyright (C) 1994-1997, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains a very simple stand-alone application that inserts
- * user-supplied text as a COM (comment) marker in a JFIF file.
- * This may be useful as an example of the minimum logic needed to parse
- * JPEG markers.
- */
-
-#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */
-#include "jinclude.h" /* get auto-config symbols, <stdio.h> */
-
-#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc() */
-extern void * malloc ();
-#endif
-#include <ctype.h> /* to declare isupper(), tolower() */
-#ifdef USE_SETMODE
-#include <fcntl.h> /* to declare setmode()'s parameter macros */
-/* If you have setmode() but not <io.h>, just delete this line: */
-#include <io.h> /* to declare setmode() */
-#endif
-
-#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
-#ifdef __MWERKS__
-#include <SIOUX.h> /* Metrowerks needs this */
-#include <console.h> /* ... and this */
-#endif
-#ifdef THINK_C
-#include <console.h> /* Think declares it here */
-#endif
-#endif
-
-#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
-#define READ_BINARY "r"
-#define WRITE_BINARY "w"
-#else
-#ifdef VMS /* VMS is very nonstandard */
-#define READ_BINARY "rb", "ctx=stm"
-#define WRITE_BINARY "wb", "ctx=stm"
-#else /* standard ANSI-compliant case */
-#define READ_BINARY "rb"
-#define WRITE_BINARY "wb"
-#endif
-#endif
-
-#ifndef EXIT_FAILURE /* define exit() codes if not provided */
-#define EXIT_FAILURE 1
-#endif
-#ifndef EXIT_SUCCESS
-#ifdef VMS
-#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
-#else
-#define EXIT_SUCCESS 0
-#endif
-#endif
-
-/* Reduce this value if your malloc() can't allocate blocks up to 64K.
- * On DOS, compiling in large model is usually a better solution.
- */
-
-#ifndef MAX_COM_LENGTH
-#define MAX_COM_LENGTH 65000L /* must be <= 65533 in any case */
-#endif
-
-
-/*
- * These macros are used to read the input file and write the output file.
- * To reuse this code in another application, you might need to change these.
- */
-
-static FILE * infile; /* input JPEG file */
-
-/* Return next input byte, or EOF if no more */
-#define NEXTBYTE() getc(infile)
-
-static FILE * outfile; /* output JPEG file */
-
-/* Emit an output byte */
-#define PUTBYTE(x) putc((x), outfile)
-
-
-/* Error exit handler */
-#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE))
-
-
-/* Read one byte, testing for EOF */
-static int
-read_1_byte (void)
-{
- int c;
-
- c = NEXTBYTE();
- if (c == EOF)
- ERREXIT("Premature EOF in JPEG file");
- return c;
-}
-
-/* Read 2 bytes, convert to unsigned int */
-/* All 2-byte quantities in JPEG markers are MSB first */
-static unsigned int
-read_2_bytes (void)
-{
- int c1, c2;
-
- c1 = NEXTBYTE();
- if (c1 == EOF)
- ERREXIT("Premature EOF in JPEG file");
- c2 = NEXTBYTE();
- if (c2 == EOF)
- ERREXIT("Premature EOF in JPEG file");
- return (((unsigned int) c1) << 8) + ((unsigned int) c2);
-}
-
-
-/* Routines to write data to output file */
-
-static void
-write_1_byte (int c)
-{
- PUTBYTE(c);
-}
-
-static void
-write_2_bytes (unsigned int val)
-{
- PUTBYTE((val >> 8) & 0xFF);
- PUTBYTE(val & 0xFF);
-}
-
-static void
-write_marker (int marker)
-{
- PUTBYTE(0xFF);
- PUTBYTE(marker);
-}
-
-static void
-copy_rest_of_file (void)
-{
- int c;
-
- while ((c = NEXTBYTE()) != EOF)
- PUTBYTE(c);
-}
-
-
-/*
- * JPEG markers consist of one or more 0xFF bytes, followed by a marker
- * code byte (which is not an FF). Here are the marker codes of interest
- * in this program. (See jdmarker.c for a more complete list.)
- */
-
-#define M_SOF0 0xC0 /* Start Of Frame N */
-#define M_SOF1 0xC1 /* N indicates which compression process */
-#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */
-#define M_SOF3 0xC3
-#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */
-#define M_SOF6 0xC6
-#define M_SOF7 0xC7
-#define M_SOF9 0xC9
-#define M_SOF10 0xCA
-#define M_SOF11 0xCB
-#define M_SOF13 0xCD
-#define M_SOF14 0xCE
-#define M_SOF15 0xCF
-#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */
-#define M_EOI 0xD9 /* End Of Image (end of datastream) */
-#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */
-#define M_COM 0xFE /* COMment */
-
-
-/*
- * Find the next JPEG marker and return its marker code.
- * We expect at least one FF byte, possibly more if the compressor used FFs
- * to pad the file. (Padding FFs will NOT be replicated in the output file.)
- * There could also be non-FF garbage between markers. The treatment of such
- * garbage is unspecified; we choose to skip over it but emit a warning msg.
- * NB: this routine must not be used after seeing SOS marker, since it will
- * not deal correctly with FF/00 sequences in the compressed image data...
- */
-
-static int
-next_marker (void)
-{
- int c;
- int discarded_bytes = 0;
-
- /* Find 0xFF byte; count and skip any non-FFs. */
- c = read_1_byte();
- while (c != 0xFF) {
- discarded_bytes++;
- c = read_1_byte();
- }
- /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs
- * are legal as pad bytes, so don't count them in discarded_bytes.
- */
- do {
- c = read_1_byte();
- } while (c == 0xFF);
-
- if (discarded_bytes != 0) {
- fprintf(stderr, "Warning: garbage data found in JPEG file\n");
- }
-
- return c;
-}
-
-
-/*
- * Read the initial marker, which should be SOI.
- * For a JFIF file, the first two bytes of the file should be literally
- * 0xFF M_SOI. To be more general, we could use next_marker, but if the
- * input file weren't actually JPEG at all, next_marker might read the whole
- * file and then return a misleading error message...
- */
-
-static int
-first_marker (void)
-{
- int c1, c2;
-
- c1 = NEXTBYTE();
- c2 = NEXTBYTE();
- if (c1 != 0xFF || c2 != M_SOI)
- ERREXIT("Not a JPEG file");
- return c2;
-}
-
-
-/*
- * Most types of marker are followed by a variable-length parameter segment.
- * This routine skips over the parameters for any marker we don't otherwise
- * want to process.
- * Note that we MUST skip the parameter segment explicitly in order not to
- * be fooled by 0xFF bytes that might appear within the parameter segment;
- * such bytes do NOT introduce new markers.
- */
-
-static void
-copy_variable (void)
-/* Copy an unknown or uninteresting variable-length marker */
-{
- unsigned int length;
-
- /* Get the marker parameter length count */
- length = read_2_bytes();
- write_2_bytes(length);
- /* Length includes itself, so must be at least 2 */
- if (length < 2)
- ERREXIT("Erroneous JPEG marker length");
- length -= 2;
- /* Skip over the remaining bytes */
- while (length > 0) {
- write_1_byte(read_1_byte());
- length--;
- }
-}
-
-static void
-skip_variable (void)
-/* Skip over an unknown or uninteresting variable-length marker */
-{
- unsigned int length;
-
- /* Get the marker parameter length count */
- length = read_2_bytes();
- /* Length includes itself, so must be at least 2 */
- if (length < 2)
- ERREXIT("Erroneous JPEG marker length");
- length -= 2;
- /* Skip over the remaining bytes */
- while (length > 0) {
- (void) read_1_byte();
- length--;
- }
-}
-
-
-/*
- * Parse the marker stream until SOFn or EOI is seen;
- * copy data to output, but discard COM markers unless keep_COM is true.
- */
-
-static int
-scan_JPEG_header (int keep_COM)
-{
- int marker;
-
- /* Expect SOI at start of file */
- if (first_marker() != M_SOI)
- ERREXIT("Expected SOI marker first");
- write_marker(M_SOI);
-
- /* Scan miscellaneous markers until we reach SOFn. */
- for (;;) {
- marker = next_marker();
- switch (marker) {
- /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be,
- * treated as SOFn. C4 in particular is actually DHT.
- */
- case M_SOF0: /* Baseline */
- case M_SOF1: /* Extended sequential, Huffman */
- case M_SOF2: /* Progressive, Huffman */
- case M_SOF3: /* Lossless, Huffman */
- case M_SOF5: /* Differential sequential, Huffman */
- case M_SOF6: /* Differential progressive, Huffman */
- case M_SOF7: /* Differential lossless, Huffman */
- case M_SOF9: /* Extended sequential, arithmetic */
- case M_SOF10: /* Progressive, arithmetic */
- case M_SOF11: /* Lossless, arithmetic */
- case M_SOF13: /* Differential sequential, arithmetic */
- case M_SOF14: /* Differential progressive, arithmetic */
- case M_SOF15: /* Differential lossless, arithmetic */
- return marker;
-
- case M_SOS: /* should not see compressed data before SOF */
- ERREXIT("SOS without prior SOFn");
- break;
-
- case M_EOI: /* in case it's a tables-only JPEG stream */
- return marker;
-
- case M_COM: /* Existing COM: conditionally discard */
- if (keep_COM) {
- write_marker(marker);
- copy_variable();
- } else {
- skip_variable();
- }
- break;
-
- default: /* Anything else just gets copied */
- write_marker(marker);
- copy_variable(); /* we assume it has a parameter count... */
- break;
- }
- } /* end loop */
-}
-
-
-/* Command line parsing code */
-
-static const char * progname; /* program name for error messages */
-
-
-static void
-usage (void)
-/* complain about bad command line */
-{
- fprintf(stderr, "wrjpgcom inserts a textual comment in a JPEG file.\n");
- fprintf(stderr, "You can add to or replace any existing comment(s).\n");
-
- fprintf(stderr, "Usage: %s [switches] ", progname);
-#ifdef TWO_FILE_COMMANDLINE
- fprintf(stderr, "inputfile outputfile\n");
-#else
- fprintf(stderr, "[inputfile]\n");
-#endif
-
- fprintf(stderr, "Switches (names may be abbreviated):\n");
- fprintf(stderr, " -replace Delete any existing comments\n");
- fprintf(stderr, " -comment \"text\" Insert comment with given text\n");
- fprintf(stderr, " -cfile name Read comment from named file\n");
- fprintf(stderr, "Notice that you must put quotes around the comment text\n");
- fprintf(stderr, "when you use -comment.\n");
- fprintf(stderr, "If you do not give either -comment or -cfile on the command line,\n");
- fprintf(stderr, "then the comment text is read from standard input.\n");
- fprintf(stderr, "It can be multiple lines, up to %u characters total.\n",
- (unsigned int) MAX_COM_LENGTH);
-#ifndef TWO_FILE_COMMANDLINE
- fprintf(stderr, "You must specify an input JPEG file name when supplying\n");
- fprintf(stderr, "comment text from standard input.\n");
-#endif
-
- exit(EXIT_FAILURE);
-}
-
-
-static int
-keymatch (char * arg, const char * keyword, int minchars)
-/* Case-insensitive matching of (possibly abbreviated) keyword switches. */
-/* keyword is the constant keyword (must be lower case already), */
-/* minchars is length of minimum legal abbreviation. */
-{
- register int ca, ck;
- register int nmatched = 0;
-
- while ((ca = *arg++) != '\0') {
- if ((ck = *keyword++) == '\0')
- return 0; /* arg longer than keyword, no good */
- if (isupper(ca)) /* force arg to lcase (assume ck is already) */
- ca = tolower(ca);
- if (ca != ck)
- return 0; /* no good */
- nmatched++; /* count matched characters */
- }
- /* reached end of argument; fail if it's too short for unique abbrev */
- if (nmatched < minchars)
- return 0;
- return 1; /* A-OK */
-}
-
-
-/*
- * The main program.
- */
-
-int
-main (int argc, char **argv)
-{
- int argn;
- char * arg;
- int keep_COM = 1;
- char * comment_arg = NULL;
- FILE * comment_file = NULL;
- unsigned int comment_length = 0;
- int marker;
-
- /* On Mac, fetch a command line. */
-#ifdef USE_CCOMMAND
- argc = ccommand(&argv);
-#endif
-
- progname = argv[0];
- if (progname == NULL || progname[0] == 0)
- progname = "wrjpgcom"; /* in case C library doesn't provide it */
-
- /* Parse switches, if any */
- for (argn = 1; argn < argc; argn++) {
- arg = argv[argn];
- if (arg[0] != '-')
- break; /* not switch, must be file name */
- arg++; /* advance over '-' */
- if (keymatch(arg, "replace", 1)) {
- keep_COM = 0;
- } else if (keymatch(arg, "cfile", 2)) {
- if (++argn >= argc) usage();
- if ((comment_file = fopen(argv[argn], "r")) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
- exit(EXIT_FAILURE);
- }
- } else if (keymatch(arg, "comment", 1)) {
- if (++argn >= argc) usage();
- comment_arg = argv[argn];
- /* If the comment text starts with '"', then we are probably running
- * under MS-DOG and must parse out the quoted string ourselves. Sigh.
- */
- if (comment_arg[0] == '"') {
- comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH);
- if (comment_arg == NULL)
- ERREXIT("Insufficient memory");
- strcpy(comment_arg, argv[argn]+1);
- for (;;) {
- comment_length = (unsigned int) strlen(comment_arg);
- if (comment_length > 0 && comment_arg[comment_length-1] == '"') {
- comment_arg[comment_length-1] = '\0'; /* zap terminating quote */
- break;
- }
- if (++argn >= argc)
- ERREXIT("Missing ending quote mark");
- strcat(comment_arg, " ");
- strcat(comment_arg, argv[argn]);
- }
- }
- comment_length = (unsigned int) strlen(comment_arg);
- } else
- usage();
- }
-
- /* Cannot use both -comment and -cfile. */
- if (comment_arg != NULL && comment_file != NULL)
- usage();
- /* If there is neither -comment nor -cfile, we will read the comment text
- * from stdin; in this case there MUST be an input JPEG file name.
- */
- if (comment_arg == NULL && comment_file == NULL && argn >= argc)
- usage();
-
- /* Open the input file. */
- if (argn < argc) {
- if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
- exit(EXIT_FAILURE);
- }
- } else {
- /* default input file is stdin */
-#ifdef USE_SETMODE /* need to hack file mode? */
- setmode(fileno(stdin), O_BINARY);
-#endif
-#ifdef USE_FDOPEN /* need to re-open in binary mode? */
- if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open stdin\n", progname);
- exit(EXIT_FAILURE);
- }
-#else
- infile = stdin;
-#endif
- }
-
- /* Open the output file. */
-#ifdef TWO_FILE_COMMANDLINE
- /* Must have explicit output file name */
- if (argn != argc-2) {
- fprintf(stderr, "%s: must name one input and one output file\n",
- progname);
- usage();
- }
- if ((outfile = fopen(argv[argn+1], WRITE_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open %s\n", progname, argv[argn+1]);
- exit(EXIT_FAILURE);
- }
-#else
- /* Unix style: expect zero or one file name */
- if (argn < argc-1) {
- fprintf(stderr, "%s: only one input file\n", progname);
- usage();
- }
- /* default output file is stdout */
-#ifdef USE_SETMODE /* need to hack file mode? */
- setmode(fileno(stdout), O_BINARY);
-#endif
-#ifdef USE_FDOPEN /* need to re-open in binary mode? */
- if ((outfile = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) {
- fprintf(stderr, "%s: can't open stdout\n", progname);
- exit(EXIT_FAILURE);
- }
-#else
- outfile = stdout;
-#endif
-#endif /* TWO_FILE_COMMANDLINE */
-
- /* Collect comment text from comment_file or stdin, if necessary */
- if (comment_arg == NULL) {
- FILE * src_file;
- int c;
-
- comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH);
- if (comment_arg == NULL)
- ERREXIT("Insufficient memory");
- comment_length = 0;
- src_file = (comment_file != NULL ? comment_file : stdin);
- while ((c = getc(src_file)) != EOF) {
- if (comment_length >= (unsigned int) MAX_COM_LENGTH) {
- fprintf(stderr, "Comment text may not exceed %u bytes\n",
- (unsigned int) MAX_COM_LENGTH);
- exit(EXIT_FAILURE);
- }
- comment_arg[comment_length++] = (char) c;
- }
- if (comment_file != NULL)
- fclose(comment_file);
- }
-
- /* Copy JPEG headers until SOFn marker;
- * we will insert the new comment marker just before SOFn.
- * This (a) causes the new comment to appear after, rather than before,
- * existing comments; and (b) ensures that comments come after any JFIF
- * or JFXX markers, as required by the JFIF specification.
- */
- marker = scan_JPEG_header(keep_COM);
- /* Insert the new COM marker, but only if nonempty text has been supplied */
- if (comment_length > 0) {
- write_marker(M_COM);
- write_2_bytes(comment_length + 2);
- while (comment_length > 0) {
- write_1_byte(*comment_arg++);
- comment_length--;
- }
- }
- /* Duplicate the remainder of the source file.
- * Note that any COM markers occuring after SOF will not be touched.
- */
- write_marker(marker);
- copy_rest_of_file();
-
- /* All done. */
- exit(EXIT_SUCCESS);
- return 0; /* suppress no-return-value warnings */
-}
diff --git a/wrppm.c b/wrppm.c
deleted file mode 100644
index 6c6d908..0000000
--- a/wrppm.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * wrppm.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in PPM/PGM format.
- * The extended 2-byte-per-sample raw PPM/PGM formats are supported.
- * The PBMPLUS library is NOT required to compile this software
- * (but it is highly useful as a set of PPM image manipulation programs).
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume output to
- * an ordinary stdio stream.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef PPM_SUPPORTED
-
-
-/*
- * For 12-bit JPEG data, we either downscale the values to 8 bits
- * (to write standard byte-per-sample PPM/PGM files), or output
- * nonstandard word-per-sample PPM/PGM files. Downscaling is done
- * if PPM_NORAWWORD is defined (this can be done in the Makefile
- * or in jconfig.h).
- * (When the core library supports data precision reduction, a cleaner
- * implementation will be to ask for that instead.)
- */
-
-#if BITS_IN_JSAMPLE == 8
-#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) (v)
-#define BYTESPERSAMPLE 1
-#define PPM_MAXVAL 255
-#else
-#ifdef PPM_NORAWWORD
-#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) ((v) >> (BITS_IN_JSAMPLE-8))
-#define BYTESPERSAMPLE 1
-#define PPM_MAXVAL 255
-#else
-/* The word-per-sample format always puts the LSB first. */
-#define PUTPPMSAMPLE(ptr,v) \
- { register int val_ = v; \
- *ptr++ = (char) (val_ & 0xFF); \
- *ptr++ = (char) ((val_ >> 8) & 0xFF); \
- }
-#define BYTESPERSAMPLE 2
-#define PPM_MAXVAL ((1<<BITS_IN_JSAMPLE)-1)
-#endif
-#endif
-
-
-/*
- * When JSAMPLE is the same size as char, we can just fwrite() the
- * decompressed data to the PPM or PGM file. On PCs, in order to make this
- * work the output buffer must be allocated in near data space, because we are
- * assuming small-data memory model wherein fwrite() can't reach far memory.
- * If you need to process very wide images on a PC, you might have to compile
- * in large-memory model, or else replace fwrite() with a putc() loop ---
- * which will be much slower.
- */
-
-
-/* Private version of data destination object */
-
-typedef struct {
- struct djpeg_dest_struct pub; /* public fields */
-
- /* Usually these two pointers point to the same place: */
- char *iobuffer; /* fwrite's I/O buffer */
- JSAMPROW pixrow; /* decompressor output buffer */
- size_t buffer_width; /* width of I/O buffer */
- JDIMENSION samples_per_row; /* JSAMPLEs per output row */
-} ppm_dest_struct;
-
-typedef ppm_dest_struct * ppm_dest_ptr;
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- *
- * put_pixel_rows handles the "normal" 8-bit case where the decompressor
- * output buffer is physically the same as the fwrite buffer.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-{
- ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
-
- (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * This code is used when we have to copy the data and apply a pixel
- * format translation. Typically this only happens in 12-bit mode.
- */
-
-METHODDEF(void)
-copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-{
- ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
- register char * bufferptr;
- register JSAMPROW ptr;
- register JDIMENSION col;
-
- ptr = dest->pub.buffer[0];
- bufferptr = dest->iobuffer;
- for (col = dest->samples_per_row; col > 0; col--) {
- PUTPPMSAMPLE(bufferptr, GETJSAMPLE(*ptr++));
- }
- (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * Write some pixel data when color quantization is in effect.
- * We have to demap the color index values to straight data.
- */
-
-METHODDEF(void)
-put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-{
- ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
- register char * bufferptr;
- register int pixval;
- register JSAMPROW ptr;
- register JSAMPROW color_map0 = cinfo->colormap[0];
- register JSAMPROW color_map1 = cinfo->colormap[1];
- register JSAMPROW color_map2 = cinfo->colormap[2];
- register JDIMENSION col;
-
- ptr = dest->pub.buffer[0];
- bufferptr = dest->iobuffer;
- for (col = cinfo->output_width; col > 0; col--) {
- pixval = GETJSAMPLE(*ptr++);
- PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[pixval]));
- PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map1[pixval]));
- PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map2[pixval]));
- }
- (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-METHODDEF(void)
-put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-{
- ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
- register char * bufferptr;
- register JSAMPROW ptr;
- register JSAMPROW color_map = cinfo->colormap[0];
- register JDIMENSION col;
-
- ptr = dest->pub.buffer[0];
- bufferptr = dest->iobuffer;
- for (col = cinfo->output_width; col > 0; col--) {
- PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map[GETJSAMPLE(*ptr++)]));
- }
- (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * Startup: write the file header.
- */
-
-METHODDEF(void)
-start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
-
- /* Emit file header */
- switch (cinfo->out_color_space) {
- case JCS_GRAYSCALE:
- /* emit header for raw PGM format */
- fprintf(dest->pub.output_file, "P5\n%ld %ld\n%d\n",
- (long) cinfo->output_width, (long) cinfo->output_height,
- PPM_MAXVAL);
- break;
- case JCS_RGB:
- /* emit header for raw PPM format */
- fprintf(dest->pub.output_file, "P6\n%ld %ld\n%d\n",
- (long) cinfo->output_width, (long) cinfo->output_height,
- PPM_MAXVAL);
- break;
- default:
- ERREXIT(cinfo, JERR_PPM_COLORSPACE);
- }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- /* Make sure we wrote the output file OK */
- fflush(dinfo->output_file);
- if (ferror(dinfo->output_file))
- ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for PPM format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_ppm (j_decompress_ptr cinfo)
-{
- ppm_dest_ptr dest;
-
- /* Create module interface object, fill in method pointers */
- dest = (ppm_dest_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(ppm_dest_struct));
- dest->pub.start_output = start_output_ppm;
- dest->pub.finish_output = finish_output_ppm;
-
- /* Calculate output image dimensions so we can allocate space */
- jpeg_calc_output_dimensions(cinfo);
-
- /* Create physical I/O buffer. Note we make this near on a PC. */
- dest->samples_per_row = cinfo->output_width * cinfo->out_color_components;
- dest->buffer_width = dest->samples_per_row * (BYTESPERSAMPLE * SIZEOF(char));
- dest->iobuffer = (char *) (*cinfo->mem->alloc_small)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width);
-
- if (cinfo->quantize_colors || BITS_IN_JSAMPLE != 8 ||
- SIZEOF(JSAMPLE) != SIZEOF(char)) {
- /* When quantizing, we need an output buffer for colormap indexes
- * that's separate from the physical I/O buffer. We also need a
- * separate buffer if pixel format translation must take place.
- */
- dest->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- cinfo->output_width * cinfo->output_components, (JDIMENSION) 1);
- dest->pub.buffer_height = 1;
- if (! cinfo->quantize_colors)
- dest->pub.put_pixel_rows = copy_pixel_rows;
- else if (cinfo->out_color_space == JCS_GRAYSCALE)
- dest->pub.put_pixel_rows = put_demapped_gray;
- else
- dest->pub.put_pixel_rows = put_demapped_rgb;
- } else {
- /* We will fwrite() directly from decompressor output buffer. */
- /* Synthesize a JSAMPARRAY pointer structure */
- /* Cast here implies near->far pointer conversion on PCs */
- dest->pixrow = (JSAMPROW) dest->iobuffer;
- dest->pub.buffer = & dest->pixrow;
- dest->pub.buffer_height = 1;
- dest->pub.put_pixel_rows = put_pixel_rows;
- }
-
- return (djpeg_dest_ptr) dest;
-}
-
-#endif /* PPM_SUPPORTED */
diff --git a/wrrle.c b/wrrle.c
deleted file mode 100644
index a4e7337..0000000
--- a/wrrle.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * wrrle.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in RLE format.
- * The Utah Raster Toolkit library is required (version 3.1 or later).
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume output to
- * an ordinary stdio stream.
- *
- * Based on code contributed by Mike Lijewski,
- * with updates from Robert Hutchinson.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef RLE_SUPPORTED
-
-/* rle.h is provided by the Utah Raster Toolkit. */
-
-#include <rle.h>
-
-/*
- * We assume that JSAMPLE has the same representation as rle_pixel,
- * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples.
- */
-
-#if BITS_IN_JSAMPLE != 8
- Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
-#endif
-
-
-/*
- * Since RLE stores scanlines bottom-to-top, we have to invert the image
- * from JPEG's top-to-bottom order. To do this, we save the outgoing data
- * in a virtual array during put_pixel_row calls, then actually emit the
- * RLE file during finish_output.
- */
-
-
-/*
- * For now, if we emit an RLE color map then it is always 256 entries long,
- * though not all of the entries need be used.
- */
-
-#define CMAPBITS 8
-#define CMAPLENGTH (1<<(CMAPBITS))
-
-typedef struct {
- struct djpeg_dest_struct pub; /* public fields */
-
- jvirt_sarray_ptr image; /* virtual array to store the output image */
- rle_map *colormap; /* RLE-style color map, or NULL if none */
- rle_pixel **rle_row; /* To pass rows to rle_putrow() */
-
-} rle_dest_struct;
-
-typedef rle_dest_struct * rle_dest_ptr;
-
-/* Forward declarations */
-METHODDEF(void) rle_put_pixel_rows
- JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied));
-
-
-/*
- * Write the file header.
- *
- * In this module it's easier to wait till finish_output to write anything.
- */
-
-METHODDEF(void)
-start_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- rle_dest_ptr dest = (rle_dest_ptr) dinfo;
- size_t cmapsize;
- int i, ci;
-#ifdef PROGRESS_REPORT
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-#endif
-
- /*
- * Make sure the image can be stored in RLE format.
- *
- * - RLE stores image dimensions as *signed* 16 bit integers. JPEG
- * uses unsigned, so we have to check the width.
- *
- * - Colorspace is expected to be grayscale or RGB.
- *
- * - The number of channels (components) is expected to be 1 (grayscale/
- * pseudocolor) or 3 (truecolor/directcolor).
- * (could be 2 or 4 if using an alpha channel, but we aren't)
- */
-
- if (cinfo->output_width > 32767 || cinfo->output_height > 32767)
- ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width,
- cinfo->output_height);
-
- if (cinfo->out_color_space != JCS_GRAYSCALE &&
- cinfo->out_color_space != JCS_RGB)
- ERREXIT(cinfo, JERR_RLE_COLORSPACE);
-
- if (cinfo->output_components != 1 && cinfo->output_components != 3)
- ERREXIT1(cinfo, JERR_RLE_TOOMANYCHANNELS, cinfo->num_components);
-
- /* Convert colormap, if any, to RLE format. */
-
- dest->colormap = NULL;
-
- if (cinfo->quantize_colors) {
- /* Allocate storage for RLE-style cmap, zero any extra entries */
- cmapsize = cinfo->out_color_components * CMAPLENGTH * SIZEOF(rle_map);
- dest->colormap = (rle_map *) (*cinfo->mem->alloc_small)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, cmapsize);
- MEMZERO(dest->colormap, cmapsize);
-
- /* Save away data in RLE format --- note 8-bit left shift! */
- /* Shifting would need adjustment for JSAMPLEs wider than 8 bits. */
- for (ci = 0; ci < cinfo->out_color_components; ci++) {
- for (i = 0; i < cinfo->actual_number_of_colors; i++) {
- dest->colormap[ci * CMAPLENGTH + i] =
- GETJSAMPLE(cinfo->colormap[ci][i]) << 8;
- }
- }
- }
-
- /* Set the output buffer to the first row */
- dest->pub.buffer = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, dest->image, (JDIMENSION) 0, (JDIMENSION) 1, TRUE);
- dest->pub.buffer_height = 1;
-
- dest->pub.put_pixel_rows = rle_put_pixel_rows;
-
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- progress->total_extra_passes++; /* count file writing as separate pass */
- }
-#endif
-}
-
-
-/*
- * Write some pixel data.
- *
- * This routine just saves the data away in a virtual array.
- */
-
-METHODDEF(void)
-rle_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-{
- rle_dest_ptr dest = (rle_dest_ptr) dinfo;
-
- if (cinfo->output_scanline < cinfo->output_height) {
- dest->pub.buffer = (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, dest->image,
- cinfo->output_scanline, (JDIMENSION) 1, TRUE);
- }
-}
-
-/*
- * Finish up at the end of the file.
- *
- * Here is where we really output the RLE file.
- */
-
-METHODDEF(void)
-finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- rle_dest_ptr dest = (rle_dest_ptr) dinfo;
- rle_hdr header; /* Output file information */
- rle_pixel **rle_row, *red, *green, *blue;
- JSAMPROW output_row;
- char cmapcomment[80];
- int row, col;
- int ci;
-#ifdef PROGRESS_REPORT
- cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
-#endif
-
- /* Initialize the header info */
- header = *rle_hdr_init(NULL);
- header.rle_file = dest->pub.output_file;
- header.xmin = 0;
- header.xmax = cinfo->output_width - 1;
- header.ymin = 0;
- header.ymax = cinfo->output_height - 1;
- header.alpha = 0;
- header.ncolors = cinfo->output_components;
- for (ci = 0; ci < cinfo->output_components; ci++) {
- RLE_SET_BIT(header, ci);
- }
- if (cinfo->quantize_colors) {
- header.ncmap = cinfo->out_color_components;
- header.cmaplen = CMAPBITS;
- header.cmap = dest->colormap;
- /* Add a comment to the output image with the true colormap length. */
- sprintf(cmapcomment, "color_map_length=%d", cinfo->actual_number_of_colors);
- rle_putcom(cmapcomment, &header);
- }
-
- /* Emit the RLE header and color map (if any) */
- rle_put_setup(&header);
-
- /* Now output the RLE data from our virtual array.
- * We assume here that (a) rle_pixel is represented the same as JSAMPLE,
- * and (b) we are not on a machine where FAR pointers differ from regular.
- */
-
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- progress->pub.pass_limit = cinfo->output_height;
- progress->pub.pass_counter = 0;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
-#endif
-
- if (cinfo->output_components == 1) {
- for (row = cinfo->output_height-1; row >= 0; row--) {
- rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, dest->image,
- (JDIMENSION) row, (JDIMENSION) 1, FALSE);
- rle_putrow(rle_row, (int) cinfo->output_width, &header);
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- progress->pub.pass_counter++;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
-#endif
- }
- } else {
- for (row = cinfo->output_height-1; row >= 0; row--) {
- rle_row = (rle_pixel **) dest->rle_row;
- output_row = * (*cinfo->mem->access_virt_sarray)
- ((j_common_ptr) cinfo, dest->image,
- (JDIMENSION) row, (JDIMENSION) 1, FALSE);
- red = rle_row[0];
- green = rle_row[1];
- blue = rle_row[2];
- for (col = cinfo->output_width; col > 0; col--) {
- *red++ = GETJSAMPLE(*output_row++);
- *green++ = GETJSAMPLE(*output_row++);
- *blue++ = GETJSAMPLE(*output_row++);
- }
- rle_putrow(rle_row, (int) cinfo->output_width, &header);
-#ifdef PROGRESS_REPORT
- if (progress != NULL) {
- progress->pub.pass_counter++;
- (*progress->pub.progress_monitor) ((j_common_ptr) cinfo);
- }
-#endif
- }
- }
-
-#ifdef PROGRESS_REPORT
- if (progress != NULL)
- progress->completed_extra_passes++;
-#endif
-
- /* Emit file trailer */
- rle_puteof(&header);
- fflush(dest->pub.output_file);
- if (ferror(dest->pub.output_file))
- ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for RLE format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_rle (j_decompress_ptr cinfo)
-{
- rle_dest_ptr dest;
-
- /* Create module interface object, fill in method pointers */
- dest = (rle_dest_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(rle_dest_struct));
- dest->pub.start_output = start_output_rle;
- dest->pub.finish_output = finish_output_rle;
-
- /* Calculate output image dimensions so we can allocate space */
- jpeg_calc_output_dimensions(cinfo);
-
- /* Allocate a work array for output to the RLE library. */
- dest->rle_row = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE,
- cinfo->output_width, (JDIMENSION) cinfo->output_components);
-
- /* Allocate a virtual array to hold the image. */
- dest->image = (*cinfo->mem->request_virt_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE,
- (JDIMENSION) (cinfo->output_width * cinfo->output_components),
- cinfo->output_height, (JDIMENSION) 1);
-
- return (djpeg_dest_ptr) dest;
-}
-
-#endif /* RLE_SUPPORTED */
diff --git a/wrtarga.c b/wrtarga.c
deleted file mode 100644
index cf104d2..0000000
--- a/wrtarga.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * wrtarga.c
- *
- * Copyright (C) 1991-1996, Thomas G. Lane.
- * This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
- *
- * This file contains routines to write output images in Targa format.
- *
- * These routines may need modification for non-Unix environments or
- * specialized applications. As they stand, they assume output to
- * an ordinary stdio stream.
- *
- * Based on code contributed by Lee Daniel Crocker.
- */
-
-#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
-
-#ifdef TARGA_SUPPORTED
-
-
-/*
- * To support 12-bit JPEG data, we'd have to scale output down to 8 bits.
- * This is not yet implemented.
- */
-
-#if BITS_IN_JSAMPLE != 8
- Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */
-#endif
-
-/*
- * The output buffer needs to be writable by fwrite(). On PCs, we must
- * allocate the buffer in near data space, because we are assuming small-data
- * memory model, wherein fwrite() can't reach far memory. If you need to
- * process very wide images on a PC, you might have to compile in large-memory
- * model, or else replace fwrite() with a putc() loop --- which will be much
- * slower.
- */
-
-
-/* Private version of data destination object */
-
-typedef struct {
- struct djpeg_dest_struct pub; /* public fields */
-
- char *iobuffer; /* physical I/O buffer */
- JDIMENSION buffer_width; /* width of one row */
-} tga_dest_struct;
-
-typedef tga_dest_struct * tga_dest_ptr;
-
-
-LOCAL(void)
-write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors)
-/* Create and write a Targa header */
-{
- char targaheader[18];
-
- /* Set unused fields of header to 0 */
- MEMZERO(targaheader, SIZEOF(targaheader));
-
- if (num_colors > 0) {
- targaheader[1] = 1; /* color map type 1 */
- targaheader[5] = (char) (num_colors & 0xFF);
- targaheader[6] = (char) (num_colors >> 8);
- targaheader[7] = 24; /* 24 bits per cmap entry */
- }
-
- targaheader[12] = (char) (cinfo->output_width & 0xFF);
- targaheader[13] = (char) (cinfo->output_width >> 8);
- targaheader[14] = (char) (cinfo->output_height & 0xFF);
- targaheader[15] = (char) (cinfo->output_height >> 8);
- targaheader[17] = 0x20; /* Top-down, non-interlaced */
-
- if (cinfo->out_color_space == JCS_GRAYSCALE) {
- targaheader[2] = 3; /* image type = uncompressed gray-scale */
- targaheader[16] = 8; /* bits per pixel */
- } else { /* must be RGB */
- if (num_colors > 0) {
- targaheader[2] = 1; /* image type = colormapped RGB */
- targaheader[16] = 8;
- } else {
- targaheader[2] = 2; /* image type = uncompressed RGB */
- targaheader[16] = 24;
- }
- }
-
- if (JFWRITE(dinfo->output_file, targaheader, 18) != (size_t) 18)
- ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * Write some pixel data.
- * In this module rows_supplied will always be 1.
- */
-
-METHODDEF(void)
-put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-/* used for unquantized full-color output */
-{
- tga_dest_ptr dest = (tga_dest_ptr) dinfo;
- register JSAMPROW inptr;
- register char * outptr;
- register JDIMENSION col;
-
- inptr = dest->pub.buffer[0];
- outptr = dest->iobuffer;
- for (col = cinfo->output_width; col > 0; col--) {
- outptr[0] = (char) GETJSAMPLE(inptr[2]); /* RGB to BGR order */
- outptr[1] = (char) GETJSAMPLE(inptr[1]);
- outptr[2] = (char) GETJSAMPLE(inptr[0]);
- inptr += 3, outptr += 3;
- }
- (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-METHODDEF(void)
-put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-/* used for grayscale OR quantized color output */
-{
- tga_dest_ptr dest = (tga_dest_ptr) dinfo;
- register JSAMPROW inptr;
- register char * outptr;
- register JDIMENSION col;
-
- inptr = dest->pub.buffer[0];
- outptr = dest->iobuffer;
- for (col = cinfo->output_width; col > 0; col--) {
- *outptr++ = (char) GETJSAMPLE(*inptr++);
- }
- (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * Write some demapped pixel data when color quantization is in effect.
- * For Targa, this is only applied to grayscale data.
- */
-
-METHODDEF(void)
-put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
- JDIMENSION rows_supplied)
-{
- tga_dest_ptr dest = (tga_dest_ptr) dinfo;
- register JSAMPROW inptr;
- register char * outptr;
- register JSAMPROW color_map0 = cinfo->colormap[0];
- register JDIMENSION col;
-
- inptr = dest->pub.buffer[0];
- outptr = dest->iobuffer;
- for (col = cinfo->output_width; col > 0; col--) {
- *outptr++ = (char) GETJSAMPLE(color_map0[GETJSAMPLE(*inptr++)]);
- }
- (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
-}
-
-
-/*
- * Startup: write the file header.
- */
-
-METHODDEF(void)
-start_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- tga_dest_ptr dest = (tga_dest_ptr) dinfo;
- int num_colors, i;
- FILE *outfile;
-
- if (cinfo->out_color_space == JCS_GRAYSCALE) {
- /* Targa doesn't have a mapped grayscale format, so we will */
- /* demap quantized gray output. Never emit a colormap. */
- write_header(cinfo, dinfo, 0);
- if (cinfo->quantize_colors)
- dest->pub.put_pixel_rows = put_demapped_gray;
- else
- dest->pub.put_pixel_rows = put_gray_rows;
- } else if (cinfo->out_color_space == JCS_RGB) {
- if (cinfo->quantize_colors) {
- /* We only support 8-bit colormap indexes, so only 256 colors */
- num_colors = cinfo->actual_number_of_colors;
- if (num_colors > 256)
- ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, num_colors);
- write_header(cinfo, dinfo, num_colors);
- /* Write the colormap. Note Targa uses BGR byte order */
- outfile = dest->pub.output_file;
- for (i = 0; i < num_colors; i++) {
- putc(GETJSAMPLE(cinfo->colormap[2][i]), outfile);
- putc(GETJSAMPLE(cinfo->colormap[1][i]), outfile);
- putc(GETJSAMPLE(cinfo->colormap[0][i]), outfile);
- }
- dest->pub.put_pixel_rows = put_gray_rows;
- } else {
- write_header(cinfo, dinfo, 0);
- dest->pub.put_pixel_rows = put_pixel_rows;
- }
- } else {
- ERREXIT(cinfo, JERR_TGA_COLORSPACE);
- }
-}
-
-
-/*
- * Finish up at the end of the file.
- */
-
-METHODDEF(void)
-finish_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
-{
- /* Make sure we wrote the output file OK */
- fflush(dinfo->output_file);
- if (ferror(dinfo->output_file))
- ERREXIT(cinfo, JERR_FILE_WRITE);
-}
-
-
-/*
- * The module selection routine for Targa format output.
- */
-
-GLOBAL(djpeg_dest_ptr)
-jinit_write_targa (j_decompress_ptr cinfo)
-{
- tga_dest_ptr dest;
-
- /* Create module interface object, fill in method pointers */
- dest = (tga_dest_ptr)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- SIZEOF(tga_dest_struct));
- dest->pub.start_output = start_output_tga;
- dest->pub.finish_output = finish_output_tga;
-
- /* Calculate output image dimensions so we can allocate space */
- jpeg_calc_output_dimensions(cinfo);
-
- /* Create I/O buffer. Note we make this near on a PC. */
- dest->buffer_width = cinfo->output_width * cinfo->output_components;
- dest->iobuffer = (char *)
- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (size_t) (dest->buffer_width * SIZEOF(char)));
-
- /* Create decompressor output buffer. */
- dest->pub.buffer = (*cinfo->mem->alloc_sarray)
- ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width, (JDIMENSION) 1);
- dest->pub.buffer_height = 1;
-
- return (djpeg_dest_ptr) dest;
-}
-
-#endif /* TARGA_SUPPORTED */