diff -Nru libjpeg-turbo-1.1.90+svn733/BUILDING.txt libjpeg-turbo-1.2.1+svn823/BUILDING.txt --- libjpeg-turbo-1.1.90+svn733/BUILDING.txt 2011-12-15 13:12:59.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/BUILDING.txt 2012-04-18 21:45:07.000000000 +0000 @@ -107,14 +107,14 @@ 62, 7, or 8. -libjpeg v7 or v8 Emulation --------------------------- +libjpeg v7 or v8 API/ABI Emulation +---------------------------------- Add --with-jpeg7 to the configure command line to build a version of -libjpeg-turbo that is compatible with libjpeg v7. Add --with-jpeg8 to the -configure command to build a version of libjpeg-turbo that is compatible with -libjpeg v8. See README-turbo.txt for more information on libjpeg v7 and v8 -emulation. +libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add --with-jpeg8 to +the configure command to build a version of libjpeg-turbo that is +API/ABI-compatible with libjpeg v8. See README-turbo.txt for more information +on libjpeg v7 and v8 emulation. Arithmetic Coding Support @@ -258,8 +258,8 @@ installed. -Sun Studio ----------- +Oracle Solaris Studio +--------------------- Add @@ -268,7 +268,7 @@ to the configure command line. libjpeg-turbo will automatically be built with the maximum optimization level (-xO5) unless you override CFLAGS. -To build a 64-bit version of libjpeg-turbo using Sun Studio, add +To build a 64-bit version of libjpeg-turbo using Oracle Solaris Studio, add --host x86_64-pc-solaris CC=cc CFLAGS='-xO5 -m64' LDFLAGS=-m64 @@ -492,14 +492,14 @@ NMake.) -libjpeg v7 or v8 Emulation --------------------------- +libjpeg v7 or v8 API/ABI Emulation +----------------------------------- Add "-DWITH_JPEG7=1" to the cmake command line to build a version of -libjpeg-turbo that is compatible with libjpeg v7. Add "-DWITH_JPEG8=1" to the -cmake command to build a version of libjpeg-turbo that is compatible with -libjpeg v8. See README-turbo.txt for more information on libjpeg v7 and v8 -emulation. +libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add "-DWITH_JPEG8=1" +to the cmake command to build a version of libjpeg-turbo that is +API/ABI-compatible with libjpeg v8. See README-turbo.txt for more information +on libjpeg v7 and v8 emulation. Arithmetic Coding Support @@ -644,13 +644,32 @@ make udmg [BUILDDIR32={32-bit build directory}] - On 64-bit OS X systems, this creates a version of the Macintosh package and - disk image that contains universal i386/x86-64 binaries. You should first - configure a 32-bit out-of-tree build of libjpeg-turbo, then configure a - 64-bit out-of-tree build, then run 'make udmg' from the 64-bit build - directory. The build system will look for the 32-bit build under - {source_directory}/osxx86 by default, but you can override this by setting - the BUILDDIR32 variable on the make command line as shown above. + On 64-bit OS X systems, this creates a Macintosh package and disk image that + contains universal i386/x86-64 binaries. You should first configure a 32-bit + out-of-tree build of libjpeg-turbo, then configure a 64-bit out-of-tree + build, then run 'make udmg' from the 64-bit build directory. The build + system will look for the 32-bit build under {source_directory}/osxx86 by + default, but you can override this by setting the BUILDDIR32 variable on the + make command line as shown above. + +make iosdmg [BUILDDIR32={32-bit build directory}] \ + [BUILDDIRARMV6={ARM v6 build directory}] \ + [BUILDDIRARMV7={ARM v7 build directory}] \ + + On OS X systems, this creates a Macintosh package and disk image in which the + libjpeg-turbo static libraries contain ARM architectures necessary to build + iOS applications. If building on an x86-64 system, the binaries will also + contain the i386 architecture, as with 'make udmg' above. You should first + configure ARM v6 and ARM v7 out-of-tree builds of libjpeg-turbo (see + "Building libjpeg-turbo for iOS" above.) If you are building an x86-64 + version of libjpeg-turbo, you should configure a 32-bit out-of-tree build as + well. Next, build libjpeg-turbo as you would normally, using an out-of-tree + build. When it is built, run 'make iosdmg' from the build directory. The + build system will look for the ARM v6 build under {source_directory}/iosarmv6 + by default, the ARM v7 build under {source_directory}/iosarmv7 by default, + and (if applicable) the 32-bit build under {source_directory}/osxx86 by + default, but you can override this by setting the BUILDDIR32, BUILDDIRARMV6, + and/or BUILDDIRARMV7 variables on the make command line as shown above. make sunpkg @@ -694,3 +713,30 @@ Building a Windows installer requires the Nullsoft Install System (http://nsis.sourceforge.net/.) makensis.exe should be in your PATH. + + +******************************************************************************* +** Regression testing +******************************************************************************* + +The most common way to test libjpeg-turbo is by invoking 'make test' on +Unix/Linux platforms or 'ctest' on Windows platforms, once the build has +completed. This runs a series of tests to ensure that mathematical +compatibility has been maintained between libjpeg-turbo and libjpeg v6b. This +also invokes the TurboJPEG unit tests, which ensure that the colorspace +extensions, YUV encoding, decompression scaling, and other features of the +TurboJPEG C and Java APIs are working properly (and, by extension, that the +equivalent features of the underlying libjpeg API are also working.) + +Invoking 'make testclean' or 'nmake testclean' (if using NMake) or building +the 'testclean' target (if using the Visual Studio IDE) will clean up the +output images generated by 'make test'. + +On Unix/Linux platforms, more extensive tests of the TurboJPEG/OSS C and Java +wrappers can be run by invoking 'make tjtest'. These extended TurboJPEG tests +essentially iterate through all of the available features of the TurboJPEG APIs +that are not covered by the TurboJPEG unit tests (this includes the lossless +transform options) and compare the images generated by each feature to images +generated using the equivalent feature in the libjpeg API. The extended +TurboJPEG tests are meant to test for regressions in the TurboJPEG wrappers, +not in the underlying libjpeg-turbo library. diff -Nru libjpeg-turbo-1.1.90+svn733/CMakeLists.txt libjpeg-turbo-1.2.1+svn823/CMakeLists.txt --- libjpeg-turbo-1.1.90+svn733/CMakeLists.txt 2011-11-29 08:53:32.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/CMakeLists.txt 2012-04-18 21:45:07.000000000 +0000 @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 2.6) project(libjpeg-turbo C) -set(VERSION 1.2.0) +set(VERSION 1.2.1) if(MINGW OR CYGWIN) execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE BUILD) @@ -252,122 +252,122 @@ add_test(tjunittest tjunittest) add_test(tjunittest-alloc tjunittest -alloc) add_test(tjunittest-yuv tjunittest -yuv) -add_test(cjpeg-int sharedlib/cjpeg -dct int -outfile testoutint.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutint.jpg) -add_test(cjpeg-fast sharedlib/cjpeg -dct fast -opt -outfile testoutfst.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst.jpg testoutfst.jpg) -add_test(cjpeg-fast-100 sharedlib/cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-fast-100-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst100.jpg testoutfst100.jpg) -add_test(cjpeg-float sharedlib/cjpeg -dct float -outfile testoutflt.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) +add_test(cjpeg-int sharedlib/cjpeg -dct int -outfile testoutint.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testoutint.jpg) +add_test(cjpeg-fast sharedlib/cjpeg -dct fast -opt -outfile testoutfst.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst.jpg testoutfst.jpg) +add_test(cjpeg-fast-100 sharedlib/cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-fast-100-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst100.jpg testoutfst100.jpg) +add_test(cjpeg-float sharedlib/cjpeg -dct float -outfile testoutflt.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) if(WITH_SIMD) -add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt.jpg testoutflt.jpg) +add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt.jpg testoutflt.jpg) else() -add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt-nosimd.jpg testoutflt.jpg) +add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt-nosimd.jpg testoutflt.jpg) endif() -add_test(cjpeg-int-gray sharedlib/cjpeg -dct int -grayscale -outfile testoutgray.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-int-gray-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimggray.jpg testoutgray.jpg) -add_test(djpeg-int sharedlib/djpeg -dct int -fast -ppm -outfile testoutint.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.ppm testoutint.ppm) -add_test(djpeg-fast sharedlib/djpeg -dct fast -ppm -outfile testoutfst.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst.ppm testoutfst.ppm) -add_test(djpeg-float sharedlib/djpeg -dct float -ppm -outfile testoutflt.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) +add_test(cjpeg-int-gray sharedlib/cjpeg -dct int -grayscale -outfile testoutgray.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-int-gray-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimggray.jpg testoutgray.jpg) +add_test(djpeg-int sharedlib/djpeg -dct int -fast -ppm -outfile testoutint.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.ppm testoutint.ppm) +add_test(djpeg-fast sharedlib/djpeg -dct fast -ppm -outfile testoutfst.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst.ppm testoutfst.ppm) +add_test(djpeg-float sharedlib/djpeg -dct float -ppm -outfile testoutflt.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) if(WITH_SIMD) -add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt.ppm testoutflt.ppm) +add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt.ppm testoutflt.ppm) else() -add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testorig.ppm testoutflt.ppm) +add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm testoutflt.ppm) endif() -add_test(djpeg-int-1_2 sharedlib/djpeg -dct int -scale 1/2 -ppm -outfile testoutint1_2.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-int-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint1_2.ppm testoutint1_2.ppm) -add_test(djpeg-fast-1_2 sharedlib/djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-fast-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst1_2.ppm testoutfst1_2.ppm) -add_test(djpeg-int-1_4 sharedlib/djpeg -dct int -scale 1/4 -ppm -outfile testoutint1_4.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-int-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint1_4.ppm testoutint1_4.ppm) -add_test(djpeg-fast-1_4 sharedlib/djpeg -dct fast -scale 1/4 -ppm -outfile testoutfst1_4.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-fast-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst1_4.ppm testoutfst1_4.ppm) -add_test(djpeg-int-1_8 sharedlib/djpeg -dct int -scale 1/8 -ppm -outfile testoutint1_8.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-int-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint1_8.ppm testoutint1_8.ppm) -add_test(djpeg-fast-1_8 sharedlib/djpeg -dct fast -scale 1/8 -ppm -outfile testoutfst1_8.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-fast-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst1_8.ppm testoutfst1_8.ppm) -add_test(djpeg-256 sharedlib/djpeg -dct int -bmp -colors 256 -outfile testout.bmp ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-256-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimg.bmp testout.bmp) -add_test(cjpeg-prog sharedlib/cjpeg -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgp.jpg testoutp.jpg) +add_test(djpeg-int-1_2 sharedlib/djpeg -dct int -scale 1/2 -ppm -outfile testoutint1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-int-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_2.ppm testoutint1_2.ppm) +add_test(djpeg-fast-1_2 sharedlib/djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-fast-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_2.ppm testoutfst1_2.ppm) +add_test(djpeg-int-1_4 sharedlib/djpeg -dct int -scale 1/4 -ppm -outfile testoutint1_4.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-int-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_4.ppm testoutint1_4.ppm) +add_test(djpeg-fast-1_4 sharedlib/djpeg -dct fast -scale 1/4 -ppm -outfile testoutfst1_4.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-fast-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_4.ppm testoutfst1_4.ppm) +add_test(djpeg-int-1_8 sharedlib/djpeg -dct int -scale 1/8 -ppm -outfile testoutint1_8.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-int-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_8.ppm testoutint1_8.ppm) +add_test(djpeg-fast-1_8 sharedlib/djpeg -dct fast -scale 1/8 -ppm -outfile testoutfst1_8.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-fast-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_8.ppm testoutfst1_8.ppm) +add_test(djpeg-256 sharedlib/djpeg -dct int -bmp -colors 256 -outfile testout.bmp ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-256-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimg.bmp testout.bmp) +add_test(cjpeg-prog sharedlib/cjpeg -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgp.jpg testoutp.jpg) add_test(jpegtran-prog sharedlib/jpegtran -outfile testoutt.jpg testoutp.jpg) -add_test(jpegtran-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutt.jpg) +add_test(jpegtran-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testoutt.jpg) if(WITH_ARITH_ENC) -add_test(cjpeg-ari sharedlib/cjpeg -dct int -arithmetic -outfile testoutari.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-ari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgari.jpg testoutari.jpg) -add_test(jpegtran-toari sharedlib/jpegtran -arithmetic -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimgint.jpg) -add_test(jpegtran-toari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgari.jpg testouta.jpg) +add_test(cjpeg-ari sharedlib/cjpeg -dct int -arithmetic -outfile testoutari.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-ari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg testoutari.jpg) +add_test(jpegtran-toari sharedlib/jpegtran -arithmetic -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg) +add_test(jpegtran-toari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg testouta.jpg) endif() if(WITH_ARITH_DEC) -add_test(djpeg-ari sharedlib/djpeg -dct int -fast -ppm -outfile testoutari.ppm ${CMAKE_SOURCE_DIR}/testimgari.jpg) -add_test(djpeg-ari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgari.ppm testoutari.ppm) -add_test(jpegtran-fromari sharedlib/jpegtran -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimgari.jpg) -add_test(jpegtran-fromari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testouta.jpg) +add_test(djpeg-ari sharedlib/djpeg -dct int -fast -ppm -outfile testoutari.ppm ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg) +add_test(djpeg-ari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.ppm testoutari.ppm) +add_test(jpegtran-fromari sharedlib/jpegtran -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg) +add_test(jpegtran-fromari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testouta.jpg) endif() -add_test(jpegtran-crop sharedlib/jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(jpegtran-crop-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgcrop.jpg testoutcrop.jpg) +add_test(jpegtran-crop sharedlib/jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(jpegtran-crop-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgcrop.jpg testoutcrop.jpg) add_test(tjunittest-static tjunittest-static) add_test(tjunittest-static-alloc tjunittest-static -alloc) add_test(tjunittest-static-yuv tjunittest-static -yuv) -add_test(cjpeg-static-int cjpeg-static -dct int -outfile testoutint.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-static-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutint.jpg) -add_test(cjpeg-static-fast cjpeg-static -dct fast -opt -outfile testoutfst.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-static-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst.jpg testoutfst.jpg) -add_test(cjpeg-static-fast-100 cjpeg-static -dct fast -quality 100 -opt -outfile testoutfst100.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-static-fast-100-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst100.jpg testoutfst100.jpg) -add_test(cjpeg-static-float cjpeg-static -dct float -outfile testoutflt.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) +add_test(cjpeg-static-int cjpeg-static -dct int -outfile testoutint.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-static-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testoutint.jpg) +add_test(cjpeg-static-fast cjpeg-static -dct fast -opt -outfile testoutfst.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-static-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst.jpg testoutfst.jpg) +add_test(cjpeg-static-fast-100 cjpeg-static -dct fast -quality 100 -opt -outfile testoutfst100.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-static-fast-100-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst100.jpg testoutfst100.jpg) +add_test(cjpeg-static-float cjpeg-static -dct float -outfile testoutflt.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) if(WITH_SIMD) -add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt.jpg testoutflt.jpg) +add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt.jpg testoutflt.jpg) else() -add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt-nosimd.jpg testoutflt.jpg) +add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt-nosimd.jpg testoutflt.jpg) endif() -add_test(cjpeg-static-int-gray cjpeg-static -dct int -grayscale -outfile testoutgray.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-static-int-gray-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimggray.jpg testoutgray.jpg) -add_test(djpeg-static-int djpeg-static -dct int -fast -ppm -outfile testoutint.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.ppm testoutint.ppm) -add_test(djpeg-static-fast djpeg-static -dct fast -ppm -outfile testoutfst.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst.ppm testoutfst.ppm) -add_test(djpeg-static-float djpeg-static -dct float -ppm -outfile testoutflt.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) +add_test(cjpeg-static-int-gray cjpeg-static -dct int -grayscale -outfile testoutgray.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-static-int-gray-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimggray.jpg testoutgray.jpg) +add_test(djpeg-static-int djpeg-static -dct int -fast -ppm -outfile testoutint.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.ppm testoutint.ppm) +add_test(djpeg-static-fast djpeg-static -dct fast -ppm -outfile testoutfst.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst.ppm testoutfst.ppm) +add_test(djpeg-static-float djpeg-static -dct float -ppm -outfile testoutflt.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) if(WITH_SIMD) -add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt.ppm testoutflt.ppm) +add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt.ppm testoutflt.ppm) else() -add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testorig.ppm testoutflt.ppm) +add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm testoutflt.ppm) endif() -add_test(djpeg-static-int-1_2 djpeg-static -dct int -scale 1/2 -ppm -outfile testoutint1_2.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-int-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint1_2.ppm testoutint1_2.ppm) -add_test(djpeg-static-fast-1_2 djpeg-static -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-fast-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst1_2.ppm testoutfst1_2.ppm) -add_test(djpeg-static-int-1_4 djpeg-static -dct int -scale 1/4 -ppm -outfile testoutint1_4.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-int-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint1_4.ppm testoutint1_4.ppm) -add_test(djpeg-static-fast-1_4 djpeg-static -dct fast -scale 1/4 -ppm -outfile testoutfst1_4.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-fast-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst1_4.ppm testoutfst1_4.ppm) -add_test(djpeg-static-int-1_8 djpeg-static -dct int -scale 1/8 -ppm -outfile testoutint1_8.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-int-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint1_8.ppm testoutint1_8.ppm) -add_test(djpeg-static-fast-1_8 djpeg-static -dct fast -scale 1/8 -ppm -outfile testoutfst1_8.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-fast-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst1_8.ppm testoutfst1_8.ppm) -add_test(djpeg-static-256 djpeg-static -dct int -bmp -colors 256 -outfile testout.bmp ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(djpeg-static-256-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimg.bmp testout.bmp) -add_test(cjpeg-static-prog cjpeg-static -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-static-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgp.jpg testoutp.jpg) +add_test(djpeg-static-int-1_2 djpeg-static -dct int -scale 1/2 -ppm -outfile testoutint1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-int-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_2.ppm testoutint1_2.ppm) +add_test(djpeg-static-fast-1_2 djpeg-static -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-fast-1_2-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_2.ppm testoutfst1_2.ppm) +add_test(djpeg-static-int-1_4 djpeg-static -dct int -scale 1/4 -ppm -outfile testoutint1_4.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-int-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_4.ppm testoutint1_4.ppm) +add_test(djpeg-static-fast-1_4 djpeg-static -dct fast -scale 1/4 -ppm -outfile testoutfst1_4.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-fast-1_4-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_4.ppm testoutfst1_4.ppm) +add_test(djpeg-static-int-1_8 djpeg-static -dct int -scale 1/8 -ppm -outfile testoutint1_8.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-int-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint1_8.ppm testoutint1_8.ppm) +add_test(djpeg-static-fast-1_8 djpeg-static -dct fast -scale 1/8 -ppm -outfile testoutfst1_8.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-fast-1_8-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_8.ppm testoutfst1_8.ppm) +add_test(djpeg-static-256 djpeg-static -dct int -bmp -colors 256 -outfile testout.bmp ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(djpeg-static-256-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimg.bmp testout.bmp) +add_test(cjpeg-static-prog cjpeg-static -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-static-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgp.jpg testoutp.jpg) add_test(jpegtran-static-prog jpegtran-static -outfile testoutt.jpg testoutp.jpg) -add_test(jpegtran-static-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutt.jpg) +add_test(jpegtran-static-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testoutt.jpg) if(WITH_ARITH_ENC) -add_test(cjpeg-static-ari cjpeg-static -dct int -arithmetic -outfile testoutari.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm) -add_test(cjpeg-static-ari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgari.jpg testoutari.jpg) -add_test(jpegtran-static-toari jpegtran-static -arithmetic -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimgint.jpg) -add_test(jpegtran-static-toari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgari.jpg testouta.jpg) +add_test(cjpeg-static-ari cjpeg-static -dct int -arithmetic -outfile testoutari.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm) +add_test(cjpeg-static-ari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg testoutari.jpg) +add_test(jpegtran-static-toari jpegtran-static -arithmetic -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg) +add_test(jpegtran-static-toari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg testouta.jpg) endif() if(WITH_ARITH_DEC) -add_test(djpeg-static-ari djpeg-static -dct int -fast -ppm -outfile testoutari.ppm ${CMAKE_SOURCE_DIR}/testimgari.jpg) -add_test(djpeg-static-ari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgari.ppm testoutari.ppm) -add_test(jpegtran-static-fromari jpegtran-static -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimgari.jpg) -add_test(jpegtran-static-fromari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testouta.jpg) +add_test(djpeg-static-ari djpeg-static -dct int -fast -ppm -outfile testoutari.ppm ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg) +add_test(djpeg-static-ari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.ppm testoutari.ppm) +add_test(jpegtran-static-fromari jpegtran-static -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg) +add_test(jpegtran-static-fromari-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testouta.jpg) endif() -add_test(jpegtran-static-crop jpegtran-static -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg ${CMAKE_SOURCE_DIR}/testorig.jpg) -add_test(jpegtran-static-crop-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgcrop.jpg testoutcrop.jpg) +add_test(jpegtran-static-crop jpegtran-static -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) +add_test(jpegtran-static-crop-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgcrop.jpg testoutcrop.jpg) add_custom_target(testclean COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmakescripts/testclean.cmake) @@ -419,9 +419,10 @@ RUNTIME DESTINATION bin ) -install(FILES ${CMAKE_SOURCE_DIR}/LGPL.txt ${CMAKE_SOURCE_DIR}/LICENSE.txt - ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/README-turbo.txt - ${CMAKE_SOURCE_DIR}/libjpeg.txt ${CMAKE_SOURCE_DIR}/usage.txt +install(FILES ${CMAKE_SOURCE_DIR}/README ${CMAKE_SOURCE_DIR}/README-turbo.txt + ${CMAKE_SOURCE_DIR}/example.c ${CMAKE_SOURCE_DIR}/libjpeg.txt + ${CMAKE_SOURCE_DIR}/structure.txt ${CMAKE_SOURCE_DIR}/usage.txt + ${CMAKE_SOURCE_DIR}/wizard.txt DESTINATION doc) install(FILES ${CMAKE_BINARY_DIR}/jconfig.h ${CMAKE_SOURCE_DIR}/jerror.h diff -Nru libjpeg-turbo-1.1.90+svn733/ChangeLog.txt libjpeg-turbo-1.2.1+svn823/ChangeLog.txt --- libjpeg-turbo-1.1.90+svn733/ChangeLog.txt 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/ChangeLog.txt 2012-04-18 21:45:07.000000000 +0000 @@ -1,3 +1,17 @@ +1.2.1 +===== + +[1] Creating or decoding a JPEG file that uses the RGB colorspace should now +properly work when the input or output colorspace is one of the libjpeg-turbo +colorspace extensions. + +[2] When libjpeg-turbo was built without SIMD support and merged (non-fancy) +upsampling was used along with an alpha-enabled colorspace during +decompression, the unused byte of the decompressed pixels was not being set to +0xFF. This has been fixed. TJUnitTest has also been extended to test for the +correct behavior of the colorspace extensions when merged upsampling is used. + + 1.2.0 ===== @@ -19,6 +33,20 @@ when decompressing to a 4-component RGB buffer, the unused byte should be set to 0xFF so that it can be interpreted as an opaque alpha channel. +[5] Fixed regression issue whereby DevIL failed to build against libjpeg-turbo +because libjpeg-turbo's distributed version of jconfig.h contained an INLINE +macro, which conflicted with a similar macro in DevIL. This macro is used only +internally when building libjpeg-turbo, so it was moved into config.h. + +[6] libjpeg-turbo will now correctly decompress erroneous CMYK/YCCK JPEGs whose +K component is assigned a component ID of 1 instead of 4. Although these files +are in violation of the spec, other JPEG implementations handle them +correctly. + +[7] Added ARM v6 and ARM v7 architectures to libjpeg.a and libturbojpeg.a in +the official OS X distribution package, so that those libraries can be used to +build both OS X and iOS applications. + 1.1.90 (1.2 beta1) ================== @@ -170,7 +198,8 @@ [2] Created a new CMake-based build system for the Visual C++ and MinGW builds. -[3] TurboJPEG/OSS can now compress from/decompress to grayscale bitmaps. +[3] Grayscale bitmaps can now be compressed from/decompressed to using the +TurboJPEG API. [4] jpgtest can now be used to test decompression performance with existing JPEG images. @@ -186,11 +215,12 @@ [7] Added arithmetic encoding and decoding support (can be disabled with configure or CMake options) -[8] Added a TJ_YUV flag to TurboJPEG/OSS which causes both the compressor and -decompressor to output planar YUV images. +[8] Added a TJ_YUV flag to the TurboJPEG API, which causes both the compressor +and decompressor to output planar YUV images. -[9] Added an extended version of tjDecompressHeader() to TurboJPEG/OSS which -allows the caller to determine the type of subsampling used in a JPEG image. +[9] Added an extended version of tjDecompressHeader() to the TurboJPEG API, +which allows the caller to determine the type of subsampling used in a JPEG +image. [10] Added further protections against invalid Huffman codes. @@ -202,7 +232,7 @@ from a corrupt JPEG image.) Previously, these would cause libjpeg-turbo to crash under certain circumstances. -[2] Fixed typo in SIMD dispatch routines which was causing 4:2:2 upsampling to +[2] Fixed typo in SIMD dispatch routines that was causing 4:2:2 upsampling to be used instead of 4:2:0 when decompressing JPEG images using SSE2 code. [3] configure script will now automatically determine whether the @@ -223,7 +253,7 @@ [3] The Unix/Linux distribution packages now include the libjpeg run-time programs (cjpeg, etc.) and man pages. -[4] Created a 32-bit supplementary package for amd64 Debian systems which +[4] Created a 32-bit supplementary package for amd64 Debian systems, which contains just the 32-bit libjpeg-turbo libraries. [5] Moved the libraries from */lib32 to */lib in the i386 Debian package. diff -Nru libjpeg-turbo-1.1.90+svn733/Makefile.am libjpeg-turbo-1.2.1+svn823/Makefile.am --- libjpeg-turbo-1.1.90+svn733/Makefile.am 2011-12-19 15:01:55.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/Makefile.am 2012-04-18 21:45:07.000000000 +0000 @@ -120,19 +120,18 @@ dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 -DOCS= README install.txt usage.txt wizard.txt example.c libjpeg.txt \ - structure.txt coderules.txt filelist.txt jconfig.txt change.log \ - README-turbo.txt rdrle.c wrrle.c BUILDING.txt ChangeLog.txt - -TESTFILES= testorig.jpg testorig.ppm testimg.bmp testimgflt.jpg \ - testimgfst.jpg testimgint.jpg testimgp.jpg testimgflt.ppm testimgfst.ppm \ - testimgint.ppm testimgflt-nosimd.jpg testimgcrop.jpg testimgari.jpg \ - testimgari.ppm testimgfst100.jpg testimggray.jpg testimgfst1_2.ppm \ - testimgfst1_4.ppm testimgfst1_8.ppm testimgint1_2.ppm testimgint1_4.ppm \ - testimgint1_8.ppm +DOCS= install.txt coderules.txt filelist.txt jconfig.txt change.log \ + rdrle.c wrrle.c BUILDING.txt ChangeLog.txt +docdir = $(datadir)/doc +dist_doc_DATA = README README-turbo.txt libjpeg.txt structure.txt usage.txt \ + wizard.txt -EXTRA_DIST = win release $(DOCS) $(TESTFILES) CMakeLists.txt \ +exampledir = $(datadir)/doc +dist_example_DATA = example.c + + +EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \ sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \ jccolext.c jdcolext.c jdmrgext.c @@ -150,62 +149,62 @@ ./tjunittest ./tjunittest -alloc ./tjunittest -yuv - ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testorig.ppm - cmp $(srcdir)/testimgint.jpg testoutint.jpg - ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testorig.ppm - cmp $(srcdir)/testimgfst.jpg testoutfst.jpg - ./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testorig.ppm - cmp $(srcdir)/testimgfst100.jpg testoutfst100.jpg - ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testorig.ppm + ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testimages/testorig.ppm + cmp $(srcdir)/testimages/testimgint.jpg testoutint.jpg + ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testimages/testorig.ppm + cmp $(srcdir)/testimages/testimgfst.jpg testoutfst.jpg + ./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testimages/testorig.ppm + cmp $(srcdir)/testimages/testimgfst100.jpg testoutfst100.jpg + ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testimages/testorig.ppm if WITH_SSE_FLOAT_DCT - cmp $(srcdir)/testimgflt.jpg testoutflt.jpg + cmp $(srcdir)/testimages/testimgflt.jpg testoutflt.jpg else - cmp $(srcdir)/testimgflt-nosimd.jpg testoutflt.jpg + cmp $(srcdir)/testimages/testimgflt-nosimd.jpg testoutflt.jpg endif - ./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testorig.ppm - cmp $(srcdir)/testimggray.jpg testoutgray.jpg - ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgint.ppm testoutint.ppm - ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgfst.ppm testoutfst.ppm - ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testorig.jpg + ./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testimages/testorig.ppm + cmp $(srcdir)/testimages/testimggray.jpg testoutgray.jpg + ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgint.ppm testoutint.ppm + ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgfst.ppm testoutfst.ppm + ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testimages/testorig.jpg if WITH_SSE_FLOAT_DCT - cmp $(srcdir)/testimgflt.ppm testoutflt.ppm + cmp $(srcdir)/testimages/testimgflt.ppm testoutflt.ppm else - cmp $(srcdir)/testorig.ppm testoutflt.ppm + cmp $(srcdir)/testimages/testorig.ppm testoutflt.ppm endif - ./djpeg -dct int -scale 1/2 -ppm -outfile testoutint1_2.ppm $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgint1_2.ppm testoutint1_2.ppm - ./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgfst1_2.ppm testoutfst1_2.ppm - ./djpeg -dct int -scale 1/4 -ppm -outfile testoutint1_4.ppm $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgint1_4.ppm testoutint1_4.ppm - ./djpeg -dct fast -scale 1/4 -ppm -outfile testoutfst1_4.ppm $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgfst1_4.ppm testoutfst1_4.ppm - ./djpeg -dct int -scale 1/8 -ppm -outfile testoutint1_8.ppm $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgint1_8.ppm testoutint1_8.ppm - ./djpeg -dct fast -scale 1/8 -ppm -outfile testoutfst1_8.ppm $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgfst1_8.ppm testoutfst1_8.ppm - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg - cmp $(srcdir)/testimg.bmp testout.bmp + ./djpeg -dct int -scale 1/2 -ppm -outfile testoutint1_2.ppm $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgint1_2.ppm testoutint1_2.ppm + ./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgfst1_2.ppm testoutfst1_2.ppm + ./djpeg -dct int -scale 1/4 -ppm -outfile testoutint1_4.ppm $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgint1_4.ppm testoutint1_4.ppm + ./djpeg -dct fast -scale 1/4 -ppm -outfile testoutfst1_4.ppm $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgfst1_4.ppm testoutfst1_4.ppm + ./djpeg -dct int -scale 1/8 -ppm -outfile testoutint1_8.ppm $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgint1_8.ppm testoutint1_8.ppm + ./djpeg -dct fast -scale 1/8 -ppm -outfile testoutfst1_8.ppm $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgfst1_8.ppm testoutfst1_8.ppm + ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimg.bmp testout.bmp if WITH_ARITH_ENC - ./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testorig.ppm - cmp $(srcdir)/testimgari.jpg testoutari.jpg - ./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimgint.jpg - cmp $(srcdir)/testimgari.jpg testouta.jpg + ./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testimages/testorig.ppm + cmp $(srcdir)/testimages/testimgari.jpg testoutari.jpg + ./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimages/testimgint.jpg + cmp $(srcdir)/testimages/testimgari.jpg testouta.jpg endif if WITH_ARITH_DEC - ./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimgari.jpg - cmp $(srcdir)/testimgari.ppm testoutari.ppm - ./jpegtran -outfile testouta.jpg $(srcdir)/testimgari.jpg - cmp $(srcdir)/testimgint.jpg testouta.jpg + ./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimages/testimgari.jpg + cmp $(srcdir)/testimages/testimgari.ppm testoutari.ppm + ./jpegtran -outfile testouta.jpg $(srcdir)/testimages/testimgari.jpg + cmp $(srcdir)/testimages/testimgint.jpg testouta.jpg endif - ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm - cmp $(srcdir)/testimgp.jpg testoutp.jpg + ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testimages/testorig.ppm + cmp $(srcdir)/testimages/testimgp.jpg testoutp.jpg ./jpegtran -outfile testoutt.jpg testoutp.jpg - cmp $(srcdir)/testimgint.jpg testoutt.jpg - ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testorig.jpg - cmp $(srcdir)/testimgcrop.jpg testoutcrop.jpg + cmp $(srcdir)/testimages/testimgint.jpg testoutt.jpg + ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testimages/testorig.jpg + cmp $(srcdir)/testimages/testimgcrop.jpg testoutcrop.jpg testclean: @@ -236,6 +235,14 @@ rm -f *_440_*.jpg rm -f *_440.yuv + +tjtest: + sh ./tjbenchtest +if WITH_JAVA + sh ./tjexampletest +endif + + if X86_64 install-exec-hook: @@ -266,7 +273,7 @@ ln -fs `pwd` $$TMPDIR/BUILD; \ rm -f ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \ rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \ - --define "_topdir $$TMPDIR" --define "_srcdir ${srcdir}" \ + --define "_topdir $$TMPDIR" \ --target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \ cp $$TMPDIR/RPMS/${RPMARCH}/${PACKAGE_NAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \ ${PACKAGE_NAME}-${VERSION}.${RPMARCH}.rpm; \ @@ -282,7 +289,7 @@ rm -f ${PACKAGE_NAME}-${VERSION}.src.rpm; \ cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \ cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \ - | sed s@%{_srcdir}/@@g | sed s/#--\>//g \ + | sed s/#--\>//g \ > $$TMPDIR/SPECS/libjpeg-turbo.spec; \ rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \ cp $$TMPDIR/SRPMS/${PACKAGE_NAME}-${VERSION}-${BUILD}.src.rpm \ @@ -295,7 +302,15 @@ if X86_64 udmg: all - sh pkgscripts/makemacpkg universal ${BUILDDIR32} + sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} + +iosdmg: all + sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} + +else + +iosdmg: all + sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} endif diff -Nru libjpeg-turbo-1.1.90+svn733/README libjpeg-turbo-1.2.1+svn823/README --- libjpeg-turbo-1.1.90+svn733/README 2011-12-15 13:12:59.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/README 2012-04-18 21:45:07.000000000 +0000 @@ -1,7 +1,8 @@ -libjpeg-turbo note: This file is mostly taken from the libjpeg v8b README -file, and it is included only for reference. Some parts of it may not apply to -libjpeg-turbo. Please see README-turbo.txt for information specific to the -turbo version. +libjpeg-turbo note: This file contains portions of the libjpeg v6b and v8 +README files, with additional wordsmithing by The libjpeg-turbo Project. +It is included only for reference, as some parts of it may not apply to +libjpeg-turbo. Please see README-turbo.txt for information specific to +libjpeg-turbo. The Independent JPEG Group's JPEG software @@ -256,8 +257,8 @@ The "official" archive site for this software is www.ijg.org. The most recent released version can always be found there in directory "files". This particular version will be archived as -http://www.ijg.org/files/jpegsrc.v8b.tar.gz, and in Windows-compatible -"zip" archive format as http://www.ijg.org/files/jpegsr8b.zip. +http://www.ijg.org/files/jpegsrc.v8d.tar.gz, and in Windows-compatible +"zip" archive format as http://www.ijg.org/files/jpegsr8d.zip. The JPEG FAQ (Frequently Asked Questions) article is a source of some general information about JPEG. @@ -286,4 +287,4 @@ TO DO ===== -Please send bug reports, offers of help, etc. to jpeg-info@uc.ag. +Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org. diff -Nru libjpeg-turbo-1.1.90+svn733/README-turbo.txt libjpeg-turbo-1.2.1+svn823/README-turbo.txt --- libjpeg-turbo-1.1.90+svn733/README-turbo.txt 2011-12-19 15:01:55.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/README-turbo.txt 2012-04-18 21:45:07.000000000 +0000 @@ -3,31 +3,31 @@ ******************************************************************************* libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, -SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86 -and x86-64 systems. On such systems, libjpeg-turbo is generally 2-4x as fast -as the unmodified version of libjpeg, all else being equal. +SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, +x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as +fast as the unmodified version of libjpeg, all else being equal. libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but the TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, including improved support for Mac OS X, 64-bit support, support for -32-bit and big endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman -encoding/decoding, and various bug fixes. The goal was to produce a fully open -source codec that could replace the partially closed source TurboJPEG/IPP codec -used by VirtualGL and TurboVNC. libjpeg-turbo generally performs in the range -of 80-120% of TurboJPEG/IPP. It is faster in some areas but slower in others. +32-bit and big-endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman +encoding/decoding, and various bug fixes. The goal was to produce a fully +open-source codec that could replace the partially closed-source TurboJPEG/IPP +codec used by VirtualGL and TurboVNC. libjpeg-turbo generally achieves 80-120% +of the performance of TurboJPEG/IPP. It is faster in some areas but slower in +others. In early 2010, libjpeg-turbo spun off into its own independent project, with the goal of making high-speed JPEG compression/decompression technology -available to a broader range of users and developers. The libjpeg-turbo shared -libraries can be used as drop-in replacements for libjpeg on most systems. +available to a broader range of users and developers. ******************************************************************************* ** License ******************************************************************************* -libjpeg-turbo is licensed under a non-restrictive, BSD-style license -(see README.) The TurboJPEG/OSS wrapper (both C and Java versions) and +Most of libjpeg-turbo inherits the non-restrictive, BSD-style license used by +libjpeg (see README.) The TurboJPEG/OSS wrapper (both C and Java versions) and associated test programs bear a similar license, which is reproduced below: Redistribution and use in source and binary forms, with or without @@ -62,16 +62,16 @@ libjpeg-turbo includes two APIs that can be used to compress and decompress JPEG images: - TurboJPEG/OSS: This API wraps libjpeg-turbo and provides an easy-to-use - interface for compressing and decompressing JPEG images in memory. It also - provides some features that would not be straightforward to implement using - the underlying libjpeg API, such as generating planar YUV images and - performing multiple simultaneous lossless transforms on an image. The Java - interface for libjpeg-turbo is written on top of TurboJPEG/OSS. - - libjpeg API: This is the industry standard API for compressing and - decompressing JPEG images. It is more difficult to use than TurboJPEG/OSS - but also more powerful. libjpeg-turbo is both API/ABI-compatible and + TurboJPEG API: This API provides an easy-to-use interface for compressing + and decompressing JPEG images in memory. It also provides some functionality + that would not be straightforward to achieve using the underlying libjpeg + API, such as generating planar YUV images and performing multiple + simultaneous lossless transforms on an image. The Java interface for + libjpeg-turbo is written on top of the TurboJPEG API. + + libjpeg API: This is the de facto industry-standard API for compressing and + decompressing JPEG images. It is more difficult to use than the TurboJPEG + API but also more powerful. libjpeg-turbo is both API/ABI-compatible and mathematically compatible with libjpeg v6b. It can also optionally be configured to be API/ABI-compatible with libjpeg v7 and v8 (see below.) @@ -101,13 +101,13 @@ architecture. System administrators can also replace the libjpeg sym links in /usr/{lib} with -links to the libjpeg dynamic library located in /opt/libjpeg-turbo/{lib}. This -will effectively accelerate every dynamically linked libjpeg application on the -system. +links to the libjpeg-turbo dynamic library located in /opt/libjpeg-turbo/{lib}. +This will effectively accelerate every application that uses the libjpeg +dynamic library on the system. The libjpeg-turbo SDK for Visual C++ installs the libjpeg-turbo DLL -(jpeg62.dll, jpeg7.dll, or jpeg8.dll, depending on whether libjpeg v6b, v7, or -v8 emulation is enabled) into c:\libjpeg-turbo[64]\bin, and the PATH +(jpeg62.dll, jpeg7.dll, or jpeg8.dll, depending on whether it was built with +libjpeg v6b, v7, or v8 emulation) into c:\libjpeg-turbo[64]\bin, and the PATH environment variable can be modified such that this directory is searched before any others that might contain a libjpeg DLL. However, if a libjpeg DLL exists in an application's install directory, then Windows will load this @@ -117,16 +117,16 @@ application's install directory to accelerate it. The version of the libjpeg-turbo DLL distributed in the libjpeg-turbo SDK for -Visual C++ requires the Visual C++ 2008 C run time DLL (msvcr90.dll). +Visual C++ requires the Visual C++ 2008 C run-time DLL (msvcr90.dll). msvcr90.dll ships with more recent versions of Windows, but users of older Windows releases can obtain it from the Visual C++ 2008 Redistributable Package, which is available as a free download from Microsoft's web site. -NOTE: Features of libjpeg that require passing a C run time structure, such +NOTE: Features of libjpeg that require passing a C run-time structure, such as a file handle, from an application to libjpeg will probably not work with the version of the libjpeg-turbo DLL distributed in the libjpeg-turbo SDK for Visual C++, unless the application is also built to use the Visual C++ 2008 C -run time DLL. In particular, this affects jpeg_stdio_dest() and +run-time DLL. In particular, this affects jpeg_stdio_dest() and jpeg_stdio_src(). Mac applications typically embed their own copies of the libjpeg dylib inside @@ -146,7 +146,7 @@ libjpeg-turbo is a drop-in replacement for the TurboJPEG/IPP SDK used by VirtualGL 2.1.x and TurboVNC 0.6 (and prior.) libjpeg-turbo contains a wrapper library (TurboJPEG/OSS) that emulates the TurboJPEG API using libjpeg-turbo -instead of the closed source Intel Performance Primitives. You can replace the +instead of the closed-source Intel Performance Primitives. You can replace the TurboJPEG/IPP package on Linux systems with the libjpeg-turbo package in order to make existing releases of VirtualGL 2.1.x and TurboVNC 0.x use the new codec at run time. Note that the 64-bit libjpeg-turbo packages contain only 64-bit @@ -157,7 +157,7 @@ You can also build the VirtualGL 2.1.x and TurboVNC 0.6 source code with the libjpeg-turbo SDK instead of TurboJPEG/IPP. It should work identically. libjpeg-turbo also includes static library versions of TurboJPEG/OSS, which -are used to build TurboVNC 1.0 and later. +are used to build VirtualGL 2.2 and TurboVNC 1.0 and later. ======================================== Using libjpeg-turbo in Your Own Programs @@ -256,24 +256,17 @@ libjpeg v7 and v8 API/ABI support ================================= -libjpeg v7 and v8 added new features to the API/ABI, and, unfortunately, the -compression and decompression structures were extended in a backward- -incompatible manner to accommodate these features. Thus, programs that are +With libjpeg v7 and v8, new features were added that necessitated extending the +compression and decompression structures. Unfortunately, due to the exposed +nature of those structures, extending them also necessitated breaking backward +ABI compatibility with previous libjpeg releases. Thus, programs that are built to use libjpeg v7 or v8 did not work with libjpeg-turbo, since it is based on the libjpeg v6b code base. Although libjpeg v7 and v8 are still not as widely used as v6b, enough programs (including a few Linux distros) have made the switch that it was desirable to provide support for the libjpeg v7/v8 -API/ABI in libjpeg-turbo. - -Some of the libjpeg v7 and v8 features -- DCT scaling, to name one -- involve -deep modifications to the code that cannot be accommodated by libjpeg-turbo -without either breaking compatibility with libjpeg v6b or producing an -unsupportable mess. In order to fully support libjpeg v8 with all of its -features, we would have to essentially port the SIMD extensions to the libjpeg -v8 code base and maintain two separate code trees. We are hesitant to do this -until/unless the newer libjpeg code bases garner more community support and -involvement and until/unless we have some notion of whether future libjpeg -releases will also be backward-incompatible. +API/ABI in libjpeg-turbo. Although libjpeg-turbo can now be configured as a +drop-in replacement for libjpeg v7 or v8, it should be noted that not all of +the features in libjpeg v7 and v8 are supported (see below.) By passing an argument of --with-jpeg7 or --with-jpeg8 to configure, or an argument of -DWITH_JPEG7=1 or -DWITH_JPEG8=1 to cmake, you can build a version @@ -312,6 +305,16 @@ -- libjpeg: DCT scaling in compressor cinfo.scale_num and cinfo.scale_denom are silently ignored. + There is no technical reason why DCT scaling cannot be supported, but + without the SmartScale extension (see below), it would only be able to + down-scale using ratios of 1/2, 8/15, 4/7, 8/13, 2/3, 8/11, 4/5, and 8/9, + which is of limited usefulness. + +-- libjpeg: SmartScale + cinfo.block_size is silently ignored. + SmartScale is an extension to the JPEG format that allows for DCT block + sizes other than 8x8. It would be difficult to support this feature while + retaining backward compatibility with libjpeg v6b. -- libjpeg: IDCT scaling extensions in decompressor libjpeg-turbo still supports IDCT scaling with scaling factors of 1/2, 1/4, @@ -319,9 +322,14 @@ -- libjpeg: Fancy downsampling in compressor cinfo.do_fancy_downsampling is silently ignored. + This requires the DCT scaling feature, which is not supported. -- jpegtran: Scaling - Seems to depend on the DCT scaling feature, which isn't supported. + This requires both the DCT scaling and SmartScale features, which are not + supported. + +-- Lossless RGB JPEG files + This requires the SmartScale feature, which is not supported. ******************************************************************************* @@ -333,12 +341,13 @@ =============== The optimized Huffman decoder in libjpeg-turbo does not handle restart markers -in a way that makes libjpeg happy, so it is necessary to use the slow Huffman -decoder when decompressing a JPEG image that has restart markers. This can -cause the decompression performance to drop by as much as 20%, but the -performance will still be much much greater than that of libjpeg v6b. Many -consumer packages, such as PhotoShop, use restart markers when generating JPEG -images, so images generated by those programs will experience this issue. +in a way that makes the rest of the libjpeg infrastructure happy, so it is +necessary to use the slow Huffman decoder when decompressing a JPEG image that +has restart markers. This can cause the decompression performance to drop by +as much as 20%, but the performance will still be much greater than that of +libjpeg. Many consumer packages, such as PhotoShop, use restart markers when +generating JPEG images, so images generated by those programs will experience +this issue. =============================================== Fast Integer Forward DCT at High Quality Levels diff -Nru libjpeg-turbo-1.1.90+svn733/cjpeg.1 libjpeg-turbo-1.2.1+svn823/cjpeg.1 --- libjpeg-turbo-1.1.90+svn733/cjpeg.1 2010-11-23 05:49:54.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/cjpeg.1 2012-04-18 21:45:07.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CJPEG 1 "11 October 2010" +.TH CJPEG 1 "31 January 2012" .SH NAME cjpeg \- compress an image file to a JPEG file .SH SYNOPSIS @@ -121,7 +121,7 @@ subsampling may be unacceptable. .PP The \fB-quality\fR option accepts a comma-separated list of parameters, which -respectively refer to the quality levels which should be assigned to the +respectively refer to the quality levels that should be assigned to the quantization table slots. If there are more q-table slots than parameters, then the last parameter is replicated. Thus, if only one quality parameter is given, this is used for both luminance and chrominance (slots 0 and 1, @@ -150,6 +150,12 @@ .PP Switches for advanced users: .TP +.B \-arithmetic +Use arithmetic coding. +.B Caution: +arithmetic coded JPEG is not yet widely implemented, so many decoders will be +unable to view an arithmetic coded JPEG file at all. +.TP .B \-dct int Use integer DCT method (default). .TP @@ -214,12 +220,6 @@ .PP Switches for wizards: .TP -.B \-arithmetic -Use arithmetic coding. -.B Caution: -arithmetic coded JPEG is not yet widely implemented, so many decoders will be -unable to view an arithmetic coded JPEG file at all. -.TP .B \-baseline Force baseline-compatible quantization tables to be generated. This clamps quantization values to 8 bits even at low quality settings. (This switch is diff -Nru libjpeg-turbo-1.1.90+svn733/cjpeg.c libjpeg-turbo-1.2.1+svn823/cjpeg.c --- libjpeg-turbo-1.1.90+svn733/cjpeg.c 2010-10-10 07:21:55.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/cjpeg.c 2012-04-18 21:45:07.000000000 +0000 @@ -164,6 +164,9 @@ fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n"); #endif fprintf(stderr, "Switches for advanced users:\n"); +#ifdef C_ARITH_CODING_SUPPORTED + fprintf(stderr, " -arithmetic Use arithmetic coding\n"); +#endif #ifdef DCT_ISLOW_SUPPORTED fprintf(stderr, " -dct int Use integer DCT method%s\n", (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); @@ -184,9 +187,6 @@ fprintf(stderr, " -outfile name Specify name for output file\n"); fprintf(stderr, " -verbose or -debug Emit debug output\n"); fprintf(stderr, "Switches for wizards:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif fprintf(stderr, " -baseline Force baseline quantization tables\n"); fprintf(stderr, " -qtables file Use quantization tables given in file\n"); fprintf(stderr, " -qslots N[,...] Set component quantization tables\n"); @@ -277,9 +277,9 @@ if (! printed_version) { fprintf(stderr, "%s version %s (build %s)\n", PACKAGE_NAME, VERSION, BUILD); - fprintf(stderr, "%s\n\n", LJTCOPYRIGHT); - fprintf(stderr, "Based on Independent JPEG Group's libjpeg, version %s\n%s\n\n", - JVERSION, JCOPYRIGHT); + fprintf(stderr, "%s\n\n", JCOPYRIGHT); + fprintf(stderr, "Emulating The Independent JPEG Group's libjpeg, version %s\n\n", + JVERSION); printed_version = TRUE; } cinfo->err->trace_level++; diff -Nru libjpeg-turbo-1.1.90+svn733/configure.ac libjpeg-turbo-1.2.1+svn823/configure.ac --- libjpeg-turbo-1.1.90+svn733/configure.ac 2011-12-18 16:29:35.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/configure.ac 2012-04-18 21:45:07.000000000 +0000 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.56]) -AC_INIT([libjpeg-turbo], [1.2.0]) +AC_INIT([libjpeg-turbo], [1.2.1]) BUILD=`date +%Y%m%d` AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2]) @@ -368,6 +368,8 @@ 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([tjbenchtest]) +AC_CONFIG_FILES([tjexampletest]) AC_CONFIG_FILES([libjpeg.map]) AC_CONFIG_FILES([Makefile simd/Makefile]) AC_CONFIG_FILES([java/Makefile]) diff -Nru libjpeg-turbo-1.1.90+svn733/debian/changelog libjpeg-turbo-1.2.1+svn823/debian/changelog --- libjpeg-turbo-1.1.90+svn733/debian/changelog 2012-01-13 11:17:21.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/debian/changelog 2012-04-18 21:45:07.000000000 +0000 @@ -1,3 +1,15 @@ +libjpeg-turbo (1.2.1+svn823-1ubuntu2) precise; urgency=low + + * update to stable release 1.2.1 r823 + + -- Tom Gall Wed, 04 Apr 2012 09:39:12 -0600 + +libjpeg-turbo (1.2-1ubuntu1) precise; urgency=low + + * update to stable release 1.2 + + -- Tom Gall Sun, 05 Feb 2012 12:41:02 -0600 + libjpeg-turbo (1.1.90+svn733-0ubuntu4) precise; urgency=low * Install jpegint.h in the -dev package. diff -Nru libjpeg-turbo-1.1.90+svn733/debian/patches/series libjpeg-turbo-1.2.1+svn823/debian/patches/series --- libjpeg-turbo-1.1.90+svn733/debian/patches/series 2011-12-01 17:11:59.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/debian/patches/series 2012-04-18 21:45:07.000000000 +0000 @@ -1,3 +1,3 @@ -FixLibraryStartup.patch +# FixLibraryStartup.patch tjunittest.patch add-copying-for-debian-dir.patch diff -Nru libjpeg-turbo-1.1.90+svn733/djpeg.c libjpeg-turbo-1.2.1+svn823/djpeg.c --- libjpeg-turbo-1.1.90+svn733/djpeg.c 2011-03-03 16:58:47.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/djpeg.c 2012-04-18 21:45:07.000000000 +0000 @@ -245,9 +245,9 @@ if (! printed_version) { fprintf(stderr, "%s version %s (build %s)\n", PACKAGE_NAME, VERSION, BUILD); - fprintf(stderr, "%s\n\n", LJTCOPYRIGHT); - fprintf(stderr, "Based on Independent JPEG Group's libjpeg, version %s\n%s\n\n", - JVERSION, JCOPYRIGHT); + fprintf(stderr, "%s\n\n", JCOPYRIGHT); + fprintf(stderr, "Emulating The Independent JPEG Group's libjpeg, version %s\n\n", + JVERSION); printed_version = TRUE; } cinfo->err->trace_level++; diff -Nru libjpeg-turbo-1.1.90+svn733/install.txt libjpeg-turbo-1.2.1+svn823/install.txt --- libjpeg-turbo-1.1.90+svn733/install.txt 2010-10-12 01:55:31.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/install.txt 2012-04-18 21:45:07.000000000 +0000 @@ -534,17 +534,17 @@ and experimenting with any optional optimizations such as loop unrolling. (Unfortunately, far too many compilers have optimizer bugs ... be prepared to back off if the code fails self-test.) If you do any experimentation along -these lines, please report the optimal settings to jpeg-info@uc.ag so we -can mention them in future releases. Be sure to specify your machine -and compiler version. +these lines, please report the optimal settings to jpeg-info@jpegclub.org so +we can mention them in future releases. Be sure to specify your machine and +compiler version. HINTS FOR SPECIFIC SYSTEMS ========================== We welcome reports on changes needed for systems not mentioned here. Submit -'em to jpeg-info@uc.ag. Also, if configure or ckconfig.c is wrong about how -to configure the JPEG software for your system, please let us know. +'em to jpeg-info@jpegclub.org. Also, if configure or ckconfig.c is wrong +about how to configure the JPEG software for your system, please let us know. Acorn RISC OS: diff -Nru libjpeg-turbo-1.1.90+svn733/java/TJUnitTest.java libjpeg-turbo-1.2.1+svn823/java/TJUnitTest.java --- libjpeg-turbo-1.1.90+svn733/java/TJUnitTest.java 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/java/TJUnitTest.java 2012-04-18 21:45:07.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C)2011 D. R. Commander. All Rights Reserved. + * Copyright (C)2011-2012 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -765,6 +765,9 @@ for(int pf : formats) { for(int i = 0; i < 2; i++) { int flags = 0; + if (subsamp == TJ.SAMP_422 || subsamp == TJ.SAMP_420 + || subsamp == TJ.SAMP_440) + flags |= TJ.FLAG_FASTUPSAMPLE; if(i == 1) { if(yuv == YUVDECODE) { tjc.close(); tjd.close(); return; @@ -850,20 +853,18 @@ if(doyuv) yuv = YUVENCODE; doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_444, testName); doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_444, testName); - if(doyuv) { - doTest(41, 35, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_422, - testName); - doTest(35, 39, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_422, - testName); - doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_420, - testName); - doTest(41, 35, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_420, - testName); - doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_440, - testName); - doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_440, - testName); - } + doTest(41, 35, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_422, + testName); + doTest(35, 39, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_422, + testName); + doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_420, + testName); + doTest(41, 35, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_420, + testName); + doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_440, + testName); + doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_440, + testName); doTest(35, 39, bi ? onlyGrayBI : onlyGray, TJ.SAMP_GRAY, testName); doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_GRAY, testName); diff -Nru libjpeg-turbo-1.1.90+svn733/jccolext.c libjpeg-turbo-1.2.1+svn823/jccolext.c --- libjpeg-turbo-1.1.90+svn733/jccolext.c 2011-09-07 06:31:00.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jccolext.c 2012-04-18 21:45:07.000000000 +0000 @@ -2,7 +2,7 @@ * jccolext.c * * Copyright (C) 1991-1996, Thomas G. Lane. - * Copyright (C) 2009-2011, D. R. Commander. + * Copyright (C) 2009-2012, 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. * @@ -112,3 +112,35 @@ } } } + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles extended RGB->plain RGB conversion + */ + +INLINE +LOCAL(void) +rgb_rgb_convert_internal (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + outptr0[col] = GETJSAMPLE(inptr[RGB_RED]); + outptr1[col] = GETJSAMPLE(inptr[RGB_GREEN]); + outptr2[col] = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + } + } +} diff -Nru libjpeg-turbo-1.1.90+svn733/jccolor.c libjpeg-turbo-1.2.1+svn823/jccolor.c --- libjpeg-turbo-1.1.90+svn733/jccolor.c 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jccolor.c 2012-04-18 21:45:07.000000000 +0000 @@ -3,7 +3,7 @@ * * Copyright (C) 1991-1996, Thomas G. Lane. * Copyright 2009 Pierre Ossman for Cendio AB - * Copyright (C) 2009-2011, D. R. Commander. + * Copyright (C) 2009-2012, 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. * @@ -14,6 +14,7 @@ #include "jinclude.h" #include "jpeglib.h" #include "jsimd.h" +#include "config.h" /* Private subobject */ @@ -95,6 +96,7 @@ #define RGB_PIXELSIZE EXT_RGB_PIXELSIZE #define rgb_ycc_convert_internal extrgb_ycc_convert_internal #define rgb_gray_convert_internal extrgb_gray_convert_internal +#define rgb_rgb_convert_internal extrgb_rgb_convert_internal #include "jccolext.c" #undef RGB_RED #undef RGB_GREEN @@ -102,6 +104,7 @@ #undef RGB_PIXELSIZE #undef rgb_ycc_convert_internal #undef rgb_gray_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_RGBX_RED #define RGB_GREEN EXT_RGBX_GREEN @@ -109,6 +112,7 @@ #define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE #define rgb_ycc_convert_internal extrgbx_ycc_convert_internal #define rgb_gray_convert_internal extrgbx_gray_convert_internal +#define rgb_rgb_convert_internal extrgbx_rgb_convert_internal #include "jccolext.c" #undef RGB_RED #undef RGB_GREEN @@ -116,6 +120,7 @@ #undef RGB_PIXELSIZE #undef rgb_ycc_convert_internal #undef rgb_gray_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_BGR_RED #define RGB_GREEN EXT_BGR_GREEN @@ -123,6 +128,7 @@ #define RGB_PIXELSIZE EXT_BGR_PIXELSIZE #define rgb_ycc_convert_internal extbgr_ycc_convert_internal #define rgb_gray_convert_internal extbgr_gray_convert_internal +#define rgb_rgb_convert_internal extbgr_rgb_convert_internal #include "jccolext.c" #undef RGB_RED #undef RGB_GREEN @@ -130,6 +136,7 @@ #undef RGB_PIXELSIZE #undef rgb_ycc_convert_internal #undef rgb_gray_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_BGRX_RED #define RGB_GREEN EXT_BGRX_GREEN @@ -137,6 +144,7 @@ #define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE #define rgb_ycc_convert_internal extbgrx_ycc_convert_internal #define rgb_gray_convert_internal extbgrx_gray_convert_internal +#define rgb_rgb_convert_internal extbgrx_rgb_convert_internal #include "jccolext.c" #undef RGB_RED #undef RGB_GREEN @@ -144,6 +152,7 @@ #undef RGB_PIXELSIZE #undef rgb_ycc_convert_internal #undef rgb_gray_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_XBGR_RED #define RGB_GREEN EXT_XBGR_GREEN @@ -151,6 +160,7 @@ #define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE #define rgb_ycc_convert_internal extxbgr_ycc_convert_internal #define rgb_gray_convert_internal extxbgr_gray_convert_internal +#define rgb_rgb_convert_internal extxbgr_rgb_convert_internal #include "jccolext.c" #undef RGB_RED #undef RGB_GREEN @@ -158,6 +168,7 @@ #undef RGB_PIXELSIZE #undef rgb_ycc_convert_internal #undef rgb_gray_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_XRGB_RED #define RGB_GREEN EXT_XRGB_GREEN @@ -165,6 +176,7 @@ #define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE #define rgb_ycc_convert_internal extxrgb_ycc_convert_internal #define rgb_gray_convert_internal extxrgb_gray_convert_internal +#define rgb_rgb_convert_internal extxrgb_rgb_convert_internal #include "jccolext.c" #undef RGB_RED #undef RGB_GREEN @@ -172,6 +184,7 @@ #undef RGB_PIXELSIZE #undef rgb_ycc_convert_internal #undef rgb_gray_convert_internal +#undef rgb_rgb_convert_internal /* @@ -306,6 +319,52 @@ /* + * Extended RGB to plain RGB conversion + */ + +METHODDEF(void) +rgb_rgb_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + switch (cinfo->in_color_space) { + case JCS_EXT_RGB: + extrgb_rgb_convert_internal(cinfo, input_buf, output_buf, output_row, + num_rows); + break; + case JCS_EXT_RGBX: + case JCS_EXT_RGBA: + extrgbx_rgb_convert_internal(cinfo, input_buf, output_buf, output_row, + num_rows); + break; + case JCS_EXT_BGR: + extbgr_rgb_convert_internal(cinfo, input_buf, output_buf, output_row, + num_rows); + break; + case JCS_EXT_BGRX: + case JCS_EXT_BGRA: + extbgrx_rgb_convert_internal(cinfo, input_buf, output_buf, output_row, + num_rows); + break; + case JCS_EXT_XBGR: + case JCS_EXT_ABGR: + extxbgr_rgb_convert_internal(cinfo, input_buf, output_buf, output_row, + num_rows); + break; + case JCS_EXT_XRGB: + case JCS_EXT_ARGB: + extxrgb_rgb_convert_internal(cinfo, input_buf, output_buf, output_row, + num_rows); + break; + default: + rgb_rgb_convert_internal(cinfo, input_buf, output_buf, output_row, + num_rows); + break; + } +} + + +/* * Convert some rows of samples to the JPEG colorspace. * This version handles Adobe-style CMYK->YCCK conversion, * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the same @@ -522,21 +581,25 @@ break; case JCS_RGB: - case JCS_EXT_RGB: - case JCS_EXT_RGBX: - case JCS_EXT_BGR: - case JCS_EXT_BGRX: - case JCS_EXT_XBGR: - case JCS_EXT_XRGB: - case JCS_EXT_RGBA: - case JCS_EXT_BGRA: - case JCS_EXT_ABGR: - case JCS_EXT_ARGB: if (cinfo->num_components != 3) ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - if (cinfo->in_color_space == cinfo->jpeg_color_space && - rgb_pixelsize[cinfo->in_color_space] == 3) + if (rgb_red[cinfo->in_color_space] == 0 && + rgb_green[cinfo->in_color_space] == 1 && + rgb_blue[cinfo->in_color_space] == 2 && + rgb_pixelsize[cinfo->in_color_space] == 3) cconvert->pub.color_convert = null_convert; + else if (cinfo->in_color_space == JCS_RGB || + cinfo->in_color_space == JCS_EXT_RGB || + cinfo->in_color_space == JCS_EXT_RGBX || + cinfo->in_color_space == JCS_EXT_BGR || + cinfo->in_color_space == JCS_EXT_BGRX || + cinfo->in_color_space == JCS_EXT_XBGR || + cinfo->in_color_space == JCS_EXT_XRGB || + cinfo->in_color_space == JCS_EXT_RGBA || + cinfo->in_color_space == JCS_EXT_BGRA || + cinfo->in_color_space == JCS_EXT_ABGR || + cinfo->in_color_space == JCS_EXT_ARGB) + cconvert->pub.color_convert = rgb_rgb_convert; else ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); break; diff -Nru libjpeg-turbo-1.1.90+svn733/jcdctmgr.c libjpeg-turbo-1.2.1+svn823/jcdctmgr.c --- libjpeg-turbo-1.1.90+svn733/jcdctmgr.c 2011-02-18 20:50:08.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jcdctmgr.c 2012-04-18 21:45:07.000000000 +0000 @@ -182,7 +182,7 @@ /* fq will be one bit too large to fit in DCTELEM, so adjust */ fq >>= 1; r--; - } else if (fr <= (divisor / 2)) { /* fractional part is < 0.5 */ + } else if (fr <= (divisor / 2U)) { /* fractional part is < 0.5 */ c++; } else { /* fractional part is > 0.5 */ fq++; diff -Nru libjpeg-turbo-1.1.90+svn733/jconfig.h.in libjpeg-turbo-1.2.1+svn823/jconfig.h.in --- libjpeg-turbo-1.1.90+svn733/jconfig.h.in 2011-12-18 16:29:35.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jconfig.h.in 2012-04-18 21:45:07.000000000 +0000 @@ -30,9 +30,6 @@ /* Compiler does not support pointers to unspecified structures. */ #undef INCOMPLETE_TYPES_BROKEN -/* How to obtain function inlining. */ -#undef INLINE - /* Compiler has rather than standard . */ #undef NEED_BSD_STRINGS diff -Nru libjpeg-turbo-1.1.90+svn733/jdcolext.c libjpeg-turbo-1.2.1+svn823/jdcolext.c --- libjpeg-turbo-1.1.90+svn733/jdcolext.c 2011-09-09 18:15:53.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jdcolext.c 2012-04-18 21:45:07.000000000 +0000 @@ -102,3 +102,40 @@ } } } + + +/* + * Convert RGB to extended RGB: just swap the order of source pixels + */ + +INLINE +LOCAL(void) +rgb_rgb_convert_internal (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW inptr0, inptr1, inptr2; + register JSAMPROW outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + /* We can dispense with GETJSAMPLE() here */ + outptr[RGB_RED] = inptr0[col]; + outptr[RGB_GREEN] = inptr1[col]; + outptr[RGB_BLUE] = inptr2[col]; + /* Set unused byte to 0xFF so it can be interpreted as an opaque */ + /* alpha channel value */ +#ifdef RGB_ALPHA + outptr[RGB_ALPHA] = 0xFF; +#endif + outptr += RGB_PIXELSIZE; + } + } +} diff -Nru libjpeg-turbo-1.1.90+svn733/jdcolor.c libjpeg-turbo-1.2.1+svn823/jdcolor.c --- libjpeg-turbo-1.1.90+svn733/jdcolor.c 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jdcolor.c 2012-04-18 21:45:07.000000000 +0000 @@ -3,7 +3,7 @@ * * Copyright (C) 1991-1997, Thomas G. Lane. * Copyright 2009 Pierre Ossman for Cendio AB - * Copyright (C) 2009, 2011, D. R. Commander. + * Copyright (C) 2009, 2011-2012, 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. * @@ -14,6 +14,7 @@ #include "jinclude.h" #include "jpeglib.h" #include "jsimd.h" +#include "config.h" /* Private subobject */ @@ -79,6 +80,7 @@ #define RGB_PIXELSIZE EXT_RGB_PIXELSIZE #define ycc_rgb_convert_internal ycc_extrgb_convert_internal #define gray_rgb_convert_internal gray_extrgb_convert_internal +#define rgb_rgb_convert_internal rgb_extrgb_convert_internal #include "jdcolext.c" #undef RGB_RED #undef RGB_GREEN @@ -86,6 +88,7 @@ #undef RGB_PIXELSIZE #undef ycc_rgb_convert_internal #undef gray_rgb_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_RGBX_RED #define RGB_GREEN EXT_RGBX_GREEN @@ -94,6 +97,7 @@ #define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE #define ycc_rgb_convert_internal ycc_extrgbx_convert_internal #define gray_rgb_convert_internal gray_extrgbx_convert_internal +#define rgb_rgb_convert_internal rgb_extrgbx_convert_internal #include "jdcolext.c" #undef RGB_RED #undef RGB_GREEN @@ -102,6 +106,7 @@ #undef RGB_PIXELSIZE #undef ycc_rgb_convert_internal #undef gray_rgb_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_BGR_RED #define RGB_GREEN EXT_BGR_GREEN @@ -109,6 +114,7 @@ #define RGB_PIXELSIZE EXT_BGR_PIXELSIZE #define ycc_rgb_convert_internal ycc_extbgr_convert_internal #define gray_rgb_convert_internal gray_extbgr_convert_internal +#define rgb_rgb_convert_internal rgb_extbgr_convert_internal #include "jdcolext.c" #undef RGB_RED #undef RGB_GREEN @@ -116,6 +122,7 @@ #undef RGB_PIXELSIZE #undef ycc_rgb_convert_internal #undef gray_rgb_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_BGRX_RED #define RGB_GREEN EXT_BGRX_GREEN @@ -124,6 +131,7 @@ #define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE #define ycc_rgb_convert_internal ycc_extbgrx_convert_internal #define gray_rgb_convert_internal gray_extbgrx_convert_internal +#define rgb_rgb_convert_internal rgb_extbgrx_convert_internal #include "jdcolext.c" #undef RGB_RED #undef RGB_GREEN @@ -132,6 +140,7 @@ #undef RGB_PIXELSIZE #undef ycc_rgb_convert_internal #undef gray_rgb_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_XBGR_RED #define RGB_GREEN EXT_XBGR_GREEN @@ -140,6 +149,7 @@ #define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE #define ycc_rgb_convert_internal ycc_extxbgr_convert_internal #define gray_rgb_convert_internal gray_extxbgr_convert_internal +#define rgb_rgb_convert_internal rgb_extxbgr_convert_internal #include "jdcolext.c" #undef RGB_RED #undef RGB_GREEN @@ -148,6 +158,7 @@ #undef RGB_PIXELSIZE #undef ycc_rgb_convert_internal #undef gray_rgb_convert_internal +#undef rgb_rgb_convert_internal #define RGB_RED EXT_XRGB_RED #define RGB_GREEN EXT_XRGB_GREEN @@ -156,6 +167,7 @@ #define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE #define ycc_rgb_convert_internal ycc_extxrgb_convert_internal #define gray_rgb_convert_internal gray_extxrgb_convert_internal +#define rgb_rgb_convert_internal rgb_extxrgb_convert_internal #include "jdcolext.c" #undef RGB_RED #undef RGB_GREEN @@ -164,6 +176,7 @@ #undef RGB_PIXELSIZE #undef ycc_rgb_convert_internal #undef gray_rgb_convert_internal +#undef rgb_rgb_convert_internal /* @@ -352,6 +365,51 @@ /* + * Convert plain RGB to extended RGB + */ + +METHODDEF(void) +rgb_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + switch (cinfo->out_color_space) { + case JCS_EXT_RGB: + rgb_extrgb_convert_internal(cinfo, input_buf, input_row, output_buf, + num_rows); + break; + case JCS_EXT_RGBX: + case JCS_EXT_RGBA: + rgb_extrgbx_convert_internal(cinfo, input_buf, input_row, output_buf, + num_rows); + break; + case JCS_EXT_BGR: + rgb_extbgr_convert_internal(cinfo, input_buf, input_row, output_buf, + num_rows); + break; + case JCS_EXT_BGRX: + case JCS_EXT_BGRA: + rgb_extbgrx_convert_internal(cinfo, input_buf, input_row, output_buf, + num_rows); + break; + case JCS_EXT_XBGR: + case JCS_EXT_ABGR: + rgb_extxbgr_convert_internal(cinfo, input_buf, input_row, output_buf, + num_rows); + break; + case JCS_EXT_XRGB: + case JCS_EXT_ARGB: + rgb_extxrgb_convert_internal(cinfo, input_buf, input_row, output_buf, + num_rows); + break; + default: + rgb_rgb_convert_internal(cinfo, input_buf, input_row, output_buf, + num_rows); + break; + } +} + +/* * Adobe-style YCCK->CMYK conversion. * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same * conversion as above, while passing K (black) unchanged. @@ -493,9 +551,14 @@ } } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) { cconvert->pub.color_convert = gray_rgb_convert; - } else if (cinfo->jpeg_color_space == cinfo->out_color_space && - rgb_pixelsize[cinfo->out_color_space] == 3) { - cconvert->pub.color_convert = null_convert; + } else if (cinfo->jpeg_color_space == JCS_RGB) { + if (rgb_red[cinfo->out_color_space] == 0 && + rgb_green[cinfo->out_color_space] == 1 && + rgb_blue[cinfo->out_color_space] == 2 && + rgb_pixelsize[cinfo->out_color_space] == 3) + cconvert->pub.color_convert = null_convert; + else + cconvert->pub.color_convert = rgb_rgb_convert; } else ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); break; diff -Nru libjpeg-turbo-1.1.90+svn733/jdhuff.c libjpeg-turbo-1.2.1+svn823/jdhuff.c --- libjpeg-turbo-1.1.90+svn733/jdhuff.c 2011-04-18 06:52:07.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jdhuff.c 2012-04-18 21:45:07.000000000 +0000 @@ -758,7 +758,7 @@ usefast = 0; } - if (cinfo->src->bytes_in_buffer < BUFSIZE * cinfo->blocks_in_MCU + if (cinfo->src->bytes_in_buffer < BUFSIZE * (size_t)cinfo->blocks_in_MCU || cinfo->unread_marker != 0) usefast = 0; diff -Nru libjpeg-turbo-1.1.90+svn733/jdmarker.c libjpeg-turbo-1.2.1+svn823/jdmarker.c --- libjpeg-turbo-1.1.90+svn733/jdmarker.c 2006-05-25 05:01:55.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jdmarker.c 2012-04-18 21:45:07.000000000 +0000 @@ -2,6 +2,7 @@ * jdmarker.c * * Copyright (C) 1991-1998, Thomas G. Lane. + * Copyright (C) 2012, 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. * @@ -322,13 +323,16 @@ /* Collect the component-spec parameters */ + for (i = 0; i < cinfo->num_components; i++) + cinfo->cur_comp_info[i] = NULL; + for (i = 0; i < n; i++) { INPUT_BYTE(cinfo, cc, return FALSE); INPUT_BYTE(cinfo, c, return FALSE); for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; ci++, compptr++) { - if (cc == compptr->component_id) + if (cc == compptr->component_id && !cinfo->cur_comp_info[ci]) goto id_found; } diff -Nru libjpeg-turbo-1.1.90+svn733/jdmerge.c libjpeg-turbo-1.2.1+svn823/jdmerge.c --- libjpeg-turbo-1.1.90+svn733/jdmerge.c 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jdmerge.c 2012-04-18 21:45:07.000000000 +0000 @@ -38,6 +38,7 @@ #include "jinclude.h" #include "jpeglib.h" #include "jsimd.h" +#include "config.h" #ifdef UPSAMPLE_MERGING_SUPPORTED @@ -102,6 +103,7 @@ #define RGB_RED EXT_RGBX_RED #define RGB_GREEN EXT_RGBX_GREEN #define RGB_BLUE EXT_RGBX_BLUE +#define RGB_ALPHA 3 #define RGB_PIXELSIZE EXT_RGBX_PIXELSIZE #define h2v1_merged_upsample_internal extrgbx_h2v1_merged_upsample_internal #define h2v2_merged_upsample_internal extrgbx_h2v2_merged_upsample_internal @@ -109,6 +111,7 @@ #undef RGB_RED #undef RGB_GREEN #undef RGB_BLUE +#undef RGB_ALPHA #undef RGB_PIXELSIZE #undef h2v1_merged_upsample_internal #undef h2v2_merged_upsample_internal @@ -130,6 +133,7 @@ #define RGB_RED EXT_BGRX_RED #define RGB_GREEN EXT_BGRX_GREEN #define RGB_BLUE EXT_BGRX_BLUE +#define RGB_ALPHA 3 #define RGB_PIXELSIZE EXT_BGRX_PIXELSIZE #define h2v1_merged_upsample_internal extbgrx_h2v1_merged_upsample_internal #define h2v2_merged_upsample_internal extbgrx_h2v2_merged_upsample_internal @@ -137,6 +141,7 @@ #undef RGB_RED #undef RGB_GREEN #undef RGB_BLUE +#undef RGB_ALPHA #undef RGB_PIXELSIZE #undef h2v1_merged_upsample_internal #undef h2v2_merged_upsample_internal @@ -144,6 +149,7 @@ #define RGB_RED EXT_XBGR_RED #define RGB_GREEN EXT_XBGR_GREEN #define RGB_BLUE EXT_XBGR_BLUE +#define RGB_ALPHA 0 #define RGB_PIXELSIZE EXT_XBGR_PIXELSIZE #define h2v1_merged_upsample_internal extxbgr_h2v1_merged_upsample_internal #define h2v2_merged_upsample_internal extxbgr_h2v2_merged_upsample_internal @@ -151,6 +157,7 @@ #undef RGB_RED #undef RGB_GREEN #undef RGB_BLUE +#undef RGB_ALPHA #undef RGB_PIXELSIZE #undef h2v1_merged_upsample_internal #undef h2v2_merged_upsample_internal @@ -158,6 +165,7 @@ #define RGB_RED EXT_XRGB_RED #define RGB_GREEN EXT_XRGB_GREEN #define RGB_BLUE EXT_XRGB_BLUE +#define RGB_ALPHA 0 #define RGB_PIXELSIZE EXT_XRGB_PIXELSIZE #define h2v1_merged_upsample_internal extxrgb_h2v1_merged_upsample_internal #define h2v2_merged_upsample_internal extxrgb_h2v2_merged_upsample_internal @@ -165,6 +173,7 @@ #undef RGB_RED #undef RGB_GREEN #undef RGB_BLUE +#undef RGB_ALPHA #undef RGB_PIXELSIZE #undef h2v1_merged_upsample_internal #undef h2v2_merged_upsample_internal diff -Nru libjpeg-turbo-1.1.90+svn733/jdmrgext.c libjpeg-turbo-1.2.1+svn823/jdmrgext.c --- libjpeg-turbo-1.1.90+svn733/jdmrgext.c 2011-09-07 06:31:00.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jdmrgext.c 2012-04-18 21:45:07.000000000 +0000 @@ -2,6 +2,7 @@ * jdmrgext.c * * Copyright (C) 1994-1996, Thomas G. Lane. + * Copyright (C) 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. * @@ -54,11 +55,17 @@ outptr[RGB_RED] = range_limit[y + cred]; outptr[RGB_GREEN] = range_limit[y + cgreen]; outptr[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr[RGB_ALPHA] = 0xFF; +#endif outptr += RGB_PIXELSIZE; y = GETJSAMPLE(*inptr0++); outptr[RGB_RED] = range_limit[y + cred]; outptr[RGB_GREEN] = range_limit[y + cgreen]; outptr[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr[RGB_ALPHA] = 0xFF; +#endif outptr += RGB_PIXELSIZE; } /* If image width is odd, do the last output column separately */ @@ -72,6 +79,9 @@ outptr[RGB_RED] = range_limit[y + cred]; outptr[RGB_GREEN] = range_limit[y + cgreen]; outptr[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr[RGB_ALPHA] = 0xFF; +#endif } } @@ -120,21 +130,33 @@ outptr0[RGB_RED] = range_limit[y + cred]; outptr0[RGB_GREEN] = range_limit[y + cgreen]; outptr0[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr0[RGB_ALPHA] = 0xFF; +#endif outptr0 += RGB_PIXELSIZE; y = GETJSAMPLE(*inptr00++); outptr0[RGB_RED] = range_limit[y + cred]; outptr0[RGB_GREEN] = range_limit[y + cgreen]; outptr0[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr0[RGB_ALPHA] = 0xFF; +#endif outptr0 += RGB_PIXELSIZE; y = GETJSAMPLE(*inptr01++); outptr1[RGB_RED] = range_limit[y + cred]; outptr1[RGB_GREEN] = range_limit[y + cgreen]; outptr1[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr1[RGB_ALPHA] = 0xFF; +#endif outptr1 += RGB_PIXELSIZE; y = GETJSAMPLE(*inptr01++); outptr1[RGB_RED] = range_limit[y + cred]; outptr1[RGB_GREEN] = range_limit[y + cgreen]; outptr1[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr1[RGB_ALPHA] = 0xFF; +#endif outptr1 += RGB_PIXELSIZE; } /* If image width is odd, do the last output column separately */ @@ -148,9 +170,15 @@ outptr0[RGB_RED] = range_limit[y + cred]; outptr0[RGB_GREEN] = range_limit[y + cgreen]; outptr0[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr0[RGB_ALPHA] = 0xFF; +#endif y = GETJSAMPLE(*inptr01); outptr1[RGB_RED] = range_limit[y + cred]; outptr1[RGB_GREEN] = range_limit[y + cgreen]; outptr1[RGB_BLUE] = range_limit[y + cblue]; +#ifdef RGB_ALPHA + outptr1[RGB_ALPHA] = 0xFF; +#endif } } diff -Nru libjpeg-turbo-1.1.90+svn733/jpegtran.1 libjpeg-turbo-1.2.1+svn823/jpegtran.1 --- libjpeg-turbo-1.1.90+svn733/jpegtran.1 2010-11-23 05:49:54.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jpegtran.1 2012-04-18 21:45:07.000000000 +0000 @@ -1,4 +1,4 @@ -.TH JPEGTRAN 1 "11 October 2010" +.TH JPEGTRAN 1 "31 January 2012" .SH NAME jpegtran \- lossless transformation of JPEG files .SH SYNOPSIS @@ -184,7 +184,7 @@ .TP .B \-copy comments Copy only comment markers. This setting copies comments from the source file -but discards any other data which is inessential for image display. +but discards any other data that is inessential for image display. .TP .B \-copy all Copy all extra markers. This setting preserves miscellaneous markers diff -Nru libjpeg-turbo-1.1.90+svn733/jpegtran.c libjpeg-turbo-1.2.1+svn823/jpegtran.c --- libjpeg-turbo-1.1.90+svn733/jpegtran.c 2011-03-04 03:20:34.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jpegtran.c 2012-04-18 21:45:07.000000000 +0000 @@ -78,14 +78,14 @@ fprintf(stderr, " -trim Drop non-transformable edge blocks\n"); #endif fprintf(stderr, "Switches for advanced users:\n"); +#ifdef C_ARITH_CODING_SUPPORTED + fprintf(stderr, " -arithmetic Use arithmetic coding\n"); +#endif fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); fprintf(stderr, " -outfile name Specify name for output file\n"); fprintf(stderr, " -verbose or -debug Emit debug output\n"); fprintf(stderr, "Switches for wizards:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif #ifdef C_MULTISCAN_FILES_SUPPORTED fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); #endif @@ -204,9 +204,9 @@ if (! printed_version) { fprintf(stderr, "%s version %s (build %s)\n", PACKAGE_NAME, VERSION, BUILD); - fprintf(stderr, "%s\n\n", LJTCOPYRIGHT); - fprintf(stderr, "Based on Independent JPEG Group's libjpeg, version %s\n%s\n\n", - JVERSION, JCOPYRIGHT); + fprintf(stderr, "%s\n\n", JCOPYRIGHT); + fprintf(stderr, "Emulating The Independent JPEG Group's libjpeg, version %s\n\n", + JVERSION); printed_version = TRUE; } cinfo->err->trace_level++; diff -Nru libjpeg-turbo-1.1.90+svn733/jversion.h libjpeg-turbo-1.2.1+svn823/jversion.h --- libjpeg-turbo-1.1.90+svn733/jversion.h 2011-08-12 19:31:09.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/jversion.h 2012-04-18 21:45:07.000000000 +0000 @@ -2,7 +2,7 @@ * jversion.h * * Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding. - * Copyright (C) 2010, D. R. Commander. + * Copyright (C) 2010, 2012, 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. * @@ -14,23 +14,18 @@ #define JVERSION "8b 16-May-2010" -#define JCOPYRIGHT "Copyright (C) 2010, Thomas G. Lane, Guido Vollbeding" - #elif JPEG_LIB_VERSION >= 70 #define JVERSION "7 27-Jun-2009" -#define JCOPYRIGHT "Copyright (C) 2009, Thomas G. Lane, Guido Vollbeding" - #else #define JVERSION "6b 27-Mar-1998" -#define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" - #endif -#define LJTCOPYRIGHT "Copyright (C) 1999-2006 MIYASAKA Masaru\n" \ +#define JCOPYRIGHT "Copyright (C) 1991-2010 Thomas G. Lane, Guido Vollbeding\n" \ + "Copyright (C) 1999-2006 MIYASAKA Masaru\n" \ "Copyright (C) 2009 Pierre Ossman for Cendio AB\n" \ - "Copyright (C) 2009-2011 D. R. Commander\n" \ + "Copyright (C) 2009-2012 D. R. Commander\n" \ "Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)" diff -Nru libjpeg-turbo-1.1.90+svn733/libjpeg.txt libjpeg-turbo-1.2.1+svn823/libjpeg.txt --- libjpeg-turbo-1.1.90+svn733/libjpeg.txt 2010-11-23 05:49:54.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/libjpeg.txt 2012-04-18 21:45:07.000000000 +0000 @@ -850,8 +850,9 @@ premise of this routine collapses. Caveat user. jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline) - [libjpeg v7/v8 only] Set default quantization tables with linear - q_scale_factor[] values (see below). + [libjpeg v7+ API/ABI emulation only] + Set default quantization tables with linear q_scale_factor[] values + (see below). jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, const unsigned int *basic_table, @@ -976,12 +977,13 @@ slot 1 for chrominance. int q_scale_factor[NUM_QUANT_TBLS] - [libjpeg v7+ only] Linear quantization scaling factors (0-100, default - 100) for use with jpeg_default_qtables(). + [libjpeg v7+ API/ABI emulation only] + Linear quantization scaling factors (0-100, default 100) + for use with jpeg_default_qtables(). See rdswitch.c and cjpeg.c for an example of usage. Note that the q_scale_factor[] values use "linear" scales, so JPEG quality levels chosen by the user must be converted to these scales - using jpeg_quality_scaling(). Here is an example which corresponds to + using jpeg_quality_scaling(). Here is an example that corresponds to cjpeg -quality 90,70: jpeg_set_defaults(cinfo); @@ -1012,11 +1014,12 @@ any need to mess with providing your own Huffman tables. -[libjpeg v7+ only] The actual dimensions of the JPEG image that will be written -to the file are given by the following fields. These are computed from the -input image dimensions and the compression parameters by jpeg_start_compress(). -You can also call jpeg_calc_jpeg_dimensions() to obtain the values that will -result from the current parameter settings. +[libjpeg v7+ API/ABI emulation only] +The actual dimensions of the JPEG image that will be written to the file are +given by the following fields. These are computed from the input image +dimensions and the compression parameters by jpeg_start_compress(). You can +also call jpeg_calc_jpeg_dimensions() to obtain the values that will result +from the current parameter settings. JDIMENSION jpeg_width Actual dimensions of output image. JDIMENSION jpeg_height diff -Nru libjpeg-turbo-1.1.90+svn733/release/Description.plist.in libjpeg-turbo-1.2.1+svn823/release/Description.plist.in --- libjpeg-turbo-1.1.90+svn733/release/Description.plist.in 2011-03-22 09:31:25.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/Description.plist.in 2012-04-18 21:45:07.000000000 +0000 @@ -3,7 +3,7 @@ IFPkgDescriptionDescription - A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs + A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs IFPkgDescriptionTitle @PACKAGE_NAME@ IFPkgDescriptionVersion diff -Nru libjpeg-turbo-1.1.90+svn733/release/ReadMe.rtf libjpeg-turbo-1.2.1+svn823/release/ReadMe.rtf --- libjpeg-turbo-1.1.90+svn733/release/ReadMe.rtf 2011-02-18 22:47:32.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/ReadMe.rtf 2012-04-18 21:45:07.000000000 +0000 @@ -1,13 +1,13 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww15200\viewh9600\viewkind0 \deftab720 \pard\pardeftab720\ql\qnatural -\f0\fs24 \cf0 libjpeg-turbo is a derivative of libjpeg which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86 and x86-64 systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal. libjpeg-turbo also includes a wrapper library which implements the TurboJPEG API used by VirtualGL and TurboVNC.\ +\f0\fs24 \cf0 libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal.\ \ -libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but the TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, including improved support for Mac OS X, 64-bit support, support for 32-bit and big endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman encoding/decoding, and various bug fixes. The goal was to produce a fully open source codec that could replace the partially closed source TurboJPEG/IPP codec used by VirtualGL and TurboVNC. libjpeg-turbo generally performs in the range of 80-120% of TurboJPEG/IPP. It is faster in some areas but slower in others.\ +libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but the TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, including improved support for Mac OS X, 64-bit support, support for 32-bit and big-endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman encoding/decoding, and various bug fixes. The goal was to produce a fully open-source codec that could replace the partially closed-source TurboJPEG/IPP codec used by VirtualGL and TurboVNC. libjpeg-turbo generally achieves 80-120% of the performance of TurboJPEG/IPP. It is faster in some areas but slower in others.\ \ In early 2010, libjpeg-turbo spun off into its own independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.\ } \ No newline at end of file diff -Nru libjpeg-turbo-1.1.90+svn733/release/deb-control.tmpl libjpeg-turbo-1.2.1+svn823/release/deb-control.tmpl --- libjpeg-turbo-1.1.90+svn733/release/deb-control.tmpl 2011-07-19 09:29:01.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/deb-control.tmpl 2012-04-18 21:45:07.000000000 +0000 @@ -5,22 +5,20 @@ Architecture: {__ARCH} Essential: no 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 - and x86-64 systems. On such systems, libjpeg-turbo is generally 2-4x as fast - as the unmodified version of libjpeg, all else being equal. libjpeg-turbo - also includes a wrapper library which implements the TurboJPEG API used by - VirtualGL and TurboVNC. +Description: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs + libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, + SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, + x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as + fast as the unmodified version of libjpeg, all else being equal. . libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but the TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, including improved support for Mac OS X, 64-bit support, support - for 32-bit and big endian pixel formats (RGBX, XBGR, etc.), accelerated + for 32-bit and big-endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman encoding/decoding, and various bug fixes. The goal was to produce a - fully open source codec that could replace the partially closed source + fully open-source codec that could replace the partially closed-source TurboJPEG/IPP codec used by VirtualGL and TurboVNC. libjpeg-turbo generally - performs in the range of 80-120% of TurboJPEG/IPP. It is faster in some + achieves 80-120% of the performance of TurboJPEG/IPP. It is faster in some areas but slower in others. . In early 2010, libjpeg-turbo spun off into its own independent project, with diff -Nru libjpeg-turbo-1.1.90+svn733/release/libjpeg-turbo.nsi.in libjpeg-turbo-1.2.1+svn823/release/libjpeg-turbo.nsi.in --- libjpeg-turbo-1.1.90+svn733/release/libjpeg-turbo.nsi.in 2011-05-25 03:52:22.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/libjpeg-turbo.nsi.in 2012-04-18 21:45:07.000000000 +0000 @@ -76,8 +76,11 @@ SetOutPath $INSTDIR\doc File "@CMAKE_SOURCE_DIR@\README" File "@CMAKE_SOURCE_DIR@\README-turbo.txt" + File "@CMAKE_SOURCE_DIR@\example.c" File "@CMAKE_SOURCE_DIR@\libjpeg.txt" + File "@CMAKE_SOURCE_DIR@\structure.txt" File "@CMAKE_SOURCE_DIR@\usage.txt" + File "@CMAKE_SOURCE_DIR@\wizard.txt" WriteRegStr HKLM "SOFTWARE\@INST_DIR@ @VERSION@" "Install_Dir" "$INSTDIR" @@ -132,8 +135,11 @@ Delete $INSTDIR\uninstall_@VERSION@.exe Delete $INSTDIR\doc\README Delete $INSTDIR\doc\README-turbo.txt + Delete $INSTDIR\doc\example.c Delete $INSTDIR\doc\libjpeg.txt + Delete $INSTDIR\doc\structure.txt Delete $INSTDIR\doc\usage.txt + Delete $INSTDIR\doc\wizard.txt RMDir "$INSTDIR\include" RMDir "$INSTDIR\lib" diff -Nru libjpeg-turbo-1.1.90+svn733/release/libjpeg-turbo.spec.in libjpeg-turbo-1.2.1+svn823/release/libjpeg-turbo.spec.in --- libjpeg-turbo-1.1.90+svn733/release/libjpeg-turbo.spec.in 2011-05-25 03:52:22.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/libjpeg-turbo.spec.in 2012-04-18 21:45:07.000000000 +0000 @@ -4,7 +4,7 @@ %define __lib lib %endif -Summary: A SIMD-accelerated JPEG codec which provides both the libjpeg and TurboJPEG APIs +Summary: A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs Name: @PACKAGE_NAME@ Version: @VERSION@ Vendor: The libjpeg-turbo Project @@ -19,21 +19,20 @@ Obsoletes: turbojpeg %description -libjpeg-turbo is a derivative of libjpeg which uses SIMD instructions (MMX, -SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86 -and x86-64 systems. On such systems, libjpeg-turbo is generally 2-4x as fast -as the unmodified version of libjpeg, all else being equal. libjpeg-turbo also -includes a wrapper library which implements the TurboJPEG API used by VirtualGL -and TurboVNC. +libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, +SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, +x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as +fast as the unmodified version of libjpeg, all else being equal. libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but the TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, including improved support for Mac OS X, 64-bit support, support for -32-bit and big endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman -encoding/decoding, and various bug fixes. The goal was to produce a fully open -source codec that could replace the partially closed source TurboJPEG/IPP codec -used by VirtualGL and TurboVNC. libjpeg-turbo generally performs in the range -of 80-120% of TurboJPEG/IPP. It is faster in some areas but slower in others. +32-bit and big-endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman +encoding/decoding, and various bug fixes. The goal was to produce a fully +open-source codec that could replace the partially closed-source TurboJPEG/IPP +codec used by VirtualGL and TurboVNC. libjpeg-turbo generally achieves 80-120% +of the performance of TurboJPEG/IPP. It is faster in some areas but slower in +others. In early 2010, libjpeg-turbo spun off into its own independent project, with the goal of making high-speed JPEG compression/decompression technology @@ -49,7 +48,7 @@ %install rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man +make install DESTDIR=$RPM_BUILD_ROOT libdir=/opt/%{name}/%{__lib} mandir=/opt/%{name}/man docdir=/opt/%{name}/doc exampledir=/opt/%{name}/doc rm -f $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/*.la mkdir -p $RPM_BUILD_ROOT/usr/%{__lib} mv $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/libturbojpeg.* $RPM_BUILD_ROOT/usr/%{__lib} @@ -59,6 +58,8 @@ mv $RPM_BUILD_ROOT/opt/%{name}/include/turbojpeg.h $RPM_BUILD_ROOT/usr/include ln -fs /usr/include/turbojpeg.h $RPM_BUILD_ROOT/opt/%{name}/include/ ln -fs /usr/%{__lib}/libturbojpeg.a $RPM_BUILD_ROOT/opt/%{name}/%{__lib}/ +mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir} +mv $RPM_BUILD_ROOT/opt/%{name}/doc $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version} %post -p /sbin/ldconfig @@ -69,7 +70,8 @@ %files %defattr(-,root,root) -%doc %{_srcdir}/README-turbo.txt %{_srcdir}/README %{_srcdir}/libjpeg.txt %{_srcdir}/usage.txt +%dir %{_defaultdocdir}/%{name}-%{version} +%doc %{_defaultdocdir}/%{name}-%{version}/* %dir /opt/%{name} %dir /opt/%{name}/bin /opt/%{name}/bin/cjpeg diff -Nru libjpeg-turbo-1.1.90+svn733/release/makecygwinpkg.in libjpeg-turbo-1.2.1+svn823/release/makecygwinpkg.in --- libjpeg-turbo-1.1.90+svn733/release/makecygwinpkg.in 2011-05-24 17:33:06.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/makecygwinpkg.in 2012-04-18 21:45:07.000000000 +0000 @@ -23,14 +23,10 @@ rm -f $PACKAGE_NAME-$VERSION-cygwin.tar.bz2 TMPDIR=`mktemp -d /tmp/ljtbuild.XXXXXX` __PWD=`pwd` -make install DESTDIR=$TMPDIR/pkg mandir=/opt/$PACKAGE_NAME/man +make install DESTDIR=$TMPDIR/pkg mandir=/opt/$PACKAGE_NAME/man \ + docdir=/usr/share/doc/$PACKAGE_NAME-$VERSION \ + exampledir=/usr/share/doc/$PACKAGE_NAME-$VERSION rm $TMPDIR/pkg/opt/$PACKAGE_NAME/lib/*.la -DOCDIR=$TMPDIR/pkg/usr/share/doc/$PACKAGE_NAME-$VERSION -mkdir -p $DOCDIR -install -m 644 $SRCDIR/README-turbo.txt $DOCDIR -install -m 644 $SRCDIR/README $DOCDIR -install -m 644 $SRCDIR/libjpeg.txt $DOCDIR -install -m 644 $SRCDIR/usage.txt $DOCDIR ln -fs lib $TMPDIR/pkg/opt/$PACKAGE_NAME/lib32 cd $TMPDIR/pkg tar cfj ../$PACKAGE_NAME-$VERSION-cygwin.tar.bz2 * diff -Nru libjpeg-turbo-1.1.90+svn733/release/makedpkg.in libjpeg-turbo-1.2.1+svn823/release/makedpkg.in --- libjpeg-turbo-1.1.90+svn733/release/makedpkg.in 2011-07-19 09:52:11.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/makedpkg.in 2012-04-18 21:45:07.000000000 +0000 @@ -36,7 +36,10 @@ | 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 \ + docdir=$TMPDIR/usr/share/doc/$DIRNAME-$VERSION \ + exampledir=$TMPDIR/usr/share/doc/$DIRNAME-$VERSION rm -f $TMPDIR/opt/$DIRNAME/$__LIB/*.la if [ $SUPPLEMENT = 1 ]; then @@ -44,6 +47,7 @@ rm -rf $TMPDIR/opt/$DIRNAME/man rm -rf $TMPDIR/opt/$DIRNAME/bin rm -rf $TMPDIR/opt/$DIRNAME/classes + rm -rf $TMPDIR/usr fi mkdir -p $TMPDIR/usr/$__LIB @@ -63,11 +67,6 @@ mkdir -p $TMPDIR/usr/include mv $TMPDIR/opt/$DIRNAME/include/turbojpeg.h $TMPDIR/usr/include ln -fs /usr/include/turbojpeg.h $TMPDIR/opt/$DIRNAME/include/ - mkdir -p $TMPDIR/usr/share/doc/$DIRNAME-$VERSION - install -m 644 $SRCDIR/README-turbo.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION - install -m 644 $SRCDIR/README $TMPDIR/usr/share/doc/$DIRNAME-$VERSION - install -m 644 $SRCDIR/libjpeg.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION - install -m 644 $SRCDIR/usage.txt $TMPDIR/usr/share/doc/$DIRNAME-$VERSION fi sudo chown -Rh root:root $TMPDIR/* diff -Nru libjpeg-turbo-1.1.90+svn733/release/makemacpkg.in libjpeg-turbo-1.2.1+svn823/release/makemacpkg.in --- libjpeg-turbo-1.1.90+svn733/release/makemacpkg.in 2011-05-25 03:52:22.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/makemacpkg.in 2012-04-18 21:45:07.000000000 +0000 @@ -17,24 +17,51 @@ usage() { - echo "$0 [universal [32-bit build dir]]" + echo "$0 [-build32 [32-bit build dir]] [-buildarmv6 [ARM v6 build dir]] [-buildarmv7 [ARM v7 build dir]]" exit 1 } -UNIVERSAL=0 - PACKAGE_NAME=@PACKAGE_NAME@ VERSION=@VERSION@ BUILD=@BUILD@ SRCDIR=@abs_top_srcdir@ BUILDDIR32=@abs_top_srcdir@/osxx86 +BUILD32=0 +BUILDDIRARMV6=@abs_top_srcdir@/iosarmv6 +BUILDARMV6=0 +BUILDDIRARMV7=@abs_top_srcdir@/iosarmv7 +BUILDARMV7=0 WITH_JAVA=@WITH_JAVA@ -if [ $# -gt 0 ]; then - if [ "$1" = "universal" ]; then - UNIVERSAL=1 - if [ $# -gt 1 ]; then BUILDDIR32=$2; fi - fi -fi +while [ $# -gt 0 ]; do + case $1 in + -h*) usage 0 ;; + -build32) + BUILD32=1 + if [ $# -gt 1 ]; then + if [[ ! "$2" =~ -.* ]]; then + BUILDDIR32=$2; shift + fi + fi + ;; + -buildarmv6) + BUILDARMV6=1 + if [ $# -gt 1 ]; then + if [[ ! "$2" =~ -.* ]]; then + BUILDDIRARMV6=$2; shift + fi + fi + ;; + -buildarmv7) + BUILDARMV7=1 + if [ $# -gt 1 ]; then + if [[ ! "$2" =~ -.* ]]; then + BUILDDIRARMV7=$2; shift + fi + fi + ;; + esac + shift +done PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker if [ -f $PACKAGE_NAME-$VERSION.dmg ]; then @@ -46,14 +73,16 @@ PKGROOT=$TMPDIR/pkg/Package_Root mkdir -p $PKGROOT mkdir -p $PKGROOT/opt/$PACKAGE_NAME/bin -make install DESTDIR=$PKGROOT mandir=/opt/$PACKAGE_NAME/man +make install DESTDIR=$PKGROOT mandir=/opt/$PACKAGE_NAME/man \ + docdir=/Library/Documentation/$PACKAGE_NAME \ + exampledir=/Library/Documentation/$PACKAGE_NAME rm -f $PKGROOT/opt/$PACKAGE_NAME/lib/*.la mkdir -p $PKGROOT/usr/lib mv $PKGROOT/opt/$PACKAGE_NAME/lib/libturbojpeg.* $PKGROOT/usr/lib mkdir -p $PKGROOT/usr/include mv $PKGROOT/opt/$PACKAGE_NAME/include/turbojpeg.h $PKGROOT/usr/include -if [ $UNIVERSAL = 1 ]; then +if [ $BUILD32 = 1 ]; then if [ ! -d $BUILDDIR32 ]; then echo ERROR: 32-bit build directory $BUILDDIR32 does not exist exit 1 @@ -118,6 +147,52 @@ fi +if [ $BUILDARMV6 = 1 ]; then + if [ ! -d $BUILDDIRARMV6 ]; then + echo ERROR: ARM v6 build directory $BUILDDIRARMV6 does not exist + exit 1 + fi + if [ ! -f $BUILDDIRARMV6/Makefile ]; then + echo ERROR: ARM v6 build directory $BUILDDIRARMV6 is not configured + exit 1 + fi + mkdir -p $TMPDIR/dist.armv6 + pushd $BUILDDIRARMV6 + make install DESTDIR=$TMPDIR/dist.armv6 + popd + lipo -create \ + $PKGROOT/opt/$PACKAGE_NAME/lib/libjpeg.a \ + -arch arm $TMPDIR/dist.armv6/opt/$PACKAGE_NAME/lib/libjpeg.a \ + -output $PKGROOT/opt/$PACKAGE_NAME/lib/libjpeg.a + lipo -create \ + $PKGROOT/usr/lib/libturbojpeg.a \ + -arch arm $TMPDIR/dist.armv6/opt/$PACKAGE_NAME/lib/libturbojpeg.a \ + -output $PKGROOT/usr/lib/libturbojpeg.a +fi + +if [ $BUILDARMV7 = 1 ]; then + if [ ! -d $BUILDDIRARMV7 ]; then + echo ERROR: ARM v7 build directory $BUILDDIRARMV7 does not exist + exit 1 + fi + if [ ! -f $BUILDDIRARMV7/Makefile ]; then + echo ERROR: ARM v7 build directory $BUILDDIRARMV7 is not configured + exit 1 + fi + mkdir -p $TMPDIR/dist.armv7 + pushd $BUILDDIRARMV7 + make install DESTDIR=$TMPDIR/dist.armv7 + popd + lipo -create \ + $PKGROOT/opt/$PACKAGE_NAME/lib/libjpeg.a \ + -arch arm $TMPDIR/dist.armv7/opt/$PACKAGE_NAME/lib/libjpeg.a \ + -output $PKGROOT/opt/$PACKAGE_NAME/lib/libjpeg.a + lipo -create \ + $PKGROOT/usr/lib/libturbojpeg.a \ + -arch arm $TMPDIR/dist.armv7/opt/$PACKAGE_NAME/lib/libturbojpeg.a \ + -output $PKGROOT/usr/lib/libturbojpeg.a +fi + install_name_tool -id /opt/$PACKAGE_NAME/lib/libjpeg.@SO_MAJOR_VERSION@.dylib $PKGROOT/opt/$PACKAGE_NAME/lib/libjpeg.@SO_MAJOR_VERSION@.dylib install_name_tool -id libturbojpeg.dylib $PKGROOT/usr/lib/libturbojpeg.dylib @@ -133,7 +208,6 @@ ln -fs lib $PKGROOT/opt/$PACKAGE_NAME/lib64 fi -mkdir -p $PKGROOT/Library/Documentation/$PACKAGE_NAME chmod 1775 $PKGROOT/Library chmod 775 $PKGROOT/Library/Documentation mkdir -p $TMPDIR/pkg/Resources @@ -142,11 +216,6 @@ cp pkgscripts/Info.plist $TMPDIR/pkg/ install -m 755 pkgscripts/uninstall $PKGROOT/opt/$PACKAGE_NAME/bin/ -install -m 644 $SRCDIR/README-turbo.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/README-turbo.txt -install -m 644 $SRCDIR/README $PKGROOT/Library/Documentation/$PACKAGE_NAME/README -install -m 644 $SRCDIR/libjpeg.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/libjpeg.txt -install -m 644 $SRCDIR/usage.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/usage.txt - sudo chown -R root:admin $PKGROOT sudo chown -R root:0 $PKGROOT/usr cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.rtf $TMPDIR/pkg/Resources/ diff -Nru libjpeg-turbo-1.1.90+svn733/release/makesunpkg.in libjpeg-turbo-1.2.1+svn823/release/makesunpkg.in --- libjpeg-turbo-1.1.90+svn733/release/makesunpkg.in 2011-05-25 03:52:22.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/makesunpkg.in 2012-04-18 21:45:07.000000000 +0000 @@ -65,11 +65,11 @@ cd $PWD fi # This mess is to work around a bug in /usr/ccs/bin/make -make install DESTDIR=$TMPDIR libdir=/opt/$PACKAGE_NAME/$__LIB mandir=/opt/$PACKAGE_NAME/man AM_MAKEFLAGS="libdir=/opt/$PACKAGE_NAME/$__LIB mandir=/opt/$PACKAGE_NAME/man" +make install DESTDIR=$TMPDIR libdir=/opt/$PACKAGE_NAME/$__LIB \ + mandir=/opt/$PACKAGE_NAME/man docdir=/opt/$PACKAGE_NAME/doc \ + exampledir=/opt/$PACKAGE_NAME/doc \ + AM_MAKEFLAGS="libdir=/opt/$PACKAGE_NAME/$__LIB mandir=/opt/$PACKAGE_NAME/man docdir=/opt/$PACKAGE_NAME/doc exampledir=/opt/$PACKAGE_NAME/doc" rm -f $TMPDIR/opt/$PACKAGE_NAME/$__LIB/*.la -mkdir -p $TMPDIR/opt/$PACKAGE_NAME/doc -cp $SRCDIR/README-turbo.txt $SRCDIR/README $SRCDIR/libjpeg.txt $SRCDIR/usage.txt $TMPDIR/opt/$PACKAGE_NAME/doc -chmod 644 $TMPDIR/opt/$PACKAGE_NAME/doc/* cat >$TMPDIR/proto <>$TMPDIR/proto diff -Nru libjpeg-turbo-1.1.90+svn733/release/pkginfo.in libjpeg-turbo-1.2.1+svn823/release/pkginfo.in --- libjpeg-turbo-1.1.90+svn733/release/pkginfo.in 2011-04-27 00:32:24.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/release/pkginfo.in 2012-04-18 21:45:07.000000000 +0000 @@ -3,7 +3,7 @@ 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 +DESC=A SIMD-accelerated JPEG codec that provides both the libjpeg and TurboJPEG APIs VENDOR=The libjpeg-turbo Project HOTLINE=http://www.libjpeg-turbo.org EMAIL=information@libjpeg-turbo.org diff -Nru libjpeg-turbo-1.1.90+svn733/simd/CMakeLists.txt libjpeg-turbo-1.2.1+svn823/simd/CMakeLists.txt --- libjpeg-turbo-1.1.90+svn733/simd/CMakeLists.txt 2011-11-29 09:01:23.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/simd/CMakeLists.txt 2012-04-18 21:45:07.000000000 +0000 @@ -37,6 +37,8 @@ set(OBJDIR ${CMAKE_CURRENT_BINARY_DIR}) endif() +file(GLOB INC_FILES *.inc) + foreach(file ${SIMD_BASENAMES}) set(DEPFILE "") set(SIMD_SRC ${CMAKE_CURRENT_SOURCE_DIR}/${file}.asm) @@ -53,7 +55,8 @@ string(REGEX REPLACE "gra" "gry" DEPFILE ${DEPFILE}) endif() set(SIMD_OBJ ${OBJDIR}/${file}.obj) - add_custom_command(OUTPUT ${SIMD_OBJ} DEPENDS ${SIMD_SRC} ${DEPFILE} *.inc + add_custom_command(OUTPUT ${SIMD_OBJ} + DEPENDS ${SIMD_SRC} ${DEPFILE} ${INC_FILES} COMMAND ${NASM} ${NAFLAGS} ${SIMD_SRC} -o${SIMD_OBJ}) set(SIMD_OBJS ${SIMD_OBJS} ${SIMD_OBJ}) endforeach() diff -Nru libjpeg-turbo-1.1.90+svn733/simd/jsimd_arm.c libjpeg-turbo-1.2.1+svn823/simd/jsimd_arm.c --- libjpeg-turbo-1.1.90+svn733/simd/jsimd_arm.c 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/simd/jsimd_arm.c 2012-04-18 21:45:07.000000000 +0000 @@ -104,7 +104,7 @@ int bufsize = 1024; /* an initial guess for the line buffer size limit */ #endif - if (simd_support != ~0) + if (simd_support != ~0U) return; simd_support = 0; diff -Nru libjpeg-turbo-1.1.90+svn733/simd/jsimd_i386.c libjpeg-turbo-1.2.1+svn823/simd/jsimd_i386.c --- libjpeg-turbo-1.1.90+svn733/simd/jsimd_i386.c 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/simd/jsimd_i386.c 2012-04-18 21:45:07.000000000 +0000 @@ -41,7 +41,7 @@ { char *env = NULL; - if (simd_support != ~0) + if (simd_support != ~0U) return; simd_support = jpeg_simd_cpu_support(); diff -Nru libjpeg-turbo-1.1.90+svn733/structure.txt libjpeg-turbo-1.2.1+svn823/structure.txt --- libjpeg-turbo-1.1.90+svn733/structure.txt 2010-11-23 05:49:54.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/structure.txt 2012-04-18 21:45:07.000000000 +0000 @@ -1,6 +1,6 @@ IJG JPEG LIBRARY: SYSTEM ARCHITECTURE -Copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. +Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding. This file is part of the Independent JPEG Group's software. For conditions of distribution and use, see the accompanying README file. @@ -385,8 +385,9 @@ * Data destination manager: writes the output JPEG datastream to its final destination (e.g., a file). The destination manager supplied with the - library knows how to write to a stdio stream; for other behaviors, the - surrounding application may provide its own destination manager. + library knows how to write to a stdio stream or to a memory buffer; + for other behaviors, the surrounding application may provide its own + destination manager. * Memory manager: allocates and releases memory, controls virtual arrays (with backing store management, where required). @@ -504,9 +505,9 @@ * Marker reading: decodes JPEG markers (except for RSTn). * Data source manager: supplies the input JPEG datastream. The source - manager supplied with the library knows how to read from a stdio stream; - for other behaviors, the surrounding application may provide its own source - manager. + manager supplied with the library knows how to read from a stdio stream + or from a memory buffer; for other behaviors, the surrounding application + may provide its own source manager. * Memory manager: same as for compression library. @@ -586,8 +587,7 @@ With these conventions, JSAMPLE values can be assumed to be >= 0. This helps simplify correct rounding during downsampling, etc. The JPEG standard's specification that sample values run from -128..127 is accommodated by -subtracting 128 just as the sample value is copied into the source array for -the DCT step (this will be an array of signed ints). Similarly, during +subtracting 128 from the sample value in the DCT step. Similarly, during decompression the output of the IDCT step will be immediately shifted back to 0..255. (NB: different values are required when 12-bit samples are in use. The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be diff -Nru libjpeg-turbo-1.1.90+svn733/tjbench.c libjpeg-turbo-1.2.1+svn823/tjbench.c --- libjpeg-turbo-1.1.90+svn733/tjbench.c 2011-10-18 22:06:22.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/tjbench.c 2012-04-18 21:45:07.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C)2009-2011 D. R. Commander. All Rights Reserved. + * Copyright (C)2009-2012 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -110,7 +110,7 @@ if((handle=tjInitDecompress())==NULL) _throwtj("executing tjInitDecompress()"); - bufsize=(yuv==YUVDECODE? yuvsize:pitch*h); + bufsize=(yuv==YUVDECODE? yuvsize:pitch*scaledh); if(dstbuf==NULL) { if((dstbuf=(unsigned char *)malloc(bufsize)) == NULL) @@ -681,7 +681,7 @@ printf("-rgb, -bgr, -rgbx, -bgrx, -xbgr, -xrgb =\n"); printf(" Test the specified color conversion path in the codec (default: BGR)\n"); printf("-fastupsample = Use fast, inaccurate upsampling code to perform 4:2:2 and 4:2:0\n"); - printf(" YUV decoding in libjpeg decompressor\n"); + printf(" YUV decoding\n"); printf("-quiet = Output results in tabular rather than verbose format\n"); printf("-yuvencode = Encode RGB input as planar YUV rather than compressing as JPEG\n"); printf("-yuvdecode = Decode JPEG image to planar YUV rather than RGB\n"); diff -Nru libjpeg-turbo-1.1.90+svn733/tjbenchtest.in libjpeg-turbo-1.2.1+svn823/tjbenchtest.in --- libjpeg-turbo-1.1.90+svn733/tjbenchtest.in 1970-01-01 00:00:00.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/tjbenchtest.in 2012-04-18 21:45:07.000000000 +0000 @@ -0,0 +1,162 @@ +#!/bin/bash + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +onexit() +{ + if [ -d $OUTDIR ]; then + rm -rf $OUTDIR + fi +} + +runme() +{ + echo \*\*\* $* + $* +} + +EXT=bmp +IMAGES="vgl_5674_0098.${EXT} vgl_6434_0018a.${EXT} vgl_6548_0026a.${EXT} nightshot_iso_100.${EXT}" +IMGDIR=@srcdir@/testimages +OUTDIR=__tjbenchtest_output +EXEDIR=. +BMPARG= +if [ "$EXT" = "bmp" ]; then BMPARG=-bmp; fi + +if [ -d $OUTDIR ]; then + rm -rf $OUTDIR +fi +mkdir -p $OUTDIR + +exec >$EXEDIR/tjbenchtest.log + +# Standard tests +for image in $IMAGES; do + + cp $IMGDIR/$image $OUTDIR + basename=`basename $image .${EXT}` + $EXEDIR/cjpeg -quality 95 -dct fast -grayscale $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_GRAY_cjpeg.jpg + $EXEDIR/cjpeg -quality 95 -dct fast -sample 2x2 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_420_cjpeg.jpg + $EXEDIR/cjpeg -quality 95 -dct fast -sample 2x1 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_422_cjpeg.jpg + $EXEDIR/cjpeg -quality 95 -dct fast -sample 1x1 $IMGDIR/${basename}.${EXT} >$OUTDIR/${basename}_444_cjpeg.jpg + for samp in GRAY 420 422 444; do + $EXEDIR/djpeg -rgb $BMPARG $OUTDIR/${basename}_${samp}_cjpeg.jpg >$OUTDIR/${basename}_${samp}_djpeg.${EXT} + done + for samp in 420 422; do + $EXEDIR/djpeg -nosmooth $BMPARG $OUTDIR/${basename}_${samp}_cjpeg.jpg >$OUTDIR/${basename}_${samp}_djpeg_nosmooth.${EXT} + done + + # Compression + runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -quiet -benchtime 0.01 + for s in GRAY 420 422 444; do + runme cmp $OUTDIR/${basename}_${s}_Q95.jpg $OUTDIR/${basename}_${s}_cjpeg.jpg + done + + # Tiled compression & decompression + runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 + for samp in GRAY 444; do + for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \ + $OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do + runme cmp $i $OUTDIR/${basename}_${samp}_djpeg.${EXT} + rm $i + done + done + runme $EXEDIR/tjbench $OUTDIR/$image 95 -rgb -tile -quiet -benchtime 0.01 -fastupsample + for samp in 420 422; do + for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \ + $OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do + runme cmp $i $OUTDIR/${basename}_${samp}_djpeg_nosmooth.${EXT} + rm $i + done + done + + # Tiled decompression + for samp in GRAY 444; do + runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -tile -quiet -benchtime 0.01 + for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \ + $OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do + runme cmp $i $OUTDIR/${basename}_${samp}_djpeg.${EXT} + rm $i + done + done + for samp in 420 422; do + runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -tile -quiet -benchtime 0.01 -fastupsample + for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \ + $OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do + runme cmp $i $OUTDIR/${basename}_${samp}_djpeg_nosmooth.${EXT} + rm $i + done + done + + # Scaled decompression + for scale in 2 4 8; do + for samp in GRAY 420 422 444; do + $EXEDIR/djpeg -rgb -scale 1/${scale} $BMPARG $OUTDIR/${basename}_${samp}_cjpeg.jpg >$OUTDIR/${basename}_${samp}_1_${scale}_djpeg.${EXT} + runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -scale 1/${scale} -quiet -benchtime 0.01 + runme cmp $OUTDIR/${basename}_${samp}_Q95_1_${scale}.${EXT} $OUTDIR/${basename}_${samp}_1_${scale}_djpeg.${EXT} + rm $OUTDIR/${basename}_${samp}_Q95_1_${scale}.${EXT} + done + done + + # Transforms + for samp in GRAY 420 422 444; do + $EXEDIR/jpegtran -flip horizontal -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_hflip_jpegtran.jpg + $EXEDIR/jpegtran -flip vertical -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_vflip_jpegtran.jpg + $EXEDIR/jpegtran -transpose -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_transpose_jpegtran.jpg + $EXEDIR/jpegtran -transverse -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_transverse_jpegtran.jpg + $EXEDIR/jpegtran -rotate 90 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot90_jpegtran.jpg + $EXEDIR/jpegtran -rotate 180 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot180_jpegtran.jpg + $EXEDIR/jpegtran -rotate 270 -trim $OUTDIR/${basename}_${samp}_Q95.jpg >$OUTDIR/${basename}_${samp}_rot270_jpegtran.jpg + done + for xform in hflip vflip transpose transverse rot90 rot180 rot270; do + for samp in GRAY 444; do + $EXEDIR/djpeg -rgb $BMPARG $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT} + runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01 + for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \ + $OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do + runme cmp $i $OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT} + rm $i + done + done + for samp in 420 422; do + $EXEDIR/djpeg -nosmooth -rgb $BMPARG $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT} + runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01 -fastupsample + for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \ + $OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do + runme cmp $i $OUTDIR/${basename}_${samp}_${xform}_jpegtran.${EXT} + rm $i + done + done + done + + # Grayscale transform + for xform in hflip vflip transpose transverse rot90 rot180 rot270; do + for samp in GRAY 444 422 420; do + runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -tile -quiet -benchtime 0.01 -grayscale + for i in $OUTDIR/${basename}_${samp}_Q95_[0-9]*[0-9]x[0-9]*[0-9].${EXT} \ + $OUTDIR/${basename}_${samp}_Q95_full.${EXT}; do + runme cmp $i $OUTDIR/${basename}_GRAY_${xform}_jpegtran.${EXT} + rm $i + done + done + done + + # Transforms with scaling + for xform in hflip vflip transpose transverse rot90 rot180 rot270; do + for samp in GRAY 444 422 420; do + for scale in 2 4 8; do + $EXEDIR/djpeg -rgb -scale 1/${scale} $BMPARG $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_1_${scale}_jpegtran.${EXT} + runme $EXEDIR/tjbench $OUTDIR/${basename}_${samp}_Q95.jpg $BMPARG -$xform -scale 1/${scale} -quiet -benchtime 0.01 + runme cmp $OUTDIR/${basename}_${samp}_Q95_1_${scale}.${EXT} $OUTDIR/${basename}_${samp}_${xform}_1_${scale}_jpegtran.${EXT} + rm $OUTDIR/${basename}_${samp}_Q95_1_${scale}.${EXT} + done + done + done + +done + +echo SUCCESS! diff -Nru libjpeg-turbo-1.1.90+svn733/tjexampletest.in libjpeg-turbo-1.2.1+svn823/tjexampletest.in --- libjpeg-turbo-1.1.90+svn733/tjexampletest.in 1970-01-01 00:00:00.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/tjexampletest.in 2012-04-18 21:45:07.000000000 +0000 @@ -0,0 +1,116 @@ +#!/bin/bash + +set -u +set -e +trap onexit INT +trap onexit TERM +trap onexit EXIT + +onexit() +{ + if [ -d $OUTDIR ]; then + rm -rf $OUTDIR + fi +} + +runme() +{ + echo \*\*\* $* + $* +} + +IMAGES="vgl_5674_0098.bmp vgl_6434_0018a.bmp vgl_6548_0026a.bmp nightshot_iso_100.bmp" +IMGDIR=@srcdir@/testimages +OUTDIR=__tjexampletest_output +EXEDIR=. +JAVA="@JAVA@ -cp java/turbojpeg.jar -Djava.library.path=.libs" + +if [ -d $OUTDIR ]; then + rm -rf $OUTDIR +fi +mkdir -p $OUTDIR + +exec >$EXEDIR/tjexampletest.log + +for image in $IMAGES; do + + cp $IMGDIR/$image $OUTDIR + basename=`basename $image .bmp` + $EXEDIR/cjpeg -quality 95 -dct fast -grayscale $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_GRAY_cjpeg.jpg + $EXEDIR/cjpeg -quality 95 -dct fast -sample 2x2 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_420_cjpeg.jpg + $EXEDIR/cjpeg -quality 95 -dct fast -sample 2x1 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_422_cjpeg.jpg + $EXEDIR/cjpeg -quality 95 -dct fast -sample 1x1 $IMGDIR/${basename}.bmp >$OUTDIR/${basename}_444_cjpeg.jpg + for samp in GRAY 420 422 444; do + $EXEDIR/djpeg -rgb -bmp $OUTDIR/${basename}_${samp}_cjpeg.jpg >$OUTDIR/${basename}_${samp}_djpeg.bmp + done + + # Compression + for samp in GRAY 420 422 444; do + runme $JAVA TJExample $OUTDIR/$image $OUTDIR/${basename}_${samp}.jpg -q 95 -samp ${samp} + runme cmp $OUTDIR/${basename}_${samp}.jpg $OUTDIR/${basename}_${samp}_cjpeg.jpg + done + + # Decompression + for samp in 420 GRAY 420 422 444; do + runme $JAVA TJExample $OUTDIR/${basename}_${samp}.jpg $OUTDIR/${basename}_${samp}.bmp + runme cmp -i 54:54 $OUTDIR/${basename}_${samp}.bmp $OUTDIR/${basename}_${samp}_djpeg.bmp + rm $OUTDIR/${basename}_${samp}.bmp + done + + # Scaled decompression + for scale in 2 4 8; do + for samp in GRAY 420 422 444; do + $EXEDIR/djpeg -rgb -bmp -scale 1/${scale} $OUTDIR/${basename}_${samp}_cjpeg.jpg >$OUTDIR/${basename}_${samp}_1_${scale}_djpeg.bmp + runme $JAVA TJExample $OUTDIR/${basename}_${samp}.jpg $OUTDIR/${basename}_${samp}_1_${scale}.bmp -scale 1/${scale} + runme cmp -i 54:54 $OUTDIR/${basename}_${samp}_1_${scale}.bmp $OUTDIR/${basename}_${samp}_1_${scale}_djpeg.bmp + rm $OUTDIR/${basename}_${samp}_1_${scale}.bmp + done + done + + # Transforms + for samp in GRAY 420 422 444; do + $EXEDIR/jpegtran -crop 70x60+16+16 -flip horizontal -trim $OUTDIR/${basename}_${samp}.jpg >$OUTDIR/${basename}_${samp}_hflip_jpegtran.jpg + $EXEDIR/jpegtran -crop 70x60+16+16 -flip vertical -trim $OUTDIR/${basename}_${samp}.jpg >$OUTDIR/${basename}_${samp}_vflip_jpegtran.jpg + $EXEDIR/jpegtran -crop 70x60+16+16 -transpose -trim $OUTDIR/${basename}_${samp}.jpg >$OUTDIR/${basename}_${samp}_transpose_jpegtran.jpg + $EXEDIR/jpegtran -crop 70x60+16+16 -transverse -trim $OUTDIR/${basename}_${samp}.jpg >$OUTDIR/${basename}_${samp}_transverse_jpegtran.jpg + $EXEDIR/jpegtran -crop 70x60+16+16 -rotate 90 -trim $OUTDIR/${basename}_${samp}.jpg >$OUTDIR/${basename}_${samp}_rot90_jpegtran.jpg + $EXEDIR/jpegtran -crop 70x60+16+16 -rotate 180 -trim $OUTDIR/${basename}_${samp}.jpg >$OUTDIR/${basename}_${samp}_rot180_jpegtran.jpg + $EXEDIR/jpegtran -crop 70x60+16+16 -rotate 270 -trim $OUTDIR/${basename}_${samp}.jpg >$OUTDIR/${basename}_${samp}_rot270_jpegtran.jpg + done + for xform in hflip vflip transpose transverse rot90 rot180 rot270; do + for samp in GRAY 420 422 444; do + runme $JAVA TJExample $OUTDIR/${basename}_${samp}.jpg $OUTDIR/${basename}_${samp}_${xform}.jpg -$xform -crop 16,16,70x60 + runme cmp $OUTDIR/${basename}_${samp}_${xform}.jpg $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg + $EXEDIR/djpeg -rgb -bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_jpegtran.bmp + runme $JAVA TJExample $OUTDIR/${basename}_${samp}.jpg $OUTDIR/${basename}_${samp}_${xform}.bmp -$xform -crop 16,16,70x60 + runme cmp -i 54:54 $OUTDIR/${basename}_${samp}_${xform}.bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.bmp + rm $OUTDIR/${basename}_${samp}_${xform}.bmp + done + done + + # Grayscale transform + for xform in hflip vflip transpose transverse rot90 rot180 rot270; do + for samp in GRAY 444 422 420; do + runme $JAVA TJExample $OUTDIR/${basename}_${samp}.jpg $OUTDIR/${basename}_${samp}_${xform}.jpg -$xform -grayscale -crop 16,16,70x60 + runme cmp $OUTDIR/${basename}_${samp}_${xform}.jpg $OUTDIR/${basename}_GRAY_${xform}_jpegtran.jpg + runme $JAVA TJExample $OUTDIR/${basename}_${samp}.jpg $OUTDIR/${basename}_${samp}_${xform}.bmp -$xform -grayscale -crop 16,16,70x60 + runme cmp -i 54:54 $OUTDIR/${basename}_${samp}_${xform}.bmp $OUTDIR/${basename}_GRAY_${xform}_jpegtran.bmp + rm $OUTDIR/${basename}_${samp}_${xform}.bmp + done + done + + # Transforms with scaling + for xform in hflip vflip transpose transverse rot90 rot180 rot270; do + for samp in GRAY 444 422 420; do + for scale in 2 4 8; do + $EXEDIR/djpeg -rgb -bmp -scale 1/${scale} $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_1_${scale}_jpegtran.bmp + runme $JAVA TJExample $OUTDIR/${basename}_${samp}.jpg $OUTDIR/${basename}_${samp}_${xform}_1_${scale}.bmp -$xform -scale 1/${scale} -crop 16,16,70x60 + runme cmp -i 54:54 $OUTDIR/${basename}_${samp}_${xform}_1_${scale}.bmp $OUTDIR/${basename}_${samp}_${xform}_1_${scale}_jpegtran.bmp + rm $OUTDIR/${basename}_${samp}_${xform}_1_${scale}.bmp + done + done + done + +done + +echo SUCCESS! diff -Nru libjpeg-turbo-1.1.90+svn733/tjunittest.c libjpeg-turbo-1.2.1+svn823/tjunittest.c --- libjpeg-turbo-1.1.90+svn733/tjunittest.c 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/tjunittest.c 2012-04-18 21:45:07.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C)2009-2011 D. R. Commander. All Rights Reserved. + * Copyright (C)2009-2012 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -77,7 +77,7 @@ const int _onlyRGB[]={TJPF_RGB}; enum {YUVENCODE=1, YUVDECODE}; -int yuv=0, alloc=0, alpha=0; +int yuv=0, alloc=0; int exitStatus=0; #define bailout() {exitStatus=-1; goto bailout;} @@ -502,6 +502,8 @@ for(i=0; i<2; i++) { int flags=0; + if(subsamp==TJSAMP_422 || subsamp==TJSAMP_420 || subsamp==TJSAMP_440) + flags|=TJFLAG_FASTUPSAMPLE; if(i==1) { if(yuv==YUVDECODE) goto bailout; @@ -617,15 +619,12 @@ if(doyuv) {yuv=YUVENCODE; alloc=0;} doTest(35, 39, _3byteFormats, 2, TJSAMP_444, "test"); doTest(39, 41, _4byteFormats, 4, TJSAMP_444, "test"); - if(doyuv) - { - doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test"); - doTest(35, 39, _4byteFormats, 4, TJSAMP_422, "test"); - doTest(39, 41, _3byteFormats, 2, TJSAMP_420, "test"); - doTest(41, 35, _4byteFormats, 4, TJSAMP_420, "test"); - doTest(35, 39, _3byteFormats, 2, TJSAMP_440, "test"); - doTest(39, 41, _4byteFormats, 4, TJSAMP_440, "test"); - } + doTest(41, 35, _3byteFormats, 2, TJSAMP_422, "test"); + doTest(35, 39, _4byteFormats, 4, TJSAMP_422, "test"); + doTest(39, 41, _3byteFormats, 2, TJSAMP_420, "test"); + doTest(41, 35, _4byteFormats, 4, TJSAMP_420, "test"); + doTest(35, 39, _3byteFormats, 2, TJSAMP_440, "test"); + doTest(39, 41, _4byteFormats, 4, TJSAMP_440, "test"); doTest(35, 39, _onlyGray, 1, TJSAMP_GRAY, "test"); doTest(39, 41, _3byteFormats, 2, TJSAMP_GRAY, "test"); doTest(41, 35, _4byteFormats, 4, TJSAMP_GRAY, "test"); diff -Nru libjpeg-turbo-1.1.90+svn733/turbojpeg-jni.c libjpeg-turbo-1.2.1+svn823/turbojpeg-jni.c --- libjpeg-turbo-1.1.90+svn733/turbojpeg-jni.c 2011-09-26 18:46:09.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/turbojpeg-jni.c 2012-04-18 21:45:07.000000000 +0000 @@ -635,7 +635,8 @@ if(t[i].r.w!=0) w=t[i].r.w; if(t[i].r.h!=0) h=t[i].r.h; bailif0(jdstBufs[i]=(*env)->GetObjectArrayElement(env, dstobjs, i)); - if((*env)->GetArrayLength(env, jdstBufs[i])GetArrayLength(env, jdstBufs[i]) + GetPrimitiveArrayCritical(env, jdstBufs[i], 0)); } diff -Nru libjpeg-turbo-1.1.90+svn733/turbojpeg.c libjpeg-turbo-1.2.1+svn823/turbojpeg.c --- libjpeg-turbo-1.1.90+svn733/turbojpeg.c 2011-12-19 02:21:03.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/turbojpeg.c 2012-04-18 21:45:07.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C)2009-2011 D. R. Commander. All Rights Reserved. + * Copyright (C)2009-2012 D. R. Commander. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -498,7 +498,7 @@ JSAMPROW *outbuf[MAX_COMPONENTS]; int row, pw, ph, cw[MAX_COMPONENTS], ch[MAX_COMPONENTS]; JSAMPLE *ptr=dstBuf; - unsigned long yuvsize=0; + unsigned long yuvsize=0; jpeg_component_info *compptr; getinstance(handle); @@ -756,7 +756,10 @@ jpeg_mem_src_tj(dinfo, jpegBuf, jpegSize); jpeg_read_header(dinfo, TRUE); - if(setDecompDefaults(dinfo, pixelFormat)==-1) return -1; + if(setDecompDefaults(dinfo, pixelFormat)==-1) + { + retval=-1; goto bailout; + } if(flags&TJFLAG_FASTUPSAMPLE) dinfo->do_fancy_upsampling=FALSE; @@ -1065,7 +1068,7 @@ &xinfo[i]); if(t[i].customFilter) { - int ci, by, y; + int ci, y; JDIMENSION by; for(ci=0; cinum_components; ci++) { jpeg_component_info *compptr=&cinfo->comp_info[ci]; diff -Nru libjpeg-turbo-1.1.90+svn733/usage.txt libjpeg-turbo-1.2.1+svn823/usage.txt --- libjpeg-turbo-1.1.90+svn733/usage.txt 2010-11-23 05:49:54.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/usage.txt 2012-04-18 21:45:07.000000000 +0000 @@ -131,7 +131,7 @@ subsampling may be unacceptable. The -quality option accepts a comma-separated list of parameters, which -respectively refer to the quality levels which should be assigned to the +respectively refer to the quality levels that should be assigned to the quantization table slots. If there are more q-table slots than parameters, then the last parameter is replicated. Thus, if only one quality parameter is given, this is used for both luminance and chrominance (slots 0 and 1, @@ -157,6 +157,11 @@ Switches for advanced users: + -arithmetic Use arithmetic coding. CAUTION: arithmetic coded JPEG + is not yet widely implemented, so many decoders will + be unable to view an arithmetic coded JPEG file at + all. + -dct int Use integer DCT method (default). -dct fast Use fast integer DCT (less accurate). -dct float Use floating-point DCT method. @@ -201,11 +206,6 @@ Switches for wizards: - -arithmetic Use arithmetic coding. CAUTION: arithmetic coded JPEG - is not yet widely implemented, so many decoders will - be unable to view an arithmetic coded JPEG file at - all. - -baseline Force baseline-compatible quantization tables to be generated. This clamps quantization values to 8 bits even at low quality settings. (This switch is poorly @@ -447,9 +447,9 @@ jpegtran accepts a subset of the switches recognized by cjpeg: -optimize Perform optimization of entropy encoding parameters. -progressive Create progressive JPEG file. + -arithmetic Use arithmetic coding. -restart N Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is attached to the number. - -arithmetic Use arithmetic coding. -scans file Use the scan script given in the specified text file. See the previous discussion of cjpeg for more details about these switches. If you specify none of these switches, you get a plain baseline-JPEG output @@ -527,7 +527,7 @@ present in the source file. -copy comments Copy only comment markers. This setting copies comments from the source file but discards - any other data which is inessential for image display. + any other data that is inessential for image display. -copy all Copy all extra markers. This setting preserves miscellaneous markers found in the source file, such as JFIF thumbnails, Exif data, and Photoshop settings. diff -Nru libjpeg-turbo-1.1.90+svn733/win/config.h.in libjpeg-turbo-1.2.1+svn823/win/config.h.in --- libjpeg-turbo-1.1.90+svn733/win/config.h.in 2010-10-16 08:52:55.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/win/config.h.in 2012-04-18 21:45:07.000000000 +0000 @@ -1,3 +1,13 @@ #define VERSION "@VERSION@" #define BUILD "@BUILD@" #define PACKAGE_NAME "@CMAKE_PROJECT_NAME@" + +#ifndef INLINE +#if defined(__GNUC__) +#define INLINE __attribute__((always_inline)) +#elif defined(_MSC_VER) +#define INLINE __forceinline +#else +#define INLINE +#endif +#endif diff -Nru libjpeg-turbo-1.1.90+svn733/win/jconfig.h.in libjpeg-turbo-1.2.1+svn823/win/jconfig.h.in --- libjpeg-turbo-1.1.90+svn733/win/jconfig.h.in 2011-12-18 16:29:35.000000000 +0000 +++ libjpeg-turbo-1.2.1+svn823/win/jconfig.h.in 2012-04-18 21:45:07.000000000 +0000 @@ -33,16 +33,6 @@ #endif #define XMD_H /* prevent jmorecfg.h from redefining it */ -#ifndef INLINE -#if defined(__GNUC__) -#define INLINE __attribute__((always_inline)) -#elif defined(_MSC_VER) -#define INLINE __forceinline -#else -#define INLINE -#endif -#endif - #ifdef JPEG_INTERNALS #undef RIGHT_SHIFT_IS_UNSIGNED