From 211d1e74638c3a04aed74f015d2c0c2367b2674e Mon Sep 17 00:00:00 2001 From: DRC Date: Sun, 13 Jan 2013 11:25:20 +0000 Subject: [PATCH] Consolidate the MD5 sums into one location and add a --without-turbojpeg switch to the Un*x build to allow building libjpeg-turbo without the TurboJPEG/OSS wrapper library. These modifications were supposed to lay the ground work for adding compile-time-selectable 12-bit JPEG support, but unfortunately there are deeper issues that prevent the implementation of that feature right now (namely, some of the modifications made to the C code to support the SIMD code are apparently not 12-bit-friendly.) git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@902 632fc199-4ca6-4c93-a231-07263d6284db --- CMakeLists.txt | 130 +++++++++++++++++++++++------------------ Makefile.am | 153 +++++++++++++++++++++++++++++++++---------------- configure.ac | 20 +++++++ 3 files changed, 198 insertions(+), 105 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a0c6ed..b1763d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,6 +249,39 @@ else() endif() enable_testing() + +set(MD5_JPEG_INT 9a68f56bc76e466aa7e52f415d0f4a5f) +set(MD5_JPEG_FAST 0e1502e7fa421835e376a314fac2a39f) +set(MD5_JPEG_FAST_100 7bf72a8e741d64eecb960c97323af77c) +set(MD5_JPEG_FLOAT d1623885ffafcd40c684af09e3d65cd5) +set(MD5_JPEG_FLOAT_NOSIMD fb4884c35f8273f498cb32879de5c455) +set(MD5_JPEG_INT_GRAY 72b51f894b8f4a10b3ee3066770aa38d) +set(MD5_PPM_INT d1ed0d11f076b842525271647716aeb8) +set(MD5_PPM_FAST 048298a2d2410261c0533cb97bcfef23) +set(MD5_PPM_FLOAT 7f5b446ee36b2630e06785b8d42af15f) +set(MD5_PPM_FLOAT_NOSIMD 64072f1dbdc5b3a187777788604971a5) +set(MD5_PPM_INT_2_1 9f9de8c0612f8d06869b960b05abf9c9) +set(MD5_PPM_INT_15_8 b6875bc070720b899566cc06459b63b7) +set(MD5_PPM_INT_7_4 06a177eae05f164fac57f7a2c346ee87) +set(MD5_PPM_INT_13_8 bc3452573c8152f6ae552939ee19f82f) +set(MD5_PPM_INT_3_2 f5a8b88a8a7f96016f04d259cf82ed67) +set(MD5_PPM_INT_11_8 d8cc73c0aaacd4556569b59437ba00a5) +set(MD5_PPM_INT_5_4 32775dd9ad2ab90f4c5b219b53e0c86c) +set(MD5_PPM_INT_9_8 d25e61bc7eac0002f5b393aa223747b6) +set(MD5_PPM_INT_7_8 ddb564b7c74a09494016d6cd7502a946) +set(MD5_PPM_INT_3_4 8ed8e68808c3fbc4ea764fc9d2968646) +set(MD5_PPM_INT_5_8 a3363274999da2366a024efae6d16c9b) +set(MD5_PPM_INT_1_2 e692a315cea26b988c8e8b29a5dbcd81) +set(MD5_PPM_INT_3_8 79eca9175652ced755155c90e785a996) +set(MD5_PPM_INT_1_4 79cd778f8bf1a117690052cacdd54eca) +set(MD5_PPM_INT_1_8 391b3d4aca640c8567d6f8745eb2142f) +set(MD5_PPM_FAST_1_2 f30bcf6d32ccd44cbdd9aeaacbd9454f) +set(MD5_BMP_256 4980185e3776e89bd931736e1cddeee6) +set(MD5_JPEG_ARI e986fb0a637a8d833d96e8a6d6d84ea1) +set(MD5_PPM_ARI 72b59a99bcf1de24c5b27d151bde2437) +set(MD5_JPEG_PROG 1c4afddc05c0a43489ee54438a482d92) +set(MD5_JPEG_CROP b4197f377e621c4e9b1d20471432610d) + if(WITH_JAVA) add_test(TJUnitTest ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR} TJUnitTest) add_test(TJUnitTest-yuv ${JAVA_RUNTIME} -cp java/${OBJDIR}turbojpeg.jar -Djava.library.path=${CMAKE_CURRENT_BINARY_DIR}/${OBJDIR} TJUnitTest -yuv) @@ -259,126 +292,111 @@ 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}/testimages/testorig.ppm) -add_test(cjpeg-int-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -DFILE=testoutint.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-int-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testoutint.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=0e1502e7fa421835e376a314fac2a39f -DFILE=testoutfst.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-fast-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FAST} -DFILE=testoutfst.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=7bf72a8e741d64eecb960c97323af77c -DFILE=testoutfst100.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-fast-100-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FAST_100} -DFILE=testoutfst100.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=d1623885ffafcd40c684af09e3d65cd5 -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FLOAT} -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) else() -add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -DMD5=fb4884c35f8273f498cb32879de5c455 -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FLOAT_NOSIMD} -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endif() 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} -DMD5=72b51f894b8f4a10b3ee3066770aa38d -DFILE=testoutgray.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-int-gray-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT_GRAY} -DFILE=testoutgray.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=d1ed0d11f076b842525271647716aeb8 -DFILE=testoutint.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-int-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_INT} -DFILE=testoutint.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=048298a2d2410261c0533cb97bcfef23 -DFILE=testoutfst.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-fast-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FAST} -DFILE=testoutfst.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=7f5b446ee36b2630e06785b8d42af15f -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FLOAT} -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) else() -add_test(djpeg-float-cmp ${CMAKE_COMMAND} -DMD5=64072f1dbdc5b3a187777788604971a5 -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) -endif() -set(MD5_2_1 9f9de8c0612f8d06869b960b05abf9c9) -set(MD5_15_8 b6875bc070720b899566cc06459b63b7) -set(MD5_7_4 06a177eae05f164fac57f7a2c346ee87) -set(MD5_13_8 bc3452573c8152f6ae552939ee19f82f) -set(MD5_3_2 f5a8b88a8a7f96016f04d259cf82ed67) -set(MD5_11_8 d8cc73c0aaacd4556569b59437ba00a5) -set(MD5_5_4 32775dd9ad2ab90f4c5b219b53e0c86c) -set(MD5_9_8 d25e61bc7eac0002f5b393aa223747b6) -set(MD5_7_8 ddb564b7c74a09494016d6cd7502a946) -set(MD5_3_4 8ed8e68808c3fbc4ea764fc9d2968646) -set(MD5_5_8 a3363274999da2366a024efae6d16c9b) -set(MD5_1_2 e692a315cea26b988c8e8b29a5dbcd81) -set(MD5_3_8 79eca9175652ced755155c90e785a996) -set(MD5_1_4 79cd778f8bf1a117690052cacdd54eca) -set(MD5_1_8 391b3d4aca640c8567d6f8745eb2142f) +add_test(djpeg-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FLOAT_NOSIMD} -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +endif() foreach(scale 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8) string(REGEX REPLACE "_" "/" scalearg ${scale}) add_test(djpeg-int-${scale} sharedlib/djpeg -dct int -nosmooth -scale ${scalearg} -ppm -outfile testoutint${scale}.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) -add_test(djpeg-int-${scale}-cmp ${CMAKE_COMMAND} -DMD5=${MD5_${scale}} -DFILE=testoutint${scale}.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-int-${scale}-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_INT_${scale}} -DFILE=testoutint${scale}.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endforeach() 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} -DMD5=f30bcf6d32ccd44cbdd9aeaacbd9454f -DFILE=testoutfst1_2.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-fast-1_2-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FAST_1_2} -DFILE=testoutfst1_2.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=4980185e3776e89bd931736e1cddeee6 -DFILE=testout.bmp -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-256-cmp ${CMAKE_COMMAND} -DMD5=${MD5_BMP_256} -DFILE=testout.bmp -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=1c4afddc05c0a43489ee54438a482d92 -DFILE=testoutp.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-prog-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_PROG} -DFILE=testoutp.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) add_test(jpegtran-prog sharedlib/jpegtran -outfile testoutt.jpg testoutp.jpg) -add_test(jpegtran-prog-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -DFILE=testoutt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(jpegtran-prog-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testoutt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) if(WITH_ARITH_ENC) 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} -DMD5=e986fb0a637a8d833d96e8a6d6d84ea1 -DFILE=testoutari.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake ) +add_test(cjpeg-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_ARI} -DFILE=testoutari.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake ) add_test(jpegtran-toari sharedlib/jpegtran -arithmetic -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg) -add_test(jpegtran-toari-cmp ${CMAKE_COMMAND} -DMD5=e986fb0a637a8d833d96e8a6d6d84ea1 -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(jpegtran-toari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_ARI} -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endif() if(WITH_ARITH_DEC) 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} -DMD5=72b59a99bcf1de24c5b27d151bde2437 -DFILE=testoutari.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_ARI} -DFILE=testoutari.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) add_test(jpegtran-fromari sharedlib/jpegtran -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg) -add_test(jpegtran-fromari-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(jpegtran-fromari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endif() 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} -DMD5=b4197f377e621c4e9b1d20471432610d -DFILE=testoutcrop.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(jpegtran-crop-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_CROP} -DFILE=testoutcrop.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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}/testimages/testorig.ppm) -add_test(cjpeg-static-int-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -DFILE=testoutint.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-static-int-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testoutint.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=0e1502e7fa421835e376a314fac2a39f -DFILE=testoutfst.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-static-fast-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FAST} -DFILE=testoutfst.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=7bf72a8e741d64eecb960c97323af77c -DFILE=testoutfst100.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-static-fast-100-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FAST_100} -DFILE=testoutfst100.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=d1623885ffafcd40c684af09e3d65cd5 -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FLOAT} -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) else() -add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=fb4884c35f8273f498cb32879de5c455 -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_FLOAT_NOSIMD} -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endif() 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} -DMD5=72b51f894b8f4a10b3ee3066770aa38d -DFILE=testoutgray.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-static-int-gray-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT_GRAY} -DFILE=testoutgray.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=d1ed0d11f076b842525271647716aeb8 -DFILE=testoutint.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-static-int-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_INT} -DFILE=testoutint.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=048298a2d2410261c0533cb97bcfef23 -DFILE=testoutfst.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-static-fast-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FAST} -DFILE=testoutfst.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=7f5b446ee36b2630e06785b8d42af15f -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FLOAT} -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) else() -add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=64072f1dbdc5b3a187777788604971a5 -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FLOAT_NOSIMD} -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endif() foreach(scale 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8) string(REGEX REPLACE "_" "/" scalearg ${scale}) add_test(djpeg-static-int-${scale} djpeg-static -dct int -nosmooth -scale ${scalearg} -ppm -outfile testoutint${scale}.ppm ${CMAKE_SOURCE_DIR}/testimages/testorig.jpg) -add_test(djpeg-static-int-${scale}-cmp ${CMAKE_COMMAND} -DMD5=${MD5_${scale}} -DFILE=testoutint${scale}.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-static-int-${scale}-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_INT_${scale}} -DFILE=testoutint${scale}.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endforeach() 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} -DMD5=f30bcf6d32ccd44cbdd9aeaacbd9454f -DFILE=testoutfst1_2.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-static-fast-1_2-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_FAST_1_2} -DFILE=testoutfst1_2.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=4980185e3776e89bd931736e1cddeee6 -DFILE=testout.bmp -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-static-256-cmp ${CMAKE_COMMAND} -DMD5=${MD5_BMP_256} -DFILE=testout.bmp -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) 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} -DMD5=1c4afddc05c0a43489ee54438a482d92 -DFILE=testoutp.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(cjpeg-static-prog-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_PROG} -DFILE=testoutp.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) add_test(jpegtran-static-prog jpegtran-static -outfile testoutt.jpg testoutp.jpg) -add_test(jpegtran-static-prog-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -DFILE=testoutt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(jpegtran-static-prog-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testoutt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) if(WITH_ARITH_ENC) 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} -DMD5=e986fb0a637a8d833d96e8a6d6d84ea1 -DFILE=testoutari.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake ) +add_test(cjpeg-static-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_ARI} -DFILE=testoutari.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake ) 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} -DMD5=e986fb0a637a8d833d96e8a6d6d84ea1 -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(jpegtran-static-toari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_ARI} -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endif() if(WITH_ARITH_DEC) 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} -DMD5=72b59a99bcf1de24c5b27d151bde2437 -DFILE=testoutari.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(djpeg-static-ari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_PPM_ARI} -DFILE=testoutari.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) add_test(jpegtran-static-fromari jpegtran-static -outfile testouta.jpg ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg) -add_test(jpegtran-static-fromari-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(jpegtran-static-fromari-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_INT} -DFILE=testouta.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) endif() 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} -DMD5=b4197f377e621c4e9b1d20471432610d -DFILE=testoutcrop.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) +add_test(jpegtran-static-crop-cmp ${CMAKE_COMMAND} -DMD5=${MD5_JPEG_CROP} -DFILE=testoutcrop.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake) add_custom_target(testclean COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmakescripts/testclean.cmake) diff --git a/Makefile.am b/Makefile.am index b4f39c3..9ceac4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,16 @@ -lib_LTLIBRARIES = libjpeg.la libturbojpeg.la +lib_LTLIBRARIES = libjpeg.la libjpeg_la_LDFLAGS = -version-info ${SO_MAJOR_VERSION}:${SO_MINOR_VERSION} -no-undefined +include_HEADERS = jerror.h jmorecfg.h jpeglib.h + +if WITH_TURBOJPEG +lib_LTLIBRARIES += libturbojpeg.la libturbojpeg_la_LDFLAGS = -version-info 0:0 -no-undefined -include_HEADERS = jerror.h jmorecfg.h jpeglib.h turbojpeg.h +include_HEADERS += turbojpeg.h +endif + nodist_include_HEADERS = jconfig.h + HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h @@ -17,28 +24,26 @@ libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \ jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c if WITH_ARITH - libjpeg_la_SOURCES += jaricom.c - endif if WITH_ARITH_ENC - libjpeg_la_SOURCES += jcarith.c - endif if WITH_ARITH_DEC - libjpeg_la_SOURCES += jdarith.c - endif -libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpeg.c turbojpeg.h \ - transupp.c transupp.h jdatadst-tj.c jdatasrc-tj.c SUBDIRS = java + +if WITH_TURBOJPEG + +libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpeg.c turbojpeg.h \ + transupp.c transupp.h jdatadst-tj.c jdatasrc-tj.c + if WITH_JAVA libturbojpeg_la_SOURCES += turbojpeg-jni.c @@ -54,12 +59,17 @@ endif libturbojpeg_la_SOURCES += $(TJMAPFILE) if VERSION_SCRIPT - libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/$(TJMAPFILE) -libjpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)libjpeg.map +endif endif + +if VERSION_SCRIPT +libjpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)libjpeg.map +endif + + if WITH_SIMD SUBDIRS += simd @@ -72,8 +82,16 @@ libjpeg_la_SOURCES += jsimd_none.c endif -bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom tjbench -noinst_PROGRAMS = tjunittest jcstest + +bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom +noinst_PROGRAMS = jcstest + + +if WITH_TURBOJPEG + +bin_PROGRAMS += tjbench + +noinst_PROGRAMS += tjunittest tjbench_SOURCES = tjbench.c bmp.h bmp.c tjutil.h tjutil.c rdbmp.c rdppm.c \ wrbmp.c wrppm.c @@ -86,6 +104,9 @@ tjunittest_SOURCES = tjunittest.c tjutil.h tjutil.c tjunittest_LDADD = libturbojpeg.la +endif + + cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \ rdppm.c rdswitch.c rdtarga.c @@ -139,7 +160,40 @@ dist-hook: rm -rf `find $(distdir) -name .svn` +MD5_JPEG_INT = 9a68f56bc76e466aa7e52f415d0f4a5f +MD5_JPEG_FAST = 0e1502e7fa421835e376a314fac2a39f +MD5_JPEG_FAST_100 = 7bf72a8e741d64eecb960c97323af77c +MD5_JPEG_FLOAT = d1623885ffafcd40c684af09e3d65cd5 +MD5_JPEG_FLOAT_NOSIMD = fb4884c35f8273f498cb32879de5c455 +MD5_JPEG_INT_GRAY = 72b51f894b8f4a10b3ee3066770aa38d +MD5_PPM_INT = d1ed0d11f076b842525271647716aeb8 +MD5_PPM_FAST = 048298a2d2410261c0533cb97bcfef23 +MD5_PPM_FLOAT = 7f5b446ee36b2630e06785b8d42af15f +MD5_PPM_FLOAT_NOSIMD = 64072f1dbdc5b3a187777788604971a5 +MD5_PPM_INT_2_1 = 9f9de8c0612f8d06869b960b05abf9c9 +MD5_PPM_INT_15_8 = b6875bc070720b899566cc06459b63b7 +MD5_PPM_INT_7_4 = 06a177eae05f164fac57f7a2c346ee87 +MD5_PPM_INT_13_8 = bc3452573c8152f6ae552939ee19f82f +MD5_PPM_INT_3_2 = f5a8b88a8a7f96016f04d259cf82ed67 +MD5_PPM_INT_11_8 = d8cc73c0aaacd4556569b59437ba00a5 +MD5_PPM_INT_5_4 = 32775dd9ad2ab90f4c5b219b53e0c86c +MD5_PPM_INT_9_8 = d25e61bc7eac0002f5b393aa223747b6 +MD5_PPM_INT_7_8 = ddb564b7c74a09494016d6cd7502a946 +MD5_PPM_INT_3_4 = 8ed8e68808c3fbc4ea764fc9d2968646 +MD5_PPM_INT_5_8 = a3363274999da2366a024efae6d16c9b +MD5_PPM_INT_1_2 = e692a315cea26b988c8e8b29a5dbcd81 +MD5_PPM_INT_3_8 = 79eca9175652ced755155c90e785a996 +MD5_PPM_INT_1_4 = 79cd778f8bf1a117690052cacdd54eca +MD5_PPM_INT_1_8 = 391b3d4aca640c8567d6f8745eb2142f +MD5_PPM_FAST_1_2 = f30bcf6d32ccd44cbdd9aeaacbd9454f +MD5_BMP_256 = 4980185e3776e89bd931736e1cddeee6 +MD5_JPEG_ARI = e986fb0a637a8d833d96e8a6d6d84ea1 +MD5_PPM_ARI = 72b59a99bcf1de24c5b27d151bde2437 +MD5_JPEG_PROG = 1c4afddc05c0a43489ee54438a482d92 +MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d + test: testclean all +if WITH_TURBOJPEG if WITH_JAVA $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -bi @@ -149,45 +203,46 @@ endif ./tjunittest ./tjunittest -alloc ./tjunittest -yuv +endif ./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testimages/testorig.ppm - sh $(srcdir)/md5cmp 9a68f56bc76e466aa7e52f415d0f4a5f testoutint.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testoutint.jpg ./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testimages/testorig.ppm - sh $(srcdir)/md5cmp 0e1502e7fa421835e376a314fac2a39f testoutfst.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_FAST) testoutfst.jpg ./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testimages/testorig.ppm - sh $(srcdir)/md5cmp 7bf72a8e741d64eecb960c97323af77c testoutfst100.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_FAST_100) testoutfst100.jpg ./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testimages/testorig.ppm if WITH_SSE_FLOAT_DCT - sh $(srcdir)/md5cmp d1623885ffafcd40c684af09e3d65cd5 testoutflt.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_FLOAT) testoutflt.jpg else - sh $(srcdir)/md5cmp fb4884c35f8273f498cb32879de5c455 testoutflt.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_FLOAT_NOSIMD) testoutflt.jpg endif ./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testimages/testorig.ppm - sh $(srcdir)/md5cmp 72b51f894b8f4a10b3ee3066770aa38d testoutgray.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_INT_GRAY) testoutgray.jpg ./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testimages/testorig.jpg - sh $(srcdir)/md5cmp d1ed0d11f076b842525271647716aeb8 testoutint.ppm + sh $(srcdir)/md5cmp $(MD5_PPM_INT) testoutint.ppm ./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testimages/testorig.jpg - sh $(srcdir)/md5cmp 048298a2d2410261c0533cb97bcfef23 testoutfst.ppm + sh $(srcdir)/md5cmp $(MD5_PPM_FAST) testoutfst.ppm ./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testimages/testorig.jpg if WITH_SSE_FLOAT_DCT - sh $(srcdir)/md5cmp 7f5b446ee36b2630e06785b8d42af15f testoutflt.ppm + sh $(srcdir)/md5cmp $(MD5_PPM_FLOAT) testoutflt.ppm else - sh $(srcdir)/md5cmp 64072f1dbdc5b3a187777788604971a5 testoutflt.ppm + sh $(srcdir)/md5cmp $(MD5_PPM_FLOAT_NOSIMD) testoutflt.ppm endif - MD5[21]=9f9de8c0612f8d06869b960b05abf9c9; \ - MD5[158]=b6875bc070720b899566cc06459b63b7; \ - MD5[74]=06a177eae05f164fac57f7a2c346ee87; \ - MD5[138]=bc3452573c8152f6ae552939ee19f82f; \ - MD5[32]=f5a8b88a8a7f96016f04d259cf82ed67; \ - MD5[118]=d8cc73c0aaacd4556569b59437ba00a5; \ - MD5[54]=32775dd9ad2ab90f4c5b219b53e0c86c; \ - MD5[98]=d25e61bc7eac0002f5b393aa223747b6; \ - MD5[78]=ddb564b7c74a09494016d6cd7502a946; \ - MD5[34]=8ed8e68808c3fbc4ea764fc9d2968646; \ - MD5[58]=a3363274999da2366a024efae6d16c9b; \ - MD5[12]=e692a315cea26b988c8e8b29a5dbcd81; \ - MD5[38]=79eca9175652ced755155c90e785a996; \ - MD5[14]=79cd778f8bf1a117690052cacdd54eca; \ - MD5[18]=391b3d4aca640c8567d6f8745eb2142f; \ + MD5[21]=$(MD5_PPM_INT_2_1); \ + MD5[158]=$(MD5_PPM_INT_15_8); \ + MD5[74]=$(MD5_PPM_INT_7_4); \ + MD5[138]=$(MD5_PPM_INT_13_8); \ + MD5[32]=$(MD5_PPM_INT_3_2); \ + MD5[118]=$(MD5_PPM_INT_11_8); \ + MD5[54]=$(MD5_PPM_INT_5_4); \ + MD5[98]=$(MD5_PPM_INT_9_8); \ + MD5[78]=$(MD5_PPM_INT_7_8); \ + MD5[34]=$(MD5_PPM_INT_3_4); \ + MD5[58]=$(MD5_PPM_INT_5_8); \ + MD5[12]=$(MD5_PPM_INT_1_2); \ + MD5[38]=$(MD5_PPM_INT_3_8); \ + MD5[14]=$(MD5_PPM_INT_1_4); \ + MD5[18]=$(MD5_PPM_INT_1_8); \ for scale in 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8; do \ scalearg=`echo $$scale | sed s@_@/@g`; \ arrayindex=`echo $$scale | sed s@_@@g`; \ @@ -195,27 +250,27 @@ endif sh $(srcdir)/md5cmp $${MD5[$$arrayindex]} testoutint$$scale.ppm; \ done ./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testimages/testorig.jpg - sh $(srcdir)/md5cmp f30bcf6d32ccd44cbdd9aeaacbd9454f testoutfst1_2.ppm - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testimages/testorig.jpg - sh $(srcdir)/md5cmp 4980185e3776e89bd931736e1cddeee6 testout.bmp + sh $(srcdir)/md5cmp $(MD5_PPM_FAST_1_2) testoutfst1_2.ppm + ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testimages/testorig.jpg + sh $(srcdir)/md5cmp $(MD5_BMP_256) testout.bmp if WITH_ARITH_ENC ./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testimages/testorig.ppm - sh $(srcdir)/md5cmp e986fb0a637a8d833d96e8a6d6d84ea1 testoutari.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_ARI) testoutari.jpg ./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimages/testimgint.jpg - sh $(srcdir)/md5cmp e986fb0a637a8d833d96e8a6d6d84ea1 testouta.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_ARI) testouta.jpg endif if WITH_ARITH_DEC ./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimages/testimgari.jpg - sh $(srcdir)/md5cmp 72b59a99bcf1de24c5b27d151bde2437 testoutari.ppm + sh $(srcdir)/md5cmp $(MD5_PPM_ARI) testoutari.ppm ./jpegtran -outfile testouta.jpg $(srcdir)/testimages/testimgari.jpg - sh $(srcdir)/md5cmp 9a68f56bc76e466aa7e52f415d0f4a5f testouta.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testouta.jpg endif ./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testimages/testorig.ppm - sh $(srcdir)/md5cmp 1c4afddc05c0a43489ee54438a482d92 testoutp.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_PROG) testoutp.jpg ./jpegtran -outfile testoutt.jpg testoutp.jpg - sh $(srcdir)/md5cmp 9a68f56bc76e466aa7e52f415d0f4a5f testoutt.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_INT) testoutt.jpg ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testimages/testorig.jpg - sh $(srcdir)/md5cmp b4197f377e621c4e9b1d20471432610d testoutcrop.jpg + sh $(srcdir)/md5cmp $(MD5_JPEG_CROP) testoutcrop.jpg testclean: diff --git a/configure.ac b/configure.ac index a3f268c..24fb45b 100644 --- a/configure.ac +++ b/configure.ac @@ -189,6 +189,7 @@ int bar() { return foo();], ljt_cv_inline="inline")))) AC_MSG_RESULT($ljt_cv_inline) AC_DEFINE_UNQUOTED([INLINE],[$ljt_cv_inline],[How to obtain function inlining.]) +# Arithmetic coding support AC_MSG_CHECKING([whether to include arithmetic encoding support]) AC_ARG_WITH([arith-enc], AC_HELP_STRING([--without-arith-enc], [Omit arithmetic encoding support])) @@ -213,6 +214,17 @@ AM_CONDITIONAL([WITH_ARITH_DEC], [test "x$with_arith_dec" != "xno"]) AM_CONDITIONAL([WITH_ARITH], [test "x$with_arith_dec" != "xno" -o "x$with_arith_enc" != "xno"]) +# TurboJPEG support +AC_MSG_CHECKING([whether to build TurboJPEG/OSS C wrapper]) +AC_ARG_WITH([turbojpeg], + AC_HELP_STRING([--without-turbojpeg],[Do not build the TurboJPEG/OSS wrapper library and associated test programs])) +if test "x$with_turbojpeg" = "xno"; then + AC_MSG_RESULT(no) +else + AC_MSG_RESULT(yes) +fi + +# Java support AC_ARG_VAR(JAVAC, [Java compiler command (default: javac)]) if test "x$JAVAC" = "x"; then JAVAC=javac @@ -235,6 +247,9 @@ AC_ARG_VAR(JNI_CFLAGS, [C compiler flags needed to include jni.h (default: -I/Sy AC_MSG_CHECKING([whether to build TurboJPEG/OSS Java wrapper]) AC_ARG_WITH([java], AC_HELP_STRING([--with-java],[Build Java wrapper for the TurboJPEG/OSS library])) +if test "x$with_turbojpeg" = "xno"; then + with_java=no +fi RPM_CONFIG_ARGS= WITH_JAVA=0 @@ -336,6 +351,7 @@ AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"]) AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"]) AM_CONDITIONAL([SIMD_ARM], [test "x$simd_arch" = "xarm"]) AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"]) +AM_CONDITIONAL([WITH_TURBOJPEG], [test "x$with_turbojpeg" != "xno"]) case "$host_cpu" in x86_64) @@ -366,9 +382,13 @@ AC_CONFIG_FILES([pkgscripts/makemacpkg:release/makemacpkg.in]) AC_CONFIG_FILES([pkgscripts/Description.plist:release/Description.plist.in]) AC_CONFIG_FILES([pkgscripts/Info.plist:release/Info.plist.in]) AC_CONFIG_FILES([pkgscripts/uninstall:release/uninstall.in]) +if test "x$with_turbojpeg" != "xno"; then AC_CONFIG_FILES([tjbenchtest]) +fi +if test "x$with_java" = "xyes"; then AC_CONFIG_FILES([tjbenchtest.java]) AC_CONFIG_FILES([tjexampletest]) +fi AC_CONFIG_FILES([libjpeg.map]) AC_CONFIG_FILES([Makefile simd/Makefile]) AC_CONFIG_FILES([java/Makefile]) -- 2.40.0