aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2015-04-22 08:43:04 +0000
committerDRC <dcommander@users.sourceforge.net>2015-04-22 08:43:04 +0000
commitf64b36fd5744abaca277cb01811b02067200f5ff (patch)
treeb225050925157a95d8ad08133584d11cffb40006
parent89a3f970da6398b9a1cac2ed0bfed99fbfc93a0e (diff)
downloadlibjpeg-turbo-f64b36fd5744abaca277cb01811b02067200f5ff.tar.gz
Oops. OS X doesn't define __WORDSIZE unless you include stdint.h, so apparently the Huffman codec hasn't ever been fully accelerated on 64-bit OS X.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1541 632fc199-4ca6-4c93-a231-07263d6284db
-rw-r--r--ChangeLog.txt5
-rw-r--r--jchuff.c5
-rw-r--r--jdhuff.c5
3 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 139bcca5..3711188c 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -32,6 +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.
+
1.4.0
=====
diff --git a/jchuff.c b/jchuff.c
index a5c0a1fd..fe03591d 100644
--- a/jchuff.c
+++ b/jchuff.c
@@ -21,6 +21,7 @@
#include "jpeglib.h"
#include "jchuff.h" /* Declarations shared with jcphuff.c */
#include <limits.h>
+#include <stdint.h>
/*
* NOTE: If USE_CLZ_INTRINSIC is defined, then clz/bsr instructions will be
@@ -376,6 +377,10 @@ dump_buffer (working_state * state)
} \
}
+#if !defined(_WIN32) && !defined(__WORDSIZE)
+#error __WORDSIZE is not defined
+#endif
+
#if __WORDSIZE==64 || defined(_WIN64)
#define EMIT_BITS(code, size) { \
diff --git a/jdhuff.c b/jdhuff.c
index 7dc13289..583ee114 100644
--- a/jdhuff.c
+++ b/jdhuff.c
@@ -22,6 +22,7 @@
#include "jdhuff.h" /* Declarations shared with jdphuff.c */
#include "jpegcomp.h"
#include "jstdhuff.c"
+#include <stdint.h>
/*
@@ -419,6 +420,10 @@ jpeg_fill_bit_buffer (bitread_working_state * state,
} \
}
+#if !defined(_WIN32) && !defined(__WORDSIZE)
+#error __WORDSIZE is not defined
+#endif
+
#if __WORDSIZE == 64 || defined(_WIN64)
/* Pre-fetch 48 bytes, because the holding register is 64-bit */