Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-gall committed Jul 5, 2011
1 parent ca48cf7 commit 0c0e874
Show file tree
Hide file tree
Showing 32 changed files with 293 additions and 237 deletions.
22 changes: 13 additions & 9 deletions BUILDING.txt
Expand Up @@ -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

Expand Down
35 changes: 16 additions & 19 deletions CMakeLists.txt
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down
38 changes: 37 additions & 1 deletion 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
=====

Expand All @@ -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.)
Expand Down
33 changes: 19 additions & 14 deletions Makefile.am
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 0c0e874

Please sign in to comment.