Makefile.am 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  1. lib_LTLIBRARIES = libjpeg.la
  2. libjpeg_la_LDFLAGS = -version-info ${LIBTOOL_CURRENT}:${SO_MINOR_VERSION}:${SO_AGE} -no-undefined
  3. include_HEADERS = jerror.h jmorecfg.h jpeglib.h
  4. if WITH_TURBOJPEG
  5. lib_LTLIBRARIES += libturbojpeg.la
  6. libturbojpeg_la_LDFLAGS = -version-info 1:0:1 -no-undefined
  7. include_HEADERS += turbojpeg.h
  8. endif
  9. nodist_include_HEADERS = jconfig.h
  10. pkgconfigdir = $(libdir)/pkgconfig
  11. pkgconfig_DATA = pkgscripts/libjpeg.pc
  12. if WITH_TURBOJPEG
  13. pkgconfig_DATA += pkgscripts/libturbojpeg.pc
  14. endif
  15. HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
  16. jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h \
  17. jpeg_nbits_table.h
  18. libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
  19. jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
  20. jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \
  21. jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
  22. jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
  23. jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c \
  24. jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \
  25. jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c
  26. if WITH_ARITH
  27. libjpeg_la_SOURCES += jaricom.c
  28. endif
  29. if WITH_ARITH_ENC
  30. libjpeg_la_SOURCES += jcarith.c
  31. endif
  32. if WITH_ARITH_DEC
  33. libjpeg_la_SOURCES += jdarith.c
  34. endif
  35. SUBDIRS = java
  36. if WITH_TURBOJPEG
  37. libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpeg.c turbojpeg.h \
  38. transupp.c transupp.h jdatadst-tj.c jdatasrc-tj.c
  39. if WITH_JAVA
  40. libturbojpeg_la_SOURCES += turbojpeg-jni.c
  41. libturbojpeg_la_CFLAGS = ${JNI_CFLAGS}
  42. TJMAPFILE = turbojpeg-mapfile.jni
  43. else
  44. TJMAPFILE = turbojpeg-mapfile
  45. endif
  46. libturbojpeg_la_SOURCES += $(TJMAPFILE)
  47. if VERSION_SCRIPT
  48. libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/$(TJMAPFILE)
  49. endif
  50. endif
  51. if VERSION_SCRIPT
  52. libjpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)libjpeg.map
  53. endif
  54. if WITH_SIMD
  55. SUBDIRS += simd
  56. libjpeg_la_LIBADD = simd/libsimd.la
  57. libturbojpeg_la_LIBADD = simd/libsimd.la
  58. else
  59. libjpeg_la_SOURCES += jsimd_none.c
  60. endif
  61. bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom
  62. noinst_PROGRAMS = jcstest
  63. if WITH_TURBOJPEG
  64. bin_PROGRAMS += tjbench
  65. noinst_PROGRAMS += tjunittest
  66. tjbench_SOURCES = tjbench.c bmp.h bmp.c tjutil.h tjutil.c rdbmp.c rdppm.c \
  67. wrbmp.c wrppm.c
  68. tjbench_LDADD = libturbojpeg.la libjpeg.la -lm
  69. tjbench_CFLAGS = -DBMP_SUPPORTED -DPPM_SUPPORTED
  70. tjunittest_SOURCES = tjunittest.c tjutil.h tjutil.c
  71. tjunittest_LDADD = libturbojpeg.la
  72. endif
  73. cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdgif.c rdppm.c rdswitch.c
  74. if WITH_12BIT
  75. else
  76. cjpeg_SOURCES += rdbmp.c rdtarga.c
  77. endif
  78. cjpeg_LDADD = libjpeg.la
  79. cjpeg_CFLAGS = -DGIF_SUPPORTED -DPPM_SUPPORTED
  80. if WITH_12BIT
  81. else
  82. cjpeg_CFLAGS += -DBMP_SUPPORTED -DTARGA_SUPPORTED
  83. endif
  84. djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
  85. wrgif.c wrppm.c
  86. if WITH_12BIT
  87. else
  88. djpeg_SOURCES += wrbmp.c wrtarga.c
  89. endif
  90. djpeg_LDADD = libjpeg.la
  91. djpeg_CFLAGS = -DGIF_SUPPORTED -DPPM_SUPPORTED
  92. if WITH_12BIT
  93. else
  94. djpeg_CFLAGS += -DBMP_SUPPORTED -DTARGA_SUPPORTED
  95. endif
  96. jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h
  97. jpegtran_LDADD = libjpeg.la
  98. rdjpgcom_SOURCES = rdjpgcom.c
  99. rdjpgcom_LDADD = libjpeg.la
  100. wrjpgcom_SOURCES = wrjpgcom.c
  101. wrjpgcom_LDADD = libjpeg.la
  102. jcstest_SOURCES = jcstest.c
  103. jcstest_LDADD = libjpeg.la
  104. dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
  105. DOCS= coderules.txt jconfig.txt change.log rdrle.c wrrle.c BUILDING.md \
  106. ChangeLog.md
  107. dist_doc_DATA = README.ijg README.md libjpeg.txt structure.txt usage.txt \
  108. wizard.txt LICENSE.md
  109. exampledir = $(docdir)
  110. dist_example_DATA = example.c
  111. EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \
  112. sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \
  113. doxygen-extra.css jccolext.c jdcolext.c jdcol565.c jdmrgext.c jdmrg565.c \
  114. jstdhuff.c jdcoefct.h jdmainct.h jdmaster.h jdsample.h wrppm.h \
  115. md5/CMakeLists.txt
  116. dist-hook:
  117. rm -rf `find $(distdir) -name .svn`
  118. SUBDIRS += md5
  119. if WITH_12BIT
  120. TESTORIG = testorig12.jpg
  121. MD5_JPEG_RGB_ISLOW = 9620f424569594bb9242b48498ad801f
  122. MD5_PPM_RGB_ISLOW = f3301d2219783b8b3d942b7239fa50c0
  123. MD5_JPEG_422_IFAST_OPT = 7322e3bd2f127f7de4b40d4480ce60e4
  124. MD5_PPM_422_IFAST = 79807fa552899e66a04708f533e16950
  125. MD5_PPM_422M_IFAST = 07737bfe8a7c1c87aaa393a0098d16b0
  126. MD5_JPEG_420_IFAST_Q100_PROG = a1da220b5604081863a504297ed59e55
  127. MD5_PPM_420_Q100_IFAST = 1b3730122709f53d007255e8dfd3305e
  128. MD5_PPM_420M_Q100_IFAST = 980a1a3c5bf9510022869d30b7d26566
  129. MD5_JPEG_GRAY_ISLOW = 235c90707b16e2e069f37c888b2636d9
  130. MD5_PPM_GRAY_ISLOW = 7213c10af507ad467da5578ca5ee1fca
  131. MD5_PPM_GRAY_ISLOW_RGB = e96ee81c30a6ed422d466338bd3de65d
  132. MD5_JPEG_420S_IFAST_OPT = 7af8e60be4d9c227ec63ac9b6630855e
  133. MD5_JPEG_3x2_FLOAT_PROG_SSE = a8c17daf77b457725ec929e215b603f8
  134. MD5_PPM_3x2_FLOAT_SSE = 42876ab9e5c2f76a87d08db5fbd57956
  135. MD5_JPEG_3x2_FLOAT_PROG_32BIT = a8c17daf77b457725ec929e215b603f8
  136. MD5_PPM_3x2_FLOAT_32BIT = 42876ab9e5c2f76a87d08db5fbd57956
  137. MD5_PPM_3x2_FLOAT_64BIT = d6fbc71153b3d8ded484dbc17c7b9cf4
  138. MD5_JPEG_3x2_IFAST_PROG = 1396cc2b7185cfe943d408c9d305339e
  139. MD5_PPM_3x2_IFAST = 3975985ef6eeb0a2cdc58daa651ccc00
  140. MD5_PPM_420M_ISLOW_2_1 = 4ca6be2a6f326ff9eaab63e70a8259c0
  141. MD5_PPM_420M_ISLOW_15_8 = 12aa9f9534c1b3d7ba047322226365eb
  142. MD5_PPM_420M_ISLOW_13_8 = f7e22817c7b25e1393e4ec101e9d4e96
  143. MD5_PPM_420M_ISLOW_11_8 = 800a16f9f4dc9b293197bfe11be10a82
  144. MD5_PPM_420M_ISLOW_9_8 = 06b7a92a9bc69f4dc36ec40f1937d55c
  145. MD5_PPM_420M_ISLOW_7_8 = 3ec444a14a4ab4eab88ffc49c48eca43
  146. MD5_PPM_420M_ISLOW_3_4 = 3e726b7ea872445b19437d1c1d4f0d93
  147. MD5_PPM_420M_ISLOW_5_8 = a8a771abdc94301d20ffac119b2caccd
  148. MD5_PPM_420M_ISLOW_1_2 = b419124dd5568b085787234866102866
  149. MD5_PPM_420M_ISLOW_3_8 = 343d19015531b7bbe746124127244fa8
  150. MD5_PPM_420M_ISLOW_1_4 = 35fd59d866e44659edfa3c18db2a3edb
  151. MD5_PPM_420M_ISLOW_1_8 = ccaed48ac0aedefda5d4abe4013f4ad7
  152. MD5_PPM_420_ISLOW_SKIP15_31 = 86664cd9dc956536409e44e244d20a97
  153. MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71 = 452a21656115a163029cfba5c04fa76a
  154. MD5_PPM_444_ISLOW_SKIP1_6 = ef63901f71ef7a75cd78253fc0914f84
  155. MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13 = 15b173fb5872d9575572fbcc1b05956f
  156. MD5_JPEG_CROP = cdb35ff4b4519392690ea040c56ea99c
  157. else
  158. TESTORIG = testorig.jpg
  159. MD5_JPEG_RGB_ISLOW = 768e970dd57b340ff1b83c9d3d47c77b
  160. MD5_PPM_RGB_ISLOW = 00a257f5393fef8821f2b88ac7421291
  161. MD5_BMP_RGB_ISLOW_565 = f07d2e75073e4bb10f6c6f4d36e2e3be
  162. MD5_BMP_RGB_ISLOW_565D = 4cfa0928ef3e6bb626d7728c924cfda4
  163. MD5_JPEG_422_IFAST_OPT = 2540287b79d913f91665e660303ab2c8
  164. MD5_PPM_422_IFAST = 35bd6b3f833bad23de82acea847129fa
  165. MD5_PPM_422M_IFAST = 8dbc65323d62cca7c91ba02dd1cfa81d
  166. MD5_BMP_422M_IFAST_565 = 3294bd4d9a1f2b3d08ea6020d0db7065
  167. MD5_BMP_422M_IFAST_565D = da98c9c7b6039511be4a79a878a9abc1
  168. MD5_JPEG_420_IFAST_Q100_PROG = 990cbe0329c882420a2094da7e5adade
  169. MD5_PPM_420_Q100_IFAST = 5a732542015c278ff43635e473a8a294
  170. MD5_PPM_420M_Q100_IFAST = ff692ee9323a3b424894862557c092f1
  171. MD5_JPEG_GRAY_ISLOW = 72b51f894b8f4a10b3ee3066770aa38d
  172. MD5_PPM_GRAY_ISLOW = 8d3596c56eace32f205deccc229aa5ed
  173. MD5_PPM_GRAY_ISLOW_RGB = 116424ac07b79e5e801f00508eab48ec
  174. MD5_BMP_GRAY_ISLOW_565 = 12f78118e56a2f48b966f792fedf23cc
  175. MD5_BMP_GRAY_ISLOW_565D = bdbbd616441a24354c98553df5dc82db
  176. MD5_JPEG_420S_IFAST_OPT = 388708217ac46273ca33086b22827ed8
  177. # See README.md for more details on why this next bit is necessary.
  178. MD5_JPEG_3x2_FLOAT_PROG_SSE = 343e3f8caf8af5986ebaf0bdc13b5c71
  179. MD5_PPM_3x2_FLOAT_SSE = 1a75f36e5904d6fc3a85a43da9ad89bb
  180. MD5_JPEG_3x2_FLOAT_PROG_32BIT = 9bca803d2042bd1eb03819e2bf92b3e5
  181. MD5_PPM_3x2_FLOAT_32BIT = f6bfab038438ed8f5522fbd33595dcdc
  182. MD5_PPM_3x2_FLOAT_64BIT = 0e917a34193ef976b679a6b069b1be26
  183. MD5_JPEG_3x2_IFAST_PROG = 1ee5d2c1a77f2da495f993c8c7cceca5
  184. MD5_PPM_3x2_IFAST = fd283664b3b49127984af0a7f118fccd
  185. MD5_JPEG_420_ISLOW_ARI = e986fb0a637a8d833d96e8a6d6d84ea1
  186. MD5_JPEG_444_ISLOW_PROGARI = 0a8f1c8f66e113c3cf635df0a475a617
  187. MD5_PPM_420M_IFAST_ARI = 72b59a99bcf1de24c5b27d151bde2437
  188. MD5_JPEG_420_ISLOW = 9a68f56bc76e466aa7e52f415d0f4a5f
  189. MD5_PPM_420M_ISLOW_2_1 = 9f9de8c0612f8d06869b960b05abf9c9
  190. MD5_PPM_420M_ISLOW_15_8 = b6875bc070720b899566cc06459b63b7
  191. MD5_PPM_420M_ISLOW_13_8 = bc3452573c8152f6ae552939ee19f82f
  192. MD5_PPM_420M_ISLOW_11_8 = d8cc73c0aaacd4556569b59437ba00a5
  193. MD5_PPM_420M_ISLOW_9_8 = d25e61bc7eac0002f5b393aa223747b6
  194. MD5_PPM_420M_ISLOW_7_8 = ddb564b7c74a09494016d6cd7502a946
  195. MD5_PPM_420M_ISLOW_3_4 = 8ed8e68808c3fbc4ea764fc9d2968646
  196. MD5_PPM_420M_ISLOW_5_8 = a3363274999da2366a024efae6d16c9b
  197. MD5_PPM_420M_ISLOW_1_2 = e692a315cea26b988c8e8b29a5dbcd81
  198. MD5_PPM_420M_ISLOW_3_8 = 79eca9175652ced755155c90e785a996
  199. MD5_PPM_420M_ISLOW_1_4 = 79cd778f8bf1a117690052cacdd54eca
  200. MD5_PPM_420M_ISLOW_1_8 = 391b3d4aca640c8567d6f8745eb2142f
  201. MD5_BMP_420_ISLOW_256 = 4980185e3776e89bd931736e1cddeee6
  202. MD5_BMP_420_ISLOW_565 = bf9d13e16c4923b92e1faa604d7922cb
  203. MD5_BMP_420_ISLOW_565D = 6bde71526acc44bcff76f696df8638d2
  204. MD5_BMP_420M_ISLOW_565 = 8dc0185245353cfa32ad97027342216f
  205. MD5_BMP_420M_ISLOW_565D =d1be3a3339166255e76fa50a0d70d73e
  206. MD5_PPM_420_ISLOW_SKIP15_31 = c4c65c1e43d7275cd50328a61e6534f0
  207. MD5_PPM_420_ISLOW_ARI_SKIP16_139 = 087c6b123db16ac00cb88c5b590bb74a
  208. MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71 = 26eb36ccc7d1f0cb80cdabb0ac8b5d99
  209. MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4 = 886c6775af22370257122f8b16207e6d
  210. MD5_PPM_444_ISLOW_SKIP1_6 = 5606f86874cf26b8fcee1117a0a436a6
  211. MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13 = db87dc7ce26bcdc7a6b56239ce2b9d6c
  212. MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0 = cb57b32bd6d03e35432362f7bf184b6d
  213. MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d
  214. endif
  215. .PHONY: test
  216. test: tjquicktest tjbittest bittest
  217. if CROSS_COMPILING
  218. tjquicktest: testclean
  219. else
  220. tjquicktest: testclean all
  221. endif
  222. if WITH_TURBOJPEG
  223. if WITH_JAVA
  224. $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest
  225. $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -bi
  226. $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv
  227. $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -noyuvpad
  228. $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -bi
  229. $(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -bi -noyuvpad
  230. endif
  231. ./tjunittest
  232. ./tjunittest -alloc
  233. ./tjunittest -yuv
  234. ./tjunittest -yuv -alloc
  235. ./tjunittest -yuv -noyuvpad
  236. endif
  237. echo GREAT SUCCESS!
  238. if CROSS_COMPILING
  239. tjbittest: testclean
  240. else
  241. tjbittest: testclean all
  242. endif
  243. if WITH_TURBOJPEG
  244. MD5_PPM_GRAY_TILE = 89d3ca21213d9d864b50b4e4e7de4ca6
  245. MD5_PPM_420_8x8_TILE = 847fceab15c5b7b911cb986cf0f71de3
  246. MD5_PPM_420_16x16_TILE = ca45552a93687e078f7137cc4126a7b0
  247. MD5_PPM_420_32x32_TILE = d8676f1d6b68df358353bba9844f4a00
  248. MD5_PPM_420_64x64_TILE = 4e4c1a3d7ea4bace4f868bcbe83b7050
  249. MD5_PPM_420_128x128_TILE = f24c3429c52265832beab9df72a0ceae
  250. MD5_PPM_420M_8x8_TILE = bc25320e1f4c31ce2e610e43e9fd173c
  251. MD5_PPM_420M_TILE = 75ffdf14602258c5c189522af57fa605
  252. MD5_PPM_422_8x8_TILE = d83dacd9fc73b0a6f10c09acad64eb1e
  253. MD5_PPM_422_16x16_TILE = 35077fb610d72dd743b1eb0cbcfe10fb
  254. MD5_PPM_422_32x32_TILE = e6902ed8a449ecc0f0d6f2bf945f65f7
  255. MD5_PPM_422_64x64_TILE = 2b4502a8f316cedbde1da7bce3d2231e
  256. MD5_PPM_422_128x128_TILE = f0b5617d578f5e13c8eee215d64d4877
  257. MD5_PPM_422M_8x8_TILE = 828941d7f41cd6283abd6beffb7fd51d
  258. MD5_PPM_422M_TILE = e877ae1324c4a280b95376f7f018172f
  259. MD5_PPM_444_TILE = 7964e41e67cfb8d0a587c0aa4798f9c3
  260. # Test compressing from/decompressing to an arbitrary subregion of a larger
  261. # image buffer
  262. cp $(srcdir)/testimages/testorig.ppm testout_tile.ppm
  263. ./tjbench testout_tile.ppm 95 -rgb -quiet -tile -benchtime 0.01 >/dev/null 2>&1
  264. for i in 8 16 32 64 128; do \
  265. md5/md5cmp $(MD5_PPM_GRAY_TILE) testout_tile_GRAY_Q95_$$i\x$$i.ppm; \
  266. done
  267. md5/md5cmp $(MD5_PPM_420_8x8_TILE) testout_tile_420_Q95_8x8.ppm
  268. md5/md5cmp $(MD5_PPM_420_16x16_TILE) testout_tile_420_Q95_16x16.ppm
  269. md5/md5cmp $(MD5_PPM_420_32x32_TILE) testout_tile_420_Q95_32x32.ppm
  270. md5/md5cmp $(MD5_PPM_420_64x64_TILE) testout_tile_420_Q95_64x64.ppm
  271. md5/md5cmp $(MD5_PPM_420_128x128_TILE) testout_tile_420_Q95_128x128.ppm
  272. md5/md5cmp $(MD5_PPM_422_8x8_TILE) testout_tile_422_Q95_8x8.ppm
  273. md5/md5cmp $(MD5_PPM_422_16x16_TILE) testout_tile_422_Q95_16x16.ppm
  274. md5/md5cmp $(MD5_PPM_422_32x32_TILE) testout_tile_422_Q95_32x32.ppm
  275. md5/md5cmp $(MD5_PPM_422_64x64_TILE) testout_tile_422_Q95_64x64.ppm
  276. md5/md5cmp $(MD5_PPM_422_128x128_TILE) testout_tile_422_Q95_128x128.ppm
  277. for i in 8 16 32 64 128; do \
  278. md5/md5cmp $(MD5_PPM_444_TILE) testout_tile_444_Q95_$$i\x$$i.ppm; \
  279. done
  280. rm -f testout_tile_GRAY_* testout_tile_420_* testout_tile_422_* testout_tile_444_*
  281. ./tjbench testout_tile.ppm 95 -rgb -fastupsample -quiet -tile -benchtime 0.01 >/dev/null 2>&1
  282. md5/md5cmp $(MD5_PPM_420M_8x8_TILE) testout_tile_420_Q95_8x8.ppm
  283. for i in 16 32 64 128; do \
  284. md5/md5cmp $(MD5_PPM_420M_TILE) testout_tile_420_Q95_$$i\x$$i.ppm; \
  285. done
  286. md5/md5cmp $(MD5_PPM_422M_8x8_TILE) testout_tile_422_Q95_8x8.ppm
  287. for i in 16 32 64 128; do \
  288. md5/md5cmp $(MD5_PPM_422M_TILE) testout_tile_422_Q95_$$i\x$$i.ppm; \
  289. done
  290. rm -f testout_tile_GRAY_* testout_tile_420_* testout_tile_422_* testout_tile_444_* testout_tile.ppm
  291. echo GREAT SUCCESS!
  292. endif
  293. if CROSS_COMPILING
  294. bittest: testclean
  295. else
  296. bittest: testclean all
  297. endif
  298. # These tests are carefully crafted to provide full coverage of as many of the
  299. # underlying algorithms as possible (including all of the SIMD-accelerated
  300. # ones.)
  301. # CC: null SAMP: fullsize FDCT: islow ENT: huff
  302. ./cjpeg -rgb -dct int -outfile testout_rgb_islow.jpg $(srcdir)/testimages/testorig.ppm
  303. md5/md5cmp $(MD5_JPEG_RGB_ISLOW) testout_rgb_islow.jpg
  304. # CC: null SAMP: fullsize IDCT: islow ENT: huff
  305. ./djpeg -dct int -ppm -outfile testout_rgb_islow.ppm testout_rgb_islow.jpg
  306. md5/md5cmp $(MD5_PPM_RGB_ISLOW) testout_rgb_islow.ppm
  307. rm -f testout_rgb_islow.ppm
  308. if WITH_12BIT
  309. rm -f testout_rgb_islow.jpg
  310. else
  311. # CC: RGB->RGB565 SAMP: fullsize IDCT: islow ENT: huff
  312. ./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_rgb_islow_565.bmp testout_rgb_islow.jpg
  313. md5/md5cmp $(MD5_BMP_RGB_ISLOW_565) testout_rgb_islow_565.bmp
  314. rm -f testout_rgb_islow_565.bmp
  315. # CC: RGB->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
  316. ./djpeg -dct int -rgb565 -bmp -outfile testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
  317. md5/md5cmp $(MD5_BMP_RGB_ISLOW_565D) testout_rgb_islow_565D.bmp
  318. rm -f testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
  319. endif
  320. # CC: RGB->YCC SAMP: fullsize/h2v1 FDCT: ifast ENT: 2-pass huff
  321. ./cjpeg -sample 2x1 -dct fast -opt -outfile testout_422_ifast_opt.jpg $(srcdir)/testimages/testorig.ppm
  322. md5/md5cmp $(MD5_JPEG_422_IFAST_OPT) testout_422_ifast_opt.jpg
  323. # CC: YCC->RGB SAMP: fullsize/h2v1 fancy IDCT: ifast ENT: huff
  324. ./djpeg -dct fast -outfile testout_422_ifast.ppm testout_422_ifast_opt.jpg
  325. md5/md5cmp $(MD5_PPM_422_IFAST) testout_422_ifast.ppm
  326. rm -f testout_422_ifast.ppm
  327. # CC: YCC->RGB SAMP: h2v1 merged IDCT: ifast ENT: huff
  328. ./djpeg -dct fast -nosmooth -outfile testout_422m_ifast.ppm testout_422_ifast_opt.jpg
  329. md5/md5cmp $(MD5_PPM_422M_IFAST) testout_422m_ifast.ppm
  330. rm -f testout_422m_ifast.ppm
  331. if WITH_12BIT
  332. rm -f testout_422_ifast_opt.jpg
  333. else
  334. # CC: YCC->RGB565 SAMP: h2v1 merged IDCT: ifast ENT: huff
  335. ./djpeg -dct int -nosmooth -rgb565 -dither none -bmp -outfile testout_422m_ifast_565.bmp testout_422_ifast_opt.jpg
  336. md5/md5cmp $(MD5_BMP_422M_IFAST_565) testout_422m_ifast_565.bmp
  337. rm -f testout_422m_ifast_565.bmp
  338. # CC: YCC->RGB565 (dithered) SAMP: h2v1 merged IDCT: ifast ENT: huff
  339. ./djpeg -dct int -nosmooth -rgb565 -bmp -outfile testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg
  340. md5/md5cmp $(MD5_BMP_422M_IFAST_565D) testout_422m_ifast_565D.bmp
  341. rm -f testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg
  342. endif
  343. # CC: RGB->YCC SAMP: fullsize/h2v2 FDCT: ifast ENT: prog huff
  344. ./cjpeg -sample 2x2 -quality 100 -dct fast -prog -outfile testout_420_q100_ifast_prog.jpg $(srcdir)/testimages/testorig.ppm
  345. md5/md5cmp $(MD5_JPEG_420_IFAST_Q100_PROG) testout_420_q100_ifast_prog.jpg
  346. # CC: YCC->RGB SAMP: fullsize/h2v2 fancy IDCT: ifast ENT: prog huff
  347. ./djpeg -dct fast -outfile testout_420_q100_ifast.ppm testout_420_q100_ifast_prog.jpg
  348. md5/md5cmp $(MD5_PPM_420_Q100_IFAST) testout_420_q100_ifast.ppm
  349. rm -f testout_420_q100_ifast.ppm
  350. # CC: YCC->RGB SAMP: h2v2 merged IDCT: ifast ENT: prog huff
  351. ./djpeg -dct fast -nosmooth -outfile testout_420m_q100_ifast.ppm testout_420_q100_ifast_prog.jpg
  352. md5/md5cmp $(MD5_PPM_420M_Q100_IFAST) testout_420m_q100_ifast.ppm
  353. rm -f testout_420m_q100_ifast.ppm testout_420_q100_ifast_prog.jpg
  354. # CC: RGB->Gray SAMP: fullsize FDCT: islow ENT: huff
  355. ./cjpeg -gray -dct int -outfile testout_gray_islow.jpg $(srcdir)/testimages/testorig.ppm
  356. md5/md5cmp $(MD5_JPEG_GRAY_ISLOW) testout_gray_islow.jpg
  357. # CC: Gray->Gray SAMP: fullsize IDCT: islow ENT: huff
  358. ./djpeg -dct int -outfile testout_gray_islow.ppm testout_gray_islow.jpg
  359. md5/md5cmp $(MD5_PPM_GRAY_ISLOW) testout_gray_islow.ppm
  360. rm -f testout_gray_islow.ppm
  361. # CC: Gray->RGB SAMP: fullsize IDCT: islow ENT: huff
  362. ./djpeg -dct int -rgb -outfile testout_gray_islow_rgb.ppm testout_gray_islow.jpg
  363. md5/md5cmp $(MD5_PPM_GRAY_ISLOW_RGB) testout_gray_islow_rgb.ppm
  364. rm -f testout_gray_islow_rgb.ppm
  365. if WITH_12BIT
  366. rm -f testout_gray_islow.jpg
  367. else
  368. # CC: Gray->RGB565 SAMP: fullsize IDCT: islow ENT: huff
  369. ./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_gray_islow_565.bmp testout_gray_islow.jpg
  370. md5/md5cmp $(MD5_BMP_GRAY_ISLOW_565) testout_gray_islow_565.bmp
  371. rm -f testout_gray_islow_565.bmp
  372. # CC: Gray->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
  373. ./djpeg -dct int -rgb565 -bmp -outfile testout_gray_islow_565D.bmp testout_gray_islow.jpg
  374. md5/md5cmp $(MD5_BMP_GRAY_ISLOW_565D) testout_gray_islow_565D.bmp
  375. rm -f testout_gray_islow_565D.bmp testout_gray_islow.jpg
  376. endif
  377. # CC: RGB->YCC SAMP: fullsize smooth/h2v2 smooth FDCT: islow
  378. # ENT: 2-pass huff
  379. ./cjpeg -sample 2x2 -smooth 1 -dct int -opt -outfile testout_420s_ifast_opt.jpg $(srcdir)/testimages/testorig.ppm
  380. md5/md5cmp $(MD5_JPEG_420S_IFAST_OPT) testout_420s_ifast_opt.jpg
  381. rm -f testout_420s_ifast_opt.jpg
  382. # The output of the floating point tests is not validated by default, because
  383. # the output differs depending on the type of floating point math used, and
  384. # this is only deterministic if the DCT/IDCT are implemented using SIMD
  385. # instructions on a particular platform. Pass one of the following on the make
  386. # command line to validate the floating point tests against one of the expected
  387. # results:
  388. #
  389. # FLOATTEST=sse validate against the expected results from the libjpeg-turbo
  390. # SSE SIMD extensions
  391. # FLOATTEST=32bit validate against the expected results from the C code
  392. # when running on a 32-bit FPU (or when SSE is being used for
  393. # floating point math, which is generally the default with
  394. # x86-64 compilers)
  395. # FLOATTEST=64bit validate against the exepected results from the C code
  396. # when running on a 64-bit FPU
  397. # CC: RGB->YCC SAMP: fullsize/int FDCT: float ENT: prog huff
  398. ./cjpeg -sample 3x2 -dct float -prog -outfile testout_3x2_float_prog.jpg $(srcdir)/testimages/testorig.ppm
  399. if [ "${FLOATTEST}" = "sse" ]; then \
  400. md5/md5cmp $(MD5_JPEG_3x2_FLOAT_PROG_SSE) testout_3x2_float_prog.jpg; \
  401. elif [ "${FLOATTEST}" = "32bit" -o "${FLOATTEST}" = "64bit" ]; then \
  402. md5/md5cmp $(MD5_JPEG_3x2_FLOAT_PROG_32BIT) testout_3x2_float_prog.jpg; \
  403. fi
  404. # CC: YCC->RGB SAMP: fullsize/int IDCT: float ENT: prog huff
  405. ./djpeg -dct float -outfile testout_3x2_float.ppm testout_3x2_float_prog.jpg
  406. if [ "${FLOATTEST}" = "sse" ]; then \
  407. md5/md5cmp $(MD5_PPM_3x2_FLOAT_SSE) testout_3x2_float.ppm; \
  408. elif [ "${FLOATTEST}" = "32bit" ]; then \
  409. md5/md5cmp $(MD5_PPM_3x2_FLOAT_32BIT) testout_3x2_float.ppm; \
  410. elif [ "${FLOATTEST}" = "64bit" ]; then \
  411. md5/md5cmp $(MD5_PPM_3x2_FLOAT_64BIT) testout_3x2_float.ppm; \
  412. fi
  413. rm -f testout_3x2_float.ppm testout_3x2_float_prog.jpg
  414. # CC: RGB->YCC SAMP: fullsize/int FDCT: ifast ENT: prog huff
  415. ./cjpeg -sample 3x2 -dct fast -prog -outfile testout_3x2_ifast_prog.jpg $(srcdir)/testimages/testorig.ppm
  416. md5/md5cmp $(MD5_JPEG_3x2_IFAST_PROG) testout_3x2_ifast_prog.jpg
  417. # CC: YCC->RGB SAMP: fullsize/int IDCT: ifast ENT: prog huff
  418. ./djpeg -dct fast -outfile testout_3x2_ifast.ppm testout_3x2_ifast_prog.jpg
  419. md5/md5cmp $(MD5_PPM_3x2_IFAST) testout_3x2_ifast.ppm
  420. rm -f testout_3x2_ifast.ppm testout_3x2_ifast_prog.jpg
  421. if WITH_ARITH_ENC
  422. # CC: YCC->RGB SAMP: fullsize/h2v2 FDCT: islow ENT: arith
  423. ./cjpeg -dct int -arithmetic -outfile testout_420_islow_ari.jpg $(srcdir)/testimages/testorig.ppm
  424. md5/md5cmp $(MD5_JPEG_420_ISLOW_ARI) testout_420_islow_ari.jpg
  425. rm -f testout_420_islow_ari.jpg
  426. ./jpegtran -arithmetic -outfile testout_420_islow_ari.jpg $(srcdir)/testimages/testimgint.jpg
  427. md5/md5cmp $(MD5_JPEG_420_ISLOW_ARI) testout_420_islow_ari.jpg
  428. rm -f testout_420_islow_ari.jpg
  429. # CC: YCC->RGB SAMP: fullsize FDCT: islow ENT: prog arith
  430. ./cjpeg -sample 1x1 -dct int -prog -arithmetic -outfile testout_444_islow_progari.jpg $(srcdir)/testimages/testorig.ppm
  431. md5/md5cmp $(MD5_JPEG_444_ISLOW_PROGARI) testout_444_islow_progari.jpg
  432. rm -f testout_444_islow_progari.jpg
  433. endif
  434. if WITH_ARITH_DEC
  435. # CC: RGB->YCC SAMP: h2v2 merged IDCT: ifast ENT: arith
  436. ./djpeg -fast -ppm -outfile testout_420m_ifast_ari.ppm $(srcdir)/testimages/testimgari.jpg
  437. md5/md5cmp $(MD5_PPM_420M_IFAST_ARI) testout_420m_ifast_ari.ppm
  438. rm -f testout_420m_ifast_ari.ppm
  439. ./jpegtran -outfile testout_420_islow.jpg $(srcdir)/testimages/testimgari.jpg
  440. md5/md5cmp $(MD5_JPEG_420_ISLOW) testout_420_islow.jpg
  441. rm -f testout_420_islow.jpg
  442. endif
  443. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 16x16 islow ENT: huff
  444. ./djpeg -dct int -scale 2/1 -nosmooth -ppm -outfile testout_420m_islow_2_1.ppm $(srcdir)/testimages/$(TESTORIG)
  445. md5/md5cmp $(MD5_PPM_420M_ISLOW_2_1) testout_420m_islow_2_1.ppm
  446. rm -f testout_420m_islow_2_1.ppm
  447. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 15x15 islow ENT: huff
  448. ./djpeg -dct int -scale 15/8 -nosmooth -ppm -outfile testout_420m_islow_15_8.ppm $(srcdir)/testimages/$(TESTORIG)
  449. md5/md5cmp $(MD5_PPM_420M_ISLOW_15_8) testout_420m_islow_15_8.ppm
  450. rm -f testout_420m_islow_15_8.ppm
  451. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 13x13 islow ENT: huff
  452. ./djpeg -dct int -scale 13/8 -nosmooth -ppm -outfile testout_420m_islow_13_8.ppm $(srcdir)/testimages/$(TESTORIG)
  453. md5/md5cmp $(MD5_PPM_420M_ISLOW_13_8) testout_420m_islow_13_8.ppm
  454. rm -f testout_420m_islow_13_8.ppm
  455. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 11x11 islow ENT: huff
  456. ./djpeg -dct int -scale 11/8 -nosmooth -ppm -outfile testout_420m_islow_11_8.ppm $(srcdir)/testimages/$(TESTORIG)
  457. md5/md5cmp $(MD5_PPM_420M_ISLOW_11_8) testout_420m_islow_11_8.ppm
  458. rm -f testout_420m_islow_11_8.ppm
  459. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 9x9 islow ENT: huff
  460. ./djpeg -dct int -scale 9/8 -nosmooth -ppm -outfile testout_420m_islow_9_8.ppm $(srcdir)/testimages/$(TESTORIG)
  461. md5/md5cmp $(MD5_PPM_420M_ISLOW_9_8) testout_420m_islow_9_8.ppm
  462. rm -f testout_420m_islow_9_8.ppm
  463. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 7x7 islow/14x14 islow ENT: huff
  464. ./djpeg -dct int -scale 7/8 -nosmooth -ppm -outfile testout_420m_islow_7_8.ppm $(srcdir)/testimages/$(TESTORIG)
  465. md5/md5cmp $(MD5_PPM_420M_ISLOW_7_8) testout_420m_islow_7_8.ppm
  466. rm -f testout_420m_islow_7_8.ppm
  467. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 6x6 islow/12x12 islow ENT: huff
  468. ./djpeg -dct int -scale 3/4 -nosmooth -ppm -outfile testout_420m_islow_3_4.ppm $(srcdir)/testimages/$(TESTORIG)
  469. md5/md5cmp $(MD5_PPM_420M_ISLOW_3_4) testout_420m_islow_3_4.ppm
  470. rm -f testout_420m_islow_3_4.ppm
  471. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 5x5 islow/10x10 islow ENT: huff
  472. ./djpeg -dct int -scale 5/8 -nosmooth -ppm -outfile testout_420m_islow_5_8.ppm $(srcdir)/testimages/$(TESTORIG)
  473. md5/md5cmp $(MD5_PPM_420M_ISLOW_5_8) testout_420m_islow_5_8.ppm
  474. rm -f testout_420m_islow_5_8.ppm
  475. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 4x4 islow/8x8 islow ENT: huff
  476. ./djpeg -dct int -scale 1/2 -nosmooth -ppm -outfile testout_420m_islow_1_2.ppm $(srcdir)/testimages/$(TESTORIG)
  477. md5/md5cmp $(MD5_PPM_420M_ISLOW_1_2) testout_420m_islow_1_2.ppm
  478. rm -f testout_420m_islow_1_2.ppm
  479. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 3x3 islow/6x6 islow ENT: huff
  480. ./djpeg -dct int -scale 3/8 -nosmooth -ppm -outfile testout_420m_islow_3_8.ppm $(srcdir)/testimages/$(TESTORIG)
  481. md5/md5cmp $(MD5_PPM_420M_ISLOW_3_8) testout_420m_islow_3_8.ppm
  482. rm -f testout_420m_islow_3_8.ppm
  483. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 2x2 islow/4x4 islow ENT: huff
  484. ./djpeg -dct int -scale 1/4 -nosmooth -ppm -outfile testout_420m_islow_1_4.ppm $(srcdir)/testimages/$(TESTORIG)
  485. md5/md5cmp $(MD5_PPM_420M_ISLOW_1_4) testout_420m_islow_1_4.ppm
  486. rm -f testout_420m_islow_1_4.ppm
  487. # CC: YCC->RGB SAMP: h2v2 merged IDCT: 1x1 islow/2x2 islow ENT: huff
  488. ./djpeg -dct int -scale 1/8 -nosmooth -ppm -outfile testout_420m_islow_1_8.ppm $(srcdir)/testimages/$(TESTORIG)
  489. md5/md5cmp $(MD5_PPM_420M_ISLOW_1_8) testout_420m_islow_1_8.ppm
  490. rm -f testout_420m_islow_1_8.ppm
  491. if WITH_12BIT
  492. else
  493. # CC: YCC->RGB (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
  494. ./djpeg -dct int -colors 256 -bmp -outfile testout_420_islow_256.bmp $(srcdir)/testimages/$(TESTORIG)
  495. md5/md5cmp $(MD5_BMP_420_ISLOW_256) testout_420_islow_256.bmp
  496. rm -f testout_420_islow_256.bmp
  497. # CC: YCC->RGB565 SAMP: h2v2 fancy IDCT: islow ENT: huff
  498. ./djpeg -dct int -rgb565 -dither none -bmp -outfile testout_420_islow_565.bmp $(srcdir)/testimages/$(TESTORIG)
  499. md5/md5cmp $(MD5_BMP_420_ISLOW_565) testout_420_islow_565.bmp
  500. rm -f testout_420_islow_565.bmp
  501. # CC: YCC->RGB565 (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
  502. ./djpeg -dct int -rgb565 -bmp -outfile testout_420_islow_565D.bmp $(srcdir)/testimages/$(TESTORIG)
  503. md5/md5cmp $(MD5_BMP_420_ISLOW_565D) testout_420_islow_565D.bmp
  504. rm -f testout_420_islow_565D.bmp
  505. # CC: YCC->RGB565 SAMP: h2v2 merged IDCT: islow ENT: huff
  506. ./djpeg -dct int -nosmooth -rgb565 -dither none -bmp -outfile testout_420m_islow_565.bmp $(srcdir)/testimages/$(TESTORIG)
  507. md5/md5cmp $(MD5_BMP_420M_ISLOW_565) testout_420m_islow_565.bmp
  508. rm -f testout_420m_islow_565.bmp
  509. # CC: YCC->RGB565 (dithered) SAMP: h2v2 merged IDCT: islow ENT: huff
  510. ./djpeg -dct int -nosmooth -rgb565 -bmp -outfile testout_420m_islow_565D.bmp $(srcdir)/testimages/$(TESTORIG)
  511. md5/md5cmp $(MD5_BMP_420M_ISLOW_565D) testout_420m_islow_565D.bmp
  512. rm -f testout_420m_islow_565D.bmp
  513. endif
  514. # Partial decode tests. These tests are designed to cover all of the possible
  515. # code paths in jpeg_skip_scanlines().
  516. # Context rows: Yes Intra-iMCU row: Yes iMCU row prefetch: No ENT: huff
  517. ./djpeg -dct int -skip 15,31 -ppm -outfile testout_420_islow_skip15,31.ppm $(srcdir)/testimages/$(TESTORIG)
  518. md5/md5cmp $(MD5_PPM_420_ISLOW_SKIP15_31) testout_420_islow_skip15,31.ppm
  519. rm -f testout_420_islow_skip15,31.ppm
  520. # Context rows: Yes Intra-iMCU row: No iMCU row prefetch: Yes ENT: arith
  521. if WITH_ARITH_DEC
  522. ./djpeg -dct int -skip 16,139 -ppm -outfile testout_420_islow_ari_skip16,139.ppm $(srcdir)/testimages/testimgari.jpg
  523. md5/md5cmp $(MD5_PPM_420_ISLOW_ARI_SKIP16_139) testout_420_islow_ari_skip16,139.ppm
  524. rm -f testout_420_islow_ari_skip16,139.ppm
  525. endif
  526. # Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: prog huff
  527. ./cjpeg -dct int -prog -outfile testout_420_islow_prog.jpg $(srcdir)/testimages/testorig.ppm
  528. ./djpeg -dct int -crop 62x62+71+71 -ppm -outfile testout_420_islow_prog_crop62x62,71,71.ppm testout_420_islow_prog.jpg
  529. md5/md5cmp $(MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71) testout_420_islow_prog_crop62x62,71,71.ppm
  530. rm -f testout_420_islow_prog_crop62x62,71,71.ppm testout_420_islow_prog.jpg
  531. # Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: arith
  532. if WITH_ARITH_DEC
  533. ./djpeg -dct int -crop 53x53+4+4 -ppm -outfile testout_420_islow_ari_crop53x53,4,4.ppm $(srcdir)/testimages/testimgari.jpg
  534. md5/md5cmp $(MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4) testout_420_islow_ari_crop53x53,4,4.ppm
  535. rm -f testout_420_islow_ari_crop53x53,4,4.ppm
  536. endif
  537. # Context rows: No Intra-iMCU row: Yes ENT: huff
  538. ./cjpeg -dct int -sample 1x1 -outfile testout_444_islow.jpg $(srcdir)/testimages/testorig.ppm
  539. ./djpeg -dct int -skip 1,6 -ppm -outfile testout_444_islow_skip1,6.ppm testout_444_islow.jpg
  540. md5/md5cmp $(MD5_PPM_444_ISLOW_SKIP1_6) testout_444_islow_skip1,6.ppm
  541. rm -f testout_444_islow_skip1,6.ppm testout_444_islow.jpg
  542. # Context rows: No Intra-iMCU row: No ENT: prog huff
  543. ./cjpeg -dct int -prog -sample 1x1 -outfile testout_444_islow_prog.jpg $(srcdir)/testimages/testorig.ppm
  544. ./djpeg -dct int -crop 98x98+13+13 -ppm -outfile testout_444_islow_prog_crop98x98,13,13.ppm testout_444_islow_prog.jpg
  545. md5/md5cmp $(MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13) testout_444_islow_prog_crop98x98,13,13.ppm
  546. rm -f testout_444_islow_prog_crop98x98,13,13.ppm testout_444_islow_prog.jpg
  547. # Context rows: No Intra-iMCU row: No ENT: arith
  548. if WITH_ARITH_ENC
  549. ./cjpeg -dct int -arithmetic -sample 1x1 -outfile testout_444_islow_ari.jpg $(srcdir)/testimages/testorig.ppm
  550. if WITH_ARITH_DEC
  551. ./djpeg -dct int -crop 37x37+0+0 -ppm -outfile testout_444_islow_ari_crop37x37,0,0.ppm testout_444_islow_ari.jpg
  552. md5/md5cmp $(MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0) testout_444_islow_ari_crop37x37,0,0.ppm
  553. rm -f testout_444_islow_ari_crop37x37,0,0.ppm
  554. endif
  555. rm -f testout_444_islow_ari.jpg
  556. endif
  557. ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testout_crop.jpg $(srcdir)/testimages/$(TESTORIG)
  558. md5/md5cmp $(MD5_JPEG_CROP) testout_crop.jpg
  559. rm -f testout_crop.jpg
  560. echo GREAT SUCCESS!
  561. testclean:
  562. rm -f testout*
  563. rm -f *_GRAY_*.bmp
  564. rm -f *_GRAY_*.png
  565. rm -f *_GRAY_*.ppm
  566. rm -f *_GRAY_*.jpg
  567. rm -f *_GRAY.yuv
  568. rm -f *_420_*.bmp
  569. rm -f *_420_*.png
  570. rm -f *_420_*.ppm
  571. rm -f *_420_*.jpg
  572. rm -f *_420.yuv
  573. rm -f *_422_*.bmp
  574. rm -f *_422_*.png
  575. rm -f *_422_*.ppm
  576. rm -f *_422_*.jpg
  577. rm -f *_422.yuv
  578. rm -f *_444_*.bmp
  579. rm -f *_444_*.png
  580. rm -f *_444_*.ppm
  581. rm -f *_444_*.jpg
  582. rm -f *_444.yuv
  583. rm -f *_440_*.bmp
  584. rm -f *_440_*.png
  585. rm -f *_440_*.ppm
  586. rm -f *_440_*.jpg
  587. rm -f *_440.yuv
  588. rm -f *_411_*.bmp
  589. rm -f *_411_*.png
  590. rm -f *_411_*.ppm
  591. rm -f *_411_*.jpg
  592. rm -f *_411.yuv
  593. tjtest:
  594. sh ./tjbenchtest
  595. sh ./tjbenchtest -alloc
  596. sh ./tjbenchtest -yuv
  597. sh ./tjbenchtest -yuv -alloc
  598. if WITH_JAVA
  599. sh ./tjbenchtest.java
  600. sh ./tjbenchtest.java -yuv
  601. endif
  602. pkgscripts/libjpeg-turbo.spec: pkgscripts/libjpeg-turbo.spec.tmpl
  603. cat pkgscripts/libjpeg-turbo.spec.tmpl | sed s@%{__prefix}@$(prefix)@g | \
  604. sed s@%{__bindir}@$(bindir)@g | sed s@%{__datadir}@$(datadir)@g | \
  605. sed s@%{__docdir}@$(docdir)@g | sed s@%{__includedir}@$(includedir)@g | \
  606. sed s@%{__libdir}@$(libdir)@g | sed s@%{__mandir}@$(mandir)@g \
  607. > pkgscripts/libjpeg-turbo.spec
  608. rpm: all pkgscripts/libjpeg-turbo.spec
  609. TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
  610. mkdir -p $$TMPDIR/RPMS; \
  611. ln -fs `pwd` $$TMPDIR/BUILD; \
  612. rm -f ${PKGNAME}-${VERSION}.${RPMARCH}.rpm; \
  613. rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
  614. --define "_topdir $$TMPDIR" \
  615. --target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
  616. cp $$TMPDIR/RPMS/${RPMARCH}/${PKGNAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
  617. ${PKGNAME}-${VERSION}.${RPMARCH}.rpm; \
  618. rm -rf $$TMPDIR
  619. srpm: dist-gzip pkgscripts/libjpeg-turbo.spec
  620. TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
  621. mkdir -p $$TMPDIR/RPMS; \
  622. mkdir -p $$TMPDIR/SRPMS; \
  623. mkdir -p $$TMPDIR/BUILD; \
  624. mkdir -p $$TMPDIR/SOURCES; \
  625. mkdir -p $$TMPDIR/SPECS; \
  626. rm -f ${PKGNAME}-${VERSION}.src.rpm; \
  627. cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \
  628. cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
  629. | sed s/#--\>//g \
  630. > $$TMPDIR/SPECS/libjpeg-turbo.spec; \
  631. rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \
  632. cp $$TMPDIR/SRPMS/${PKGNAME}-${VERSION}-${BUILD}.src.rpm \
  633. ${PKGNAME}-${VERSION}.src.rpm; \
  634. rm -rf $$TMPDIR
  635. pkgscripts/makedpkg: pkgscripts/makedpkg.tmpl
  636. cat pkgscripts/makedpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
  637. sed s@%{__docdir}@$(docdir)@g | sed s@%{__libdir}@$(libdir)@g \
  638. > pkgscripts/makedpkg
  639. deb: all pkgscripts/makedpkg
  640. sh pkgscripts/makedpkg
  641. pkgscripts/uninstall: pkgscripts/uninstall.tmpl
  642. cat pkgscripts/uninstall.tmpl | sed s@%{__prefix}@$(prefix)@g | \
  643. sed s@%{__bindir}@$(bindir)@g | sed s@%{__datadir}@$(datadir)@g | \
  644. sed s@%{__includedir}@$(includedir)@g | sed s@%{__libdir}@$(libdir)@g | \
  645. sed s@%{__mandir}@$(mandir)@g > pkgscripts/uninstall
  646. pkgscripts/makemacpkg: pkgscripts/makemacpkg.tmpl
  647. cat pkgscripts/makemacpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
  648. sed s@%{__bindir}@$(bindir)@g | sed s@%{__docdir}@$(docdir)@g | \
  649. sed s@%{__libdir}@$(libdir)@g > pkgscripts/makemacpkg
  650. if X86_64
  651. udmg: all pkgscripts/makemacpkg pkgscripts/uninstall
  652. sh pkgscripts/makemacpkg -build32 ${BUILDDIR32}
  653. iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
  654. sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S} -buildarmv8 ${BUILDDIRARMV8} -lipo "${LIPO}"
  655. else
  656. iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
  657. sh pkgscripts/makemacpkg -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S} -buildarmv8 ${BUILDDIRARMV8} -lipo "${LIPO}"
  658. endif
  659. dmg: all pkgscripts/makemacpkg pkgscripts/uninstall
  660. sh pkgscripts/makemacpkg
  661. pkgscripts/makecygwinpkg: pkgscripts/makecygwinpkg.tmpl
  662. cat pkgscripts/makecygwinpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
  663. sed s@%{__docdir}@$(docdir)@g | sed s@%{__libdir}@$(libdir)@g \
  664. > pkgscripts/makecygwinpkg
  665. cygwinpkg: all pkgscripts/makecygwinpkg
  666. sh pkgscripts/makecygwinpkg