Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba29357611 | ||
|
|
2c289bfa9b | ||
|
|
5ee81f43cf | ||
|
|
4f81526385 | ||
|
|
fad469f51e | ||
|
|
83c8f14fa2 | ||
|
|
049aef51d4 | ||
|
|
c56a74cdac | ||
|
|
51705fb967 | ||
|
|
e43d21d57f | ||
|
|
9e6378c448 | ||
|
|
62de12281a | ||
|
|
5c36465fd5 | ||
|
|
58454c74cc | ||
|
|
98b8529d1f | ||
|
|
577ae78c30 | ||
|
|
926e01ffe1 | ||
|
|
2a33dfcaab | ||
|
|
e7fde87ca5 | ||
|
|
59a58343ea | ||
|
|
9e50fa7fbe | ||
|
|
e44f8c0112 | ||
|
|
1e14b47c22 | ||
|
|
a8eabfebd1 | ||
|
|
1c87e45cff | ||
|
|
539b288780 | ||
|
|
47aaf6fa15 | ||
|
|
328c4388b7 | ||
|
|
e6f597f28f | ||
|
|
bfa34cf143 | ||
|
|
5e091d4d1f | ||
|
|
95db4f48a5 | ||
|
|
1a79ede633 | ||
|
|
a6471c34ed | ||
|
|
df1c38df74 | ||
|
|
6ee5459459 | ||
|
|
66df5eca03 |
22
BUILDING.txt
22
BUILDING.txt
@@ -12,21 +12,25 @@ Build Requirements
|
|||||||
-- libtool 1.4 or later
|
-- libtool 1.4 or later
|
||||||
|
|
||||||
-- NASM
|
-- NASM
|
||||||
* 0.98 or later is required for a 32-bit build
|
* 0.98, or 2.01 or later is required for a 32-bit build
|
||||||
* NASM 2.05 or later is required for a 64-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
|
* 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/).
|
obtained from MacPorts (http://www.macports.org/).
|
||||||
|
|
||||||
The NASM 2.05 RPMs do not work on older Linux systems, such as Red Hat
|
The binary RPMs released by the NASM project do not work on older Linux
|
||||||
Enterprise Linux 4. On such systems, you can easily build and install NASM
|
systems, such as Red Hat Enterprise Linux 4. On such systems, you can
|
||||||
2.05 from the source RPM by executing the following as root:
|
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`
|
ARCH=`uname -m`
|
||||||
wget http://www.nasm.us/pub/nasm/releasebuilds/2.05.01/nasm-2.05.01-1.src.rpm
|
rpmbuild --rebuild nasm-{version}.src.rpm
|
||||||
rpmbuild --rebuild nasm-2.05.01-1.src.rpm
|
rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
|
||||||
rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-2.05.01-1.$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
|
-- GCC v4.1 or later recommended for best performance
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
project(libjpeg-turbo C)
|
project(libjpeg-turbo C)
|
||||||
set(VERSION 1.1.0)
|
set(VERSION 1.1.1)
|
||||||
|
|
||||||
if(MINGW OR CYGWIN)
|
if(MINGW OR CYGWIN)
|
||||||
execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
|
execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD)
|
||||||
@@ -32,17 +32,11 @@ endif()
|
|||||||
|
|
||||||
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
|
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
|
||||||
|
|
||||||
if(NOT DEFINED WITH_SIMD)
|
option(WITH_SIMD "Include SIMD extensions" TRUE)
|
||||||
set(WITH_SIMD 1)
|
option(WITH_ARITH_ENC "Include arithmetic encoding support" TRUE)
|
||||||
endif()
|
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)
|
||||||
if(NOT DEFINED WITH_ARITH_ENC)
|
option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b)" FALSE)
|
||||||
set(WITH_ARITH_ENC 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT DEFINED WITH_ARITH_DEC)
|
|
||||||
set(WITH_ARITH_DEC 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_ARITH_ENC)
|
if(WITH_ARITH_ENC)
|
||||||
set(C_ARITH_CODING_SUPPORTED 1)
|
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
|
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdbmp.c rdgif.c rdppm.c rdswitch.c
|
||||||
rdtarga.c)
|
rdtarga.c)
|
||||||
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS
|
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)
|
target_link_libraries(cjpeg-static jpeg-static)
|
||||||
|
|
||||||
add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrbmp.c wrgif.c
|
add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrbmp.c wrgif.c
|
||||||
wrppm.c wrtarga.c)
|
wrppm.c wrtarga.c)
|
||||||
set_property(TARGET djpeg-static PROPERTY COMPILE_FLAGS
|
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)
|
target_link_libraries(djpeg-static jpeg-static)
|
||||||
|
|
||||||
add_executable(jpegtran-static jpegtran.c cdjpeg.c rdswitch.c transupp.c)
|
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
|
# Installer
|
||||||
#
|
#
|
||||||
|
|
||||||
set(INST_NAME ${CMAKE_PROJECT_NAME})
|
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(INST_PLATFORM "Visual C++")
|
set(INST_PLATFORM "Visual C++")
|
||||||
|
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-vc)
|
||||||
|
set(INST_DIR ${CMAKE_PROJECT_NAME})
|
||||||
elseif(MINGW)
|
elseif(MINGW)
|
||||||
set(INST_PLATFORM GCC)
|
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)
|
set(INST_DEFS -DGCC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(64BIT)
|
if(64BIT)
|
||||||
set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
|
set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
|
||||||
set(INST_NAME ${INST_NAME}64)
|
set(INST_NAME ${INST_NAME}64)
|
||||||
|
set(INST_DIR ${INST_DIR}64)
|
||||||
set(INST_DEFS ${INST_DEFS} -DWIN64)
|
set(INST_DEFS ${INST_DEFS} -DWIN64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC_IDE)
|
if(MSVC_IDE)
|
||||||
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=$(OutDir)\\")
|
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
|
||||||
else()
|
else()
|
||||||
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
|
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
|
||||||
endif()
|
endif()
|
||||||
@@ -327,7 +323,8 @@ configure_file(release/libjpeg-turbo.nsi.in libjpeg-turbo.nsi @ONLY)
|
|||||||
|
|
||||||
add_custom_target(installer
|
add_custom_target(installer
|
||||||
makensis -nocd ${INST_DEFS} libjpeg-turbo.nsi
|
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)
|
SOURCES libjpeg-turbo.nsi)
|
||||||
|
|
||||||
install(TARGETS jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom jpgtest
|
install(TARGETS jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom jpgtest
|
||||||
|
|||||||
@@ -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
|
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.
|
[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
|
[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
|
[5] The Windows distribution packages now include the libjpeg run-time programs
|
||||||
(cjpeg, etc.)
|
(cjpeg, etc.)
|
||||||
|
|||||||
33
Makefile.am
33
Makefile.am
@@ -169,15 +169,19 @@ testclean:
|
|||||||
rm -f *_GRAYQ[0-9]*.bmp
|
rm -f *_GRAYQ[0-9]*.bmp
|
||||||
rm -f *_GRAYQ[0-9]*.ppm
|
rm -f *_GRAYQ[0-9]*.ppm
|
||||||
rm -f *_GRAYQ[0-9]*.jpg
|
rm -f *_GRAYQ[0-9]*.jpg
|
||||||
|
rm -f *_GRAY.yuv
|
||||||
rm -f *_420Q[0-9]*.bmp
|
rm -f *_420Q[0-9]*.bmp
|
||||||
rm -f *_420Q[0-9]*.ppm
|
rm -f *_420Q[0-9]*.ppm
|
||||||
rm -f *_420Q[0-9]*.jpg
|
rm -f *_420Q[0-9]*.jpg
|
||||||
|
rm -f *_420.yuv
|
||||||
rm -f *_422Q[0-9]*.bmp
|
rm -f *_422Q[0-9]*.bmp
|
||||||
rm -f *_422Q[0-9]*.ppm
|
rm -f *_422Q[0-9]*.ppm
|
||||||
rm -f *_422Q[0-9]*.jpg
|
rm -f *_422Q[0-9]*.jpg
|
||||||
|
rm -f *_422.yuv
|
||||||
rm -f *_444Q[0-9]*.bmp
|
rm -f *_444Q[0-9]*.bmp
|
||||||
rm -f *_444Q[0-9]*.ppm
|
rm -f *_444Q[0-9]*.ppm
|
||||||
rm -f *_444Q[0-9]*.jpg
|
rm -f *_444Q[0-9]*.jpg
|
||||||
|
rm -f *_444.yuv
|
||||||
|
|
||||||
if X86_64
|
if X86_64
|
||||||
|
|
||||||
@@ -207,11 +211,12 @@ rpm: all
|
|||||||
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
|
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
|
||||||
mkdir -p $$TMPDIR/RPMS; \
|
mkdir -p $$TMPDIR/RPMS; \
|
||||||
ln -fs `pwd` $$TMPDIR/BUILD; \
|
ln -fs `pwd` $$TMPDIR/BUILD; \
|
||||||
rm -f ${PACKAGE_NAME}.${RPMARCH}.rpm; \
|
rm -f ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
|
||||||
rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
|
rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
|
||||||
--define "_topdir $$TMPDIR" --define "_srcdir ${srcdir}" \
|
--define "_topdir $$TMPDIR" --define "_srcdir ${srcdir}" \
|
||||||
--target ${RPMARCH} libjpeg-turbo.spec; \
|
--target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
|
||||||
cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm ${PACKAGE_NAME}.${RPMARCH}.rpm; \
|
cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
|
||||||
|
${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \
|
||||||
rm -rf $$TMPDIR
|
rm -rf $$TMPDIR
|
||||||
|
|
||||||
srpm: dist-gzip
|
srpm: dist-gzip
|
||||||
@@ -221,38 +226,38 @@ srpm: dist-gzip
|
|||||||
mkdir -p $$TMPDIR/BUILD; \
|
mkdir -p $$TMPDIR/BUILD; \
|
||||||
mkdir -p $$TMPDIR/SOURCES; \
|
mkdir -p $$TMPDIR/SOURCES; \
|
||||||
mkdir -p $$TMPDIR/SPECS; \
|
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; \
|
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 \
|
| 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; \
|
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
|
rm -rf $$TMPDIR
|
||||||
|
|
||||||
deb: all
|
deb: all
|
||||||
sh $(srcdir)/release/makedpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
|
sh pkgscripts/makedpkg
|
||||||
${DEBARCH} ${srcdir}
|
|
||||||
|
|
||||||
if X86_64
|
if X86_64
|
||||||
|
|
||||||
udmg: all
|
udmg: all
|
||||||
sh makemacpkg universal ${BUILDDIR32}
|
sh pkgscripts/makemacpkg universal ${BUILDDIR32}
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dmg: all
|
dmg: all
|
||||||
sh makemacpkg
|
sh pkgscripts/makemacpkg
|
||||||
|
|
||||||
if X86_64
|
if X86_64
|
||||||
|
|
||||||
csunpkg: all
|
csunpkg: all
|
||||||
sh makesunpkg combined ${BUILDDIR32}
|
sh pkgscripts/makesunpkg combined ${BUILDDIR32}
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
sunpkg: all
|
sunpkg: all
|
||||||
sh makesunpkg
|
sh pkgscripts/makesunpkg
|
||||||
|
|
||||||
cygwinpkg: all
|
cygwinpkg: all
|
||||||
sh $(srcdir)/release/makecygwinpkg ${PACKAGE_NAME} ${VERSION} ${srcdir}
|
sh pkgscripts/makecygwinpkg
|
||||||
|
|||||||
25
configure.ac
25
configure.ac
@@ -2,7 +2,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ([2.56])
|
AC_PREREQ([2.56])
|
||||||
AC_INIT([libjpeg-turbo], [1.1.0])
|
AC_INIT([libjpeg-turbo], [1.1.1])
|
||||||
BUILD=`date +%Y%m%d`
|
BUILD=`date +%Y%m%d`
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
|
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
|
||||||
@@ -98,14 +98,6 @@ AC_CHECK_FUNCS([memset memcpy], [],
|
|||||||
[AC_DEFINE([NEED_BSD_STRINGS], 1,
|
[AC_DEFINE([NEED_BSD_STRINGS], 1,
|
||||||
[Define if you have BSD-like bzero and bcopy])])
|
[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_MSG_CHECKING([libjpeg API version])
|
||||||
AC_ARG_VAR(JPEG_LIB_VERSION, [libjpeg API version (62, 70, or 80)])
|
AC_ARG_VAR(JPEG_LIB_VERSION, [libjpeg API version (62, 70, or 80)])
|
||||||
if test "x$JPEG_LIB_VERSION" = "x"; then
|
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
|
# SIMD is optional
|
||||||
AC_ARG_WITH([simd],
|
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
|
if test "x${with_simd}" != "xno"; then
|
||||||
# Check if we're on a supported CPU
|
# Check if we're on a supported CPU
|
||||||
AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])
|
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
|
# jconfig.h is a minimal version that allows this package to be built
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_HEADERS([jconfig.h])
|
AC_CONFIG_HEADERS([jconfig.h])
|
||||||
AC_CONFIG_FILES([libjpeg-turbo.spec:release/libjpeg-turbo.spec.in])
|
AC_CONFIG_FILES([pkgscripts/libjpeg-turbo.spec:release/libjpeg-turbo.spec.in])
|
||||||
AC_CONFIG_FILES([makemacpkg:release/makemacpkg.in])
|
AC_CONFIG_FILES([pkgscripts/makecygwinpkg:release/makecygwinpkg.in])
|
||||||
AC_CONFIG_FILES([makesunpkg:release/makesunpkg.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([libjpeg.map])
|
||||||
AC_CONFIG_FILES([Makefile simd/Makefile])
|
AC_CONFIG_FILES([Makefile simd/Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 1991-1996, Thomas G. Lane.
|
* Copyright (C) 1991-1996, Thomas G. Lane.
|
||||||
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
* 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.
|
* This file is part of the Independent JPEG Group's software.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* 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)
|
JDIMENSION output_row, int num_rows)
|
||||||
{
|
{
|
||||||
#if BITS_IN_JSAMPLE != 8
|
#if BITS_IN_JSAMPLE != 8
|
||||||
|
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
||||||
register INT32 * ctab = cconvert->rgb_ycc_tab;
|
register INT32 * ctab = cconvert->rgb_ycc_tab;
|
||||||
#endif
|
#endif
|
||||||
register JSAMPROW inptr;
|
register JSAMPROW inptr;
|
||||||
|
|||||||
@@ -75,7 +75,9 @@ initial_setup (j_compress_ptr cinfo, boolean transcode_only)
|
|||||||
JDIMENSION jd_samplesperrow;
|
JDIMENSION jd_samplesperrow;
|
||||||
|
|
||||||
#if JPEG_LIB_VERSION >= 70
|
#if JPEG_LIB_VERSION >= 70
|
||||||
|
#if JPEG_LIB_VERSION >= 80
|
||||||
if (!transcode_only)
|
if (!transcode_only)
|
||||||
|
#endif
|
||||||
jpeg_calc_jpeg_dimensions(cinfo);
|
jpeg_calc_jpeg_dimensions(cinfo);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
12
jdhuff.c
12
jdhuff.c
@@ -623,6 +623,7 @@ decode_mcu_slow (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
if (val0 == 0xFF) { \
|
if (val0 == 0xFF) { \
|
||||||
buffer++; \
|
buffer++; \
|
||||||
if (val1 != 0) { \
|
if (val1 != 0) { \
|
||||||
|
cinfo->unread_marker = val1; \
|
||||||
buffer -= 2; \
|
buffer -= 2; \
|
||||||
get_buffer &= ~0xFF; \
|
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.bytes_in_buffer -= (buffer - br_state.next_input_byte);
|
||||||
br_state.next_input_byte = buffer;
|
br_state.next_input_byte = buffer;
|
||||||
BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
|
BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
|
||||||
@@ -778,7 +784,8 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||||||
usefast = 0;
|
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;
|
usefast = 0;
|
||||||
|
|
||||||
/* If we've run out of data, just leave the MCU set to zeroes.
|
/* 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 (! entropy->pub.insufficient_data) {
|
||||||
|
|
||||||
if (usefast) {
|
if (usefast) {
|
||||||
if (!decode_mcu_fast(cinfo, MCU_data)) return FALSE;
|
if (!decode_mcu_fast(cinfo, MCU_data)) goto use_slow;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
use_slow:
|
||||||
if (!decode_mcu_slow(cinfo, MCU_data)) return FALSE;
|
if (!decode_mcu_slow(cinfo, MCU_data)) return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,11 @@ transdecode_master_selection (j_decompress_ptr cinfo)
|
|||||||
/* This is effectively a buffered-image operation. */
|
/* This is effectively a buffered-image operation. */
|
||||||
cinfo->buffered_image = TRUE;
|
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. */
|
/* Entropy decoding: either Huffman or arithmetic coding. */
|
||||||
if (cinfo->arith_code) {
|
if (cinfo->arith_code) {
|
||||||
#ifdef D_ARITH_CODING_SUPPORTED
|
#ifdef D_ARITH_CODING_SUPPORTED
|
||||||
|
|||||||
15
jmemmgr.c
15
jmemmgr.c
@@ -37,6 +37,15 @@ extern char * getenv JPP((const char * name));
|
|||||||
#endif
|
#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:
|
* Some important notes:
|
||||||
* The allocation routines provided here must never return NULL.
|
* 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
|
* and so that algorithms can straddle outside the proper area up
|
||||||
* to the next alignment.
|
* 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) */
|
/* Check for unsatisfiable request (do now to ensure no overflow below) */
|
||||||
if ((SIZEOF(small_pool_hdr) + sizeofobject + ALIGN_SIZE - 1) > MAX_ALLOC_CHUNK)
|
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
|
* algorithms can straddle outside the proper area up to the next
|
||||||
* alignment.
|
* 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) */
|
/* Check for unsatisfiable request (do now to ensure no overflow below) */
|
||||||
if ((SIZEOF(large_pool_hdr) + sizeofobject + ALIGN_SIZE - 1) > MAX_ALLOC_CHUNK)
|
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 */
|
/* Make sure each row is properly aligned */
|
||||||
if ((ALIGN_SIZE % SIZEOF(JSAMPLE)) != 0)
|
if ((ALIGN_SIZE % SIZEOF(JSAMPLE)) != 0)
|
||||||
out_of_memory(cinfo, 5); /* safety check */
|
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 */
|
/* Calculate max # of rows allowed in one allocation chunk */
|
||||||
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
|
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
|
|||||||
|
|
||||||
/* Utility routines in jutils.c */
|
/* Utility routines in jutils.c */
|
||||||
EXTERN(long) jdiv_round_up JPP((long a, long b));
|
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,
|
EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
|
||||||
JSAMPARRAY output_array, int dest_row,
|
JSAMPARRAY output_array, int dest_row,
|
||||||
int num_rows, JDIMENSION num_cols));
|
int num_rows, JDIMENSION num_cols));
|
||||||
|
|||||||
2
jpegut.c
2
jpegut.c
@@ -219,7 +219,7 @@ int checkbuf(unsigned char *buf, int w, int h, int ps, int subsamp, int flags)
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
#define checkval255(v) { \
|
#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); \
|
printf("\nComp. %s at %d,%d should be 255, not %d\n", #v, i, j, v); \
|
||||||
retval=0; goto bailout; \
|
retval=0; goto bailout; \
|
||||||
}}
|
}}
|
||||||
|
|||||||
4
jutils.c
4
jutils.c
@@ -77,8 +77,8 @@ jdiv_round_up (long a, long b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GLOBAL(size_t)
|
GLOBAL(long)
|
||||||
jround_up (size_t a, size_t b)
|
jround_up (long a, long b)
|
||||||
/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
|
/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
|
||||||
/* Assumes a >= 0, b > 0 */
|
/* Assumes a >= 0, b > 0 */
|
||||||
{
|
{
|
||||||
|
|||||||
14
rdbmp.c
14
rdbmp.c
@@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 1994-1996, Thomas G. Lane.
|
* Copyright (C) 1994-1996, Thomas G. Lane.
|
||||||
* Modified 2009-2010 by Guido Vollbeding.
|
* Modified 2009-2010 by Guido Vollbeding.
|
||||||
|
* Modified 2011 by Siarhei Siamashka.
|
||||||
* This file is part of the Independent JPEG Group's software.
|
* This file is part of the Independent JPEG Group's software.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* 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;
|
bmp_source_ptr source = (bmp_source_ptr) sinfo;
|
||||||
register FILE *infile = source->pub.input_file;
|
register FILE *infile = source->pub.input_file;
|
||||||
register int c;
|
|
||||||
register JSAMPROW out_ptr;
|
register JSAMPROW out_ptr;
|
||||||
JSAMPARRAY image_ptr;
|
JSAMPARRAY image_ptr;
|
||||||
JDIMENSION row, col;
|
JDIMENSION row;
|
||||||
cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
|
cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress;
|
||||||
|
|
||||||
/* Read the data into a virtual array in input-file row order. */
|
/* 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,
|
((j_common_ptr) cinfo, source->whole_image,
|
||||||
row, (JDIMENSION) 1, TRUE);
|
row, (JDIMENSION) 1, TRUE);
|
||||||
out_ptr = image_ptr[0];
|
out_ptr = image_ptr[0];
|
||||||
for (col = source->row_width; col > 0; col--) {
|
if (fread(out_ptr, 1, source->row_width, infile) != source->row_width) {
|
||||||
/* inline copy of read_byte() for speed */
|
if (feof(infile))
|
||||||
if ((c = getc(infile)) == EOF)
|
ERREXIT(cinfo, JERR_INPUT_EOF);
|
||||||
ERREXIT(cinfo, JERR_INPUT_EOF);
|
else
|
||||||
*out_ptr++ = (JSAMPLE) c;
|
ERREXIT(cinfo, JERR_FILE_READ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (progress != NULL)
|
if (progress != NULL)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
<key>IFPkgDescriptionDescription</key>
|
<key>IFPkgDescriptionDescription</key>
|
||||||
<string>A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs</string>
|
<string>A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs</string>
|
||||||
<key>IFPkgDescriptionTitle</key>
|
<key>IFPkgDescriptionTitle</key>
|
||||||
<string>{__APPNAME}</string>
|
<string>@PACKAGE_NAME@</string>
|
||||||
<key>IFPkgDescriptionVersion</key>
|
<key>IFPkgDescriptionVersion</key>
|
||||||
<string>{__VERSION}</string>
|
<string>@VERSION@</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -3,15 +3,15 @@
|
|||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>{__VERSION}, The libjpeg-turbo Project</string>
|
<string>@VERSION@, The libjpeg-turbo Project</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.libjpeg-turbo.libjpeg-turbo</string>
|
<string>com.libjpeg-turbo.libjpeg-turbo</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>{__VERSION}</string>
|
<string>@VERSION@</string>
|
||||||
<key>IFMajorVersion</key>
|
<key>IFMajorVersion</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>IFMinorVersion</key>
|
<key>IFMinorVersion</key>
|
||||||
<integer>{__BUILD}</integer>
|
<integer>@BUILD@</integer>
|
||||||
<key>IFPkgFlagAllowBackRev</key>
|
<key>IFPkgFlagAllowBackRev</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>IFPkgFlagAuthorizationAction</key>
|
<key>IFPkgFlagAuthorizationAction</key>
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
Package: {__PKGNAME}
|
Package: @PACKAGE_NAME@
|
||||||
Version: {__VERSION}-{__BUILD}
|
Version: @VERSION@-@BUILD@
|
||||||
Section: misc
|
Section: misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: {__ARCH}
|
Architecture: @DEBARCH@
|
||||||
Essential: no
|
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
|
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,
|
libjpeg-turbo is a derivative of libjpeg which uses SIMD instructions (MMX,
|
||||||
SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86
|
SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
!include x64.nsh
|
!include x64.nsh
|
||||||
Name "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@"
|
Name "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@"
|
||||||
OutFile "@CMAKE_BINARY_DIR@\${BUILDDIR}@INST_NAME@.exe"
|
OutFile "@CMAKE_BINARY_DIR@\${BUILDDIR}@INST_NAME@.exe"
|
||||||
InstallDir c:\@INST_NAME@
|
InstallDir c:\@INST_DIR@
|
||||||
|
|
||||||
SetCompressor bzip2
|
SetCompressor bzip2
|
||||||
|
|
||||||
@@ -45,12 +45,12 @@ Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
|
|||||||
!else
|
!else
|
||||||
File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg@DLL_VERSION@.dll"
|
File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg@DLL_VERSION@.dll"
|
||||||
!endif
|
!endif
|
||||||
File "@CMAKE_BINARY_DIR@\sharedlib\cjpeg.exe"
|
File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}cjpeg.exe"
|
||||||
File "@CMAKE_BINARY_DIR@\sharedlib\djpeg.exe"
|
File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}djpeg.exe"
|
||||||
File "@CMAKE_BINARY_DIR@\sharedlib\jpegtran.exe"
|
File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpegtran.exe"
|
||||||
File "@CMAKE_BINARY_DIR@\jpgtest.exe"
|
File "@CMAKE_BINARY_DIR@\${BUILDDIR}jpgtest.exe"
|
||||||
File "@CMAKE_BINARY_DIR@\rdjpgcom.exe"
|
File "@CMAKE_BINARY_DIR@\${BUILDDIR}rdjpgcom.exe"
|
||||||
File "@CMAKE_BINARY_DIR@\wrjpgcom.exe"
|
File "@CMAKE_BINARY_DIR@\${BUILDDIR}wrjpgcom.exe"
|
||||||
SetOutPath $INSTDIR\lib
|
SetOutPath $INSTDIR\lib
|
||||||
!ifdef GCC
|
!ifdef GCC
|
||||||
File "@CMAKE_BINARY_DIR@\libturbojpeg.dll.a"
|
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@\LICENSE.txt"
|
||||||
File "@CMAKE_SOURCE_DIR@\usage.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_DIR@ @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"'
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @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_DIR@ @VERSION@" "NoModify" 1
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "NoRepair" 1
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@" "NoRepair" 1
|
||||||
WriteUninstaller "uninstall_@VERSION@.exe"
|
WriteUninstaller "uninstall_@VERSION@.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
@@ -95,8 +95,8 @@ Section "Uninstall"
|
|||||||
|
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@"
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_DIR@ @VERSION@"
|
||||||
DeleteRegKey HKLM "SOFTWARE\@INST_NAME@ @VERSION@"
|
DeleteRegKey HKLM "SOFTWARE\@INST_DIR@ @VERSION@"
|
||||||
|
|
||||||
!ifdef GCC
|
!ifdef GCC
|
||||||
Delete $INSTDIR\bin\libjpeg-@DLL_VERSION@.dll
|
Delete $INSTDIR\bin\libjpeg-@DLL_VERSION@.dll
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Summary: A SIMD-accelerated JPEG codec which provides both the libjpeg and Turbo
|
|||||||
Name: @PACKAGE_NAME@
|
Name: @PACKAGE_NAME@
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Vendor: The libjpeg-turbo Project
|
Vendor: The libjpeg-turbo Project
|
||||||
URL: http://libjpeg-turbo.VirtualGL.org
|
URL: http://www.libjpeg-turbo.org
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
#-->Source0: http://prdownloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz
|
#-->Source0: http://prdownloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-%{version}.tar.gz
|
||||||
Release: @BUILD@
|
Release: @BUILD@
|
||||||
@@ -43,7 +43,7 @@ available to a broader range of users and developers.
|
|||||||
#-->%setup -q
|
#-->%setup -q
|
||||||
|
|
||||||
#-->%build
|
#-->%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
|
#-->make DESTDIR=$RPM_BUILD_ROOT libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|||||||
@@ -15,16 +15,9 @@ onexit()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
usage()
|
PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
{
|
VERSION=@VERSION@
|
||||||
echo "$0 <package name> <version> <source dir.>"
|
SRCDIR=@abs_top_srcdir@
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ $# -lt 3 ]; then usage $0; fi
|
|
||||||
PACKAGE_NAME=$1
|
|
||||||
VERSION=$2
|
|
||||||
SRCDIR=$3
|
|
||||||
|
|
||||||
umask 022
|
umask 022
|
||||||
rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2
|
rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2
|
||||||
@@ -15,12 +15,6 @@ onexit()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
echo "$0 <package name> <version> <build> <DEB architecture> <source dir.>"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
makedeb()
|
makedeb()
|
||||||
{
|
{
|
||||||
SUPPLEMENT=$1
|
SUPPLEMENT=$1
|
||||||
@@ -35,12 +29,10 @@ makedeb()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
umask 022
|
umask 022
|
||||||
rm -f $PACKAGE_NAME\_$DEBARCH.deb
|
rm -f $PACKAGE_NAME\_$VERSION\_$DEBARCH.deb
|
||||||
TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
|
TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
|
||||||
mkdir $TMPDIR/DEBIAN
|
mkdir $TMPDIR/DEBIAN
|
||||||
(cat $SRCDIR/release/deb-control.tmpl | sed s/{__PKGNAME}/$PACKAGE_NAME/g \
|
cp pkgscripts/deb-control $TMPDIR/DEBIAN/control
|
||||||
| sed s/{__VERSION}/$VERSION/g | sed s/{__BUILD}/$BUILD/g \
|
|
||||||
| sed s/{__ARCH}/$DEBARCH/g > $TMPDIR/DEBIAN/control)
|
|
||||||
|
|
||||||
make install prefix=$TMPDIR/opt/$DIRNAME libdir=$TMPDIR/opt/$DIRNAME/$__LIB mandir=$TMPDIR/opt/$DIRNAME/man
|
make install prefix=$TMPDIR/opt/$DIRNAME libdir=$TMPDIR/opt/$DIRNAME/$__LIB mandir=$TMPDIR/opt/$DIRNAME/man
|
||||||
rm -f $TMPDIR/opt/$DIRNAME/$__LIB/*.la
|
rm -f $TMPDIR/opt/$DIRNAME/$__LIB/*.la
|
||||||
@@ -78,15 +70,14 @@ makedeb()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
sudo chown -Rh root:root $TMPDIR/*
|
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=@PACKAGE_NAME@
|
||||||
PACKAGE_NAME=$1
|
VERSION=@VERSION@
|
||||||
VERSION=$2
|
BUILD=@BUILD@
|
||||||
BUILD=$3
|
DEBARCH=@DEBARCH@
|
||||||
DEBARCH=$4
|
SRCDIR=@abs_top_srcdir@
|
||||||
SRCDIR=$5
|
|
||||||
|
|
||||||
makedeb 0
|
makedeb 0
|
||||||
if [ "$DEBARCH" = "i386" ]; then makedeb 1; fi
|
if [ "$DEBARCH" = "i386" ]; then makedeb 1; fi
|
||||||
@@ -26,8 +26,8 @@ UNIVERSAL=0
|
|||||||
PACKAGE_NAME=@PACKAGE_NAME@
|
PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
VERSION=@VERSION@
|
VERSION=@VERSION@
|
||||||
BUILD=@BUILD@
|
BUILD=@BUILD@
|
||||||
SRCDIR=@srcdir@
|
SRCDIR=@abs_top_srcdir@
|
||||||
BUILDDIR32=@srcdir@/osxx86
|
BUILDDIR32=@abs_top_srcdir@/osxx86
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
if [ "$1" = "universal" ]; then
|
if [ "$1" = "universal" ]; then
|
||||||
UNIVERSAL=1
|
UNIVERSAL=1
|
||||||
@@ -36,8 +36,8 @@ if [ $# -gt 0 ]; then
|
|||||||
fi
|
fi
|
||||||
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
||||||
|
|
||||||
if [ -f $PACKAGE_NAME.dmg ]; then
|
if [ -f $PACKAGE_NAME-$VERSION.dmg ]; then
|
||||||
rm -f $PACKAGE_NAME.dmg
|
rm -f $PACKAGE_NAME-$VERSION.dmg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
umask 022
|
umask 022
|
||||||
@@ -134,15 +134,9 @@ chmod 1775 $PKGROOT/Library
|
|||||||
chmod 775 $PKGROOT/Library/Documentation
|
chmod 775 $PKGROOT/Library/Documentation
|
||||||
mkdir -p $TMPDIR/pkg/Resources
|
mkdir -p $TMPDIR/pkg/Resources
|
||||||
|
|
||||||
(cat $SRCDIR/release/Description.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
|
cp pkgscripts/Description.plist $TMPDIR/pkg/
|
||||||
| sed s/{__APPNAME}/$PACKAGE_NAME/g \
|
cp pkgscripts/Info.plist $TMPDIR/pkg/
|
||||||
> $TMPDIR/pkg/Description.plist)
|
install -m 755 pkgscripts/uninstall $PKGROOT/opt/$PACKAGE_NAME/bin/
|
||||||
(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
|
|
||||||
|
|
||||||
install -m 644 $SRCDIR/LICENSE.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/LICENSE.txt
|
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
|
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 osacompile -t APPL -o "$TMPDIR/dmg/Uninstall $PACKAGE_NAME.app" $TMPDIR/uninstall.applescript
|
||||||
sudo chown -R $USER "$TMPDIR/dmg/Uninstall $PACKAGE_NAME.app"
|
sudo chown -R $USER "$TMPDIR/dmg/Uninstall $PACKAGE_NAME.app"
|
||||||
hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
|
hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
|
||||||
-srcfolder "$TMPDIR/dmg" \
|
-srcfolder "$TMPDIR/dmg" $TMPDIR/$PACKAGE_NAME-$VERSION.dmg
|
||||||
$TMPDIR/$PACKAGE_NAME.dmg
|
cp $TMPDIR/$PACKAGE_NAME-$VERSION.dmg .
|
||||||
cp $TMPDIR/$PACKAGE_NAME.dmg .
|
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ PACKAGE_NAME=@PACKAGE_NAME@
|
|||||||
VERSION=@VERSION@
|
VERSION=@VERSION@
|
||||||
BUILD=@BUILD@
|
BUILD=@BUILD@
|
||||||
PKGARCH=@DEBARCH@
|
PKGARCH=@DEBARCH@
|
||||||
SRCDIR=@srcdir@
|
SRCDIR=@abs_top_srcdir@
|
||||||
BUILDDIR32=@srcdir@/solx86
|
BUILDDIR32=@abs_top_srcdir@/solx86
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
if [ "$1" = "combined" ]; then
|
if [ "$1" = "combined" ]; then
|
||||||
COMBINED=1
|
COMBINED=1
|
||||||
@@ -41,9 +41,7 @@ TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
|
|||||||
rm -f $PACKAGE_NAME.pkg.bz2
|
rm -f $PACKAGE_NAME.pkg.bz2
|
||||||
cp $SRCDIR/release/copyright $TMPDIR
|
cp $SRCDIR/release/copyright $TMPDIR
|
||||||
touch $TMPDIR/depend
|
touch $TMPDIR/depend
|
||||||
cat $SRCDIR/release/pkginfo.tmpl | sed s/{__VERSION}/$VERSION/g \
|
cp pkgscripts/pkginfo $TMPDIR/pkginfo
|
||||||
| sed s/{__BUILD}/$BUILD/g | sed s/{__APPNAME}/$PACKAGE_NAME/g \
|
|
||||||
| sed s/{__PKGNAME}/$PACKAGE_NAME/g > $TMPDIR/pkginfo
|
|
||||||
|
|
||||||
if [ "$PKGARCH" = "i386" ]; then
|
if [ "$PKGARCH" = "i386" ]; then
|
||||||
__LIB=lib
|
__LIB=lib
|
||||||
@@ -132,8 +130,8 @@ f none $PACKAGE_NAME/doc/usage.txt 0644 root bin
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
pkgmk -o -r $TMPDIR/opt -d $TMPDIR -a i386 -f $TMPDIR/proto
|
pkgmk -o -r $TMPDIR/opt -d $TMPDIR -a i386 -f $TMPDIR/proto
|
||||||
pkgtrans -s $TMPDIR $TMPDIR/$PACKAGE_NAME.pkg $PACKAGE_NAME
|
pkgtrans -s $TMPDIR $TMPDIR/$PACKAGE_NAME-$VERSION.pkg $PACKAGE_NAME
|
||||||
bzip2 $TMPDIR/$PACKAGE_NAME.pkg
|
bzip2 $TMPDIR/$PACKAGE_NAME-$VERSION.pkg
|
||||||
cp $TMPDIR/$PACKAGE_NAME.pkg.bz2 .
|
cp $TMPDIR/$PACKAGE_NAME-$VERSION.pkg.bz2 .
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
ARCH=i386
|
ARCH=i386
|
||||||
PKG={__PKGNAME}
|
PKG=@PACKAGE_NAME@
|
||||||
NAME={__APPNAME} SDK and run time libraries
|
NAME=@PACKAGE_NAME@ SDK and run time libraries
|
||||||
VERSION={__VERSION},REV={__BUILD}
|
VERSION=@VERSION@,REV=@BUILD@
|
||||||
SUNW_PKGVERS=1.0
|
SUNW_PKGVERS=1.0
|
||||||
DESC=A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs
|
DESC=A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs
|
||||||
VENDOR=The libjpeg-turbo Project
|
VENDOR=The libjpeg-turbo Project
|
||||||
HOTLINE=http://libjpeg-turbo.VirtualGL.org
|
HOTLINE=http://www.libjpeg-turbo.org
|
||||||
EMAIL=information@virtualgl.org
|
EMAIL=information@libjpeg-turbo.org
|
||||||
MAXINST=1
|
MAXINST=1
|
||||||
CATEGORY=application
|
CATEGORY=application
|
||||||
BASEDIR=/opt
|
BASEDIR=/opt
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright (C)2009-2010 D. R. Commander
|
# Copyright (C)2009-2011 D. R. Commander
|
||||||
# Copyright (C)2009 Sun Microsystems, Inc.
|
# Copyright (C)2009 Sun Microsystems, Inc.
|
||||||
#
|
#
|
||||||
# This library is free software and may be redistributed and/or modified under
|
# 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"
|
error "This command must be run as root"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKGNAME={__APPNAME}
|
PKGNAME=@PACKAGE_NAME@
|
||||||
MACPKGNAME=com.$PKGNAME.$PKGNAME
|
MACPKGNAME=com.$PKGNAME.$PKGNAME
|
||||||
RCPT=/Library/Receipts/$PKGNAME.pkg
|
RCPT=/Library/Receipts/$PKGNAME.pkg
|
||||||
|
|
||||||
@@ -40,13 +40,13 @@ endif()
|
|||||||
add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdbmp.c ../rdgif.c ../rdppm.c
|
add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdbmp.c ../rdgif.c ../rdppm.c
|
||||||
../rdswitch.c ../rdtarga.c)
|
../rdswitch.c ../rdtarga.c)
|
||||||
set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS
|
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)
|
target_link_libraries(cjpeg jpeg)
|
||||||
|
|
||||||
add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
|
add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
|
||||||
../wrbmp.c ../wrgif.c ../wrppm.c ../wrtarga.c)
|
../wrbmp.c ../wrgif.c ../wrppm.c ../wrtarga.c)
|
||||||
set_property(TARGET djpeg PROPERTY COMPILE_FLAGS
|
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)
|
target_link_libraries(djpeg jpeg)
|
||||||
|
|
||||||
add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
|
add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ else()
|
|||||||
-I${CMAKE_CURRENT_SOURCE_DIR}/)
|
-I${CMAKE_CURRENT_SOURCE_DIR}/)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
set(NAFLAGS ${NAFLAGS} -DMSVC)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# This only works if building from the command line. There is currently no way
|
# 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.
|
# to set a variable's value based on the build type when using the MSVC IDE.
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug"
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug"
|
||||||
@@ -36,7 +32,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC_IDE)
|
if(MSVC_IDE)
|
||||||
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/$(OutDir)")
|
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||||
else()
|
else()
|
||||||
set(OBJDIR ${CMAKE_CURRENT_BINARY_DIR})
|
set(OBJDIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
;
|
;
|
||||||
%define SEG_TEXT .text align=16 public use64 class=CODE
|
%define SEG_TEXT .text align=16 public use64 class=CODE
|
||||||
%define SEG_CONST .rdata align=16 public use64 class=CONST
|
%define SEG_CONST .rdata align=16 public use64 class=CONST
|
||||||
%ifdef MSVC
|
|
||||||
%define EXTN(name) name ; foo() -> foo
|
%define EXTN(name) name ; foo() -> foo
|
||||||
%endif
|
|
||||||
|
|
||||||
%elifdef OBJ32 ; ----(nasm -fobj -DOBJ32 ...)----------
|
%elifdef OBJ32 ; ----(nasm -fobj -DOBJ32 ...)----------
|
||||||
; * Borland C++ (Win32)
|
; * Borland C++ (Win32)
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h,
|
|||||||
}
|
}
|
||||||
*size=yuvsize;
|
*size=yuvsize;
|
||||||
cinfo->next_scanline+=height;
|
cinfo->next_scanline+=height;
|
||||||
|
jpeg_abort_compress(&j->cinfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -315,11 +316,10 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h,
|
|||||||
jpeg_write_scanlines(&j->cinfo, &row_pointer[j->cinfo.next_scanline],
|
jpeg_write_scanlines(&j->cinfo, &row_pointer[j->cinfo.next_scanline],
|
||||||
j->cinfo.image_height-j->cinfo.next_scanline);
|
j->cinfo.image_height-j->cinfo.next_scanline);
|
||||||
}
|
}
|
||||||
}
|
jpeg_finish_compress(&j->cinfo);
|
||||||
jpeg_finish_compress(&j->cinfo);
|
|
||||||
if(!(flags&TJ_YUV))
|
|
||||||
*size=TJBUFSIZE(j->cinfo.image_width, j->cinfo.image_height)
|
*size=TJBUFSIZE(j->cinfo.image_width, j->cinfo.image_height)
|
||||||
-(unsigned long)(j->jdms.free_in_buffer);
|
-(unsigned long)(j->jdms.free_in_buffer);
|
||||||
|
}
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
if(j->cinfo.global_state>CSTATE_START) jpeg_abort_compress(&j->cinfo);
|
if(j->cinfo.global_state>CSTATE_START) jpeg_abort_compress(&j->cinfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user