aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2011-07-05 20:54:28 +0000
committerTom Gall <tom.gall@linaro.org>2011-07-05 20:54:28 +0000
commit0c0e874b223e9ccc4a756c471f8792102b2d34a4 (patch)
tree85967f13ba6c0132f6921d5264b1502f193a9b36
parentca48cf7cf9749a5403386a1e3793a06fa0daf808 (diff)
1.1.1 from upstream at http://sourceforge.net/projects/libjpeg-turbo/
-rw-r--r--BUILDING.txt22
-rw-r--r--CMakeLists.txt35
-rw-r--r--ChangeLog.txt38
-rw-r--r--Makefile.am33
-rw-r--r--Makefile.in70
-rwxr-xr-xconfigure87
-rw-r--r--configure.ac25
-rw-r--r--jccolor.c3
-rw-r--r--jcmaster.c2
-rw-r--r--jdhuff.c12
-rw-r--r--jdtrans.c5
-rw-r--r--jmemmgr.c15
-rw-r--r--jpegint.h2
-rw-r--r--jpegut.c2
-rw-r--r--jutils.c4
-rw-r--r--rdbmp.c14
-rw-r--r--release/Description.plist.in (renamed from release/Description.plist.tmpl)4
-rw-r--r--[-rwxr-xr-x]release/Info.plist.in (renamed from release/Info.plist.tmpl)6
-rw-r--r--release/deb-control.in (renamed from release/deb-control.tmpl)8
-rwxr-xr-xrelease/libjpeg-turbo.nsi.in28
-rw-r--r--release/libjpeg-turbo.spec.in4
-rw-r--r--[-rwxr-xr-x]release/makecygwinpkg.in (renamed from release/makecygwinpkg)13
-rw-r--r--release/makedpkg.in (renamed from release/makedpkg)25
-rw-r--r--release/makemacpkg.in25
-rw-r--r--release/makesunpkg.in14
-rw-r--r--release/pkginfo.in (renamed from release/pkginfo.tmpl)10
-rw-r--r--release/uninstall.in (renamed from release/uninstall.sh.tmpl)4
-rwxr-xr-xsharedlib/CMakeLists.txt4
-rwxr-xr-xsimd/CMakeLists.txt6
-rw-r--r--simd/Makefile.in2
-rw-r--r--simd/jsimdext.inc2
-rw-r--r--turbojpegl.c6
32 files changed, 293 insertions, 237 deletions
diff --git a/BUILDING.txt b/BUILDING.txt
index 50e2fb7..846e969 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -12,21 +12,25 @@ Build Requirements
-- libtool 1.4 or later
-- NASM
- * 0.98 or later is required for a 32-bit build
- * NASM 2.05 or later is required for a 64-bit build
+ * 0.98, or 2.01 or later is required for a 32-bit build
+ * NASM 2.00 or later is required for a 64-bit build
* NASM 2.07 or later is required for a 64-bit build on OS X. This can be
obtained from MacPorts (http://www.macports.org/).
- The NASM 2.05 RPMs do not work on older Linux systems, such as Red Hat
- Enterprise Linux 4. On such systems, you can easily build and install NASM
- 2.05 from the source RPM by executing the following as root:
+ The binary RPMs released by the NASM project do not work on older Linux
+ systems, such as Red Hat Enterprise Linux 4. On such systems, you can
+ easily build and install NASM from a source RPM by downloading one of the
+ SRPMs from
+
+ http://www.nasm.us/pub/nasm/releasebuilds
+
+ and executing the following as root:
ARCH=`uname -m`
- wget http://www.nasm.us/pub/nasm/releasebuilds/2.05.01/nasm-2.05.01-1.src.rpm
- rpmbuild --rebuild nasm-2.05.01-1.src.rpm
- rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-2.05.01-1.$ARCH.rpm
+ rpmbuild --rebuild nasm-{version}.src.rpm
+ rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
- NOTE: NASM build will fail if texinfo is not installed.
+ NOTE: the NASM build will fail if texinfo is not installed.
-- GCC v4.1 or later recommended for best performance
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c1d1b9..f347edd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@
cmake_minimum_required(VERSION 2.6)
project(libjpeg-turbo C)
-set(VERSION 1.1.0)
+set(VERSION 1.1.1)
if(MINGW OR CYGWIN)
execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
@@ -32,17 +32,11 @@ endif()
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
-if(NOT DEFINED WITH_SIMD)
- set(WITH_SIMD 1)
-endif()
-
-if(NOT DEFINED WITH_ARITH_ENC)
- set(WITH_ARITH_ENC 1)
-endif()
-
-if(NOT DEFINED WITH_ARITH_DEC)
- set(WITH_ARITH_DEC 1)
-endif()
+option(WITH_SIMD "Include SIMD extensions" TRUE)
+option(WITH_ARITH_ENC "Include arithmetic encoding support" TRUE)
+option(WITH_ARITH_DEC "Include arithmetic decoding support" TRUE)
+option(WITH_JPEG7 "Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
+option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
if(WITH_ARITH_ENC)
set(C_ARITH_CODING_SUPPORTED 1)
@@ -184,13 +178,13 @@ target_link_libraries(jpgtest-static turbojpeg-static)
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdbmp.c rdgif.c rdppm.c rdswitch.c
rdtarga.c)
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS
- "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED")
+ "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
target_link_libraries(cjpeg-static jpeg-static)
add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrbmp.c wrgif.c
wrppm.c wrtarga.c)
set_property(TARGET djpeg-static PROPERTY COMPILE_FLAGS
- "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED")
+ "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
target_link_libraries(djpeg-static jpeg-static)
add_executable(jpegtran-static jpegtran.c cdjpeg.c rdswitch.c transupp.c)
@@ -301,24 +295,26 @@ add_test(jpegtran-static-crop-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOUR
# Installer
#
-set(INST_NAME ${CMAKE_PROJECT_NAME})
-
if(MSVC)
set(INST_PLATFORM "Visual C++")
+ set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-vc)
+ set(INST_DIR ${CMAKE_PROJECT_NAME})
elseif(MINGW)
set(INST_PLATFORM GCC)
- set(INST_NAME ${INST_NAME}-gcc)
+ set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-gcc)
+ set(INST_DIR ${CMAKE_PROJECT_NAME}-gcc)
set(INST_DEFS -DGCC)
endif()
if(64BIT)
set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
set(INST_NAME ${INST_NAME}64)
+ set(INST_DIR ${INST_DIR}64)
set(INST_DEFS ${INST_DEFS} -DWIN64)
endif()
if(MSVC_IDE)
- set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=$(OutDir)\\")
+ set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
else()
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
endif()
@@ -327,7 +323,8 @@ configure_file(release/libjpeg-turbo.nsi.in libjpeg-turbo.nsi @ONLY)
add_custom_target(installer
makensis -nocd ${INST_DEFS} libjpeg-turbo.nsi
- DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static
+ DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom
+ cjpeg djpeg jpegtran jpgtest
SOURCES libjpeg-turbo.nsi)
install(TARGETS jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom jpgtest
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 4f0dc72..50a6cd2 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,39 @@
+1.1.1
+=====
+
+[1] Fixed a 1-pixel error in row 0, column 21 of the luminance plane generated
+by tjEncodeYUV().
+
+[2] libjpeg-turbo's accelerated Huffman decoder previously ignored unexpected
+markers found in the middle of the JPEG data stream during decompression. It
+will now hand off decoding of a particular block to the unaccelerated Huffman
+decoder if an unexpected marker is found, so that the unaccelerated Huffman
+decoder can generate an appropriate warning.
+
+[3] Older versions of MinGW64 prefixed symbol names with underscores by
+default, which differed from the behavior of 64-bit Visual C++. MinGW64 1.0
+has adopted the behavior of 64-bit Visual C++ as the default, so to accommodate
+this, the libjpeg-turbo SIMD function names are no longer prefixed with an
+underscore when building with MinGW64. This means that, when building
+libjpeg-turbo with older versions of MinGW64, you will now have to add
+-fno-leading-underscore to the CFLAGS.
+
+[4] Fixed a regression bug in the NSIS script that caused the Windows installer
+build to fail when using the Visual Studio IDE.
+
+[5] Fixed a bug in jpeg_read_coefficients() whereby it would not initialize
+cinfo->image_width and cinfo->image_height if libjpeg v7 or v8 emulation was
+enabled. This specifically caused the jpegoptim program to fail if it was
+linked against a version of libjpeg-turbo that was built with libjpeg v7 or v8
+emulation.
+
+[6] Eliminated excessive I/O overhead that occurred when reading BMP files in
+cjpeg.
+
+[7] Eliminated errors in the output of cjpeg on Windows that occurred when the
+application was invoked using I/O redirection (cjpeg <inputfile >output.jpg).
+
+
1.1.0
=====
@@ -18,7 +54,7 @@ It also ensures that the library can avoid the performance pitfall created by
[3] Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler.
[4] Fixed visual artifacts in grayscale JPEG compression caused by a typo in
-the RGB-to-chrominance lookup tables.
+the RGB-to-luminance lookup tables.
[5] The Windows distribution packages now include the libjpeg run-time programs
(cjpeg, etc.)
diff --git a/Makefile.am b/Makefile.am
index 19f692c..005f040 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -169,15 +169,19 @@ testclean:
rm -f *_GRAYQ[0-9]*.bmp
rm -f *_GRAYQ[0-9]*.ppm
rm -f *_GRAYQ[0-9]*.jpg
+ rm -f *_GRAY.yuv
rm -f *_420Q[0-9]*.bmp
rm -f *_420Q[0-9]*.ppm
rm -f *_420Q[0-9]*.jpg
+ rm -f *_420.yuv
rm -f *_422Q[0-9]*.bmp
rm -f *_422Q[0-9]*.ppm
rm -f *_422Q[0-9]*.jpg
+ rm -f *_422.yuv
rm -f *_444Q[0-9]*.bmp
rm -f *_444Q[0-9]*.ppm
rm -f *_444Q[0-9]*.jpg
+ rm -f *_444.yuv
if X86_64
@@ -207,11 +211,12 @@ rpm: all
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
mkdir -p $$TMPDIR/RPMS; \
ln -fs `pwd` $$TMPDIR/BUILD; \
- rm -f ${PACKAGE_NAME}.${RPMARCH}.rpm; \
+ rm -f ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
--define "_topdir $$TMPDIR" --define "_srcdir ${srcdir}" \
- --target ${RPMARCH} libjpeg-turbo.spec; \
- cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm ${PACKAGE_NAME}.${RPMARCH}.rpm; \
+ --target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
+ cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
+ ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
rm -rf $$TMPDIR
srpm: dist-gzip
@@ -221,38 +226,38 @@ srpm: dist-gzip
mkdir -p $$TMPDIR/BUILD; \
mkdir -p $$TMPDIR/SOURCES; \
mkdir -p $$TMPDIR/SPECS; \
- rm -f ${PACKAGE_NAME}.src.rpm; \
+ rm -f ${PACKAGE_NAME}-${VERSION}.src.rpm; \
cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \
- cat libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
+ cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
| sed s@%{_srcdir}/@@g | sed s/#--\>//g \
- >$$TMPDIR/SPECS/libjpeg-turbo.spec; \
+ > $$TMPDIR/SPECS/libjpeg-turbo.spec; \
rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \
- cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm ${PACKAGE_NAME}.src.rpm; \
+ cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm \
+ ${PACKAGE_NAME}-${VERSION}.src.rpm; \
rm -rf $$TMPDIR
deb: all
- sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
- ${DEBARCH} ${srcdir}
+ sh pkgscripts/makedpkg
if X86_64
udmg: all
- sh makemacpkg universal ${BUILDDIR32}
+ sh pkgscripts/makemacpkg universal ${BUILDDIR32}
endif
dmg: all
- sh makemacpkg
+ sh pkgscripts/makemacpkg
if X86_64
csunpkg: all
- sh makesunpkg combined ${BUILDDIR32}
+ sh pkgscripts/makesunpkg combined ${BUILDDIR32}
endif
sunpkg: all
- sh makesunpkg
+ sh pkgscripts/makesunpkg
cygwinpkg: all
- sh $(srcdir)/release/makecygwinpkg ${PACKAGE_NAME} ${VERSION} ${srcdir}
+ sh pkgscripts/makecygwinpkg
diff --git a/Makefile.in b/Makefile.in
index eb130f2..092cb94 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -53,9 +53,16 @@ DIST_COMMON = README $(am__configure_deps) $(dist_man1_MANS) \
$(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(srcdir)/jconfig.h.in \
$(srcdir)/libjpeg.map.in $(top_srcdir)/configure \
+ $(top_srcdir)/release/Description.plist.in \
+ $(top_srcdir)/release/Info.plist.in \
+ $(top_srcdir)/release/deb-control.in \
$(top_srcdir)/release/libjpeg-turbo.spec.in \
+ $(top_srcdir)/release/makecygwinpkg.in \
+ $(top_srcdir)/release/makedpkg.in \
$(top_srcdir)/release/makemacpkg.in \
- $(top_srcdir)/release/makesunpkg.in compile config.guess \
+ $(top_srcdir)/release/makesunpkg.in \
+ $(top_srcdir)/release/pkginfo.in \
+ $(top_srcdir)/release/uninstall.in compile config.guess \
config.sub depcomp install-sh ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -67,7 +74,11 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h jconfig.h
-CONFIG_CLEAN_FILES = libjpeg-turbo.spec makemacpkg makesunpkg \
+CONFIG_CLEAN_FILES = pkgscripts/libjpeg-turbo.spec \
+ pkgscripts/makecygwinpkg pkgscripts/makedpkg \
+ pkgscripts/deb-control pkgscripts/makemacpkg \
+ pkgscripts/Description.plist pkgscripts/Info.plist \
+ pkgscripts/uninstall pkgscripts/makesunpkg pkgscripts/pkginfo \
libjpeg.map
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -247,8 +258,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IS_WIN32_FALSE = @IS_WIN32_FALSE@
-IS_WIN32_TRUE = @IS_WIN32_TRUE@
JPEG_LIB_VERSION = @JPEG_LIB_VERSION@
JPEG_LIB_VERSION_DECIMAL = @JPEG_LIB_VERSION_DECIMAL@
LDFLAGS = @LDFLAGS@
@@ -466,11 +475,25 @@ stamp-h2: $(srcdir)/jconfig.h.in $(top_builddir)/config.status
distclean-hdr:
-rm -f config.h stamp-h1 jconfig.h stamp-h2
-libjpeg-turbo.spec: $(top_builddir)/config.status $(top_srcdir)/release/libjpeg-turbo.spec.in
+pkgscripts/libjpeg-turbo.spec: $(top_builddir)/config.status $(top_srcdir)/release/libjpeg-turbo.spec.in
cd $(top_builddir) && $(SHELL) ./config.status $@
-makemacpkg: $(top_builddir)/config.status $(top_srcdir)/release/makemacpkg.in
+pkgscripts/makecygwinpkg: $(top_builddir)/config.status $(top_srcdir)/release/makecygwinpkg.in
cd $(top_builddir) && $(SHELL) ./config.status $@
-makesunpkg: $(top_builddir)/config.status $(top_srcdir)/release/makesunpkg.in
+pkgscripts/makedpkg: $(top_builddir)/config.status $(top_srcdir)/release/makedpkg.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pkgscripts/deb-control: $(top_builddir)/config.status $(top_srcdir)/release/deb-control.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pkgscripts/makemacpkg: $(top_builddir)/config.status $(top_srcdir)/release/makemacpkg.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pkgscripts/Description.plist: $(top_builddir)/config.status $(top_srcdir)/release/Description.plist.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pkgscripts/Info.plist: $(top_builddir)/config.status $(top_srcdir)/release/Info.plist.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pkgscripts/uninstall: $(top_builddir)/config.status $(top_srcdir)/release/uninstall.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pkgscripts/makesunpkg: $(top_builddir)/config.status $(top_srcdir)/release/makesunpkg.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pkgscripts/pkginfo: $(top_builddir)/config.status $(top_srcdir)/release/pkginfo.in
cd $(top_builddir) && $(SHELL) ./config.status $@
libjpeg.map: $(top_builddir)/config.status $(srcdir)/libjpeg.map.in
cd $(top_builddir) && $(SHELL) ./config.status $@
@@ -1394,15 +1417,19 @@ testclean:
rm -f *_GRAYQ[0-9]*.bmp
rm -f *_GRAYQ[0-9]*.ppm
rm -f *_GRAYQ[0-9]*.jpg
+ rm -f *_GRAY.yuv
rm -f *_420Q[0-9]*.bmp
rm -f *_420Q[0-9]*.ppm
rm -f *_420Q[0-9]*.jpg
+ rm -f *_420.yuv
rm -f *_422Q[0-9]*.bmp
rm -f *_422Q[0-9]*.ppm
rm -f *_422Q[0-9]*.jpg
+ rm -f *_422.yuv
rm -f *_444Q[0-9]*.bmp
rm -f *_444Q[0-9]*.ppm
rm -f *_444Q[0-9]*.jpg
+ rm -f *_444.yuv
@X86_64_TRUE@install-exec-hook:
@X86_64_TRUE@ __PREFIX=`echo ${prefix} | sed -e 's@\/*$$@@'`; \
@@ -1426,11 +1453,12 @@ rpm: all
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
mkdir -p $$TMPDIR/RPMS; \
ln -fs `pwd` $$TMPDIR/BUILD; \
- rm -f ${PACKAGE_NAME}.${RPMARCH}.rpm; \
+ rm -f ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
--define "_topdir $$TMPDIR" --define "_srcdir ${srcdir}" \
- --target ${RPMARCH} libjpeg-turbo.spec; \
- cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm ${PACKAGE_NAME}.${RPMARCH}.rpm; \
+ --target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
+ cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
+ ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
rm -rf $$TMPDIR
srpm: dist-gzip
@@ -1440,33 +1468,33 @@ srpm: dist-gzip
mkdir -p $$TMPDIR/BUILD; \
mkdir -p $$TMPDIR/SOURCES; \
mkdir -p $$TMPDIR/SPECS; \
- rm -f ${PACKAGE_NAME}.src.rpm; \
+ rm -f ${PACKAGE_NAME}-${VERSION}.src.rpm; \
cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \
- cat libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
+ cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
| sed s@%{_srcdir}/@@g | sed s/#--\>//g \
- >$$TMPDIR/SPECS/libjpeg-turbo.spec; \
+ > $$TMPDIR/SPECS/libjpeg-turbo.spec; \
rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \
- cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm ${PACKAGE_NAME}.src.rpm; \
+ cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm \
+ ${PACKAGE_NAME}-${VERSION}.src.rpm; \
rm -rf $$TMPDIR
deb: all
- sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
- ${DEBARCH} ${srcdir}
+ sh pkgscripts/makedpkg
@X86_64_TRUE@udmg: all
-@X86_64_TRUE@ sh makemacpkg universal ${BUILDDIR32}
+@X86_64_TRUE@ sh pkgscripts/makemacpkg universal ${BUILDDIR32}
dmg: all
- sh makemacpkg
+ sh pkgscripts/makemacpkg
@X86_64_TRUE@csunpkg: all
-@X86_64_TRUE@ sh makesunpkg combined ${BUILDDIR32}
+@X86_64_TRUE@ sh pkgscripts/makesunpkg combined ${BUILDDIR32}
sunpkg: all
- sh makesunpkg
+ sh pkgscripts/makesunpkg
cygwinpkg: all
- sh $(srcdir)/release/makecygwinpkg ${PACKAGE_NAME} ${VERSION} ${srcdir}
+ sh pkgscripts/makecygwinpkg
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/configure b/configure
index f5658a1..02aebae 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for libjpeg-turbo 1.1.0.
+# Generated by GNU Autoconf 2.59 for libjpeg-turbo 1.1.1.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
@@ -421,8 +421,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='libjpeg-turbo'
PACKAGE_TARNAME='libjpeg-turbo'
-PACKAGE_VERSION='1.1.0'
-PACKAGE_STRING='libjpeg-turbo 1.1.0'
+PACKAGE_VERSION='1.1.1'
+PACKAGE_STRING='libjpeg-turbo 1.1.1'
PACKAGE_BUGREPORT=''
ac_default_prefix=/opt/libjpeg-turbo
@@ -463,7 +463,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL IS_WIN32_TRUE IS_WIN32_FALSE JPEG_LIB_VERSION JPEG_LIB_VERSION_DECIMAL SO_MAJOR_VERSION SO_MINOR_VERSION VERSION_SCRIPT_TRUE VERSION_SCRIPT_FALSE VERSION_SCRIPT_FLAG WITH_ARITH_ENC_TRUE WITH_ARITH_ENC_FALSE WITH_ARITH_DEC_TRUE WITH_ARITH_DEC_FALSE WITH_ARITH_TRUE WITH_ARITH_FALSE NASM NAFLAGS WITH_SIMD_TRUE WITH_SIMD_FALSE SIMD_I386_TRUE SIMD_I386_FALSE SIMD_X86_64_TRUE SIMD_X86_64_FALSE X86_64_TRUE X86_64_FALSE RPMARCH DEBARCH BUILD LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL JPEG_LIB_VERSION JPEG_LIB_VERSION_DECIMAL SO_MAJOR_VERSION SO_MINOR_VERSION VERSION_SCRIPT_TRUE VERSION_SCRIPT_FALSE VERSION_SCRIPT_FLAG WITH_ARITH_ENC_TRUE WITH_ARITH_ENC_FALSE WITH_ARITH_DEC_TRUE WITH_ARITH_DEC_FALSE WITH_ARITH_TRUE WITH_ARITH_FALSE NASM NAFLAGS WITH_SIMD_TRUE WITH_SIMD_FALSE SIMD_I386_TRUE SIMD_I386_FALSE SIMD_X86_64_TRUE SIMD_X86_64_FALSE X86_64_TRUE X86_64_FALSE RPMARCH DEBARCH BUILD LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -964,7 +964,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libjpeg-turbo 1.1.0 to adapt to many kinds of systems.
+\`configure' configures libjpeg-turbo 1.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1030,7 +1030,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libjpeg-turbo 1.1.0:";;
+ short | recursive ) echo "Configuration of libjpeg-turbo 1.1.1:";;
esac
cat <<\_ACEOF
@@ -1065,7 +1065,7 @@ Optional Packages:
backward incompatible with libjpeg v6b.)
--without-arith-enc Omit arithmetic encoding support
--without-arith-dec Omit arithmetic decoding support
- --without-simd Omit accelerated SIMD routines.
+ --without-simd Omit SIMD extensions.
Some influential environment variables:
CC C compiler command
@@ -1187,7 +1187,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-libjpeg-turbo configure 1.1.0
+libjpeg-turbo configure 1.1.1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1201,7 +1201,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libjpeg-turbo $as_me 1.1.0, which was
+It was created by libjpeg-turbo $as_me 1.1.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1846,7 +1846,7 @@ fi
# Define the identity of the package.
PACKAGE='libjpeg-turbo'
- VERSION='1.1.0'
+ VERSION='1.1.1'
cat >>confdefs.h <<_ACEOF
@@ -21373,23 +21373,6 @@ fi
done
-# Set flags to indicate platform
-case "$host_os" in
- cygwin* | mingw* | pw32* | interix*)
- is_win32=1
- ;;
-esac
-
-
-if test "x$is_win32" = "x1"; then
- IS_WIN32_TRUE=
- IS_WIN32_FALSE='#'
-else
- IS_WIN32_TRUE='#'
- IS_WIN32_FALSE=
-fi
-
-
echo "$as_me:$LINENO: checking libjpeg API version" >&5
echo $ECHO_N "checking libjpeg API version... $ECHO_C" >&6
@@ -21820,7 +21803,7 @@ echo "${ECHO_T}$NAFLAGS" >&6
echo "$as_me:$LINENO: checking whether the assembler ($NASM $NAFLAGS) works" >&5
echo $ECHO_N "checking whether the assembler ($NASM $NAFLAGS) works... $ECHO_C" >&6
cat > conftest.asm <<EOF
-%line 21823 "configure"
+%line 21806 "configure"
section .text
global _main,main
_main:
@@ -22022,7 +22005,7 @@ echo "${ECHO_T}$NAFLAGS" >&6
echo "$as_me:$LINENO: checking whether the assembler ($NASM $NAFLAGS) works" >&5
echo $ECHO_N "checking whether the assembler ($NASM $NAFLAGS) works... $ECHO_C" >&6
cat > conftest.asm <<EOF
-%line 22025 "configure"
+%line 22008 "configure"
section .text
global _main,main
_main:
@@ -22158,11 +22141,25 @@ _ACEOF
ac_config_headers="$ac_config_headers jconfig.h"
- ac_config_files="$ac_config_files libjpeg-turbo.spec:release/libjpeg-turbo.spec.in"
+ ac_config_files="$ac_config_files pkgscripts/libjpeg-turbo.spec:release/libjpeg-turbo.spec.in"
+
+ ac_config_files="$ac_config_files pkgscripts/makecygwinpkg:release/makecygwinpkg.in"
- ac_config_files="$ac_config_files makemacpkg:release/makemacpkg.in"
+ ac_config_files="$ac_config_files pkgscripts/makedpkg:release/makedpkg.in"
- ac_config_files="$ac_config_files makesunpkg:release/makesunpkg.in"
+ ac_config_files="$ac_config_files pkgscripts/deb-control:release/deb-control.in"
+
+ ac_config_files="$ac_config_files pkgscripts/makemacpkg:release/makemacpkg.in"
+
+ ac_config_files="$ac_config_files pkgscripts/Description.plist:release/Description.plist.in"
+
+ ac_config_files="$ac_config_files pkgscripts/Info.plist:release/Info.plist.in"
+
+ ac_config_files="$ac_config_files pkgscripts/uninstall:release/uninstall.in"
+
+ ac_config_files="$ac_config_files pkgscripts/makesunpkg:release/makesunpkg.in"
+
+ ac_config_files="$ac_config_files pkgscripts/pkginfo:release/pkginfo.in"
ac_config_files="$ac_config_files libjpeg.map"
@@ -22287,13 +22284,6 @@ echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${IS_WIN32_TRUE}" && test -z "${IS_WIN32_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"IS_WIN32\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"IS_WIN32\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
if test -z "${VERSION_SCRIPT_TRUE}" && test -z "${VERSION_SCRIPT_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"VERSION_SCRIPT\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -22621,7 +22611,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by libjpeg-turbo $as_me 1.1.0, which was
+This file was extended by libjpeg-turbo $as_me 1.1.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22684,7 +22674,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-libjpeg-turbo config.status 1.1.0
+libjpeg-turbo config.status 1.1.1
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -22794,9 +22784,16 @@ for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
- "libjpeg-turbo.spec" ) CONFIG_FILES="$CONFIG_FILES libjpeg-turbo.spec:release/libjpeg-turbo.spec.in" ;;
- "makemacpkg" ) CONFIG_FILES="$CONFIG_FILES makemacpkg:release/makemacpkg.in" ;;
- "makesunpkg" ) CONFIG_FILES="$CONFIG_FILES makesunpkg:release/makesunpkg.in" ;;
+ "pkgscripts/libjpeg-turbo.spec" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/libjpeg-turbo.spec:release/libjpeg-turbo.spec.in" ;;
+ "pkgscripts/makecygwinpkg" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/makecygwinpkg:release/makecygwinpkg.in" ;;
+ "pkgscripts/makedpkg" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/makedpkg:release/makedpkg.in" ;;
+ "pkgscripts/deb-control" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/deb-control:release/deb-control.in" ;;
+ "pkgscripts/makemacpkg" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/makemacpkg:release/makemacpkg.in" ;;
+ "pkgscripts/Description.plist" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/Description.plist:release/Description.plist.in" ;;
+ "pkgscripts/Info.plist" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/Info.plist:release/Info.plist.in" ;;
+ "pkgscripts/uninstall" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/uninstall:release/uninstall.in" ;;
+ "pkgscripts/makesunpkg" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/makesunpkg:release/makesunpkg.in" ;;
+ "pkgscripts/pkginfo" ) CONFIG_FILES="$CONFIG_FILES pkgscripts/pkginfo:release/pkginfo.in" ;;
"libjpeg.map" ) CONFIG_FILES="$CONFIG_FILES libjpeg.map" ;;
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"simd/Makefile" ) CONFIG_FILES="$CONFIG_FILES simd/Makefile" ;;
@@ -22953,8 +22950,6 @@ s,@F77@,$F77,;t t
s,@FFLAGS@,$FFLAGS,;t t
s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
-s,@IS_WIN32_TRUE@,$IS_WIN32_TRUE,;t t
-s,@IS_WIN32_FALSE@,$IS_WIN32_FALSE,;t t
s,@JPEG_LIB_VERSION@,$JPEG_LIB_VERSION,;t t
s,@JPEG_LIB_VERSION_DECIMAL@,$JPEG_LIB_VERSION_DECIMAL,;t t
s,@SO_MAJOR_VERSION@,$SO_MAJOR_VERSION,;t t
diff --git a/configure.ac b/configure.ac
index a9c9977..10d1880 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.56])
-AC_INIT([libjpeg-turbo], [1.1.0])
+AC_INIT([libjpeg-turbo], [1.1.1])
BUILD=`date +%Y%m%d`
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
@@ -98,14 +98,6 @@ 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"])
-
AC_MSG_CHECKING([libjpeg API version])
AC_ARG_VAR(JPEG_LIB_VERSION, [libjpeg API version (62, 70, or 80)])
if test "x$JPEG_LIB_VERSION" = "x"; then
@@ -206,7 +198,7 @@ AM_CONDITIONAL([WITH_ARITH], [test "x$with_arith_dec" != "xno" -o "x$with_arith_
# SIMD is optional
AC_ARG_WITH([simd],
- AC_HELP_STRING([--without-simd],[Omit accelerated SIMD routines.]))
+ AC_HELP_STRING([--without-simd],[Omit SIMD extensions.]))
if test "x${with_simd}" != "xno"; then
# Check if we're on a supported CPU
AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])
@@ -260,9 +252,16 @@ AC_DEFINE_UNQUOTED([BUILD], "$BUILD", [Build number])
# 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([libjpeg-turbo.spec:release/libjpeg-turbo.spec.in])
-AC_CONFIG_FILES([makemacpkg:release/makemacpkg.in])
-AC_CONFIG_FILES([makesunpkg:release/makesunpkg.in])
+AC_CONFIG_FILES([pkgscripts/libjpeg-turbo.spec:release/libjpeg-turbo.spec.in])
+AC_CONFIG_FILES([pkgscripts/makecygwinpkg:release/makecygwinpkg.in])
+AC_CONFIG_FILES([pkgscripts/makedpkg:release/makedpkg.in])
+AC_CONFIG_FILES([pkgscripts/deb-control:release/deb-control.in])
+AC_CONFIG_FILES([pkgscripts/makemacpkg:release/makemacpkg.in])
+AC_CONFIG_FILES([pkgscripts/Description.plist:release/Description.plist.in])
+AC_CONFIG_FILES([pkgscripts/Info.plist:release/Info.plist.in])
+AC_CONFIG_FILES([pkgscripts/uninstall:release/uninstall.in])
+AC_CONFIG_FILES([pkgscripts/makesunpkg:release/makesunpkg.in])
+AC_CONFIG_FILES([pkgscripts/pkginfo:release/pkginfo.in])
AC_CONFIG_FILES([libjpeg.map])
AC_CONFIG_FILES([Makefile simd/Makefile])
AC_OUTPUT
diff --git a/jccolor.c b/jccolor.c
index 7396990..b374c8b 100644
--- a/jccolor.c
+++ b/jccolor.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1991-1996, Thomas G. Lane.
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
- * Copyright 2009 D. R. Commander
+ * Copyright 2009-2011 D. R. Commander
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -259,6 +259,7 @@ rgb_gray_convert (j_compress_ptr cinfo,
JDIMENSION output_row, int num_rows)
{
#if BITS_IN_JSAMPLE != 8
+ my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
register INT32 * ctab = cconvert->rgb_ycc_tab;
#endif
register JSAMPROW inptr;
diff --git a/jcmaster.c b/jcmaster.c
index 74df555..3ca346c 100644
--- a/jcmaster.c
+++ b/jcmaster.c
@@ -75,7 +75,9 @@ initial_setup (j_compress_ptr cinfo, boolean transcode_only)
JDIMENSION jd_samplesperrow;
#if JPEG_LIB_VERSION >= 70
+#if JPEG_LIB_VERSION >= 80
if (!transcode_only)
+#endif
jpeg_calc_jpeg_dimensions(cinfo);
#endif
diff --git a/jdhuff.c b/jdhuff.c
index 58e3779..b795462 100644
--- a/jdhuff.c
+++ b/jdhuff.c
@@ -623,6 +623,7 @@ decode_mcu_slow (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
if (val0 == 0xFF) { \
buffer++; \
if (val1 != 0) { \
+ cinfo->unread_marker = val1; \
buffer -= 2; \
get_buffer &= ~0xFF; \
} \
@@ -739,6 +740,11 @@ decode_mcu_fast (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
}
}
+ if (cinfo->unread_marker != 0) {
+ cinfo->unread_marker = 0;
+ return FALSE;
+ }
+
br_state.bytes_in_buffer -= (buffer - br_state.next_input_byte);
br_state.next_input_byte = buffer;
BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
@@ -778,7 +784,8 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
usefast = 0;
}
- if (cinfo->src->bytes_in_buffer < BUFSIZE * cinfo->blocks_in_MCU)
+ if (cinfo->src->bytes_in_buffer < BUFSIZE * cinfo->blocks_in_MCU
+ || cinfo->unread_marker != 0)
usefast = 0;
/* If we've run out of data, just leave the MCU set to zeroes.
@@ -787,9 +794,10 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
if (! entropy->pub.insufficient_data) {
if (usefast) {
- if (!decode_mcu_fast(cinfo, MCU_data)) return FALSE;
+ if (!decode_mcu_fast(cinfo, MCU_data)) goto use_slow;
}
else {
+ use_slow:
if (!decode_mcu_slow(cinfo, MCU_data)) return FALSE;
}
diff --git a/jdtrans.c b/jdtrans.c
index 9d9c1b1..f0cd0ae 100644
--- a/jdtrans.c
+++ b/jdtrans.c
@@ -99,6 +99,11 @@ transdecode_master_selection (j_decompress_ptr cinfo)
/* This is effectively a buffered-image operation. */
cinfo->buffered_image = TRUE;
+#if JPEG_LIB_VERSION >= 80
+ /* Compute output image dimensions and related values. */
+ jpeg_core_output_dimensions(cinfo);
+#endif
+
/* Entropy decoding: either Huffman or arithmetic coding. */
if (cinfo->arith_code) {
#ifdef D_ARITH_CODING_SUPPORTED
diff --git a/jmemmgr.c b/jmemmgr.c
index 5458952..cf32524 100644
--- a/jmemmgr.c
+++ b/jmemmgr.c
@@ -37,6 +37,15 @@ extern char * getenv JPP((const char * name));
#endif
+LOCAL(size_t)
+round_up_pow2 (size_t a, size_t b)
+/* a rounded up to the next multiple of b, i.e. ceil(a/b)*b */
+/* Assumes a >= 0, b > 0, and b is a power of 2 */
+{
+ return ((a + b - 1) & (~(b - 1)));
+}
+
+
/*
* Some important notes:
* The allocation routines provided here must never return NULL.
@@ -265,7 +274,7 @@ alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
* and so that algorithms can straddle outside the proper area up
* to the next alignment.
*/
- sizeofobject = jround_up(sizeofobject, ALIGN_SIZE);
+ sizeofobject = round_up_pow2(sizeofobject, ALIGN_SIZE);
/* Check for unsatisfiable request (do now to ensure no overflow below) */
if ((SIZEOF(small_pool_hdr) + sizeofobject + ALIGN_SIZE - 1) > MAX_ALLOC_CHUNK)
@@ -354,7 +363,7 @@ alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
* algorithms can straddle outside the proper area up to the next
* alignment.
*/
- sizeofobject = jround_up(sizeofobject, ALIGN_SIZE);
+ sizeofobject = round_up_pow2(sizeofobject, ALIGN_SIZE);
/* Check for unsatisfiable request (do now to ensure no overflow below) */
if ((SIZEOF(large_pool_hdr) + sizeofobject + ALIGN_SIZE - 1) > MAX_ALLOC_CHUNK)
@@ -420,7 +429,7 @@ alloc_sarray (j_common_ptr cinfo, int pool_id,
/* Make sure each row is properly aligned */
if ((ALIGN_SIZE % SIZEOF(JSAMPLE)) != 0)
out_of_memory(cinfo, 5); /* safety check */
- samplesperrow = (JDIMENSION)jround_up(samplesperrow, (2 * ALIGN_SIZE) / SIZEOF(JSAMPLE));
+ samplesperrow = (JDIMENSION)round_up_pow2(samplesperrow, (2 * ALIGN_SIZE) / SIZEOF(JSAMPLE));
/* Calculate max # of rows allowed in one allocation chunk */
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
diff --git a/jpegint.h b/jpegint.h
index 3ba7be0..7871748 100644
--- a/jpegint.h
+++ b/jpegint.h
@@ -375,7 +375,7 @@ EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
/* Utility routines in jutils.c */
EXTERN(long) jdiv_round_up JPP((long a, long b));
-EXTERN(size_t) jround_up JPP((size_t a, size_t b));
+EXTERN(long) jround_up JPP((long a, long b));
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
JSAMPARRAY output_array, int dest_row,
int num_rows, JDIMENSION num_cols));
diff --git a/jpegut.c b/jpegut.c
index 1be8bc1..3bbcb89 100644
--- a/jpegut.c
+++ b/jpegut.c
@@ -219,7 +219,7 @@ int checkbuf(unsigned char *buf, int w, int h, int ps, int subsamp, int flags)
}}
#define checkval255(v) { \
- if(v<254 && !(v==217 && i==0 && j==21)) { \
+ if(v<254) { \
printf("\nComp. %s at %d,%d should be 255, not %d\n", #v, i, j, v); \
retval=0; goto bailout; \
}}
diff --git a/jutils.c b/jutils.c
index 98b54f5..d18a955 100644
--- a/jutils.c
+++ b/jutils.c
@@ -77,8 +77,8 @@ jdiv_round_up (long a, long b)
}
-GLOBAL(size_t)
-jround_up (size_t a, size_t b)
+GLOBAL(long)
+jround_up (long a, long b)
/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
/* Assumes a >= 0, b > 0 */
{
diff --git a/rdbmp.c b/rdbmp.c
index fd773d4..be32e43 100644
--- a/rdbmp.c
+++ b/rdbmp.c
@@ -3,6 +3,7 @@
*
* Copyright (C) 1994-1996, Thomas G. Lane.
* Modified 2009-2010 by Guido Vollbeding.
+ * Modified 2011 by Siarhei Siamashka.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -220,10 +221,9 @@ preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
{
bmp_source_ptr source = (bmp_source_ptr) sinfo;
register FILE *infile = source->pub.input_file;
- register int c;
register JSAMPROW out_ptr;
JSAMPARRAY image_ptr;
- JDIMENSION row, col;
+ JDIMENSION row;
cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
/* Read the data into a virtual array in input-file row order. */
@@ -237,11 +237,11 @@ preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
((j_common_ptr) cinfo, source->whole_image,
row, (JDIMENSION) 1, TRUE);
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;
+ if (fread(out_ptr, 1, source->row_width, infile) != source->row_width) {
+ if (feof(infile))
+ ERREXIT(cinfo, JERR_INPUT_EOF);
+ else
+ ERREXIT(cinfo, JERR_FILE_READ);
}
}
if (progress != NULL)
diff --git a/release/Description.plist.tmpl b/release/Description.plist.in
index 4c5875c..adca3ec 100644
--- a/release/Description.plist.tmpl
+++ b/release/Description.plist.in
@@ -5,8 +5,8 @@
<key>IFPkgDescriptionDescription</key>
<string>A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs</string>
<key>IFPkgDescriptionTitle</key>
- <string>{__APPNAME}</string>
+ <string>@PACKAGE_NAME@</string>
<key>IFPkgDescriptionVersion</key>
- <string>{__VERSION}</string>
+ <string>@VERSION@</string>
</dict>
</plist>
diff --git a/release/Info.plist.tmpl b/release/Info.plist.in
index a33daae..0575079 100755..100644
--- a/release/Info.plist.tmpl
+++ b/release/Info.plist.in
@@ -3,15 +3,15 @@
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
- <string>{__VERSION}, The libjpeg-turbo Project</string>
+ <string>@VERSION@, The libjpeg-turbo Project</string>
<key>CFBundleIdentifier</key>
<string>com.libjpeg-turbo.libjpeg-turbo</string>
<key>CFBundleShortVersionString</key>
- <string>{__VERSION}</string>
+ <string>@VERSION@</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>IFMinorVersion</key>
- <integer>{__BUILD}</integer>
+ <integer>@BUILD@</integer>
<key>IFPkgFlagAllowBackRev</key>
<false/>
<key>IFPkgFlagAuthorizationAction</key>
diff --git a/release/deb-control.tmpl b/release/deb-control.in
index ade573e..1a2386d 100644
--- a/release/deb-control.tmpl
+++ b/release/deb-control.in
@@ -1,10 +1,10 @@
-Package: {__PKGNAME}
-Version: {__VERSION}-{__BUILD}
+Package: @PACKAGE_NAME@
+Version: @VERSION@-@BUILD@
Section: misc
Priority: optional
-Architecture: {__ARCH}
+Architecture: @DEBARCH@
Essential: no
-Maintainer: The libjpeg-turbo Project [http://libjpeg-turbo.VirtualGL.org]
+Maintainer: The libjpeg-turbo Project [http://www.libjpeg-turbo.org]
Description: A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs
libjpeg-turbo is a derivative of libjpeg which uses SIMD instructions (MMX,
SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86
diff --git a/release/libjpeg-turbo.nsi.in b/release/libjpeg-turbo.nsi.in
index de71153..6eb4bae 100755
--- a/release/libjpeg-turbo.nsi.in
+++ b/release/libjpeg-turbo.nsi.in
@@ -1,7 +1,7 @@
!include x64.nsh
Name "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@"
OutFile "@CMAKE_BINARY_DIR@\${BUILDDIR}@INST_NAME@.exe"
-InstallDir c:\@INST_NAME@
+InstallDir c:\@INST_DIR@
SetCompressor bzip2
@@ -45,12 +45,12 @@ Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
!else
File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg@DLL_VERSION@.dll"
!endif
- File "@CMAKE_BINARY_DIR@\sharedlib\cjpeg.exe"
- File "@CMAKE_BINARY_DIR@\sharedlib\djpeg.exe"
- File "@CMAKE_BINARY_DIR@\sharedlib\jpegtran.exe"
- File "@CMAKE_BINARY_DIR@\jpgtest.exe"
- File "@CMAKE_BINARY_DIR@\rdjpgcom.exe"
- File "@CMAKE_BINARY_DIR@\wrjpgcom.exe"
+ File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}cjpeg.exe"
+ File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}djpeg.exe"
+ File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpegtran.exe"
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}jpgtest.exe"
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}rdjpgcom.exe"
+ File "@CMAKE_BINARY_DIR@\${BUILDDIR}wrjpgcom.exe"
SetOutPath $INSTDIR\lib
!ifdef GCC
File "@CMAKE_BINARY_DIR@\libturbojpeg.dll.a"
@@ -77,12 +77,12 @@ Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
File "@CMAKE_SOURCE_DIR@\LICENSE.txt"
File "@CMAKE_SOURCE_DIR@\usage.txt"
- WriteRegStr HKLM "SOFTWARE\@INST_NAME@ @VERSION@" "Install_Dir" "$INSTDIR"
+ WriteRegStr HKLM "SOFTWARE\@INST_DIR@ @VERSION@" "Install_Dir" "$INSTDIR"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"'
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "NoModify" 1
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "NoRepair" 1
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "NoRepair" 1
WriteUninstaller "uninstall_@VERSION@.exe"
SectionEnd
@@ -95,8 +95,8 @@ Section "Uninstall"
SetShellVarContext all
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@"
- DeleteRegKey HKLM "SOFTWARE\@INST_NAME@ @VERSION@"
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@"
+ DeleteRegKey HKLM "SOFTWARE\@INST_DIR@ @VERSION@"
!ifdef GCC
Delete $INSTDIR\bin\libjpeg-@DLL_VERSION@.dll
diff --git a/release/libjpeg-turbo.spec.in b/release/libjpeg-turbo.spec.in
index 48e161d..645be70 100644
--- a/release/libjpeg-turbo.spec.in
+++ b/release/libjpeg-turbo.spec.in
@@ -8,7 +8,7 @@ Summary: A SIMD-accelerated JPEG codec which provides both the libjpeg and Turbo
Name: @PACKAGE_NAME@
Version: @VERSION@
Vendor: The libjpeg-turbo Project
-URL: http://libjpeg-turbo.VirtualGL.org
+URL: http://www.libjpeg-turbo.org
Group: System Environment/Libraries
#-->Source0: http://prdownloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz
Release: @BUILD@
@@ -43,7 +43,7 @@ available to a broader range of users and developers.
#-->%setup -q
#-->%build
-#-->configure libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man JPEG_LIB_VERSION=@JPEG_LIB_VERSION@ SO_MAJOR_VERSION=@SO_MAJOR_VERSION@ SO_MINOR_VERSION=@SO_MINOR_VERSION@ --with-pic
+#-->./configure libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man JPEG_LIB_VERSION=@JPEG_LIB_VERSION@ SO_MAJOR_VERSION=@SO_MAJOR_VERSION@ SO_MINOR_VERSION=@SO_MINOR_VERSION@ --with-pic
#-->make DESTDIR=$RPM_BUILD_ROOT libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man
%install
diff --git a/release/makecygwinpkg b/release/makecygwinpkg.in
index 3ed1a40..51d5852 100755..100644
--- a/release/makecygwinpkg
+++ b/release/makecygwinpkg.in
@@ -15,16 +15,9 @@ onexit()
fi
}
-usage()
-{
- echo "$0 <package name> <version> <source dir.>"
- exit 1
-}
-
-if [ $# -lt 3 ]; then usage $0; fi
-PACKAGE_NAME=$1
-VERSION=$2
-SRCDIR=$3
+PACKAGE_NAME=@PACKAGE_NAME@
+VERSION=@VERSION@
+SRCDIR=@abs_top_srcdir@
umask 022
rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2
diff --git a/release/makedpkg b/release/makedpkg.in
index f565464..2a0539a 100644
--- a/release/makedpkg
+++ b/release/makedpkg.in
@@ -15,12 +15,6 @@ onexit()
fi
}
-usage()
-{
- echo "$0 <package name> <version> <build> <DEB architecture> <source dir.>"
- exit 1
-}
-
makedeb()
{
SUPPLEMENT=$1
@@ -35,12 +29,10 @@ makedeb()
fi
umask 022
- rm -f $PACKAGE_NAME\_$DEBARCH.deb
+ rm -f $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb
TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
mkdir $TMPDIR/DEBIAN
- (cat $SRCDIR/release/deb-control.tmpl | sed s/{__PKGNAME}/$PACKAGE_NAME/g \
- | sed s/{__VERSION}/$VERSION/g | sed s/{__BUILD}/$BUILD/g \
- | sed s/{__ARCH}/$DEBARCH/g > $TMPDIR/DEBIAN/control)
+ cp pkgscripts/deb-control $TMPDIR/DEBIAN/control
make install prefix=$TMPDIR/opt/$DIRNAME libdir=$TMPDIR/opt/$DIRNAME/$__LIB mandir=$TMPDIR/opt/$DIRNAME/man
rm -f $TMPDIR/opt/$DIRNAME/$__LIB/*.la
@@ -78,15 +70,14 @@ makedeb()
fi
sudo chown -Rh root:root $TMPDIR/*
- dpkg -b $TMPDIR $PACKAGE_NAME\_$DEBARCH.deb
+ dpkg -b $TMPDIR $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb
}
-if [ $# -lt 5 ]; then usage $0; fi
-PACKAGE_NAME=$1
-VERSION=$2
-BUILD=$3
-DEBARCH=$4
-SRCDIR=$5
+PACKAGE_NAME=@PACKAGE_NAME@
+VERSION=@VERSION@
+BUILD=@BUILD@
+DEBARCH=@DEBARCH@
+SRCDIR=@abs_top_srcdir@
makedeb 0
if [ "$DEBARCH" = "i386" ]; then makedeb 1; fi
diff --git a/release/makemacpkg.in b/release/makemacpkg.in
index 49931d9..4fee6c1 100644
--- a/release/makemacpkg.in
+++ b/release/makemacpkg.in
@@ -26,8 +26,8 @@ UNIVERSAL=0
PACKAGE_NAME=@PACKAGE_NAME@
VERSION=@VERSION@
BUILD=@BUILD@
-SRCDIR=@srcdir@
-BUILDDIR32=@srcdir@/osxx86
+SRCDIR=@abs_top_srcdir@
+BUILDDIR32=@abs_top_srcdir@/osxx86
if [ $# -gt 0 ]; then
if [ "$1" = "universal" ]; then
UNIVERSAL=1
@@ -36,8 +36,8 @@ if [ $# -gt 0 ]; then
fi
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
-if [ -f $PACKAGE_NAME.dmg ]; then
- rm -f $PACKAGE_NAME.dmg
+if [ -f $PACKAGE_NAME-$VERSION.dmg ]; then
+ rm -f $PACKAGE_NAME-$VERSION.dmg
fi
umask 022
@@ -134,15 +134,9 @@ chmod 1775 $PKGROOT/Library
chmod 775 $PKGROOT/Library/Documentation
mkdir -p $TMPDIR/pkg/Resources
-(cat $SRCDIR/release/Description.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
- | sed s/{__APPNAME}/$PACKAGE_NAME/g \
- > $TMPDIR/pkg/Description.plist)
-(cat $SRCDIR/release/Info.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
- | sed s/{__BUILD}/$BUILD/g > $TMPDIR/pkg/Info.plist)
-(cat $SRCDIR/release/uninstall.sh.tmpl \
- | sed s/{__APPNAME}/$PACKAGE_NAME/g \
- > $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall)
-chmod 755 $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall
+cp pkgscripts/Description.plist $TMPDIR/pkg/
+cp pkgscripts/Info.plist $TMPDIR/pkg/
+install -m 755 pkgscripts/uninstall $PKGROOT/opt/$PACKAGE_NAME/bin/
install -m 644 $SRCDIR/LICENSE.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/LICENSE.txt
install -m 644 $SRCDIR/LGPL.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/LGPL.txt
@@ -163,8 +157,7 @@ install -m 644 $SRCDIR/release/uninstall.applescript $TMPDIR
sudo osacompile -t APPL -o "$TMPDIR/dmg/Uninstall $PACKAGE_NAME.app" $TMPDIR/uninstall.applescript
sudo chown -R $USER "$TMPDIR/dmg/Uninstall $PACKAGE_NAME.app"
hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
- -srcfolder "$TMPDIR/dmg" \
- $TMPDIR/$PACKAGE_NAME.dmg
-cp $TMPDIR/$PACKAGE_NAME.dmg .
+ -srcfolder "$TMPDIR/dmg" $TMPDIR/$PACKAGE_NAME-$VERSION.dmg
+cp $TMPDIR/$PACKAGE_NAME-$VERSION.dmg .
exit
diff --git a/release/makesunpkg.in b/release/makesunpkg.in
index f262389..aa2e735 100644
--- a/release/makesunpkg.in
+++ b/release/makesunpkg.in
@@ -27,8 +27,8 @@ PACKAGE_NAME=@PACKAGE_NAME@
VERSION=@VERSION@
BUILD=@BUILD@
PKGARCH=@DEBARCH@
-SRCDIR=@srcdir@
-BUILDDIR32=@srcdir@/solx86
+SRCDIR=@abs_top_srcdir@
+BUILDDIR32=@abs_top_srcdir@/solx86
if [ $# -gt 0 ]; then
if [ "$1" = "combined" ]; then
COMBINED=1
@@ -41,9 +41,7 @@ TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
rm -f $PACKAGE_NAME.pkg.bz2
cp $SRCDIR/release/copyright $TMPDIR
touch $TMPDIR/depend
-cat $SRCDIR/release/pkginfo.tmpl | sed s/{__VERSION}/$VERSION/g \
- | sed s/{__BUILD}/$BUILD/g | sed s/{__APPNAME}/$PACKAGE_NAME/g \
- | sed s/{__PKGNAME}/$PACKAGE_NAME/g > $TMPDIR/pkginfo
+cp pkgscripts/pkginfo $TMPDIR/pkginfo
if [ "$PKGARCH" = "i386" ]; then
__LIB=lib
@@ -132,8 +130,8 @@ f none $PACKAGE_NAME/doc/usage.txt 0644 root bin
EOF
pkgmk -o -r $TMPDIR/opt -d $TMPDIR -a i386 -f $TMPDIR/proto
-pkgtrans -s $TMPDIR $TMPDIR/$PACKAGE_NAME.pkg $PACKAGE_NAME
-bzip2 $TMPDIR/$PACKAGE_NAME.pkg
-cp $TMPDIR/$PACKAGE_NAME.pkg.bz2 .
+pkgtrans -s $TMPDIR $TMPDIR/$PACKAGE_NAME-$VERSION.pkg $PACKAGE_NAME
+bzip2 $TMPDIR/$PACKAGE_NAME-$VERSION.pkg
+cp $TMPDIR/$PACKAGE_NAME-$VERSION.pkg.bz2 .
exit
diff --git a/release/pkginfo.tmpl b/release/pkginfo.in
index 68bee88..7801dfb 100644
--- a/release/pkginfo.tmpl
+++ b/release/pkginfo.in
@@ -1,12 +1,12 @@
ARCH=i386
-PKG={__PKGNAME}
-NAME={__APPNAME} SDK and run time libraries
-VERSION={__VERSION},REV={__BUILD}
+PKG=@PACKAGE_NAME@
+NAME=@PACKAGE_NAME@ SDK and run time libraries
+VERSION=@VERSION@,REV=@BUILD@
SUNW_PKGVERS=1.0
DESC=A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs
VENDOR=The libjpeg-turbo Project
-HOTLINE=http://libjpeg-turbo.VirtualGL.org
-EMAIL=information@virtualgl.org
+HOTLINE=http://www.libjpeg-turbo.org
+EMAIL=information@libjpeg-turbo.org
MAXINST=1
CATEGORY=application
BASEDIR=/opt
diff --git a/release/uninstall.sh.tmpl b/release/uninstall.in
index ed8846b..94fc4f1 100644
--- a/release/uninstall.sh.tmpl
+++ b/release/uninstall.in
@@ -1,4 +1,4 @@
-# Copyright (C)2009-2010 D. R. Commander
+# Copyright (C)2009-2011 D. R. Commander
# Copyright (C)2009 Sun Microsystems, Inc.
#
# This library is free software and may be redistributed and/or modified under
@@ -23,7 +23,7 @@ if [ ! "`id -u`" = "0" ]; then
error "This command must be run as root"
fi
-PKGNAME={__APPNAME}
+PKGNAME=@PACKAGE_NAME@
MACPKGNAME=com.$PKGNAME.$PKGNAME
RCPT=/Library/Receipts/$PKGNAME.pkg
diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt
index 3fd7aaf..7db7e2f 100755
--- a/sharedlib/CMakeLists.txt
+++ b/sharedlib/CMakeLists.txt
@@ -40,13 +40,13 @@ endif()
add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdbmp.c ../rdgif.c ../rdppm.c
../rdswitch.c ../rdtarga.c)
set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS
- "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED")
+ "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
target_link_libraries(cjpeg jpeg)
add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
../wrbmp.c ../wrgif.c ../wrppm.c ../wrtarga.c)
set_property(TARGET djpeg PROPERTY COMPILE_FLAGS
- "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED")
+ "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
target_link_libraries(djpeg jpeg)
add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
diff --git a/simd/CMakeLists.txt b/simd/CMakeLists.txt
index 5be325e..263579d 100755
--- a/simd/CMakeLists.txt
+++ b/simd/CMakeLists.txt
@@ -10,10 +10,6 @@ else()
-I${CMAKE_CURRENT_SOURCE_DIR}/)
endif()
-if(MSVC)
- set(NAFLAGS ${NAFLAGS} -DMSVC)
-endif()
-
# This only works if building from the command line. There is currently no way
# to set a variable's value based on the build type when using the MSVC IDE.
if(CMAKE_BUILD_TYPE STREQUAL "Debug"
@@ -36,7 +32,7 @@ else()
endif()
if(MSVC_IDE)
- set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/$(OutDir)")
+ set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
else()
set(OBJDIR ${CMAKE_CURRENT_BINARY_DIR})
endif()
diff --git a/simd/Makefile.in b/simd/Makefile.in
index 44e779c..bf14b58 100644
--- a/simd/Makefile.in
+++ b/simd/Makefile.in
@@ -143,8 +143,6 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IS_WIN32_FALSE = @IS_WIN32_FALSE@
-IS_WIN32_TRUE = @IS_WIN32_TRUE@
JPEG_LIB_VERSION = @JPEG_LIB_VERSION@
JPEG_LIB_VERSION_DECIMAL = @JPEG_LIB_VERSION_DECIMAL@
LDFLAGS = @LDFLAGS@
diff --git a/simd/jsimdext.inc b/simd/jsimdext.inc
index 4ea3d17..c4297f9 100644
--- a/simd/jsimdext.inc
+++ b/simd/jsimdext.inc
@@ -48,9 +48,7 @@
;
%define SEG_TEXT .text align=16 public use64 class=CODE
%define SEG_CONST .rdata align=16 public use64 class=CONST
-%ifdef MSVC
%define EXTN(name) name ; foo() -> foo
-%endif
%elifdef OBJ32 ; ----(nasm -fobj -DOBJ32 ...)----------
; * Borland C++ (Win32)
diff --git a/turbojpegl.c b/turbojpegl.c
index 8e3f2b0..5cc5437 100644
--- a/turbojpegl.c
+++ b/turbojpegl.c
@@ -300,6 +300,7 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h,
}
*size=yuvsize;
cinfo->next_scanline+=height;
+ jpeg_abort_compress(&j->cinfo);
}
else
{
@@ -315,11 +316,10 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h,
jpeg_write_scanlines(&j->cinfo, &row_pointer[j->cinfo.next_scanline],
j->cinfo.image_height-j->cinfo.next_scanline);
}
- }
- jpeg_finish_compress(&j->cinfo);
- if(!(flags&TJ_YUV))
+ jpeg_finish_compress(&j->cinfo);
*size=TJBUFSIZE(j->cinfo.image_width, j->cinfo.image_height)
-(unsigned long)(j->jdms.free_in_buffer);
+ }
bailout:
if(j->cinfo.global_state>CSTATE_START) jpeg_abort_compress(&j->cinfo);