]> granicus.if.org Git - libjpeg-turbo/commitdiff
__WORDSIZE doesn't seem to be available on platforms other than Mac or Linux, and...
authorDRC <dcommander@users.sourceforge.net>
Fri, 15 May 2015 19:09:44 +0000 (19:09 +0000)
committerDRC <dcommander@users.sourceforge.net>
Fri, 15 May 2015 19:09:44 +0000 (19:09 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1550 632fc199-4ca6-4c93-a231-07263d6284db

ChangeLog.txt
configure.ac
jchuff.c
jconfig.h.in
jdhuff.c
jdhuff.h

index 309b5e21d7756f0f7f4616ca49f0be40bfb4e8ac..1619a46bd63ca18aaa3398ce0ebaeddf1b3b2d94 100644 (file)
@@ -32,10 +32,11 @@ SIMD-enabled libjpeg-turbo MIPS build was executed with the -nosmooth option on
 a MIPS machine that lacked DSPr2 support.  The MIPS SIMD routines for h2v1 and
 h2v2 merged upsampling were not properly checking for the existence of DSPr2.
 
-[6] Performance has been improved significantly on 64-bit Mac platforms
-(particularly compression performance.)  Due to an oversight, the 64-bit
-version of the accelerated Huffman codec was not being compiled in when
-libjpeg-turbo was built on OS X.  Oops.
+[6] Performance has been improved significantly on 64-bit non-Linux and
+non-Windows platforms (generally 10-20% faster compression and 5-10% faster
+decompression.)  Due to an oversight, the 64-bit version of the accelerated
+Huffman codec was not being compiled in when libjpeg-turbo was built on
+platforms other than Windows or Linux.  Oops.
 
 [7] Fixed an extremely rare bug in the Huffman encoder that caused 64-bit
 builds of libjpeg-turbo to incorrectly encode a few specific test images when
index f2b8cf2e4cb8689efd49074a66f67dbacfc006ed..6ef4b5c6a28e5d33a4a9e9752204a052b3816899 100644 (file)
@@ -50,6 +50,8 @@ if test "x$exec_prefix" = "xNONE"; then
   exec_prefix=${prefix}
 fi
 
+AC_CHECK_SIZEOF(size_t)
+
 if test "x${libdir}" = 'x${exec_prefix}/lib' -o "x${libdir}" = 'x${prefix}/lib'; then
   LIBDIR=`eval echo ${libdir}`
   LIBDIR=`eval echo $LIBDIR`
@@ -58,10 +60,9 @@ if test "x${libdir}" = 'x${exec_prefix}/lib' -o "x${libdir}" = 'x${prefix}/lib';
       darwin*)
         ;;
       *)
-        AC_CHECK_SIZEOF(long)
-        if test "${ac_cv_sizeof_long}" = "8"; then
+        if test "${ac_cv_sizeof_size_t}" = "8"; then
           libdir='${exec_prefix}/lib64'
-        elif test "${ac_cv_sizeof_long}" = "4"; then
+        elif test "${ac_cv_sizeof_size_t}" = "4"; then
           libdir='${exec_prefix}/lib32'
         fi
         ;;
index 23c665913e2c13954e5b91594c23180a5a4324ae..4ecc18d61b886499dd2e5543e2a0b910f4996657 100644 (file)
--- a/jchuff.c
+++ b/jchuff.c
@@ -21,9 +21,6 @@
 #include "jpeglib.h"
 #include "jchuff.h"             /* Declarations shared with jcphuff.c */
 #include <limits.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
 
 /*
  * NOTE: If USE_CLZ_INTRINSIC is defined, then clz/bsr instructions will be
@@ -379,11 +376,11 @@ dump_buffer (working_state * state)
   } \
 }
 
-#if !defined(_WIN32) && !defined(__WORDSIZE)
-#error __WORDSIZE is not defined
+#if !defined(_WIN32) && !defined(SIZEOF_SIZE_T)
+#error Cannot determine word size
 #endif
 
-#if __WORDSIZE==64 || defined(_WIN64)
+#if SIZEOF_SIZE_T==8 || defined(_WIN64)
 
 #define EMIT_BITS(code, size) { \
   CHECKBUF47() \
index fbf64a586d0638880cb6d63fece89df630e0077c..b99a87e1cfe93678cb24dcc801d255611c696f3e 100644 (file)
@@ -32,9 +32,6 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
 /* Define to 1 if the system has the type `unsigned char'. */
 #undef HAVE_UNSIGNED_CHAR
 
@@ -71,3 +68,6 @@
 
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t
+
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
index 03e3949219f7617ba035a0855d2bf67bf4a61501..cbdce7d4c94a51b156d6221e8f83d7d4a1d6980e 100644 (file)
--- a/jdhuff.c
+++ b/jdhuff.c
@@ -22,9 +22,6 @@
 #include "jdhuff.h"             /* Declarations shared with jdphuff.c */
 #include "jpegcomp.h"
 #include "jstdhuff.c"
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
 
 
 /*
@@ -422,11 +419,7 @@ jpeg_fill_bit_buffer (bitread_working_state * state,
   } \
 }
 
-#if !defined(_WIN32) && !defined(__WORDSIZE)
-#error __WORDSIZE is not defined
-#endif
-
-#if __WORDSIZE == 64 || defined(_WIN64)
+#if SIZEOF_SIZE_T==8 || defined(_WIN64)
 
 /* Pre-fetch 48 bytes, because the holding register is 64-bit */
 #define FILL_BIT_BUFFER_FAST \
index f2805e46cf7113cf55248aaa97e32c908b0717ab..c7f3d500867913ef9b8dce237390340b5a39d8f0 100644 (file)
--- a/jdhuff.h
+++ b/jdhuff.h
@@ -67,7 +67,11 @@ EXTERN(void) jpeg_make_d_derived_tbl
  * necessary.
  */
 
-#if __WORDSIZE == 64 || defined(_WIN64)
+#if !defined(_WIN32) && !defined(SIZEOF_SIZE_T)
+#error Cannot determine word size
+#endif
+
+#if SIZEOF_SIZE_T==8 || defined(_WIN64)
 
 typedef size_t bit_buf_type;    /* type of bit-extraction buffer */
 #define BIT_BUF_SIZE  64                /* size of buffer in bits */