Modify 'make test' so that it uses MD5 sums instead of reference images. This eliminates the need to check most of the test images into the repository, which keeps the source tarball to a reasonable size.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@900 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2013-01-13 03:00:25 +00:00
parent c2328db52d
commit 9c3d4cec36
32 changed files with 118 additions and 142 deletions

View File

@@ -259,111 +259,126 @@ 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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testoutint.jpg)
add_test(cjpeg-int-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst.jpg testoutfst.jpg)
add_test(cjpeg-fast-cmp ${CMAKE_COMMAND} -DMD5=0e1502e7fa421835e376a314fac2a39f -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst100.jpg testoutfst100.jpg)
add_test(cjpeg-fast-100-cmp ${CMAKE_COMMAND} -DMD5=7bf72a8e741d64eecb960c97323af77c -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt.jpg testoutflt.jpg)
add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -DMD5=d1623885ffafcd40c684af09e3d65cd5 -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
else()
add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt-nosimd.jpg testoutflt.jpg)
add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -DMD5=fb4884c35f8273f498cb32879de5c455 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimggray.jpg testoutgray.jpg)
add_test(cjpeg-int-gray-cmp ${CMAKE_COMMAND} -DMD5=72b51f894b8f4a10b3ee3066770aa38d -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.ppm testoutint.ppm)
add_test(djpeg-int-cmp ${CMAKE_COMMAND} -DMD5=d1ed0d11f076b842525271647716aeb8 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst.ppm testoutfst.ppm)
add_test(djpeg-fast-cmp ${CMAKE_COMMAND} -DMD5=048298a2d2410261c0533cb97bcfef23 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt.ppm testoutflt.ppm)
add_test(djpeg-float-cmp ${CMAKE_COMMAND} -DMD5=7f5b446ee36b2630e06785b8d42af15f -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
else()
add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm testoutflt.ppm)
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)
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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint${scale}.ppm testoutint${scale}.ppm)
add_test(djpeg-int-${scale}-cmp ${CMAKE_COMMAND} -DMD5=${MD5_${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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_2.ppm testoutfst1_2.ppm)
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-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(djpeg-256-cmp ${CMAKE_COMMAND} -DMD5=4980185e3776e89bd931736e1cddeee6 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgp.jpg testoutp.jpg)
add_test(cjpeg-prog-cmp ${CMAKE_COMMAND} -DMD5=1c4afddc05c0a43489ee54438a482d92 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testoutt.jpg)
add_test(jpegtran-prog-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg testoutari.jpg)
add_test(cjpeg-ari-cmp ${CMAKE_COMMAND} -DMD5=e986fb0a637a8d833d96e8a6d6d84ea1 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg testouta.jpg)
add_test(jpegtran-toari-cmp ${CMAKE_COMMAND} -DMD5=e986fb0a637a8d833d96e8a6d6d84ea1 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.ppm testoutari.ppm)
add_test(djpeg-ari-cmp ${CMAKE_COMMAND} -DMD5=72b59a99bcf1de24c5b27d151bde2437 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testouta.jpg)
add_test(jpegtran-fromari-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgcrop.jpg testoutcrop.jpg)
add_test(jpegtran-crop-cmp ${CMAKE_COMMAND} -DMD5=b4197f377e621c4e9b1d20471432610d -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testoutint.jpg)
add_test(cjpeg-static-int-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst.jpg testoutfst.jpg)
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-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-fast-100-cmp ${CMAKE_COMMAND} -DMD5=7bf72a8e741d64eecb960c97323af77c -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt.jpg testoutflt.jpg)
add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=d1623885ffafcd40c684af09e3d65cd5 -DFILE=testoutflt.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
else()
add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt-nosimd.jpg testoutflt.jpg)
add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=fb4884c35f8273f498cb32879de5c455 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimggray.jpg testoutgray.jpg)
add_test(cjpeg-static-int-gray-cmp ${CMAKE_COMMAND} -DMD5=72b51f894b8f4a10b3ee3066770aa38d -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.ppm testoutint.ppm)
add_test(djpeg-static-int-cmp ${CMAKE_COMMAND} -DMD5=d1ed0d11f076b842525271647716aeb8 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst.ppm testoutfst.ppm)
add_test(djpeg-static-fast-cmp ${CMAKE_COMMAND} -DMD5=048298a2d2410261c0533cb97bcfef23 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgflt.ppm testoutflt.ppm)
add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=7f5b446ee36b2630e06785b8d42af15f -DFILE=testoutflt.ppm -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
else()
add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testorig.ppm testoutflt.ppm)
add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -DMD5=64072f1dbdc5b3a187777788604971a5 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint${scale}.ppm testoutint${scale}.ppm)
add_test(djpeg-static-int-${scale}-cmp ${CMAKE_COMMAND} -DMD5=${MD5_${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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgfst1_2.ppm testoutfst1_2.ppm)
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-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(djpeg-static-256-cmp ${CMAKE_COMMAND} -DMD5=4980185e3776e89bd931736e1cddeee6 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgp.jpg testoutp.jpg)
add_test(cjpeg-static-prog-cmp ${CMAKE_COMMAND} -DMD5=1c4afddc05c0a43489ee54438a482d92 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testoutt.jpg)
add_test(jpegtran-static-prog-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg testoutari.jpg)
add_test(cjpeg-static-ari-cmp ${CMAKE_COMMAND} -DMD5=e986fb0a637a8d833d96e8a6d6d84ea1 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.jpg testouta.jpg)
add_test(jpegtran-static-toari-cmp ${CMAKE_COMMAND} -DMD5=e986fb0a637a8d833d96e8a6d6d84ea1 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgari.ppm testoutari.ppm)
add_test(djpeg-static-ari-cmp ${CMAKE_COMMAND} -DMD5=72b59a99bcf1de24c5b27d151bde2437 -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgint.jpg testouta.jpg)
add_test(jpegtran-static-fromari-cmp ${CMAKE_COMMAND} -DMD5=9a68f56bc76e466aa7e52f415d0f4a5f -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} -E compare_files ${CMAKE_SOURCE_DIR}/testimages/testimgcrop.jpg testoutcrop.jpg)
add_test(jpegtran-static-crop-cmp ${CMAKE_COMMAND} -DMD5=b4197f377e621c4e9b1d20471432610d -DFILE=testoutcrop.jpg -P ${CMAKE_SOURCE_DIR}/cmakescripts/md5cmp.cmake)
add_custom_target(testclean COMMAND ${CMAKE_COMMAND} -P
${CMAKE_SOURCE_DIR}/cmakescripts/testclean.cmake)

View File

@@ -150,56 +150,72 @@ endif
./tjunittest -alloc
./tjunittest -yuv
./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testimages/testorig.ppm
cmp $(srcdir)/testimages/testimgint.jpg testoutint.jpg
sh $(srcdir)/md5cmp 9a68f56bc76e466aa7e52f415d0f4a5f testoutint.jpg
./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testimages/testorig.ppm
cmp $(srcdir)/testimages/testimgfst.jpg testoutfst.jpg
sh $(srcdir)/md5cmp 0e1502e7fa421835e376a314fac2a39f testoutfst.jpg
./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testimages/testorig.ppm
cmp $(srcdir)/testimages/testimgfst100.jpg testoutfst100.jpg
sh $(srcdir)/md5cmp 7bf72a8e741d64eecb960c97323af77c testoutfst100.jpg
./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testimages/testorig.ppm
if WITH_SSE_FLOAT_DCT
cmp $(srcdir)/testimages/testimgflt.jpg testoutflt.jpg
sh $(srcdir)/md5cmp d1623885ffafcd40c684af09e3d65cd5 testoutflt.jpg
else
cmp $(srcdir)/testimages/testimgflt-nosimd.jpg testoutflt.jpg
sh $(srcdir)/md5cmp fb4884c35f8273f498cb32879de5c455 testoutflt.jpg
endif
./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testimages/testorig.ppm
cmp $(srcdir)/testimages/testimggray.jpg testoutgray.jpg
sh $(srcdir)/md5cmp 72b51f894b8f4a10b3ee3066770aa38d testoutgray.jpg
./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testimages/testorig.jpg
cmp $(srcdir)/testimages/testimgint.ppm testoutint.ppm
sh $(srcdir)/md5cmp d1ed0d11f076b842525271647716aeb8 testoutint.ppm
./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testimages/testorig.jpg
cmp $(srcdir)/testimages/testimgfst.ppm testoutfst.ppm
sh $(srcdir)/md5cmp 048298a2d2410261c0533cb97bcfef23 testoutfst.ppm
./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testimages/testorig.jpg
if WITH_SSE_FLOAT_DCT
cmp $(srcdir)/testimages/testimgflt.ppm testoutflt.ppm
sh $(srcdir)/md5cmp 7f5b446ee36b2630e06785b8d42af15f testoutflt.ppm
else
cmp $(srcdir)/testimages/testorig.ppm testoutflt.ppm
sh $(srcdir)/md5cmp 64072f1dbdc5b3a187777788604971a5 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; \
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`; \
./djpeg -dct int -nosmooth -scale $$scalearg -ppm -outfile testoutint$$scale.ppm $(srcdir)/testimages/testorig.jpg; \
cmp $(srcdir)/testimages/testimgint$$scale.ppm testoutint$$scale.ppm; \
sh $(srcdir)/md5cmp $${MD5[$$arrayindex]} testoutint$$scale.ppm; \
done
./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testimages/testorig.jpg
cmp $(srcdir)/testimages/testimgfst1_2.ppm testoutfst1_2.ppm
sh $(srcdir)/md5cmp f30bcf6d32ccd44cbdd9aeaacbd9454f testoutfst1_2.ppm
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testimages/testorig.jpg
cmp $(srcdir)/testimages/testimg.bmp testout.bmp
sh $(srcdir)/md5cmp 4980185e3776e89bd931736e1cddeee6 testout.bmp
if WITH_ARITH_ENC
./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testimages/testorig.ppm
cmp $(srcdir)/testimages/testimgari.jpg testoutari.jpg
sh $(srcdir)/md5cmp e986fb0a637a8d833d96e8a6d6d84ea1 testoutari.jpg
./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimages/testimgint.jpg
cmp $(srcdir)/testimages/testimgari.jpg testouta.jpg
sh $(srcdir)/md5cmp e986fb0a637a8d833d96e8a6d6d84ea1 testouta.jpg
endif
if WITH_ARITH_DEC
./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimages/testimgari.jpg
cmp $(srcdir)/testimages/testimgari.ppm testoutari.ppm
sh $(srcdir)/md5cmp 72b59a99bcf1de24c5b27d151bde2437 testoutari.ppm
./jpegtran -outfile testouta.jpg $(srcdir)/testimages/testimgari.jpg
cmp $(srcdir)/testimages/testimgint.jpg testouta.jpg
sh $(srcdir)/md5cmp 9a68f56bc76e466aa7e52f415d0f4a5f testouta.jpg
endif
./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testimages/testorig.ppm
cmp $(srcdir)/testimages/testimgp.jpg testoutp.jpg
sh $(srcdir)/md5cmp 1c4afddc05c0a43489ee54438a482d92 testoutp.jpg
./jpegtran -outfile testoutt.jpg testoutp.jpg
cmp $(srcdir)/testimages/testimgint.jpg testoutt.jpg
sh $(srcdir)/md5cmp 9a68f56bc76e466aa7e52f415d0f4a5f testoutt.jpg
./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testimages/testorig.jpg
cmp $(srcdir)/testimages/testimgcrop.jpg testoutcrop.jpg
sh $(srcdir)/md5cmp b4197f377e621c4e9b1d20471432610d testoutcrop.jpg
testclean:

15
cmakescripts/md5cmp.cmake Normal file
View File

@@ -0,0 +1,15 @@
if(NOT MD5)
message(FATAL_ERROR "MD5 not specified")
endif()
if(NOT FILE)
message(FATAL_ERROR "FILE not specified")
endif()
file(MD5 ${FILE} MD5FILE)
if(NOT MD5 STREQUAL MD5FILE)
message(FATAL_ERROR "MD5 of ${FILE} should be ${MD5}, not ${MD5FILE}.")
else()
message(STATUS "${MD5}: OK")
endif()

12
md5cmp Normal file
View File

@@ -0,0 +1,12 @@
if [ "$1" = "" -o "$2" = "" ]; then
echo USAGE: $0 \<correct MD5 sum\> \<file\>
exit 1
fi
echo $1 $2 >md5sum.txt
if [ ! -f $2 ]; then
echo $2 does not exist!
exit 1
fi
md5sum --check md5sum.txt || exit 1
rm md5sum.txt

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +0,0 @@
P6
29 19
255
0/-50,4/,4/,2-*3.+30+74/B:/J>0dC2<43>A2<41>BB<42>=;<3B>?,<2C>@+<2B>>-<2D>=-<2D>B5<42>F;:5232./1.5//uKLkj<6B>SNdci_\VX-.0.-+,*+,*+,*+.,-0,+2.-<20A4.H94w9.<2E>A5<41>C7<43>>,<2C>=,<2C>;,<2C>A8<41>TK<54><4B>sGK<0/+/.,0/-PMF<4D><46><EFBFBD>~<7E><>w<EFBFBD>wWV:45/:728302012,.10,32.?5,B8/>3/F21K4,<2C>;4<>?6<>>0<><-<2D>C8<43>M@<40>xc<78><63><EFBFBD>m<EFBFBD>fFJ<1,)1+-NO?y<>h<68>vk<76>g@>29:4C@;GB<I?5D<1<71=9.L?/J<1@<1<>>A<>?1<>?4<>@3<>::<3A>:8<>G?<3F>bM<62>?H<>>Q<>Kc<4B>Ll<4C>JanE?<3F><>m<EFBFBD><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>w<EFBFBD>uX[F43/==3OI9kl<6B>lg<6C>IDJ>;6H@3C?<a?6<>=+<2B>;,<2C>;/<2F>;0<>4+<2B>3'<27>8+<2B>FB<46>=0<>DB<44>ES<45>Hp<48>Rt<52>]k<><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư<EFBFBD><C6B0>EA5=82OF7wy<77><79><EFBFBD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D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB>t{UHeD5]F6TN8JN3VXB8>47=36;5271-2.1628G2=K:+2+akSliZjfZw<5A>z<EFBFBD><7A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>xTO2LN6OV5r~VRP9KH79A4:B7<D9=E8=L5AZ:CW<*1)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB