Support 8-bit & 12-bit JPEGs using the same build

Partially implements #199

This commit also implements a request from #178 (the ability to compile
the libjpeg example as a standalone program.)
This commit is contained in:
DRC
2022-03-08 12:34:11 -06:00
parent fc562d11f0
commit 7fec5074f9
82 changed files with 3800 additions and 676 deletions

View File

@@ -119,7 +119,7 @@ jobs:
run: |
mkdir build
pushd build
cmake -G"Unix Makefiles" -DWITH_12BIT=1 \
cmake -G"Unix Makefiles" -DWITH_12BIT=0 \
-DCMAKE_C_FLAGS='--std=gnu90 -Wall -Werror -Wextra -Wpedantic -pedantic-errors -Wdouble-promotion -Wformat-overflow=2 -Wformat-security -Wformat-signedness -Wformat-truncation=2 -Wformat-y2k -Wmissing-include-dirs -Wshift-overflow=2 -Wswitch-bool -Wno-unused-parameter -Wuninitialized -Wstrict-overflow=2 -Wstringop-overflow=4 -Wstringop-truncation -Wduplicated-branches -Wduplicated-cond -Wdeclaration-after-statement -Wshadow -Wunsafe-loop-optimizations -Wundef -Wcast-align -Wno-clobbered -Wjump-misses-init -Wno-sign-compare -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wdisabled-optimization -Wno-overlength-strings' \
..
export NUMCPUS=`grep -c '^processor' /proc/cpuinfo`

View File

@@ -187,7 +187,7 @@ option(ENABLE_STATIC "Build static libraries" TRUE)
boolean_number(ENABLE_STATIC)
option(REQUIRE_SIMD "Generate a fatal error if SIMD extensions are not available for this platform (default is to fall back to a non-SIMD build)" FALSE)
boolean_number(REQUIRE_SIMD)
option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_ARITH_DEC=0 WITH_ARITH_ENC=0 WITH_JAVA=0 WITH_SIMD=0 WITH_TURBOJPEG=0 )" FALSE)
option(WITH_12BIT "Include 12-bit JPEG support" TRUE)
boolean_number(WITH_12BIT)
option(WITH_ARITH_DEC "Include arithmetic decoding support when emulating the libjpeg v6b API/ABI" TRUE)
boolean_number(WITH_ARITH_DEC)
@@ -248,40 +248,23 @@ if(WITH_JPEG8)
set(WITH_MEM_SRCDST 0)
endif()
if(WITH_12BIT)
set(WITH_ARITH_DEC 0)
set(WITH_ARITH_ENC 0)
set(WITH_JAVA 0)
set(WITH_SIMD 0)
set(WITH_TURBOJPEG 0)
set(BITS_IN_JSAMPLE 12)
else()
set(BITS_IN_JSAMPLE 8)
endif()
report_option(WITH_12BIT "12-bit JPEG support")
if(WITH_ARITH_DEC)
set(D_ARITH_CODING_SUPPORTED 1)
endif()
if(NOT WITH_12BIT)
report_option(WITH_ARITH_DEC "Arithmetic decoding support")
endif()
report_option(WITH_ARITH_DEC "Arithmetic decoding support")
if(WITH_ARITH_ENC)
set(C_ARITH_CODING_SUPPORTED 1)
endif()
if(NOT WITH_12BIT)
report_option(WITH_ARITH_ENC "Arithmetic encoding support")
endif()
report_option(WITH_ARITH_ENC "Arithmetic encoding support")
if(NOT WITH_12BIT)
report_option(WITH_TURBOJPEG "TurboJPEG API library")
report_option(WITH_JAVA "TurboJPEG Java wrapper")
endif()
report_option(WITH_TURBOJPEG "TurboJPEG API library")
report_option(WITH_JAVA "TurboJPEG Java wrapper")
if(WITH_MEM_SRCDST)
set(MEM_SRCDST_SUPPORTED 1)
set(MEM_SRCDST_FUNCTIONS "global: jpeg_mem_dest; jpeg_mem_src;")
endif()
if(NOT WITH_JPEG8)
report_option(WITH_MEM_SRCDST "In-memory source/destination managers")
@@ -514,15 +497,22 @@ if(UNIX AND NOT APPLE)
endif()
# Generate files
if(WIN32)
configure_file(win/jconfig.h.in jconfig.h)
else()
configure_file(jconfig.h.in jconfig.h)
endif()
configure_file(jconfig.h.in jconfig.h)
configure_file(jconfigint.h.in jconfigint.h)
configure_file(jversion.h.in jversion.h)
if(UNIX)
if(WITH_MEM_SRCDST)
set(MEM_SRCDST_FUNCTIONS "global: jpeg_mem_dest; jpeg_mem_src;")
endif()
set(SIMD_FUNCTIONS "jsimd_*")
configure_file(libjpeg.map.in libjpeg.map)
if(WITH_12BIT)
if(WITH_MEM_SRCDST)
set(MEM_SRCDST_FUNCTIONS "global: jpeg12_mem_dest; jpeg12_mem_src;")
endif()
set(SIMD_FUNCTIONS "jsimd12_*")
configure_file(libjpeg.map.in libjpeg12.map)
endif()
endif()
# Include directories and compiler definitions
@@ -538,13 +528,15 @@ if(CMAKE_EXECUTABLE_SUFFIX_TMP)
endif()
message(STATUS "CMAKE_EXECUTABLE_SUFFIX = ${CMAKE_EXECUTABLE_SUFFIX}")
set(JPEG_SOURCES jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c
jcicc.c jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c
jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c
jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdicc.c jdinput.c
jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c
jdtrans.c jerror.c jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c
jidctint.c jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c)
set(JPEG12_SOURCES jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c
jchuff.c jcicc.c jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c
jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c
jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdicc.c
jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c
jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c
jidctfst.c jidctint.c jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c
jmemnobs.c)
set(JPEG_SOURCES ${JPEG12_SOURCES})
if(WITH_ARITH_ENC OR WITH_ARITH_DEC)
set(JPEG_SOURCES ${JPEG_SOURCES} jaricom.c)
@@ -563,7 +555,7 @@ if(WITH_SIMD)
if(NEON_INTRINSICS)
add_definitions(-DNEON_INTRINSICS)
endif()
elseif(NOT WITH_12BIT)
else()
message(STATUS "SIMD extensions: None (WITH_SIMD = ${WITH_SIMD})")
endif()
if(WITH_SIMD)
@@ -592,6 +584,15 @@ if(ENABLE_STATIC)
if(NOT MSVC)
set_target_properties(jpeg-static PROPERTIES OUTPUT_NAME jpeg)
endif()
if(WITH_12BIT)
add_library(jpeg12-static STATIC ${JPEG12_SOURCES} jsimd_none.c)
set_property(TARGET jpeg12-static PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=12")
if(NOT MSVC)
set_target_properties(jpeg12-static PROPERTIES OUTPUT_NAME jpeg12)
endif()
endif()
endif()
if(WITH_TURBOJPEG)
@@ -672,28 +673,49 @@ endif()
if(WIN32)
set(USE_SETMODE "-DUSE_SETMODE")
endif()
if(WITH_12BIT)
set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
else()
set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
endif()
if(ENABLE_STATIC)
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c
${CJPEG_BMP_SOURCES})
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
add_executable(cjpeg-static cjpeg.c cdjpeg.c rdbmp.c rdgif.c rdppm.c
rdswitch.c rdtarga.c)
set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS
"-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
target_link_libraries(cjpeg-static jpeg-static)
add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrgif.c
wrppm.c ${DJPEG_BMP_SOURCES})
set_property(TARGET djpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
add_executable(djpeg-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c wrbmp.c
wrgif.c wrppm.c wrtarga.c)
set_property(TARGET djpeg-static PROPERTY COMPILE_FLAGS
"-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
target_link_libraries(djpeg-static jpeg-static)
add_executable(jpegtran-static jpegtran.c cdjpeg.c rdswitch.c transupp.c)
target_link_libraries(jpegtran-static jpeg-static)
set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "${USE_SETMODE}")
if(WITH_12BIT)
add_executable(cjpeg12-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c)
set_property(TARGET cjpeg12-static PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=12 -DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
target_link_libraries(cjpeg12-static jpeg12-static)
add_executable(djpeg12-static djpeg.c cdjpeg.c rdcolmap.c rdswitch.c
wrgif.c wrppm.c)
set_property(TARGET djpeg12-static PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=12 -DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
target_link_libraries(djpeg12-static jpeg12-static)
add_executable(jpeg12tran-static jpegtran.c cdjpeg.c rdswitch.c transupp.c)
target_link_libraries(jpeg12tran-static jpeg12-static)
set_property(TARGET jpeg12tran-static PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=12 ${USE_SETMODE}")
endif()
add_executable(example-static ../example.c)
if(WITH_12BIT)
target_link_libraries(example-static jpeg-static jpeg12-static)
set_property(TARGET example-static PROPERTY COMPILE_FLAGS "-DWITH_12BIT")
else()
target_link_libraries(example-static jpeg-static)
endif()
endif()
add_executable(rdjpgcom rdjpgcom.c)
@@ -721,124 +743,6 @@ endif()
enable_testing()
if(WITH_12BIT)
set(TESTORIG testorig12.jpg)
set(MD5_JPEG_RGB_ISLOW 9d7369207c520d37f2c1cbfcb82b2964)
set(MD5_JPEG_RGB_ISLOW2 a00bd20d8ae49684640ef7177d2e0b64)
set(MD5_PPM_RGB_ISLOW f3301d2219783b8b3d942b7239fa50c0)
set(MD5_JPEG_422_IFAST_OPT 7322e3bd2f127f7de4b40d4480ce60e4)
set(MD5_PPM_422_IFAST 79807fa552899e66a04708f533e16950)
set(MD5_JPEG_440_ISLOW e25c1912e38367be505a89c410c1c2d2)
set(MD5_PPM_440_ISLOW e7d2e26288870cfcb30f3114ad01e380)
set(MD5_PPM_422M_IFAST 07737bfe8a7c1c87aaa393a0098d16b0)
set(MD5_JPEG_420_IFAST_Q100_PROG 9447cef4803d9b0f74bcf333cc710a29)
set(MD5_PPM_420_Q100_IFAST 1b3730122709f53d007255e8dfd3305e)
set(MD5_PPM_420M_Q100_IFAST 980a1a3c5bf9510022869d30b7d26566)
set(MD5_JPEG_GRAY_ISLOW 235c90707b16e2e069f37c888b2636d9)
set(MD5_PPM_GRAY_ISLOW 7213c10af507ad467da5578ca5ee1fca)
set(MD5_PPM_GRAY_ISLOW_RGB e96ee81c30a6ed422d466338bd3de65d)
set(MD5_JPEG_420S_IFAST_OPT 7af8e60be4d9c227ec63ac9b6630855e)
set(MD5_JPEG_3x2_FLOAT_PROG_SSE a8c17daf77b457725ec929e215b603f8)
set(MD5_PPM_3x2_FLOAT_SSE 42876ab9e5c2f76a87d08db5fbd57956)
set(MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT a8c17daf77b457725ec929e215b603f8)
set(MD5_PPM_3x2_FLOAT_NO_FP_CONTRACT ${MD5_PPM_3x2_FLOAT_SSE})
set(MD5_JPEG_3x2_FLOAT_PROG_FP_CONTRACT
${MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT})
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT ${MD5_PPM_3x2_FLOAT_SSE})
set(MD5_JPEG_3x2_FLOAT_PROG_387 bc6dbbefac2872f6b9d6c4a0ae60c3c0)
set(MD5_PPM_3x2_FLOAT_387 bcc5723c61560463ac60f772e742d092)
set(MD5_JPEG_3x2_FLOAT_PROG_MSVC e27840755870fa849872e58aa0cd1400)
set(MD5_PPM_3x2_FLOAT_MSVC 6c2880b83bb1aa41dfe330e7a9768690)
set(MD5_JPEG_3x2_IFAST_PROG 1396cc2b7185cfe943d408c9d305339e)
set(MD5_PPM_3x2_IFAST 3975985ef6eeb0a2cdc58daa651ccc00)
set(MD5_PPM_420M_ISLOW_2_1 4ca6be2a6f326ff9eaab63e70a8259c0)
set(MD5_PPM_420M_ISLOW_15_8 12aa9f9534c1b3d7ba047322226365eb)
set(MD5_PPM_420M_ISLOW_13_8 f7e22817c7b25e1393e4ec101e9d4e96)
set(MD5_PPM_420M_ISLOW_11_8 800a16f9f4dc9b293197bfe11be10a82)
set(MD5_PPM_420M_ISLOW_9_8 06b7a92a9bc69f4dc36ec40f1937d55c)
set(MD5_PPM_420M_ISLOW_7_8 3ec444a14a4ab4eab88ffc49c48eca43)
set(MD5_PPM_420M_ISLOW_3_4 3e726b7ea872445b19437d1c1d4f0d93)
set(MD5_PPM_420M_ISLOW_5_8 a8a771abdc94301d20ffac119b2caccd)
set(MD5_PPM_420M_ISLOW_1_2 b419124dd5568b085787234866102866)
set(MD5_PPM_420M_ISLOW_3_8 343d19015531b7bbe746124127244fa8)
set(MD5_PPM_420M_ISLOW_1_4 35fd59d866e44659edfa3c18db2a3edb)
set(MD5_PPM_420M_ISLOW_1_8 ccaed48ac0aedefda5d4abe4013f4ad7)
set(MD5_PPM_420_ISLOW_SKIP15_31 86664cd9dc956536409e44e244d20a97)
set(MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71 452a21656115a163029cfba5c04fa76a)
set(MD5_PPM_444_ISLOW_SKIP1_6 ef63901f71ef7a75cd78253fc0914f84)
set(MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13 15b173fb5872d9575572fbcc1b05956f)
set(MD5_JPEG_CROP cdb35ff4b4519392690ea040c56ea99c)
else()
set(TESTORIG testorig.jpg)
set(MD5_JPEG_RGB_ISLOW 1d44a406f61da743b5fd31c0a9abdca3)
set(MD5_JPEG_RGB_ISLOW2 31d121e57b6c2934c890a7fc7763bcd4)
set(MD5_PPM_RGB_ISLOW 00a257f5393fef8821f2b88ac7421291)
set(MD5_BMP_RGB_ISLOW_565 f07d2e75073e4bb10f6c6f4d36e2e3be)
set(MD5_BMP_RGB_ISLOW_565D 4cfa0928ef3e6bb626d7728c924cfda4)
set(MD5_JPEG_422_IFAST_OPT 2540287b79d913f91665e660303ab2c8)
set(MD5_PPM_422_IFAST 35bd6b3f833bad23de82acea847129fa)
set(MD5_JPEG_440_ISLOW 538bc02bd4b4658fd85de6ece6cbeda6)
set(MD5_PPM_440_ISLOW 11e7eab7ef7ef3276934bb7e7b6bb377)
set(MD5_PPM_422M_IFAST 8dbc65323d62cca7c91ba02dd1cfa81d)
set(MD5_BMP_422M_IFAST_565 3294bd4d9a1f2b3d08ea6020d0db7065)
set(MD5_BMP_422M_IFAST_565D da98c9c7b6039511be4a79a878a9abc1)
set(MD5_JPEG_420_IFAST_Q100_PROG 0ba15f9dab81a703505f835f9dbbac6d)
set(MD5_PPM_420_Q100_IFAST 5a732542015c278ff43635e473a8a294)
set(MD5_PPM_420M_Q100_IFAST ff692ee9323a3b424894862557c092f1)
set(MD5_JPEG_GRAY_ISLOW 72b51f894b8f4a10b3ee3066770aa38d)
set(MD5_PPM_GRAY_ISLOW 8d3596c56eace32f205deccc229aa5ed)
set(MD5_PPM_GRAY_ISLOW_RGB 116424ac07b79e5e801f00508eab48ec)
set(MD5_BMP_GRAY_ISLOW_565 12f78118e56a2f48b966f792fedf23cc)
set(MD5_BMP_GRAY_ISLOW_565D bdbbd616441a24354c98553df5dc82db)
set(MD5_JPEG_420S_IFAST_OPT 388708217ac46273ca33086b22827ed8)
set(MD5_JPEG_3x2_FLOAT_PROG_SSE 343e3f8caf8af5986ebaf0bdc13b5c71)
set(MD5_PPM_3x2_FLOAT_SSE 1a75f36e5904d6fc3a85a43da9ad89bb)
set(MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT 9bca803d2042bd1eb03819e2bf92b3e5)
set(MD5_PPM_3x2_FLOAT_NO_FP_CONTRACT f6bfab038438ed8f5522fbd33595dcdc)
set(MD5_JPEG_3x2_FLOAT_PROG_FP_CONTRACT
${MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT})
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT 0e917a34193ef976b679a6b069b1be26)
set(MD5_JPEG_3x2_FLOAT_PROG_387 1657664a410e0822c924b54f6f65e6e9)
set(MD5_PPM_3x2_FLOAT_387 cb0a1f027f3d2917c902b5640214e025)
set(MD5_JPEG_3x2_FLOAT_PROG_MSVC 7999ce9cd0ee9b6c7043b7351ab7639d)
set(MD5_PPM_3x2_FLOAT_MSVC 28cdc448a6b75e97892f0e0f8d4b21f3)
set(MD5_JPEG_3x2_IFAST_PROG 1ee5d2c1a77f2da495f993c8c7cceca5)
set(MD5_PPM_3x2_IFAST fd283664b3b49127984af0a7f118fccd)
set(MD5_JPEG_420_ISLOW_ARI e986fb0a637a8d833d96e8a6d6d84ea1)
set(MD5_JPEG_444_ISLOW_PROGARI 0a8f1c8f66e113c3cf635df0a475a617)
set(MD5_PPM_420M_IFAST_ARI 57251da28a35b46eecb7177d82d10e0e)
set(MD5_JPEG_420_ISLOW 9a68f56bc76e466aa7e52f415d0f4a5f)
set(MD5_PPM_420M_ISLOW_2_1 9f9de8c0612f8d06869b960b05abf9c9)
set(MD5_PPM_420M_ISLOW_15_8 b6875bc070720b899566cc06459b63b7)
set(MD5_PPM_420M_ISLOW_13_8 bc3452573c8152f6ae552939ee19f82f)
set(MD5_PPM_420M_ISLOW_11_8 d8cc73c0aaacd4556569b59437ba00a5)
set(MD5_PPM_420M_ISLOW_9_8 d25e61bc7eac0002f5b393aa223747b6)
set(MD5_PPM_420M_ISLOW_7_8 ddb564b7c74a09494016d6cd7502a946)
set(MD5_PPM_420M_ISLOW_3_4 8ed8e68808c3fbc4ea764fc9d2968646)
set(MD5_PPM_420M_ISLOW_5_8 a3363274999da2366a024efae6d16c9b)
set(MD5_PPM_420M_ISLOW_1_2 e692a315cea26b988c8e8b29a5dbcd81)
set(MD5_PPM_420M_ISLOW_3_8 79eca9175652ced755155c90e785a996)
set(MD5_PPM_420M_ISLOW_1_4 79cd778f8bf1a117690052cacdd54eca)
set(MD5_PPM_420M_ISLOW_1_8 391b3d4aca640c8567d6f8745eb2142f)
set(MD5_BMP_420_ISLOW_256 4980185e3776e89bd931736e1cddeee6)
set(MD5_BMP_420_ISLOW_565 bf9d13e16c4923b92e1faa604d7922cb)
set(MD5_BMP_420_ISLOW_565D 6bde71526acc44bcff76f696df8638d2)
set(MD5_BMP_420M_ISLOW_565 8dc0185245353cfa32ad97027342216f)
set(MD5_BMP_420M_ISLOW_565D ce034037d212bc403330df6f915c161b)
set(MD5_PPM_420_ISLOW_SKIP15_31 c4c65c1e43d7275cd50328a61e6534f0)
set(MD5_PPM_420_ISLOW_ARI_SKIP16_139 087c6b123db16ac00cb88c5b590bb74a)
set(MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71 26eb36ccc7d1f0cb80cdabb0ac8b5d99)
set(MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4 886c6775af22370257122f8b16207e6d)
set(MD5_PPM_444_ISLOW_SKIP1_6 5606f86874cf26b8fcee1117a0a436a6)
set(MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13 db87dc7ce26bcdc7a6b56239ce2b9d6c)
set(MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0 cb57b32bd6d03e35432362f7bf184b6d)
set(MD5_JPEG_CROP b4197f377e621c4e9b1d20471432610d)
endif()
if(WITH_JAVA)
add_test(TJUnitTest
${Java_JAVA_EXECUTABLE} ${JAVAARGS} -cp java/turbojpeg.jar
@@ -874,6 +778,11 @@ if(ENABLE_STATIC)
set(TEST_LIBTYPES ${TEST_LIBTYPES} static)
endif()
set(TEST_SAMPLE_BITS 8)
if(WITH_12BIT)
set(TEST_SAMPLE_BITS ${TEST_SAMPLE_BITS} 12)
endif()
set(TESTIMAGES ${CMAKE_CURRENT_SOURCE_DIR}/testimages)
set(MD5CMP ${CMAKE_CURRENT_BINARY_DIR}/md5/md5cmp)
if(CMAKE_CROSSCOMPILING)
@@ -1063,172 +972,315 @@ foreach(libtype ${TEST_LIBTYPES})
endif()
endmacro()
foreach(sample_bits ${TEST_SAMPLE_BITS})
if(sample_bits EQUAL 12)
set(cjpeg cjpeg12)
set(djpeg djpeg12)
set(jpegtran jpeg12tran)
set(testout testout12)
set(TESTORIG testorig12.jpg)
set(MD5_JPEG_RGB_ISLOW 9d7369207c520d37f2c1cbfcb82b2964)
set(MD5_JPEG_RGB_ISLOW2 a00bd20d8ae49684640ef7177d2e0b64)
set(MD5_PPM_RGB_ISLOW f3301d2219783b8b3d942b7239fa50c0)
set(MD5_JPEG_422_IFAST_OPT 7322e3bd2f127f7de4b40d4480ce60e4)
set(MD5_PPM_422_IFAST 79807fa552899e66a04708f533e16950)
set(MD5_JPEG_440_ISLOW e25c1912e38367be505a89c410c1c2d2)
set(MD5_PPM_440_ISLOW e7d2e26288870cfcb30f3114ad01e380)
set(MD5_PPM_422M_IFAST 07737bfe8a7c1c87aaa393a0098d16b0)
set(MD5_JPEG_420_IFAST_Q100_PROG 9447cef4803d9b0f74bcf333cc710a29)
set(MD5_PPM_420_Q100_IFAST 1b3730122709f53d007255e8dfd3305e)
set(MD5_PPM_420M_Q100_IFAST 980a1a3c5bf9510022869d30b7d26566)
set(MD5_JPEG_GRAY_ISLOW 235c90707b16e2e069f37c888b2636d9)
set(MD5_PPM_GRAY_ISLOW 7213c10af507ad467da5578ca5ee1fca)
set(MD5_PPM_GRAY_ISLOW_RGB e96ee81c30a6ed422d466338bd3de65d)
set(MD5_JPEG_420S_IFAST_OPT 7af8e60be4d9c227ec63ac9b6630855e)
set(MD5_JPEG_3x2_FLOAT_PROG_SSE a8c17daf77b457725ec929e215b603f8)
set(MD5_PPM_3x2_FLOAT_SSE 42876ab9e5c2f76a87d08db5fbd57956)
set(MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT
a8c17daf77b457725ec929e215b603f8)
set(MD5_PPM_3x2_FLOAT_NO_FP_CONTRACT ${MD5_PPM_3x2_FLOAT_SSE})
set(MD5_JPEG_3x2_FLOAT_PROG_FP_CONTRACT
${MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT})
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT ${MD5_PPM_3x2_FLOAT_SSE})
set(MD5_JPEG_3x2_FLOAT_PROG_387 bc6dbbefac2872f6b9d6c4a0ae60c3c0)
set(MD5_PPM_3x2_FLOAT_387 bcc5723c61560463ac60f772e742d092)
set(MD5_JPEG_3x2_FLOAT_PROG_MSVC e27840755870fa849872e58aa0cd1400)
set(MD5_PPM_3x2_FLOAT_MSVC 6c2880b83bb1aa41dfe330e7a9768690)
set(MD5_JPEG_3x2_IFAST_PROG 1396cc2b7185cfe943d408c9d305339e)
set(MD5_PPM_3x2_IFAST 3975985ef6eeb0a2cdc58daa651ccc00)
set(MD5_PPM_420M_ISLOW_2_1 4ca6be2a6f326ff9eaab63e70a8259c0)
set(MD5_PPM_420M_ISLOW_15_8 12aa9f9534c1b3d7ba047322226365eb)
set(MD5_PPM_420M_ISLOW_13_8 f7e22817c7b25e1393e4ec101e9d4e96)
set(MD5_PPM_420M_ISLOW_11_8 800a16f9f4dc9b293197bfe11be10a82)
set(MD5_PPM_420M_ISLOW_9_8 06b7a92a9bc69f4dc36ec40f1937d55c)
set(MD5_PPM_420M_ISLOW_7_8 3ec444a14a4ab4eab88ffc49c48eca43)
set(MD5_PPM_420M_ISLOW_3_4 3e726b7ea872445b19437d1c1d4f0d93)
set(MD5_PPM_420M_ISLOW_5_8 a8a771abdc94301d20ffac119b2caccd)
set(MD5_PPM_420M_ISLOW_1_2 b419124dd5568b085787234866102866)
set(MD5_PPM_420M_ISLOW_3_8 343d19015531b7bbe746124127244fa8)
set(MD5_PPM_420M_ISLOW_1_4 35fd59d866e44659edfa3c18db2a3edb)
set(MD5_PPM_420M_ISLOW_1_8 ccaed48ac0aedefda5d4abe4013f4ad7)
set(MD5_PPM_420_ISLOW_SKIP15_31 86664cd9dc956536409e44e244d20a97)
set(MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71
452a21656115a163029cfba5c04fa76a)
set(MD5_PPM_444_ISLOW_SKIP1_6 ef63901f71ef7a75cd78253fc0914f84)
set(MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13
15b173fb5872d9575572fbcc1b05956f)
set(MD5_JPEG_CROP cdb35ff4b4519392690ea040c56ea99c)
set(MD5_JPEG_EXAMPLE_COMPRESS 5e502da0c3c0f957a58c536f31e973dc)
set(MD5_PPM_EXAMPLE_DECOMPRESS 2ff0e8505ee6e0ffaeb24037d5650b57)
else()
set(cjpeg cjpeg)
set(djpeg djpeg)
set(jpegtran jpegtran)
set(testout testout)
set(TESTORIG testorig.jpg)
set(MD5_JPEG_RGB_ISLOW 1d44a406f61da743b5fd31c0a9abdca3)
set(MD5_JPEG_RGB_ISLOW2 31d121e57b6c2934c890a7fc7763bcd4)
set(MD5_PPM_RGB_ISLOW 00a257f5393fef8821f2b88ac7421291)
set(MD5_BMP_RGB_ISLOW_565 f07d2e75073e4bb10f6c6f4d36e2e3be)
set(MD5_BMP_RGB_ISLOW_565D 4cfa0928ef3e6bb626d7728c924cfda4)
set(MD5_JPEG_422_IFAST_OPT 2540287b79d913f91665e660303ab2c8)
set(MD5_PPM_422_IFAST 35bd6b3f833bad23de82acea847129fa)
set(MD5_JPEG_440_ISLOW 538bc02bd4b4658fd85de6ece6cbeda6)
set(MD5_PPM_440_ISLOW 11e7eab7ef7ef3276934bb7e7b6bb377)
set(MD5_PPM_422M_IFAST 8dbc65323d62cca7c91ba02dd1cfa81d)
set(MD5_BMP_422M_IFAST_565 3294bd4d9a1f2b3d08ea6020d0db7065)
set(MD5_BMP_422M_IFAST_565D da98c9c7b6039511be4a79a878a9abc1)
set(MD5_JPEG_420_IFAST_Q100_PROG 0ba15f9dab81a703505f835f9dbbac6d)
set(MD5_PPM_420_Q100_IFAST 5a732542015c278ff43635e473a8a294)
set(MD5_PPM_420M_Q100_IFAST ff692ee9323a3b424894862557c092f1)
set(MD5_JPEG_GRAY_ISLOW 72b51f894b8f4a10b3ee3066770aa38d)
set(MD5_PPM_GRAY_ISLOW 8d3596c56eace32f205deccc229aa5ed)
set(MD5_PPM_GRAY_ISLOW_RGB 116424ac07b79e5e801f00508eab48ec)
set(MD5_BMP_GRAY_ISLOW_565 12f78118e56a2f48b966f792fedf23cc)
set(MD5_BMP_GRAY_ISLOW_565D bdbbd616441a24354c98553df5dc82db)
set(MD5_JPEG_420S_IFAST_OPT 388708217ac46273ca33086b22827ed8)
set(MD5_JPEG_3x2_FLOAT_PROG_SSE 343e3f8caf8af5986ebaf0bdc13b5c71)
set(MD5_PPM_3x2_FLOAT_SSE 1a75f36e5904d6fc3a85a43da9ad89bb)
set(MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT
9bca803d2042bd1eb03819e2bf92b3e5)
set(MD5_PPM_3x2_FLOAT_NO_FP_CONTRACT f6bfab038438ed8f5522fbd33595dcdc)
set(MD5_JPEG_3x2_FLOAT_PROG_FP_CONTRACT
${MD5_JPEG_3x2_FLOAT_PROG_NO_FP_CONTRACT})
set(MD5_PPM_3x2_FLOAT_FP_CONTRACT 0e917a34193ef976b679a6b069b1be26)
set(MD5_JPEG_3x2_FLOAT_PROG_387 1657664a410e0822c924b54f6f65e6e9)
set(MD5_PPM_3x2_FLOAT_387 cb0a1f027f3d2917c902b5640214e025)
set(MD5_JPEG_3x2_FLOAT_PROG_MSVC 7999ce9cd0ee9b6c7043b7351ab7639d)
set(MD5_PPM_3x2_FLOAT_MSVC 28cdc448a6b75e97892f0e0f8d4b21f3)
set(MD5_JPEG_3x2_IFAST_PROG 1ee5d2c1a77f2da495f993c8c7cceca5)
set(MD5_PPM_3x2_IFAST fd283664b3b49127984af0a7f118fccd)
set(MD5_JPEG_420_ISLOW_ARI e986fb0a637a8d833d96e8a6d6d84ea1)
set(MD5_JPEG_444_ISLOW_PROGARI 0a8f1c8f66e113c3cf635df0a475a617)
set(MD5_PPM_420M_IFAST_ARI 57251da28a35b46eecb7177d82d10e0e)
set(MD5_JPEG_420_ISLOW 9a68f56bc76e466aa7e52f415d0f4a5f)
set(MD5_PPM_420M_ISLOW_2_1 9f9de8c0612f8d06869b960b05abf9c9)
set(MD5_PPM_420M_ISLOW_15_8 b6875bc070720b899566cc06459b63b7)
set(MD5_PPM_420M_ISLOW_13_8 bc3452573c8152f6ae552939ee19f82f)
set(MD5_PPM_420M_ISLOW_11_8 d8cc73c0aaacd4556569b59437ba00a5)
set(MD5_PPM_420M_ISLOW_9_8 d25e61bc7eac0002f5b393aa223747b6)
set(MD5_PPM_420M_ISLOW_7_8 ddb564b7c74a09494016d6cd7502a946)
set(MD5_PPM_420M_ISLOW_3_4 8ed8e68808c3fbc4ea764fc9d2968646)
set(MD5_PPM_420M_ISLOW_5_8 a3363274999da2366a024efae6d16c9b)
set(MD5_PPM_420M_ISLOW_1_2 e692a315cea26b988c8e8b29a5dbcd81)
set(MD5_PPM_420M_ISLOW_3_8 79eca9175652ced755155c90e785a996)
set(MD5_PPM_420M_ISLOW_1_4 79cd778f8bf1a117690052cacdd54eca)
set(MD5_PPM_420M_ISLOW_1_8 391b3d4aca640c8567d6f8745eb2142f)
set(MD5_BMP_420_ISLOW_256 4980185e3776e89bd931736e1cddeee6)
set(MD5_BMP_420_ISLOW_565 bf9d13e16c4923b92e1faa604d7922cb)
set(MD5_BMP_420_ISLOW_565D 6bde71526acc44bcff76f696df8638d2)
set(MD5_BMP_420M_ISLOW_565 8dc0185245353cfa32ad97027342216f)
set(MD5_BMP_420M_ISLOW_565D ce034037d212bc403330df6f915c161b)
set(MD5_PPM_420_ISLOW_SKIP15_31 c4c65c1e43d7275cd50328a61e6534f0)
set(MD5_PPM_420_ISLOW_ARI_SKIP16_139 087c6b123db16ac00cb88c5b590bb74a)
set(MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71
26eb36ccc7d1f0cb80cdabb0ac8b5d99)
set(MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4 886c6775af22370257122f8b16207e6d)
set(MD5_PPM_444_ISLOW_SKIP1_6 5606f86874cf26b8fcee1117a0a436a6)
set(MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13
db87dc7ce26bcdc7a6b56239ce2b9d6c)
set(MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0 cb57b32bd6d03e35432362f7bf184b6d)
set(MD5_JPEG_CROP b4197f377e621c4e9b1d20471432610d)
set(MD5_JPEG_EXAMPLE_COMPRESS 95d4d72e2ef127332654c2599afb47bf)
set(MD5_PPM_EXAMPLE_DECOMPRESS 6fdde7301575bfd711e295b969b6b3de)
endif()
# CC: null SAMP: fullsize FDCT: islow ENT: huff
add_bittest(cjpeg rgb-islow "-rgb;-dct;int;-icc;${TESTIMAGES}/test1.icc"
testout_rgb_islow.jpg ${TESTIMAGES}/testorig.ppm
add_bittest(${cjpeg} rgb-islow "-rgb;-dct;int;-icc;${TESTIMAGES}/test1.icc"
${testout}_rgb_islow.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_RGB_ISLOW})
# CC: null SAMP: fullsize IDCT: islow ENT: huff
add_bittest(djpeg rgb-islow "-dct;int;-ppm;-icc;testout_rgb_islow.icc"
testout_rgb_islow.ppm testout_rgb_islow.jpg
${MD5_PPM_RGB_ISLOW} cjpeg-${libtype}-rgb-islow)
add_bittest(${djpeg} rgb-islow "-dct;int;-ppm;-icc;${testout}_rgb_islow.icc"
${testout}_rgb_islow.ppm ${testout}_rgb_islow.jpg ${MD5_PPM_RGB_ISLOW}
${cjpeg}-${libtype}-rgb-islow)
add_test(djpeg-${libtype}-rgb-islow-icc-cmp
add_test(${djpeg}-${libtype}-rgb-islow-icc-cmp
${CMAKE_CROSSCOMPILING_EMULATOR} ${MD5CMP}
b06a39d730129122e85c1363ed1bbc9e testout_rgb_islow.icc)
set_tests_properties(djpeg-${libtype}-rgb-islow-icc-cmp PROPERTIES
DEPENDS djpeg-${libtype}-rgb-islow)
b06a39d730129122e85c1363ed1bbc9e ${testout}_rgb_islow.icc)
set_tests_properties(${djpeg}-${libtype}-rgb-islow-icc-cmp PROPERTIES
DEPENDS ${djpeg}-${libtype}-rgb-islow)
add_bittest(jpegtran icc "-copy;all;-icc;${TESTIMAGES}/test2.icc"
testout_rgb_islow2.jpg testout_rgb_islow.jpg
${MD5_JPEG_RGB_ISLOW2} cjpeg-${libtype}-rgb-islow)
add_bittest(${jpegtran} icc "-copy;all;-icc;${TESTIMAGES}/test2.icc"
${testout}_rgb_islow2.jpg ${testout}_rgb_islow.jpg
${MD5_JPEG_RGB_ISLOW2} ${cjpeg}-${libtype}-rgb-islow)
if(NOT WITH_12BIT)
if(sample_bits EQUAL 8)
# CC: RGB->RGB565 SAMP: fullsize IDCT: islow ENT: huff
add_bittest(djpeg rgb-islow-565 "-dct;int;-rgb565;-dither;none;-bmp"
testout_rgb_islow_565.bmp testout_rgb_islow.jpg
${MD5_BMP_RGB_ISLOW_565} cjpeg-${libtype}-rgb-islow)
add_bittest(${djpeg} rgb-islow-565 "-dct;int;-rgb565;-dither;none;-bmp"
${testout}_rgb_islow_565.bmp ${testout}_rgb_islow.jpg
${MD5_BMP_RGB_ISLOW_565} ${cjpeg}-${libtype}-rgb-islow)
# CC: RGB->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
add_bittest(djpeg rgb-islow-565D "-dct;int;-rgb565;-bmp"
testout_rgb_islow_565D.bmp testout_rgb_islow.jpg
${MD5_BMP_RGB_ISLOW_565D} cjpeg-${libtype}-rgb-islow)
add_bittest(${djpeg} rgb-islow-565D "-dct;int;-rgb565;-bmp"
${testout}_rgb_islow_565D.bmp ${testout}_rgb_islow.jpg
${MD5_BMP_RGB_ISLOW_565D} ${cjpeg}-${libtype}-rgb-islow)
endif()
# CC: RGB->YCC SAMP: fullsize/h2v1 FDCT: ifast ENT: 2-pass huff
add_bittest(cjpeg 422-ifast-opt "-sample;2x1;-dct;fast;-opt"
testout_422_ifast_opt.jpg ${TESTIMAGES}/testorig.ppm
add_bittest(${cjpeg} 422-ifast-opt "-sample;2x1;-dct;fast;-opt"
${testout}_422_ifast_opt.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_422_IFAST_OPT})
# CC: YCC->RGB SAMP: fullsize/h2v1 fancy IDCT: ifast ENT: huff
add_bittest(djpeg 422-ifast "-dct;fast"
testout_422_ifast.ppm testout_422_ifast_opt.jpg
${MD5_PPM_422_IFAST} cjpeg-${libtype}-422-ifast-opt)
add_bittest(${djpeg} 422-ifast "-dct;fast"
${testout}_422_ifast.ppm ${testout}_422_ifast_opt.jpg
${MD5_PPM_422_IFAST} ${cjpeg}-${libtype}-422-ifast-opt)
# CC: RGB->YCC SAMP: fullsize/h1v2 FDCT: islow ENT: huff
add_bittest(cjpeg 440-islow "-sample;1x2;-dct;int"
testout_440_islow.jpg ${TESTIMAGES}/testorig.ppm
add_bittest(${cjpeg} 440-islow "-sample;1x2;-dct;int"
${testout}_440_islow.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_440_ISLOW})
# CC: YCC->RGB SAMP: fullsize/h1v2 fancy IDCT: islow ENT: huff
add_bittest(djpeg 440-islow "-dct;int"
testout_440_islow.ppm testout_440_islow.jpg
${MD5_PPM_440_ISLOW} cjpeg-${libtype}-440-islow)
add_bittest(${djpeg} 440-islow "-dct;int"
${testout}_440_islow.ppm ${testout}_440_islow.jpg
${MD5_PPM_440_ISLOW} ${cjpeg}-${libtype}-440-islow)
# CC: YCC->RGB SAMP: h2v1 merged IDCT: ifast ENT: huff
add_bittest(djpeg 422m-ifast "-dct;fast;-nosmooth"
testout_422m_ifast.ppm testout_422_ifast_opt.jpg
${MD5_PPM_422M_IFAST} cjpeg-${libtype}-422-ifast-opt)
add_bittest(${djpeg} 422m-ifast "-dct;fast;-nosmooth"
${testout}_422m_ifast.ppm ${testout}_422_ifast_opt.jpg
${MD5_PPM_422M_IFAST} ${cjpeg}-${libtype}-422-ifast-opt)
if(NOT WITH_12BIT)
if(sample_bits EQUAL 8)
# CC: YCC->RGB565 SAMP: h2v1 merged IDCT: ifast ENT: huff
add_bittest(djpeg 422m-ifast-565
add_bittest(${djpeg} 422m-ifast-565
"-dct;int;-nosmooth;-rgb565;-dither;none;-bmp"
testout_422m_ifast_565.bmp testout_422_ifast_opt.jpg
${MD5_BMP_422M_IFAST_565} cjpeg-${libtype}-422-ifast-opt)
${testout}_422m_ifast_565.bmp ${testout}_422_ifast_opt.jpg
${MD5_BMP_422M_IFAST_565} ${cjpeg}-${libtype}-422-ifast-opt)
# CC: YCC->RGB565 (dithered) SAMP: h2v1 merged IDCT: ifast ENT: huff
add_bittest(djpeg 422m-ifast-565D "-dct;int;-nosmooth;-rgb565;-bmp"
testout_422m_ifast_565D.bmp testout_422_ifast_opt.jpg
${MD5_BMP_422M_IFAST_565D} cjpeg-${libtype}-422-ifast-opt)
add_bittest(${djpeg} 422m-ifast-565D "-dct;int;-nosmooth;-rgb565;-bmp"
${testout}_422m_ifast_565D.bmp ${testout}_422_ifast_opt.jpg
${MD5_BMP_422M_IFAST_565D} ${cjpeg}-${libtype}-422-ifast-opt)
endif()
# CC: RGB->YCC SAMP: fullsize/h2v2 FDCT: ifast ENT: prog huff
add_bittest(cjpeg 420-q100-ifast-prog
add_bittest(${cjpeg} 420-q100-ifast-prog
"-sample;2x2;-quality;100;-dct;fast;-scans;${TESTIMAGES}/test.scan"
testout_420_q100_ifast_prog.jpg ${TESTIMAGES}/testorig.ppm
${testout}_420_q100_ifast_prog.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_420_IFAST_Q100_PROG})
# CC: YCC->RGB SAMP: fullsize/h2v2 fancy IDCT: ifast ENT: prog huff
add_bittest(djpeg 420-q100-ifast-prog "-dct;fast"
testout_420_q100_ifast.ppm testout_420_q100_ifast_prog.jpg
${MD5_PPM_420_Q100_IFAST} cjpeg-${libtype}-420-q100-ifast-prog)
add_bittest(${djpeg} 420-q100-ifast-prog "-dct;fast"
${testout}_420_q100_ifast.ppm ${testout}_420_q100_ifast_prog.jpg
${MD5_PPM_420_Q100_IFAST} ${cjpeg}-${libtype}-420-q100-ifast-prog)
# CC: YCC->RGB SAMP: h2v2 merged IDCT: ifast ENT: prog huff
add_bittest(djpeg 420m-q100-ifast-prog "-dct;fast;-nosmooth"
testout_420m_q100_ifast.ppm testout_420_q100_ifast_prog.jpg
${MD5_PPM_420M_Q100_IFAST} cjpeg-${libtype}-420-q100-ifast-prog)
add_bittest(${djpeg} 420m-q100-ifast-prog "-dct;fast;-nosmooth"
${testout}_420m_q100_ifast.ppm ${testout}_420_q100_ifast_prog.jpg
${MD5_PPM_420M_Q100_IFAST} ${cjpeg}-${libtype}-420-q100-ifast-prog)
# CC: RGB->Gray SAMP: fullsize FDCT: islow ENT: huff
add_bittest(cjpeg gray-islow "-gray;-dct;int"
testout_gray_islow.jpg ${TESTIMAGES}/testorig.ppm
add_bittest(${cjpeg} gray-islow "-gray;-dct;int"
${testout}_gray_islow.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_GRAY_ISLOW})
# CC: Gray->Gray SAMP: fullsize IDCT: islow ENT: huff
add_bittest(djpeg gray-islow "-dct;int"
testout_gray_islow.ppm testout_gray_islow.jpg
${MD5_PPM_GRAY_ISLOW} cjpeg-${libtype}-gray-islow)
add_bittest(${djpeg} gray-islow "-dct;int"
${testout}_gray_islow.ppm ${testout}_gray_islow.jpg
${MD5_PPM_GRAY_ISLOW} ${cjpeg}-${libtype}-gray-islow)
# CC: Gray->RGB SAMP: fullsize IDCT: islow ENT: huff
add_bittest(djpeg gray-islow-rgb "-dct;int;-rgb"
testout_gray_islow_rgb.ppm testout_gray_islow.jpg
${MD5_PPM_GRAY_ISLOW_RGB} cjpeg-${libtype}-gray-islow)
add_bittest(${djpeg} gray-islow-rgb "-dct;int;-rgb"
${testout}_gray_islow_rgb.ppm ${testout}_gray_islow.jpg
${MD5_PPM_GRAY_ISLOW_RGB} ${cjpeg}-${libtype}-gray-islow)
if(NOT WITH_12BIT)
if(sample_bits EQUAL 8)
# CC: Gray->RGB565 SAMP: fullsize IDCT: islow ENT: huff
add_bittest(djpeg gray-islow-565 "-dct;int;-rgb565;-dither;none;-bmp"
testout_gray_islow_565.bmp testout_gray_islow.jpg
${MD5_BMP_GRAY_ISLOW_565} cjpeg-${libtype}-gray-islow)
add_bittest(${djpeg} gray-islow-565 "-dct;int;-rgb565;-dither;none;-bmp"
${testout}_gray_islow_565.bmp ${testout}_gray_islow.jpg
${MD5_BMP_GRAY_ISLOW_565} ${cjpeg}-${libtype}-gray-islow)
# CC: Gray->RGB565 (dithered) SAMP: fullsize IDCT: islow ENT: huff
add_bittest(djpeg gray-islow-565D "-dct;int;-rgb565;-bmp"
testout_gray_islow_565D.bmp testout_gray_islow.jpg
${MD5_BMP_GRAY_ISLOW_565D} cjpeg-${libtype}-gray-islow)
add_bittest(${djpeg} gray-islow-565D "-dct;int;-rgb565;-bmp"
${testout}_gray_islow_565D.bmp ${testout}_gray_islow.jpg
${MD5_BMP_GRAY_ISLOW_565D} ${cjpeg}-${libtype}-gray-islow)
endif()
# CC: RGB->YCC SAMP: fullsize smooth/h2v2 smooth FDCT: islow
# ENT: 2-pass huff
add_bittest(cjpeg 420s-ifast-opt "-sample;2x2;-smooth;1;-dct;int;-opt"
testout_420s_ifast_opt.jpg ${TESTIMAGES}/testorig.ppm
add_bittest(${cjpeg} 420s-ifast-opt "-sample;2x2;-smooth;1;-dct;int;-opt"
${testout}_420s_ifast_opt.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_420S_IFAST_OPT})
if(FLOATTEST)
# CC: RGB->YCC SAMP: fullsize/int FDCT: float ENT: prog huff
add_bittest(cjpeg 3x2-float-prog "-sample;3x2;-dct;float;-prog"
testout_3x2_float_prog.jpg ${TESTIMAGES}/testorig.ppm
add_bittest(${cjpeg} 3x2-float-prog "-sample;3x2;-dct;float;-prog"
${testout}_3x2_float_prog.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_3x2_FLOAT_PROG_${FLOATTEST_UC}})
# CC: YCC->RGB SAMP: fullsize/int IDCT: float ENT: prog huff
add_bittest(djpeg 3x2-float-prog "-dct;float"
testout_3x2_float.ppm testout_3x2_float_prog.jpg
${MD5_PPM_3x2_FLOAT_${FLOATTEST_UC}} cjpeg-${libtype}-3x2-float-prog)
add_bittest(${djpeg} 3x2-float-prog "-dct;float"
${testout}_3x2_float.ppm ${testout}_3x2_float_prog.jpg
${MD5_PPM_3x2_FLOAT_${FLOATTEST_UC}}
${cjpeg}-${libtype}-3x2-float-prog)
endif()
# CC: RGB->YCC SAMP: fullsize/int FDCT: ifast ENT: prog huff
add_bittest(cjpeg 3x2-ifast-prog "-sample;3x2;-dct;fast;-prog"
testout_3x2_ifast_prog.jpg ${TESTIMAGES}/testorig.ppm
add_bittest(${cjpeg} 3x2-ifast-prog "-sample;3x2;-dct;fast;-prog"
${testout}_3x2_ifast_prog.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_3x2_IFAST_PROG})
# CC: YCC->RGB SAMP: fullsize/int IDCT: ifast ENT: prog huff
add_bittest(djpeg 3x2-ifast-prog "-dct;fast"
testout_3x2_ifast.ppm testout_3x2_ifast_prog.jpg
${MD5_PPM_3x2_IFAST} cjpeg-${libtype}-3x2-ifast-prog)
add_bittest(${djpeg} 3x2-ifast-prog "-dct;fast"
${testout}_3x2_ifast.ppm ${testout}_3x2_ifast_prog.jpg
${MD5_PPM_3x2_IFAST} ${cjpeg}-${libtype}-3x2-ifast-prog)
if(WITH_ARITH_ENC)
if(WITH_ARITH_ENC AND sample_bits EQUAL 8)
# CC: YCC->RGB SAMP: fullsize/h2v2 FDCT: islow ENT: arith
add_bittest(cjpeg 420-islow-ari "-dct;int;-arithmetic"
testout_420_islow_ari.jpg ${TESTIMAGES}/testorig.ppm
add_bittest(${cjpeg} 420-islow-ari "-dct;int;-arithmetic"
${testout}_420_islow_ari.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_420_ISLOW_ARI})
add_bittest(jpegtran 420-islow-ari "-arithmetic"
testout_420_islow_ari2.jpg ${TESTIMAGES}/testimgint.jpg
add_bittest(${jpegtran} 420-islow-ari "-arithmetic"
${testout}_420_islow_ari2.jpg ${TESTIMAGES}/testimgint.jpg
${MD5_JPEG_420_ISLOW_ARI})
# CC: YCC->RGB SAMP: fullsize FDCT: islow ENT: prog arith
add_bittest(cjpeg 444-islow-progari
add_bittest(${cjpeg} 444-islow-progari
"-sample;1x1;-dct;int;-prog;-arithmetic"
testout_444_islow_progari.jpg ${TESTIMAGES}/testorig.ppm
${testout}_444_islow_progari.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_444_ISLOW_PROGARI})
endif()
if(WITH_ARITH_DEC)
if(WITH_ARITH_DEC AND sample_bits EQUAL 8)
# CC: RGB->YCC SAMP: h2v2 merged IDCT: ifast ENT: arith
add_bittest(djpeg 420m-ifast-ari "-fast;-skip;1,20;-ppm"
testout_420m_ifast_ari.ppm ${TESTIMAGES}/testimgari.jpg
add_bittest(${djpeg} 420m-ifast-ari "-fast;-skip;1,20;-ppm"
${testout}_420m_ifast_ari.ppm ${TESTIMAGES}/testimgari.jpg
${MD5_PPM_420M_IFAST_ARI})
add_bittest(jpegtran 420-islow ""
testout_420_islow.jpg ${TESTIMAGES}/testimgari.jpg
add_bittest(${jpegtran} 420-islow ""
${testout}_420_islow.jpg ${TESTIMAGES}/testimgari.jpg
${MD5_JPEG_420_ISLOW})
endif()
@@ -1253,107 +1305,140 @@ foreach(libtype ${TEST_LIBTYPES})
# ENT: huff
foreach(scale 2_1 15_8 13_8 11_8 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8)
string(REGEX REPLACE "_" "/" scalearg ${scale})
add_bittest(djpeg 420m-islow-${scale}
add_bittest(${djpeg} 420m-islow-${scale}
"-dct;int;-scale;${scalearg};-nosmooth;-ppm"
testout_420m_islow_${scale}.ppm ${TESTIMAGES}/${TESTORIG}
${testout}_420m_islow_${scale}.ppm ${TESTIMAGES}/${TESTORIG}
${MD5_PPM_420M_ISLOW_${scale}})
endforeach()
if(NOT WITH_12BIT)
if(sample_bits EQUAL 8)
# CC: YCC->RGB (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
add_bittest(djpeg 420-islow-256 "-dct;int;-colors;256;-bmp"
testout_420_islow_256.bmp ${TESTIMAGES}/${TESTORIG}
add_bittest(${djpeg} 420-islow-256 "-dct;int;-colors;256;-bmp"
${testout}_420_islow_256.bmp ${TESTIMAGES}/${TESTORIG}
${MD5_BMP_420_ISLOW_256})
# CC: YCC->RGB565 SAMP: h2v2 fancy IDCT: islow ENT: huff
add_bittest(djpeg 420-islow-565 "-dct;int;-rgb565;-dither;none;-bmp"
testout_420_islow_565.bmp ${TESTIMAGES}/${TESTORIG}
add_bittest(${djpeg} 420-islow-565 "-dct;int;-rgb565;-dither;none;-bmp"
${testout}_420_islow_565.bmp ${TESTIMAGES}/${TESTORIG}
${MD5_BMP_420_ISLOW_565})
# CC: YCC->RGB565 (dithered) SAMP: h2v2 fancy IDCT: islow ENT: huff
add_bittest(djpeg 420-islow-565D "-dct;int;-rgb565;-bmp"
testout_420_islow_565D.bmp ${TESTIMAGES}/${TESTORIG}
add_bittest(${djpeg} 420-islow-565D "-dct;int;-rgb565;-bmp"
${testout}_420_islow_565D.bmp ${TESTIMAGES}/${TESTORIG}
${MD5_BMP_420_ISLOW_565D})
# CC: YCC->RGB565 SAMP: h2v2 merged IDCT: islow ENT: huff
add_bittest(djpeg 420m-islow-565
add_bittest(${djpeg} 420m-islow-565
"-dct;int;-nosmooth;-rgb565;-dither;none;-bmp"
testout_420m_islow_565.bmp ${TESTIMAGES}/${TESTORIG}
${testout}_420m_islow_565.bmp ${TESTIMAGES}/${TESTORIG}
${MD5_BMP_420M_ISLOW_565})
# CC: YCC->RGB565 (dithered) SAMP: h2v2 merged IDCT: islow ENT: huff
add_bittest(djpeg 420m-islow-565D "-dct;int;-nosmooth;-rgb565;-bmp"
testout_420m_islow_565D.bmp ${TESTIMAGES}/${TESTORIG}
add_bittest(${djpeg} 420m-islow-565D "-dct;int;-nosmooth;-rgb565;-bmp"
${testout}_420m_islow_565D.bmp ${TESTIMAGES}/${TESTORIG}
${MD5_BMP_420M_ISLOW_565D})
endif()
# Partial decode tests. These tests are designed to cover all of the
# possible code paths in jpeg_skip_scanlines().
# Context rows: Yes Intra-iMCU row: Yes iMCU row prefetch: No ENT: huff
add_bittest(djpeg 420-islow-skip15_31 "-dct;int;-skip;15,31;-ppm"
testout_420_islow_skip15,31.ppm ${TESTIMAGES}/${TESTORIG}
# Context rows: Yes Intra-iMCU row: Yes iMCU row prefetch: No
# ENT: huff
add_bittest(${djpeg} 420-islow-skip15_31 "-dct;int;-skip;15,31;-ppm"
${testout}_420_islow_skip15,31.ppm ${TESTIMAGES}/${TESTORIG}
${MD5_PPM_420_ISLOW_SKIP15_31})
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: Yes ENT: arith
if(WITH_ARITH_DEC)
add_bittest(djpeg 420-islow-ari-skip16_139 "-dct;int;-skip;16,139;-ppm"
testout_420_islow_ari_skip16,139.ppm ${TESTIMAGES}/testimgari.jpg
${MD5_PPM_420_ISLOW_ARI_SKIP16_139})
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: Yes
# ENT: arith
if(WITH_ARITH_DEC AND sample_bits EQUAL 8)
add_bittest(${djpeg} 420-islow-ari-skip16_139
"-dct;int;-skip;16,139;-ppm" ${testout}_420_islow_ari_skip16,139.ppm
${TESTIMAGES}/testimgari.jpg ${MD5_PPM_420_ISLOW_ARI_SKIP16_139})
endif()
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: prog huff
add_test(cjpeg-${libtype}-420-islow-prog
${CMAKE_CROSSCOMPILING_EMULATOR} cjpeg${suffix} -dct int -prog
-outfile testout_420_islow_prog.jpg ${TESTIMAGES}/testorig.ppm)
add_bittest(djpeg 420-islow-prog-crop62x62_71_71
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No
# ENT: prog huff
add_test(${cjpeg}-${libtype}-420-islow-prog
${CMAKE_CROSSCOMPILING_EMULATOR} ${cjpeg}${suffix} -dct int -prog
-outfile ${testout}_420_islow_prog.jpg ${TESTIMAGES}/testorig.ppm)
add_bittest(${djpeg} 420-islow-prog-crop62x62_71_71
"-dct;int;-crop;62x62+71+71;-ppm"
testout_420_islow_prog_crop62x62,71,71.ppm testout_420_islow_prog.jpg
${MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71} cjpeg-${libtype}-420-islow-prog)
${testout}_420_islow_prog_crop62x62,71,71.ppm
${testout}_420_islow_prog.jpg ${MD5_PPM_420_ISLOW_PROG_CROP62x62_71_71}
${cjpeg}-${libtype}-420-islow-prog)
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No ENT: arith
if(WITH_ARITH_DEC)
add_bittest(djpeg 420-islow-ari-crop53x53_4_4
# Context rows: Yes Intra-iMCU row: No iMCU row prefetch: No
# ENT: arith
if(WITH_ARITH_DEC AND sample_bits EQUAL 8)
add_bittest(${djpeg} 420-islow-ari-crop53x53_4_4
"-dct;int;-crop;53x53+4+4;-ppm"
testout_420_islow_ari_crop53x53,4,4.ppm ${TESTIMAGES}/testimgari.jpg
${testout}_420_islow_ari_crop53x53,4,4.ppm ${TESTIMAGES}/testimgari.jpg
${MD5_PPM_420_ISLOW_ARI_CROP53x53_4_4})
endif()
# Context rows: No Intra-iMCU row: Yes ENT: huff
add_test(cjpeg-${libtype}-444-islow
${CMAKE_CROSSCOMPILING_EMULATOR} cjpeg${suffix} -dct int -sample 1x1
-outfile testout_444_islow.jpg ${TESTIMAGES}/testorig.ppm)
add_bittest(djpeg 444-islow-skip1_6 "-dct;int;-skip;1,6;-ppm"
testout_444_islow_skip1,6.ppm testout_444_islow.jpg
${MD5_PPM_444_ISLOW_SKIP1_6} cjpeg-${libtype}-444-islow)
add_test(${cjpeg}-${libtype}-444-islow
${CMAKE_CROSSCOMPILING_EMULATOR} ${cjpeg}${suffix} -dct int -sample 1x1
-outfile ${testout}_444_islow.jpg ${TESTIMAGES}/testorig.ppm)
add_bittest(${djpeg} 444-islow-skip1_6 "-dct;int;-skip;1,6;-ppm"
${testout}_444_islow_skip1,6.ppm ${testout}_444_islow.jpg
${MD5_PPM_444_ISLOW_SKIP1_6} ${cjpeg}-${libtype}-444-islow)
# Context rows: No Intra-iMCU row: No ENT: prog huff
add_test(cjpeg-${libtype}-444-islow-prog
${CMAKE_CROSSCOMPILING_EMULATOR} cjpeg${suffix} -dct int -prog -sample 1x1
-outfile testout_444_islow_prog.jpg ${TESTIMAGES}/testorig.ppm)
add_bittest(djpeg 444-islow-prog-crop98x98_13_13
add_test(${cjpeg}-${libtype}-444-islow-prog
${CMAKE_CROSSCOMPILING_EMULATOR} ${cjpeg}${suffix} -dct int -prog
-sample 1x1 -outfile ${testout}_444_islow_prog.jpg
${TESTIMAGES}/testorig.ppm)
add_bittest(${djpeg} 444-islow-prog-crop98x98_13_13
"-dct;int;-crop;98x98+13+13;-ppm"
testout_444_islow_prog_crop98x98,13,13.ppm testout_444_islow_prog.jpg
${MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13} cjpeg-${libtype}-444-islow-prog)
${testout}_444_islow_prog_crop98x98,13,13.ppm
${testout}_444_islow_prog.jpg ${MD5_PPM_444_ISLOW_PROG_CROP98x98_13_13}
${cjpeg}-${libtype}-444-islow-prog)
# Context rows: No Intra-iMCU row: No ENT: arith
if(WITH_ARITH_ENC)
add_test(cjpeg-${libtype}-444-islow-ari
${CMAKE_CROSSCOMPILING_EMULATOR} cjpeg${suffix} -dct int -arithmetic
-sample 1x1 -outfile testout_444_islow_ari.jpg
if(WITH_ARITH_ENC AND sample_bits EQUAL 8)
add_test(${cjpeg}-${libtype}-444-islow-ari
${CMAKE_CROSSCOMPILING_EMULATOR} ${cjpeg}${suffix} -dct int -arithmetic
-sample 1x1 -outfile ${testout}_444_islow_ari.jpg
${TESTIMAGES}/testorig.ppm)
if(WITH_ARITH_DEC)
add_bittest(djpeg 444-islow-ari-crop37x37_0_0
add_bittest(${djpeg} 444-islow-ari-crop37x37_0_0
"-dct;int;-crop;37x37+0+0;-ppm"
testout_444_islow_ari_crop37x37,0,0.ppm testout_444_islow_ari.jpg
${MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0} cjpeg-${libtype}-444-islow-ari)
${testout}_444_islow_ari_crop37x37,0,0.ppm
${testout}_444_islow_ari.jpg ${MD5_PPM_444_ISLOW_ARI_CROP37x37_0_0}
${cjpeg}-${libtype}-444-islow-ari)
endif()
endif()
add_bittest(jpegtran crop "-crop;120x90+20+50;-transpose;-perfect"
testout_crop.jpg ${TESTIMAGES}/${TESTORIG}
add_bittest(${jpegtran} crop "-crop;120x90+20+50;-transpose;-perfect"
${testout}_crop.jpg ${TESTIMAGES}/${TESTORIG}
${MD5_JPEG_CROP})
unset(EXAMPLE_12BIT_ARG)
if(sample_bits EQUAL 12)
set(EXAMPLE_12BIT_ARG "-12bit")
endif()
add_test(example-${sample_bits}bit-${libtype}-compress
${CMAKE_CROSSCOMPILING_EMULATOR} example${suffix} compress -q 95
${EXAMPLE_12BIT_ARG} ${testout}-example.jpg)
add_test(example-${sample_bits}bit-${libtype}-compress-cmp
${CMAKE_CROSSCOMPILING_EMULATOR} ${MD5CMP} ${MD5_JPEG_EXAMPLE_COMPRESS}
${testout}-example.jpg)
set_tests_properties(example-${sample_bits}bit-${libtype}-compress-cmp
PROPERTIES DEPENDS example-${sample_bits}bit-${libtype}-compress)
add_test(example-${sample_bits}bit-${libtype}-decompress
${CMAKE_CROSSCOMPILING_EMULATOR} example${suffix} decompress
${EXAMPLE_12BIT_ARG} ${testout}-example.jpg ${testout}-example.ppm)
add_test(example-${sample_bits}bit-${libtype}-decompress-cmp
${CMAKE_CROSSCOMPILING_EMULATOR} ${MD5CMP} ${MD5_PPM_EXAMPLE_DECOMPRESS}
${testout}-example.ppm)
set_tests_properties(example-${sample_bits}bit-${libtype}-decompress-cmp
PROPERTIES DEPENDS example-${sample_bits}bit-${libtype}-decompress)
endforeach()
endforeach()
add_custom_target(testclean COMMAND ${CMAKE_COMMAND} -P
@@ -1479,12 +1564,26 @@ if(ENABLE_STATIC)
install(PROGRAMS ${DIR}/jpegtran-static${EXE}
DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME jpegtran${EXE})
endif()
if(WITH_12BIT)
install(TARGETS jpeg12-static EXPORT ${CMAKE_PROJECT_NAME}Targets
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT ENABLE_SHARED)
install(PROGRAMS ${DIR}/cjpeg12-static${EXE}
DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME cjpeg12${EXE})
install(PROGRAMS ${DIR}/djpeg12-static${EXE}
DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME djpeg12${EXE})
install(PROGRAMS ${DIR}/jpeg12tran-static${EXE}
DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME jpeg12tran${EXE})
endif()
endif()
endif()
install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg
${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt
${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.c
${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c
${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt
${CMAKE_CURRENT_SOURCE_DIR}/structure.txt
@@ -1505,6 +1604,10 @@ endif()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg.pc
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libturbojpeg.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
if(WITH_12BIT)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg12.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/${CMAKE_PROJECT_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/${CMAKE_PROJECT_NAME}ConfigVersion.cmake
@@ -1517,6 +1620,10 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h
${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h
${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if(WITH_12BIT)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/jpeg12lib.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
include(cmakescripts/BuildPackages.cmake)

View File

@@ -1,3 +1,18 @@
2.2 pre-beta
============
### Significant changes relative to 2.1.3
1. By default, the build system now builds, packages, and tests a separate
12-bit-per-component flavor of the libjpeg API library, cjpeg, djpeg, and
jpegtran. The 12-bit-per-component libjpeg API library mangles the names of
libjpeg API functions, data types, structures, and macros to enable calling
applications to more easily support both 8-bit-per-component and
12-bit-per-component JPEG images. (Refer to [libjpeg.txt](libjpeg.txt) for
more details.) The `WITH_12BIT` CMake variable can be used to disable
12-bit-per-component JPEG support.
2.1.3
=====

View File

@@ -43,7 +43,7 @@ User documentation:
change.log Version-to-version change highlights.
Programmer and internal documentation:
libjpeg.txt How to use the JPEG library in your own programs.
example.txt Sample code for calling the JPEG library.
example.c Sample code for calling the JPEG library.
structure.txt Overview of the JPEG library's internal structure.
coderules.txt Coding style rules --- please read if you contribute code.

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1994-1997, Thomas G. Lane.
* Modified 2019 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2017, 2019, 2021, D. R. Commander.
* Copyright (C) 2017, 2019, 2021-2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -16,7 +16,7 @@
#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jerror.h" /* get library error codes too */
#include "cderror.h" /* get application-specific error codes */

View File

@@ -90,6 +90,10 @@ if(WITH_JAVA)
set(INST_DEFS ${INST_DEFS} -DJAVA)
endif()
if(WITH_12BIT)
set(INST_DEFS ${INST_DEFS} -D12BIT)
endif()
if(MSVC_IDE)
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
else()
@@ -109,10 +113,13 @@ configure_file(win/${INST_ID}/projectTargets-release.cmake.in
if(WITH_JAVA)
set(JAVA_DEPEND turbojpeg-java)
endif()
if(WITH_12BIT)
set(12BIT_DEPEND jpeg12 jpeg12-static cjpeg12 djpeg12 jpeg12tran)
endif()
add_custom_target(installer
makensis -nocd ${INST_DEFS} installer.nsi
DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND} ${12BIT_DEPEND}
SOURCES installer.nsi)
endif() # WIN32
@@ -159,6 +166,10 @@ add_custom_target(tarball pkgscripts/maketarball
configure_file(release/libjpeg.pc.in pkgscripts/libjpeg.pc @ONLY)
if(WITH_12BIT)
configure_file(release/libjpeg12.pc.in pkgscripts/libjpeg12.pc @ONLY)
endif()
configure_file(release/libturbojpeg.pc.in pkgscripts/libturbojpeg.pc @ONLY)
include(CMakePackageConfigHelpers)

4
cmyk.h
View File

@@ -1,7 +1,7 @@
/*
* cmyk.h
*
* Copyright (C) 2017-2018, D. R. Commander.
* Copyright (C) 2017-2018, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -16,7 +16,7 @@
#include <jinclude.h>
#define JPEG_INTERNALS
#include <jpeglib.h>
#include "jpeglibint.h"
#include "jconfigint.h"

View File

@@ -1,33 +1,41 @@
/*
* example.txt
* example.c
*
* This file was part of the Independent JPEG Group's software.
* Copyright (C) 1992-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2017, 2019, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
* This file illustrates how to use the IJG code as a subroutine library
* to read or write JPEG image files. You should look at this code in
* conjunction with the documentation file libjpeg.txt.
*
* This code will not do anything useful as-is, but it may be helpful as a
* skeleton for constructing routines that call the JPEG library.
* to read or write JPEG image files with 8-bit or 12-bit data precision. You
* should look at this code in conjunction with the documentation file
* libjpeg.txt.
*
* We present these routines in the same coding style used in the JPEG code
* (ANSI function definitions, etc); but you are of course free to code your
* routines in a different style if you prefer.
*/
/* This example was part of the original libjpeg documentation and has been
* unchanged since 1994. It is, as described in libjpeg.txt, "heavily
* commented skeleton code for calling the JPEG library." It is not meant to
* be compiled as a standalone program, since it has no main() function and
* does not compress from/decompress to a real image buffer (corollary:
* put_scanline_someplace() is not a real function.) First-time users of
* libjpeg-turbo would be better served by looking at tjexample.c, which uses
* the more straightforward TurboJPEG API, or at cjpeg.c and djpeg.c, which are
* examples of libjpeg API usage that can be (and are) compiled into standalone
* programs. Note that this example, as well as the examples in cjpeg.c and
* djpeg.c, interleave disk I/O with JPEG compression/decompression, so none of
* these examples is suitable for benchmarking purposes.
/* First-time users of libjpeg-turbo might be better served by looking at
* tjexample.c, which uses the more straightforward TurboJPEG API. Note that
* this example, like cjpeg and djpeg, interleaves disk I/O with JPEG
* compression/decompression, so it is not suitable for benchmarking purposes.
*/
#ifdef _MSC_VER
#define _CRT_SECURE_NO_DEPRECATE
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
/*
* Include file for users of JPEG library.
@@ -38,6 +46,7 @@
*/
#include "jpeglib.h"
#include "jpeg12lib.h"
/*
* <setjmp.h> is used for the optional error recovery mechanism shown in
@@ -72,17 +81,16 @@
* RGB color and is described by:
*/
extern JSAMPLE *image_buffer; /* Points to large array of R,G,B-order data */
extern int image_height; /* Number of rows in image */
extern int image_width; /* Number of columns in image */
#define WIDTH 640 /* Number of columns in image */
#define HEIGHT 480 /* Number of rows in image */
/*
* Sample routine for JPEG compression. We assume that the target file name
* and a compression quality factor are passed in.
* Sample routine for JPEG compression with 8-bit data precision. We assume
* that the target file name and a compression quality factor are passed in.
*/
GLOBAL(void)
METHODDEF(void)
write_JPEG_file(char *filename, int quality)
{
/* This struct contains the JPEG compression parameters and pointers to
@@ -103,8 +111,10 @@ write_JPEG_file(char *filename, int quality)
struct jpeg_error_mgr jerr;
/* More stuff */
FILE *outfile; /* target file */
JSAMPARRAY image_buffer; /* Points to large array of R,G,B-order data */
JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */
int row_stride; /* physical row width in image buffer */
int row, col;
/* Step 1: allocate and initialize JPEG compression object */
@@ -136,8 +146,8 @@ write_JPEG_file(char *filename, int quality)
/* First we supply a description of the input image.
* Four fields of the cinfo struct must be filled in:
*/
cinfo.image_width = image_width; /* image width and height, in pixels */
cinfo.image_height = image_height;
cinfo.image_width = WIDTH; /* image width and height, in pixels */
cinfo.image_height = HEIGHT;
cinfo.input_components = 3; /* # of color components per pixel */
cinfo.in_color_space = JCS_RGB; /* colorspace of input image */
/* Now use the library's routine to set default compression parameters.
@@ -149,6 +159,8 @@ write_JPEG_file(char *filename, int quality)
* Here we just illustrate the use of quality (quantization table) scaling:
*/
jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
/* Use 4:4:4 subsampling (default is 4:2:0) */
cinfo.comp_info[0].h_samp_factor = cinfo.comp_info[0].v_samp_factor = 1;
/* Step 4: Start compressor */
@@ -157,7 +169,31 @@ write_JPEG_file(char *filename, int quality)
*/
jpeg_start_compress(&cinfo, TRUE);
/* Step 5: while (scan lines remain to be written) */
/* Step 5: allocate and initialize image buffer */
row_stride = WIDTH * 3; /* JSAMPLEs per row in image_buffer */
/* Make a sample array that will go away when done with image. Note that,
* for the purposes of this example, we could also create a one-row-high
* sample array and initialize it for each successive scanline written in the
* scanline loop below.
*/
image_buffer = (*cinfo.mem->alloc_sarray)
((j_common_ptr)&cinfo, JPOOL_IMAGE, row_stride, HEIGHT);
/* Initialize image buffer with a repeating pattern */
for (row = 0; row < HEIGHT; row++) {
for (col = 0; col < WIDTH; col++) {
image_buffer[row][col * 3] =
(col * (MAXJSAMPLE + 1) / WIDTH) % (MAXJSAMPLE + 1);
image_buffer[row][col * 3 + 1] =
(row * (MAXJSAMPLE + 1) / HEIGHT) % (MAXJSAMPLE + 1);
image_buffer[row][col * 3 + 2] =
(row * (MAXJSAMPLE + 1) / HEIGHT + col * (MAXJSAMPLE + 1) / WIDTH) %
(MAXJSAMPLE + 1);
}
}
/* Step 6: while (scan lines remain to be written) */
/* jpeg_write_scanlines(...); */
/* Here we use the library's state variable cinfo.next_scanline as the
@@ -165,24 +201,22 @@ write_JPEG_file(char *filename, int quality)
* To keep things simple, we pass one scanline per call; you can pass
* more if you wish, though.
*/
row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */
while (cinfo.next_scanline < cinfo.image_height) {
/* jpeg_write_scanlines expects an array of pointers to scanlines.
* Here the array is only one element long, but you could pass
* more than one scanline at a time if that's more convenient.
*/
row_pointer[0] = &image_buffer[cinfo.next_scanline * row_stride];
row_pointer[0] = image_buffer[cinfo.next_scanline];
(void)jpeg_write_scanlines(&cinfo, row_pointer, 1);
}
/* Step 6: Finish compression */
/* Step 7: Finish compression */
jpeg_finish_compress(&cinfo);
/* After finish_compress, we can close the output file. */
fclose(outfile);
/* Step 7: release JPEG compression object */
/* Step 8: release JPEG compression object */
/* This is an important step since it will release a good deal of memory. */
jpeg_destroy_compress(&cinfo);
@@ -220,6 +254,76 @@ write_JPEG_file(char *filename, int quality)
*/
/*
* Sample routine for JPEG compression with 12-bit data precision. We assume
* that the target file name and a compression quality factor are passed in.
*/
#ifdef WITH_12BIT
METHODDEF(void)
write_JPEG12_file(char *filename, int quality)
{
struct jpeg12_compress_struct cinfo;
struct jpeg12_error_mgr jerr;
FILE *outfile;
J12SAMPARRAY image_buffer;
J12SAMPROW row_pointer[1];
int row_stride;
int row, col;
cinfo.err = jpeg12_std_error(&jerr);
jpeg12_create_compress(&cinfo);
if ((outfile = fopen(filename, "wb")) == NULL) {
fprintf(stderr, "can't open %s\n", filename);
exit(1);
}
jpeg12_stdio_dest(&cinfo, outfile);
cinfo.image_width = WIDTH;
cinfo.image_height = HEIGHT;
cinfo.input_components = 3;
cinfo.in_color_space = JCS_RGB;
jpeg12_set_defaults(&cinfo);
jpeg12_set_quality(&cinfo, quality, TRUE);
cinfo.comp_info[0].h_samp_factor = cinfo.comp_info[0].v_samp_factor = 1;
jpeg12_start_compress(&cinfo, TRUE);
row_stride = WIDTH * 3;
image_buffer = (*cinfo.mem->alloc_sarray)
((j12_common_ptr)&cinfo, JPOOL_IMAGE, row_stride, HEIGHT);
/* Initialize image buffer with a repeating pattern */
for (row = 0; row < HEIGHT; row++) {
for (col = 0; col < WIDTH; col++) {
image_buffer[row][col * 3] =
(col * (MAXJ12SAMPLE + 1) / WIDTH) % (MAXJ12SAMPLE + 1);
image_buffer[row][col * 3 + 1] =
(row * (MAXJ12SAMPLE + 1) / HEIGHT) % (MAXJ12SAMPLE + 1);
image_buffer[row][col * 3 + 2] =
(row * (MAXJ12SAMPLE + 1) / HEIGHT +
col * (MAXJ12SAMPLE + 1) / WIDTH) % (MAXJ12SAMPLE + 1);
}
}
row_stride = WIDTH * 3;
while (cinfo.next_scanline < cinfo.image_height) {
row_pointer[0] = image_buffer[cinfo.next_scanline];
(void)jpeg12_write_scanlines(&cinfo, row_pointer, 1);
}
jpeg12_finish_compress(&cinfo);
fclose(outfile);
jpeg12_destroy_compress(&cinfo);
}
#endif
/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/
@@ -289,22 +393,23 @@ my_error_exit(j_common_ptr cinfo)
METHODDEF(int) do_read_JPEG_file(struct jpeg_decompress_struct *cinfo,
char *filename);
char *infilename, char *outfilename);
/*
* Sample routine for JPEG decompression. We assume that the source file name
* is passed in. We want to return 1 on success, 0 on error.
* Sample routine for JPEG decompression with 8-bit data precision. We assume
* that the source file name is passed in. We want to return 1 on success, 0
* on error.
*/
GLOBAL(int)
read_JPEG_file(char *filename)
METHODDEF(int)
read_JPEG_file(char *infilename, char *outfilename)
{
/* This struct contains the JPEG decompression parameters and pointers to
* working space (which is allocated as needed by the JPEG library).
*/
struct jpeg_decompress_struct cinfo;
return do_read_JPEG_file(&cinfo, filename);
return do_read_JPEG_file(&cinfo, infilename, outfilename);
}
/*
@@ -316,7 +421,8 @@ read_JPEG_file(char *filename)
*/
METHODDEF(int)
do_read_JPEG_file(struct jpeg_decompress_struct *cinfo, char *filename)
do_read_JPEG_file(struct jpeg_decompress_struct *cinfo, char *infilename,
char *outfilename)
{
/* We use our private extension JPEG error handler.
* Note that this struct must live as long as the main JPEG parameter
@@ -325,19 +431,29 @@ do_read_JPEG_file(struct jpeg_decompress_struct *cinfo, char *filename)
struct my_error_mgr jerr;
/* More stuff */
FILE *infile; /* source file */
FILE *outfile; /* output file */
JSAMPARRAY buffer; /* Output row buffer */
int row_stride; /* physical row width in output buffer */
/* In this example we want to open the input file before doing anything else,
* so that the setjmp() error recovery below can assume the file is open.
/* In this example we want to open the input and output files before doing
* anything else, so that the setjmp() error recovery below can assume the
* files are open.
*
* VERY IMPORTANT: use "b" option to fopen() if you are on a machine that
* requires it in order to read binary files.
* requires it in order to read/write binary files.
*/
if ((infile = fopen(filename, "rb")) == NULL) {
fprintf(stderr, "can't open %s\n", filename);
if ((infile = fopen(infilename, "rb")) == NULL) {
fprintf(stderr, "can't open %s\n", infilename);
return 0;
}
if ((outfile = fopen(outfilename, "wb")) == NULL) {
fprintf(stderr, "can't open %s\n", outfilename);
fclose(infile);
return 0;
}
/* emit header for raw PPM format */
fprintf(outfile, "P6\n%d %d\n%d\n", WIDTH, HEIGHT, MAXJSAMPLE);
/* Step 1: allocate and initialize JPEG decompression object */
@@ -351,6 +467,7 @@ do_read_JPEG_file(struct jpeg_decompress_struct *cinfo, char *filename)
*/
jpeg_destroy_decompress(cinfo);
fclose(infile);
fclose(outfile);
return 0;
}
/* Now we can initialize the JPEG decompression object. */
@@ -406,8 +523,7 @@ do_read_JPEG_file(struct jpeg_decompress_struct *cinfo, char *filename)
* more than one scanline at a time if that's more convenient.
*/
(void)jpeg_read_scanlines(cinfo, buffer, 1);
/* Assume put_scanline_someplace wants a pointer and sample count. */
put_scanline_someplace(buffer[0], row_stride);
fwrite(buffer[0], 1, row_stride, outfile);
}
/* Step 7: Finish decompression */
@@ -422,12 +538,13 @@ do_read_JPEG_file(struct jpeg_decompress_struct *cinfo, char *filename)
/* This is an important step since it will release a good deal of memory. */
jpeg_destroy_decompress(cinfo);
/* After finish_decompress, we can close the input file.
/* After finish_decompress, we can close the input and output files.
* Here we postpone it until after no more JPEG errors are possible,
* so as to simplify the setjmp error logic above. (Actually, I don't
* think that jpeg_destroy can do an error exit, but why assume anything...)
*/
fclose(infile);
fclose(outfile);
/* At this point you may want to check to see whether any corrupt-data
* warnings occurred (test whether jerr.pub.num_warnings is nonzero).
@@ -462,3 +579,202 @@ do_read_JPEG_file(struct jpeg_decompress_struct *cinfo, char *filename)
* On some systems you may need to set up a signal handler to ensure that
* temporary files are deleted if the program is interrupted. See libjpeg.txt.
*/
#ifdef WITH_12BIT
struct my12_error_mgr {
struct jpeg12_error_mgr pub;
jmp_buf setjmp_buffer;
};
typedef struct my12_error_mgr *my12_error_ptr;
METHODDEF(void)
my12_error_exit(j12_common_ptr cinfo)
{
my12_error_ptr myerr = (my12_error_ptr)cinfo->err;
(*cinfo->err->output_message) (cinfo);
longjmp(myerr->setjmp_buffer, 1);
}
METHODDEF(int) do_read_JPEG12_file(struct jpeg12_decompress_struct *cinfo,
char *infilename, char *outfilename);
/*
* Sample routine for JPEG decompression with 12-bit data precision. We assume
* that the source file name is passed in. We want to return 1 on success, 0
* on error.
*/
METHODDEF(int)
read_JPEG12_file(char *infilename, char *outfilename)
{
struct jpeg12_decompress_struct cinfo;
return do_read_JPEG12_file(&cinfo, infilename, outfilename);
}
METHODDEF(int)
do_read_JPEG12_file(struct jpeg12_decompress_struct *cinfo, char *infilename,
char *outfilename)
{
struct my12_error_mgr jerr;
FILE *infile;
FILE *outfile;
J12SAMPARRAY buffer;
int row_stride;
int col;
if ((infile = fopen(infilename, "rb")) == NULL) {
fprintf(stderr, "can't open %s\n", infilename);
return 0;
}
if ((outfile = fopen(outfilename, "wb")) == NULL) {
fprintf(stderr, "can't open %s\n", outfilename);
fclose(infile);
return 0;
}
fprintf(outfile, "P6\n%d %d\n%d\n", WIDTH, HEIGHT, MAXJ12SAMPLE);
cinfo->err = jpeg12_std_error(&jerr.pub);
jerr.pub.error_exit = my12_error_exit;
if (setjmp(jerr.setjmp_buffer)) {
jpeg12_destroy_decompress(cinfo);
fclose(infile);
fclose(outfile);
return 0;
}
jpeg12_create_decompress(cinfo);
jpeg12_stdio_src(cinfo, infile);
(void)jpeg12_read_header(cinfo, TRUE);
(void)jpeg12_start_decompress(cinfo);
row_stride = cinfo->output_width * cinfo->output_components;
buffer = (*cinfo->mem->alloc_sarray)
((j12_common_ptr)cinfo, JPOOL_IMAGE, row_stride, 1);
while (cinfo->output_scanline < cinfo->output_height) {
(void)jpeg12_read_scanlines(cinfo, buffer, 1);
/* Swap MSB and LSB in each sample */
for (col = 0; col < row_stride; col++)
buffer[0][col] = ((buffer[0][col] & 0xFF) << 8) |
((buffer[0][col] >> 8) & 0xFF);
fwrite(buffer[0], 1, row_stride * sizeof(J12SAMPLE), outfile);
}
(void)jpeg12_finish_decompress(cinfo);
jpeg12_destroy_decompress(cinfo);
fclose(infile);
fclose(outfile);
return 1;
}
#endif
LOCAL(void)
usage(const char *progname)
{
fprintf(stderr, "usage: %s compress [switches] outputfile[.jpg]\n",
progname);
fprintf(stderr, " %s decompress inputfile[.jpg] outputfile[.ppm]\n",
progname);
fprintf(stderr, "Switches (names may be abbreviated):\n");
#ifdef WITH_12BIT
fprintf(stderr, " -12bit Compress/decompress JPEG file with 12-bit data precision\n");
#endif
fprintf(stderr, " -quality N Compression quality (0..100; 5-95 is most useful range,\n");
fprintf(stderr, " default is 75)\n");
exit(EXIT_FAILURE);
}
typedef enum {
COMPRESS,
DECOMPRESS
} EXAMPLE_MODE;
int
main(int argc, char **argv)
{
int argn, quality = 75;
#ifdef WITH_12BIT
int _12bit = 0;
#endif
EXAMPLE_MODE mode;
char *arg, *filename = NULL;
if (argc < 3)
usage(argv[0]);
if (!strcasecmp(argv[1], "compress"))
mode = COMPRESS;
else if (!strcasecmp(argv[1], "decompress"))
mode = DECOMPRESS;
else
usage(argv[0]);
for (argn = 2; argn < argc; argn++) {
arg = argv[argn];
if (*arg != '-') {
filename = arg;
/* Not a switch, must be a file name argument */
break; /* done parsing switches */
}
arg++; /* advance past switch marker character */
#ifdef WITH_12BIT
if (!strncasecmp(arg, "1", 1)) {
_12bit = 1;
}
else
#endif
if (!strncasecmp(arg, "q", 1)) {
/* Quality rating (quantization table scaling factor). */
if (++argn >= argc) /* advance to next argument */
usage(argv[0]);
if (sscanf(argv[argn], "%d", &quality) < 1 || quality < 0 ||
quality > 100)
usage(argv[0]);
if (quality < 1)
quality = 1;
}
}
if (!filename)
usage(argv[0]);
if (mode == COMPRESS) {
#ifdef WITH_12BIT
if (_12bit)
write_JPEG12_file(filename, quality);
else
#endif
write_JPEG_file(filename, quality);
} else if (mode == DECOMPRESS) {
if (argc - argn < 2)
usage(argv[0]);
#ifdef WITH_12BIT
if (_12bit)
read_JPEG12_file(argv[argn], argv[argn + 1]);
else
#endif
read_JPEG_file(argv[argn], argv[argn + 1]);
}
return 0;
}

View File

@@ -22,7 +22,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
/*

View File

@@ -1,8 +1,10 @@
/*
* jcapistd.c
*
* This file was part of the Independent JPEG Group's software.
* Copyright (C) 1994-1996, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -17,7 +19,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
/*

View File

@@ -3,8 +3,8 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1997, Thomas G. Lane.
* It was modified by The libjpeg-turbo Project to include only code and
* information relevant to libjpeg-turbo.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -15,7 +15,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
/* We use a full-image coefficient buffer when doing Huffman optimization,

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1991-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright (C) 2009-2012, 2015, D. R. Commander.
* Copyright (C) 2009-2012, 2015, 2022, D. R. Commander.
* Copyright (C) 2014, MIPS Technologies, Inc., California.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
@@ -15,7 +15,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jsimd.h"
#include "jconfigint.h"

View File

@@ -6,7 +6,7 @@
* libjpeg-turbo Modifications:
* Copyright (C) 1999-2006, MIYASAKA Masaru.
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright (C) 2011, 2014-2015, D. R. Commander.
* Copyright (C) 2011, 2014-2015, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -18,7 +18,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#include "jsimddct.h"

View File

@@ -25,7 +25,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jsimd.h"
#include "jconfigint.h"
#include <limits.h>

View File

@@ -2,7 +2,7 @@
* jcicc.c
*
* Copyright (C) 1997-1998, Thomas G. Lane, Todd Newman.
* Copyright (C) 2017, D. R. Commander.
* Copyright (C) 2017, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -15,7 +15,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jerror.h"

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1997, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2020, D. R. Commander.
* Copyright (C) 2020, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -20,7 +20,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jpegcomp.h"

View File

@@ -3,8 +3,8 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1996, Thomas G. Lane.
* It was modified by The libjpeg-turbo Project to include only code relevant
* to libjpeg-turbo.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -15,7 +15,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
/* Private buffer controller object */

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2003-2010 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2010, D. R. Commander.
* Copyright (C) 2010, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -14,7 +14,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jpegcomp.h"

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 2003-2010 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2010, 2016, 2018, D. R. Commander.
* Copyright (C) 2010, 2016, 2018, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -17,7 +17,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jpegcomp.h"
#include "jconfigint.h"

View File

@@ -3,8 +3,8 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1997, Thomas G. Lane.
* It was modified by The libjpeg-turbo Project to include only code relevant
* to libjpeg-turbo.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -14,7 +14,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
/*

View File

@@ -9,29 +9,39 @@
/* libjpeg-turbo version in integer form */
#define LIBJPEG_TURBO_VERSION_NUMBER @LIBJPEG_TURBO_VERSION_NUMBER@
/* Support arithmetic encoding */
/* Support arithmetic encoding when using 8-bit samples */
#cmakedefine C_ARITH_CODING_SUPPORTED 1
/* Support arithmetic decoding */
/* Support arithmetic decoding when using 8-bit samples */
#cmakedefine D_ARITH_CODING_SUPPORTED 1
/* Support in-memory source/destination managers */
#cmakedefine MEM_SRCDST_SUPPORTED 1
/* Use accelerated SIMD routines. */
/* Use accelerated SIMD routines when using 8-bit samples */
#cmakedefine WITH_SIMD 1
/*
* Define BITS_IN_JSAMPLE as either
* 8 for 8-bit sample values (the usual setting)
* 12 for 12-bit sample values
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
* JPEG standard, and the IJG code does not support anything else!
* We do not support run-time selection of data precision, sorry.
*/
#ifdef _WIN32
#define BITS_IN_JSAMPLE @BITS_IN_JSAMPLE@ /* use 8 or 12 */
#undef RIGHT_SHIFT_IS_UNSIGNED
/* Define "boolean" as unsigned char, not int, per Windows custom */
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
/* Define "INT32" as int, not long, per Windows custom */
#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */
typedef short INT16;
typedef signed int INT32;
#endif
#define XMD_H /* prevent jmorecfg.h from redefining it */
#else
/* Define if your (broken) compiler shifts signed values as if they were
unsigned. */
#cmakedefine RIGHT_SHIFT_IS_UNSIGNED 1
#endif

View File

@@ -42,3 +42,32 @@
#else
#define FALLTHROUGH
#endif
/*
* Define BITS_IN_JSAMPLE as either
* 8 for 8-bit sample values (the usual setting)
* 12 for 12-bit sample values
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
* JPEG standard, and the IJG code does not support anything else!
*/
#ifndef BITS_IN_JSAMPLE
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
#endif
#undef C_ARITH_CODING_SUPPORTED
#undef D_ARITH_CODING_SUPPORTED
#undef WITH_SIMD
#if BITS_IN_JSAMPLE == 8
/* Support arithmetic encoding */
#cmakedefine C_ARITH_CODING_SUPPORTED 1
/* Support arithmetic decoding */
#cmakedefine D_ARITH_CODING_SUPPORTED 1
/* Use accelerated SIMD routines. */
#cmakedefine WITH_SIMD 1
#endif

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2003-2008 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2009-2011, 2018, D. R. Commander.
* Copyright (C) 2009-2011, 2018, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -16,7 +16,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jstdhuff.c"

View File

@@ -20,7 +20,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jsimd.h"
#include "jconfigint.h"
#include <limits.h>

View File

@@ -19,7 +19,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
/* At present, jcsample.c can request context rows only for smoothing.

View File

@@ -6,7 +6,7 @@
* libjpeg-turbo Modifications:
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright (C) 2014, MIPS Technologies, Inc., California.
* Copyright (C) 2015, 2019, D. R. Commander.
* Copyright (C) 2015, 2019, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -52,7 +52,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jsimd.h"

View File

@@ -16,7 +16,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jpegcomp.h"

View File

@@ -21,7 +21,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdmaster.h"
#include "jconfigint.h"

View File

@@ -20,7 +20,7 @@
/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jerror.h"

View File

@@ -20,7 +20,7 @@
/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jerror.h"

View File

@@ -6,12 +6,13 @@
* libjpeg-turbo Modifications:
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright (C) 2020, Google, Inc.
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*/
#define JPEG_INTERNALS
#include "jpeglib.h"
#include "jpeglibint.h"
/* Block smoothing is only applicable for progressive JPEG, so: */

View File

@@ -6,7 +6,7 @@
* Modified 2011 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright (C) 2009, 2011-2012, 2014-2015, D. R. Commander.
* Copyright (C) 2009, 2011-2012, 2014-2015, 2022, D. R. Commander.
* Copyright (C) 2013, Linaro Limited.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
@@ -16,7 +16,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jsimd.h"
#include "jconfigint.h"

View File

@@ -23,7 +23,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#include "jsimddct.h"
#include "jpegcomp.h"

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1997, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2009-2011, 2016, 2018-2019, D. R. Commander.
* Copyright (C) 2009-2011, 2016, 2018-2019, 2022, D. R. Commander.
* Copyright (C) 2018, Matthias Räncker.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
@@ -23,7 +23,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdhuff.h" /* Declarations shared with jdphuff.c */
#include "jpegcomp.h"
#include "jstdhuff.c"

View File

@@ -2,7 +2,7 @@
* jdicc.c
*
* Copyright (C) 1997-1998, Thomas G. Lane, Todd Newman.
* Copyright (C) 2017, D. R. Commander.
* Copyright (C) 2017, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -15,7 +15,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jerror.h"

View File

@@ -17,7 +17,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jpegcomp.h"

View File

@@ -3,12 +3,14 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*/
#define JPEG_INTERNALS
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jpegcomp.h"

View File

@@ -17,7 +17,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
typedef enum { /* JPEG marker codes */

View File

@@ -19,7 +19,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jpegcomp.h"
#include "jdmaster.h"

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1994-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright (C) 2009, 2011, 2014-2015, 2020, D. R. Commander.
* Copyright (C) 2009, 2011, 2014-2015, 2020, 2022, D. R. Commander.
* Copyright (C) 2013, Linaro Limited.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
@@ -39,7 +39,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdmerge.h"
#include "jsimd.h"
#include "jconfigint.h"

View File

@@ -4,13 +4,13 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2020, D. R. Commander.
* Copyright (C) 2020, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*/
#define JPEG_INTERNALS
#include "jpeglib.h"
#include "jpeglibint.h"
#ifdef UPSAMPLE_MERGING_SUPPORTED

View File

@@ -22,7 +22,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdhuff.h" /* Declarations shared with jdhuff.c */
#include <limits.h>

View File

@@ -3,8 +3,8 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1996, Thomas G. Lane.
* It was modified by The libjpeg-turbo Project to include only code relevant
* to libjpeg-turbo.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -21,7 +21,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
/* Private buffer controller object */

View File

@@ -3,12 +3,14 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*/
#define JPEG_INTERNALS
#include "jpeglib.h"
#include "jpeglibint.h"
/* Pointer to routine to upsample a single component */

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1995-1997, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2020, D. R. Commander.
* Copyright (C) 2020, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -15,7 +15,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jpegcomp.h"

View File

@@ -22,8 +22,9 @@
*/
/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jversion.h"
#include "jerror.h"

View File

@@ -1,8 +1,10 @@
/*
* jfdctflt.c
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1996, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* libjpeg-turbo Modifications:
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -37,7 +39,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#ifdef DCT_FLOAT_SUPPORTED

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2015, D. R. Commander.
* Copyright (C) 2015, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -35,7 +35,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#ifdef DCT_IFAST_SUPPORTED

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2015, 2020, D. R. Commander.
* Copyright (C) 2015, 2020, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -28,7 +28,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#ifdef DCT_ISLOW_SUPPORTED

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1994-1998, Thomas G. Lane.
* Modified 2010 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2014, D. R. Commander.
* Copyright (C) 2014, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -42,7 +42,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#ifdef DCT_FLOAT_SUPPORTED

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1998, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2015, D. R. Commander.
* Copyright (C) 2015, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -37,7 +37,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#ifdef DCT_IFAST_SUPPORTED

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1991-1998, Thomas G. Lane.
* Modification developed 2002-2018 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2015, 2020, D. R. Commander.
* Copyright (C) 2015, 2020, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -52,7 +52,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#ifdef DCT_ISLOW_SUPPORTED

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1994-1998, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2015, D. R. Commander.
* Copyright (C) 2015, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -25,7 +25,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
#ifdef IDCT_SCALING_SUPPORTED

View File

@@ -30,7 +30,7 @@
#define JPEG_INTERNALS
#define AM_MEMORY_MANAGER /* we define jvirt_Xarray_control structs */
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jmemsys.h" /* import the system-dependent declarations */
#if !defined(_MSC_VER) || _MSC_VER > 1600
#include <stdint.h>

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1992-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2017-2018, D. R. Commander.
* Copyright (C) 2017-2018, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -19,7 +19,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jmemsys.h" /* import the system-dependent declarations */

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 1997-2009 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, D. R. Commander.
* Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -14,6 +14,9 @@
* optimizations. Most users will not need to touch this file.
*/
#ifndef JMORECFG_H
#define JMORECFG_H
/*
* Maximum number of components (color channels) allowed in JPEG image.
@@ -41,7 +44,6 @@
* arrays is very slow on your hardware, you might want to change these.
*/
#if BITS_IN_JSAMPLE == 8
/* JSAMPLE should be the smallest type that will hold the values 0..255.
*/
@@ -51,21 +53,15 @@ typedef unsigned char JSAMPLE;
#define MAXJSAMPLE 255
#define CENTERJSAMPLE 128
#endif /* BITS_IN_JSAMPLE == 8 */
#if BITS_IN_JSAMPLE == 12
/* JSAMPLE should be the smallest type that will hold the values 0..4095.
/* J12SAMPLE should be the smallest type that will hold the values 0..4095.
* On nearly all machines "short" will do nicely.
*/
typedef short JSAMPLE;
#define GETJSAMPLE(value) ((int)(value))
typedef short J12SAMPLE;
#define MAXJSAMPLE 4095
#define CENTERJSAMPLE 2048
#endif /* BITS_IN_JSAMPLE == 12 */
#define MAXJ12SAMPLE 4095
#define CENTERJ12SAMPLE 2048
/* Representation of a DCT frequency coefficient.
@@ -380,3 +376,5 @@ static const int rgb_pixelsize[JPEG_NUMCS] = {
#endif
#endif /* JPEG_INTERNAL_OPTIONS */
#endif /* JMORECFG_H */

391
jpeg12int.h Normal file
View File

@@ -0,0 +1,391 @@
/*
* jpeg12int.h
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 1997-2009 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2015-2016, 2019, 2021-2022, D. R. Commander.
* Copyright (C) 2015, Google, Inc.
* Copyright (C) 2021, Alex Richardson.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
* This file provides common declarations for the various JPEG modules.
* These declarations are considered internal to the JPEG library; most
* applications using the library shouldn't need to include this file.
*/
#ifndef JPEG12INT_H
#define JPEG12INT_H
#ifndef JPEGINT_H
/* Declarations for both compression & decompression */
typedef enum { /* Operating modes for buffer controllers */
JBUF_PASS_THRU, /* Plain stripwise operation */
/* Remaining modes require a full-image buffer to have been created */
JBUF_SAVE_SOURCE, /* Run source subobject only, save output */
JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */
JBUF_SAVE_AND_PASS /* Run both subobjects, save output */
} J_BUF_MODE;
/* Values of global_state field (jdapi.c has some dependencies on ordering!) */
#define CSTATE_START 100 /* after create_compress */
#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */
#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */
#define CSTATE_WRCOEFS 103 /* jpeg12_write_coefficients done */
#define DSTATE_START 200 /* after create_decompress */
#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */
#define DSTATE_READY 202 /* found SOS, ready for start_decompress */
#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/
#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */
#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */
#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */
#define DSTATE_BUFIMAGE 207 /* expecting jpeg12_start_output */
#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in
jpeg12_finish_output */
#define DSTATE_RDCOEFS 209 /* reading file in jpeg12_read_coefficients */
#define DSTATE_STOPPING 210 /* looking for EOI in
jpeg12_finish_decompress */
/* JLONG must hold at least signed 32-bit values. */
typedef long JLONG;
/* JUINTPTR must hold pointer values. */
#ifdef __UINTPTR_TYPE__
/*
* __UINTPTR_TYPE__ is GNU-specific and available in GCC 4.6+ and Clang 3.0+.
* Fortunately, that is sufficient to support the few architectures for which
* sizeof(void *) != sizeof(size_t). The only other options would require C99
* or Clang-specific builtins.
*/
typedef __UINTPTR_TYPE__ JUINTPTR;
#else
typedef size_t JUINTPTR;
#endif
/*
* Left shift macro that handles a negative operand without causing any
* sanitizer warnings
*/
#define LEFT_SHIFT(a, b) ((JLONG)((unsigned long)(a) << (b)))
#endif /* JPEGINT_H */
/* Declarations for compression modules */
/* Master control module */
struct jpeg12_comp_master {
void (*prepare_for_pass) (j12_compress_ptr cinfo);
void (*pass_startup) (j12_compress_ptr cinfo);
void (*finish_pass) (j12_compress_ptr cinfo);
/* State variables made visible to other modules */
boolean call_pass_startup; /* True if pass_startup must be called */
boolean is_last_pass; /* True during last pass */
};
/* Main buffer control (downsampled-data buffer) */
struct jpeg12_c_main_controller {
void (*start_pass) (j12_compress_ptr cinfo, J_BUF_MODE pass_mode);
void (*process_data) (j12_compress_ptr cinfo, J12SAMPARRAY input_buf,
JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail);
};
/* Compression preprocessing (downsampling input buffer control) */
struct jpeg12_c_prep_controller {
void (*start_pass) (j12_compress_ptr cinfo, J_BUF_MODE pass_mode);
void (*pre_process_data) (j12_compress_ptr cinfo, J12SAMPARRAY input_buf,
JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail,
J12SAMPIMAGE output_buf,
JDIMENSION *out_row_group_ctr,
JDIMENSION out_row_groups_avail);
};
/* Coefficient buffer control */
struct jpeg12_c_coef_controller {
void (*start_pass) (j12_compress_ptr cinfo, J_BUF_MODE pass_mode);
boolean (*compress_data) (j12_compress_ptr cinfo, J12SAMPIMAGE input_buf);
};
/* Colorspace conversion */
struct jpeg12_color_converter {
void (*start_pass) (j12_compress_ptr cinfo);
void (*color_convert) (j12_compress_ptr cinfo, J12SAMPARRAY input_buf,
J12SAMPIMAGE output_buf, JDIMENSION output_row,
int num_rows);
};
/* Downsampling */
struct jpeg12_downsampler {
void (*start_pass) (j12_compress_ptr cinfo);
void (*downsample) (j12_compress_ptr cinfo, J12SAMPIMAGE input_buf,
JDIMENSION in_row_index, J12SAMPIMAGE output_buf,
JDIMENSION out_row_group_index);
boolean need_context_rows; /* TRUE if need rows above & below */
};
/* Forward DCT (also controls coefficient quantization) */
struct jpeg12_forward_dct {
void (*start_pass) (j12_compress_ptr cinfo);
/* perhaps this should be an array??? */
void (*forward_DCT) (j12_compress_ptr cinfo, jpeg_component_info *compptr,
J12SAMPARRAY sample_data, JBLOCKROW coef_blocks,
JDIMENSION start_row, JDIMENSION start_col,
JDIMENSION num_blocks);
};
/* Entropy encoding */
struct jpeg12_entropy_encoder {
void (*start_pass) (j12_compress_ptr cinfo, boolean gather_statistics);
boolean (*encode_mcu) (j12_compress_ptr cinfo, JBLOCKROW *MCU_data);
void (*finish_pass) (j12_compress_ptr cinfo);
};
/* Marker writing */
struct jpeg12_marker_writer {
void (*write_file_header) (j12_compress_ptr cinfo);
void (*write_frame_header) (j12_compress_ptr cinfo);
void (*write_scan_header) (j12_compress_ptr cinfo);
void (*write_file_trailer) (j12_compress_ptr cinfo);
void (*write_tables_only) (j12_compress_ptr cinfo);
/* These routines are exported to allow insertion of extra markers */
/* Probably only COM and APPn markers should be written this way */
void (*write_marker_header) (j12_compress_ptr cinfo, int marker,
unsigned int datalen);
void (*write_marker_byte) (j12_compress_ptr cinfo, int val);
};
/* Declarations for decompression modules */
/* Master control module */
struct jpeg12_decomp_master {
void (*prepare_for_output_pass) (j12_decompress_ptr cinfo);
void (*finish_output_pass) (j12_decompress_ptr cinfo);
/* State variables made visible to other modules */
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
/* Partial decompression variables */
JDIMENSION first_iMCU_col;
JDIMENSION last_iMCU_col;
JDIMENSION first_MCU_col[MAX_COMPONENTS];
JDIMENSION last_MCU_col[MAX_COMPONENTS];
boolean jinit_upsampler_no_alloc;
/* Last iMCU row that was successfully decoded */
JDIMENSION last_good_iMCU_row;
};
/* Input control module */
struct jpeg12_input_controller {
int (*consume_input) (j12_decompress_ptr cinfo);
void (*reset_input_controller) (j12_decompress_ptr cinfo);
void (*start_input_pass) (j12_decompress_ptr cinfo);
void (*finish_input_pass) (j12_decompress_ptr cinfo);
/* State variables made visible to other modules */
boolean has_multiple_scans; /* True if file has multiple scans */
boolean eoi_reached; /* True when EOI has been consumed */
};
/* Main buffer control (downsampled-data buffer) */
struct jpeg12_d_main_controller {
void (*start_pass) (j12_decompress_ptr cinfo, J_BUF_MODE pass_mode);
void (*process_data) (j12_decompress_ptr cinfo, J12SAMPARRAY output_buf,
JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail);
};
/* Coefficient buffer control */
struct jpeg12_d_coef_controller {
void (*start_input_pass) (j12_decompress_ptr cinfo);
int (*consume_data) (j12_decompress_ptr cinfo);
void (*start_output_pass) (j12_decompress_ptr cinfo);
int (*decompress_data) (j12_decompress_ptr cinfo, J12SAMPIMAGE output_buf);
/* Pointer to array of coefficient virtual arrays, or NULL if none */
jvirt_barray_ptr *coef_arrays;
};
/* Decompression postprocessing (color quantization buffer control) */
struct jpeg12_d_post_controller {
void (*start_pass) (j12_decompress_ptr cinfo, J_BUF_MODE pass_mode);
void (*post_process_data) (j12_decompress_ptr cinfo, J12SAMPIMAGE input_buf,
JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
J12SAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail);
};
/* Marker reading & parsing */
struct jpeg12_marker_reader {
void (*reset_marker_reader) (j12_decompress_ptr cinfo);
/* Read markers until SOS or EOI.
* Returns same codes as are defined for jpeg12_consume_input:
* JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
*/
int (*read_markers) (j12_decompress_ptr cinfo);
/* Read a restart marker --- exported for use by entropy decoder only */
jpeg12_marker_parser_method read_restart_marker;
/* State of marker reader --- nominally internal, but applications
* supplying COM or APPn handlers might like to know the state.
*/
boolean saw_SOI; /* found SOI? */
boolean saw_SOF; /* found SOF? */
int next_restart_num; /* next restart number expected (0-7) */
unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */
};
/* Entropy decoding */
struct jpeg12_entropy_decoder {
void (*start_pass) (j12_decompress_ptr cinfo);
boolean (*decode_mcu) (j12_decompress_ptr cinfo, JBLOCKROW *MCU_data);
/* This is here to share code between baseline and progressive decoders; */
/* other modules probably should not use it */
boolean insufficient_data; /* set TRUE after emitting warning */
};
/* Inverse DCT (also performs dequantization) */
typedef void (*inverse_DCT_12_method_ptr) (j12_decompress_ptr cinfo,
jpeg_component_info *compptr,
JCOEFPTR coef_block,
J12SAMPARRAY output_buf,
JDIMENSION output_col);
struct jpeg12_inverse_dct {
void (*start_pass) (j12_decompress_ptr cinfo);
/* It is useful to allow each component to have a separate IDCT method. */
inverse_DCT_12_method_ptr inverse_DCT[MAX_COMPONENTS];
};
/* Upsampling (note that upsampler must also call color converter) */
struct jpeg12_upsampler {
void (*start_pass) (j12_decompress_ptr cinfo);
void (*upsample) (j12_decompress_ptr cinfo, J12SAMPIMAGE input_buf,
JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail, J12SAMPARRAY output_buf,
JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail);
boolean need_context_rows; /* TRUE if need rows above & below */
};
/* Colorspace conversion */
struct jpeg12_color_deconverter {
void (*start_pass) (j12_decompress_ptr cinfo);
void (*color_convert) (j12_decompress_ptr cinfo, J12SAMPIMAGE input_buf,
JDIMENSION input_row, J12SAMPARRAY output_buf,
int num_rows);
};
/* Color quantization or color precision reduction */
struct jpeg12_color_quantizer {
void (*start_pass) (j12_decompress_ptr cinfo, boolean is_pre_scan);
void (*color_quantize) (j12_decompress_ptr cinfo, J12SAMPARRAY input_buf,
J12SAMPARRAY output_buf, int num_rows);
void (*finish_pass) (j12_decompress_ptr cinfo);
void (*new_color_map) (j12_decompress_ptr cinfo);
};
/* Miscellaneous useful macros */
#undef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#undef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
/* We assume that right shift corresponds to signed division by 2 with
* rounding towards minus infinity. This is correct for typical "arithmetic
* shift" instructions that shift in copies of the sign bit. But some
* C compilers implement >> with an unsigned shift. For these machines you
* must define RIGHT_SHIFT_IS_UNSIGNED.
* RIGHT_SHIFT provides a proper signed right shift of a JLONG quantity.
* It is only applied with constant shift counts. SHIFT_TEMPS must be
* included in the variables of any routine using RIGHT_SHIFT.
*/
#ifdef RIGHT_SHIFT_IS_UNSIGNED
#define SHIFT_TEMPS JLONG shift_temp;
#define RIGHT_SHIFT(x, shft) \
((shift_temp = (x)) < 0 ? \
(shift_temp >> (shft)) | ((~((JLONG)0)) << (32 - (shft))) : \
(shift_temp >> (shft)))
#else
#define SHIFT_TEMPS
#define RIGHT_SHIFT(x, shft) ((x) >> (shft))
#endif
/* Compression module initialization routines */
EXTERN(void) j12init_compress_master(j12_compress_ptr cinfo);
EXTERN(void) j12init_c_master_control(j12_compress_ptr cinfo,
boolean transcode_only);
EXTERN(void) j12init_c_main_controller(j12_compress_ptr cinfo,
boolean need_full_buffer);
EXTERN(void) j12init_c_prep_controller(j12_compress_ptr cinfo,
boolean need_full_buffer);
EXTERN(void) j12init_c_coef_controller(j12_compress_ptr cinfo,
boolean need_full_buffer);
EXTERN(void) j12init_color_converter(j12_compress_ptr cinfo);
EXTERN(void) j12init_downsampler(j12_compress_ptr cinfo);
EXTERN(void) j12init_forward_dct(j12_compress_ptr cinfo);
EXTERN(void) j12init_huff_encoder(j12_compress_ptr cinfo);
EXTERN(void) j12init_phuff_encoder(j12_compress_ptr cinfo);
EXTERN(void) j12init_arith_encoder(j12_compress_ptr cinfo);
EXTERN(void) j12init_marker_writer(j12_compress_ptr cinfo);
/* Decompression module initialization routines */
EXTERN(void) j12init_master_decompress(j12_decompress_ptr cinfo);
EXTERN(void) j12init_d_main_controller(j12_decompress_ptr cinfo,
boolean need_full_buffer);
EXTERN(void) j12init_d_coef_controller(j12_decompress_ptr cinfo,
boolean need_full_buffer);
EXTERN(void) j12init_d_post_controller(j12_decompress_ptr cinfo,
boolean need_full_buffer);
EXTERN(void) j12init_input_controller(j12_decompress_ptr cinfo);
EXTERN(void) j12init_marker_reader(j12_decompress_ptr cinfo);
EXTERN(void) j12init_huff_decoder(j12_decompress_ptr cinfo);
EXTERN(void) j12init_phuff_decoder(j12_decompress_ptr cinfo);
EXTERN(void) j12init_arith_decoder(j12_decompress_ptr cinfo);
EXTERN(void) j12init_inverse_dct(j12_decompress_ptr cinfo);
EXTERN(void) j12init_upsampler(j12_decompress_ptr cinfo);
EXTERN(void) j12init_color_deconverter(j12_decompress_ptr cinfo);
EXTERN(void) j12init_1pass_quantizer(j12_decompress_ptr cinfo);
EXTERN(void) j12init_2pass_quantizer(j12_decompress_ptr cinfo);
EXTERN(void) j12init_merged_upsampler(j12_decompress_ptr cinfo);
/* Memory manager initialization */
EXTERN(void) j12init_memory_mgr(j12_common_ptr cinfo);
#ifndef JPEGINT_H
/* Utility routines in jutils.c */
EXTERN(long) j12div_round_up(long a, long b);
EXTERN(long) j12round_up(long a, long b);
#endif
EXTERN(void) j12copy_sample_rows(J12SAMPARRAY input_array, int source_row,
J12SAMPARRAY output_array, int dest_row,
int num_rows, JDIMENSION num_cols);
#ifndef JPEGINT_H
EXTERN(void) j12copy_block_row(JBLOCKROW input_row, JBLOCKROW output_row,
JDIMENSION num_blocks);
EXTERN(void) j12zero_far(void *target, size_t bytestozero);
/* Constant tables in jutils.c */
#if 0 /* This table is not actually needed in v6a */
extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
#endif
extern const int jpeg12_natural_order[]; /* zigzag coef order to natural
order */
/* Arithmetic coding probability estimation tables in jaricom.c */
extern const JLONG jpeg_aritab[];
#endif
#endif /* JPEG12INT_H */

1153
jpeg12lib.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 1997-2009 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2015-2016, 2019, 2021, D. R. Commander.
* Copyright (C) 2015-2016, 2019, 2021-2022, D. R. Commander.
* Copyright (C) 2015, Google, Inc.
* Copyright (C) 2021, Alex Richardson.
* For conditions of distribution and use, see the accompanying README.ijg
@@ -16,6 +16,11 @@
* applications using the library shouldn't need to include this file.
*/
#ifndef JPEGINT_H
#define JPEGINT_H
#ifndef JPEG12INT_H
/* Declarations for both compression & decompression */
@@ -68,6 +73,8 @@ typedef size_t JUINTPTR;
#define LEFT_SHIFT(a, b) ((JLONG)((unsigned long)(a) << (b)))
#endif /* JPEG12INT_H */
/* Declarations for compression modules */
@@ -356,12 +363,15 @@ EXTERN(void) jinit_merged_upsampler(j_decompress_ptr cinfo);
/* Memory manager initialization */
EXTERN(void) jinit_memory_mgr(j_common_ptr cinfo);
#ifndef JPEG12INT_H
/* Utility routines in jutils.c */
EXTERN(long) jdiv_round_up(long a, long b);
EXTERN(long) jround_up(long a, long b);
#endif
EXTERN(void) jcopy_sample_rows(JSAMPARRAY input_array, int source_row,
JSAMPARRAY output_array, int dest_row,
int num_rows, JDIMENSION num_cols);
#ifndef JPEG12INT_H
EXTERN(void) jcopy_block_row(JBLOCKROW input_row, JBLOCKROW output_row,
JDIMENSION num_blocks);
EXTERN(void) jzero_far(void *target, size_t bytestozero);
@@ -373,3 +383,6 @@ extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
/* Arithmetic coding probability estimation tables in jaricom.c */
extern const JLONG jpeg_aritab[];
#endif
#endif /* JPEGINT_H */

View File

@@ -5,7 +5,7 @@
* Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2002-2009 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2009-2011, 2013-2014, 2016-2017, 2020, D. R. Commander.
* Copyright (C) 2009-2011, 2013-2014, 2016-2017, 2020, 2022, D. R. Commander.
* Copyright (C) 2015, Google, Inc.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
@@ -70,6 +70,8 @@ typedef JSAMPLE *JSAMPROW; /* ptr to one image row of pixel samples. */
typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */
typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */
#ifndef JPEG12LIB_H
typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */
typedef JBLOCK *JBLOCKROW; /* pointer to one row of coefficient blocks */
typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */
@@ -264,6 +266,8 @@ typedef enum {
JDITHER_FS /* Floyd-Steinberg error diffusion dither */
} J_DITHER_MODE;
#endif /* JPEG12LIB_H */
/* Common fields between JPEG compression and decompression master structs. */
@@ -822,6 +826,8 @@ struct jpeg_source_mgr {
* successful.
*/
#ifndef JPEG12LIB_H
#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */
#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */
#define JPOOL_NUMPOOLS 2
@@ -829,6 +835,8 @@ struct jpeg_source_mgr {
typedef struct jvirt_sarray_control *jvirt_sarray_ptr;
typedef struct jvirt_barray_control *jvirt_barray_ptr;
#endif
struct jpeg_memory_mgr {
/* Method pointers */

328
jpeglibint.h Normal file
View File

@@ -0,0 +1,328 @@
/*
* jpeglibint.h
*
* Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*/
#ifndef JPEGLIBINT_H
#define JPEGLIBINT_H
#if BITS_IN_JSAMPLE == 12
#include "jpeg12lib.h"
/* Rename all external types and functions that are affected by JSAMPLE. */
#define JSAMPLE J12SAMPLE
#undef MAXJSAMPLE
#define MAXJSAMPLE MAXJ12SAMPLE
#undef CENTERJSAMPLE
#define CENTERJSAMPLE CENTERJ12SAMPLE
#define JSAMPROW J12SAMPROW
#define JSAMPARRAY J12SAMPARRAY
#define JSAMPIMAGE J12SAMPIMAGE
#define jpeg_common_struct jpeg12_common_struct
#define j_common_ptr j12_common_ptr
#define j_compress_ptr j12_compress_ptr
#define j_decompress_ptr j12_decompress_ptr
#define jpeg_compress_struct jpeg12_compress_struct
#define jpeg_decompress_struct jpeg12_decompress_struct
#define jpeg_error_mgr jpeg12_error_mgr
#define jpeg_progress_mgr jpeg12_progress_mgr
#define jpeg_destination_mgr jpeg12_destination_mgr
#define jpeg_source_mgr jpeg12_source_mgr
#define jpeg_memory_mgr jpeg12_memory_mgr
#define jpeg_marker_parser_method jpeg12_marker_parser_method
#define jpeg_std_error jpeg12_std_error
#define jpeg_create_compress jpeg12_create_compress
#define jpeg_create_decompress jpeg12_create_decompress
#define jpeg_CreateCompress jpeg12_CreateCompress
#define jpeg_CreateDecompress jpeg12_CreateDecompress
#define jpeg_destroy_compress jpeg12_destroy_compress
#define jpeg_destroy_decompress jpeg12_destroy_decompress
#define jpeg_stdio_dest jpeg12_stdio_dest
#define jpeg_stdio_src jpeg12_stdio_src
#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)
#define jpeg_mem_dest jpeg12_mem_dest
#define jpeg_mem_src jpeg12_mem_src
#endif
#define jpeg_set_defaults jpeg12_set_defaults
#define jpeg_set_colorspace jpeg12_set_colorspace
#define jpeg_default_colorspace jpeg12_default_colorspace
#define jpeg_set_quality jpeg12_set_quality
#define jpeg_set_linear_quality jpeg12_set_linear_quality
#if JPEG_LIB_VERSION >= 70
#define jpeg_default_qtables jpeg12_default_qtables
#endif
#define jpeg_add_quant_table jpeg12_add_quant_table
#define jpeg_quality_scaling jpeg12_quality_scaling
#define jpeg_simple_progression jpeg12_simple_progression
#define jpeg_suppress_tables jpeg12_suppress_tables
#define jpeg_alloc_quant_table jpeg12_alloc_quant_table
#define jpeg_alloc_huff_table jpeg12_alloc_huff_table
#define jpeg_start_compress jpeg12_start_compress
#define jpeg_write_scanlines jpeg12_write_scanlines
#define jpeg_finish_compress jpeg12_finish_compress
#if JPEG_LIB_VERSION >= 70
#define jpeg_calc_jpeg_dimensions jpeg12_calc_jpeg_dimensions
#endif
#define jpeg_write_raw_data jpeg12_write_raw_data
#define jpeg_write_marker jpeg12_write_marker
#define jpeg_write_m_header jpeg12_write_m_header
#define jpeg_write_m_byte jpeg12_write_m_byte
#define jpeg_write_tables jpeg12_write_tables
#define jpeg_write_icc_profile jpeg12_write_icc_profile
#define jpeg_read_header jpeg12_read_header
#define jpeg_start_decompress jpeg12_start_decompress
#define jpeg_read_scanlines jpeg12_read_scanlines
#define jpeg_skip_scanlines jpeg12_skip_scanlines
#define jpeg_crop_scanline jpeg12_crop_scanline
#define jpeg_finish_decompress jpeg12_finish_decompress
#define jpeg_read_raw_data jpeg12_read_raw_data
#define jpeg_has_multiple_scans jpeg12_has_multiple_scans
#define jpeg_start_output jpeg12_start_output
#define jpeg_finish_output jpeg12_finish_output
#define jpeg_input_complete jpeg12_input_complete
#define jpeg_new_colormap jpeg12_new_colormap
#define jpeg_consume_input jpeg12_consume_input
#if JPEG_LIB_VERSION >= 80
#define jpeg_core_output_dimensions jpeg12_core_output_dimensions
#endif
#define jpeg_calc_output_dimensions jpeg12_calc_output_dimensions
#define jpeg_save_markers jpeg12_save_markers
#define jpeg_set_marker_processor jpeg12_set_marker_processor
#define jpeg_read_coefficients jpeg12_read_coefficients
#define jpeg_write_coefficients jpeg12_write_coefficients
#define jpeg_copy_critical_parameters jpeg12_copy_critical_parameters
#define jpeg_abort_compress jpeg12_abort_compress
#define jpeg_abort_decompress jpeg12_abort_decompress
#define jpeg_abort jpeg12_abort
#define jpeg_destroy jpeg12_destroy
#define jpeg_resync_to_restart jpeg12_resync_to_restart
#define jpeg_read_icc_profile jpeg12_read_icc_profile
/* Rename all internal types and functions that are affected by JSAMPLE. */
#ifdef JPEG_INTERNALS
#define jpeg_comp_master jpeg12_comp_master
#define jpeg_c_main_controller jpeg12_c_main_controller
#define jpeg_c_prep_controller jpeg12_c_prep_controller
#define jpeg_c_coef_controller jpeg12_c_coef_controller
#define jpeg_color_converter jpeg12_color_converter
#define jpeg_downsampler jpeg12_downsampler
#define jpeg_forward_dct jpeg12_forward_dct
#define jpeg_entropy_encoder jpeg12_entropy_encoder
#define jpeg_marker_writer jpeg12_marker_writer
#define jpeg_decomp_master jpeg12_decomp_master
#define jpeg_input_controller jpeg12_input_controller
#define jpeg_d_main_controller jpeg12_d_main_controller
#define jpeg_d_coef_controller jpeg12_d_coef_controller
#define jpeg_d_post_controller jpeg12_d_post_controller
#define jpeg_marker_reader jpeg12_marker_reader
#define jpeg_entropy_decoder jpeg12_entropy_decoder
#define inverse_DCT_method_ptr inverse_DCT_12_method_ptr
#define jpeg_inverse_dct jpeg12_inverse_dct
#define jpeg_upsampler jpeg12_upsampler
#define jpeg_color_deconverter jpeg12_color_deconverter
#define jpeg_color_quantizer jpeg12_color_quantizer
#define jinit_compress_master j12init_compress_master
#define jinit_c_master_control j12init_c_master_control
#define jinit_c_main_controller j12init_c_main_controller
#define jinit_c_prep_controller j12init_c_prep_controller
#define jinit_c_coef_controller j12init_c_coef_controller
#define jinit_color_converter j12init_color_converter
#define jinit_downsampler j12init_downsampler
#define jinit_forward_dct j12init_forward_dct
#define jinit_huff_encoder j12init_huff_encoder
#define jinit_phuff_encoder j12init_phuff_encoder
#define jinit_arith_encoder j12init_arith_encoder
#define jinit_marker_writer j12init_marker_writer
#define jinit_master_decompress j12init_master_decompress
#define jinit_d_main_controller j12init_d_main_controller
#define jinit_d_coef_controller j12init_d_coef_controller
#define jinit_d_post_controller j12init_d_post_controller
#define jinit_input_controller j12init_input_controller
#define jinit_marker_reader j12init_marker_reader
#define jinit_huff_decoder j12init_huff_decoder
#define jinit_phuff_decoder j12init_phuff_decoder
#define jinit_arith_decoder j12init_arith_decoder
#define jinit_inverse_dct j12init_inverse_dct
#define jinit_upsampler j12init_upsampler
#define jinit_color_deconverter j12init_color_deconverter
#define jinit_1pass_quantizer j12init_1pass_quantizer
#define jinit_2pass_quantizer j12init_2pass_quantizer
#define jinit_merged_upsampler j12init_merged_upsampler
#define jinit_memory_mgr j12init_memory_mgr
#define jdiv_round_up j12div_round_up
#define jround_up j12round_up
#define jcopy_sample_rows j12copy_sample_rows
#define jcopy_block_row j12copy_block_row
#define jzero_far j12zero_far
#define jpeg_natural_order jpeg12_natural_order
#define jpeg_make_c_derived_tbl jpeg12_make_c_derived_tbl
#define jpeg_gen_optimal_table jpeg12_gen_optimal_table
#define jpeg_fdct_islow jpeg12_fdct_islow
#define jpeg_fdct_ifast jpeg12_fdct_ifast
#define jpeg_fdct_float jpeg12_fdct_float
#define jpeg_idct_islow jpeg12_idct_islow
#define jpeg_idct_ifast jpeg12_idct_ifast
#define jpeg_idct_float jpeg12_idct_float
#define jpeg_idct_7x7 jpeg12_idct_7x7
#define jpeg_idct_6x6 jpeg12_idct_6x6
#define jpeg_idct_5x5 jpeg12_idct_5x5
#define jpeg_idct_4x4 jpeg12_idct_4x4
#define jpeg_idct_3x3 jpeg12_idct_3x3
#define jpeg_idct_2x2 jpeg12_idct_2x2
#define jpeg_idct_1x1 jpeg12_idct_1x1
#define jpeg_idct_9x9 jpeg12_idct_9x9
#define jpeg_idct_10x10 jpeg12_idct_10x10
#define jpeg_idct_11x11 jpeg12_idct_11x11
#define jpeg_idct_12x12 jpeg12_idct_12x12
#define jpeg_idct_13x13 jpeg12_idct_13x13
#define jpeg_idct_14x14 jpeg12_idct_14x14
#define jpeg_idct_15x15 jpeg12_idct_15x15
#define jpeg_idct_16x16 jpeg12_idct_16x16
#define jpeg_make_d_derived_tbl jpeg12_make_d_derived_tbl
#define jpeg_fill_bit_buffer jpeg12_fill_bit_buffer
#define jpeg_huff_decode jpeg12_huff_decode
#define jpeg_std_message_table jpeg12_std_message_table
#define jpeg_get_small jpeg12_get_small
#define jpeg_free_small jpeg12_free_small
#define jpeg_get_large jpeg12_get_large
#define jpeg_free_large jpeg12_free_large
#define jpeg_mem_available jpeg12_mem_available
#define jpeg_open_backing_store jpeg12_open_backing_store
#define jpeg_mem_init jpeg12_mem_init
#define jpeg_mem_term jpeg12_mem_term
#define jsimd_can_rgb_ycc j12simd_can_rgb_ycc
#define jsimd_can_rgb_gray j12simd_can_rgb_gray
#define jsimd_can_ycc_rgb j12simd_can_ycc_rgb
#define jsimd_can_ycc_rgb565 j12simd_can_ycc_rgb565
#define jsimd_c_can_null_convert j12simd_c_can_null_convert
#define jsimd_rgb_ycc_convert j12simd_rgb_ycc_convert
#define jsimd_rgb_gray_convert j12simd_rgb_gray_convert
#define jsimd_ycc_rgb_convert j12simd_ycc_rgb_convert
#define jsimd_ycc_rgb565_convert j12simd_ycc_rgb565_convert
#define jsimd_c_null_convert j12simd_c_null_convert
#define jsimd_can_h2v2_downsample j12simd_can_h2v2_downsample
#define jsimd_can_h2v1_downsample j12simd_can_h2v1_downsample
#define jsimd_h2v2_downsample j12simd_h2v2_downsample
#define jsimd_can_h2v2_smooth_downsample j12simd_can_h2v2_smooth_downsample
#define jsimd_h2v2_smooth_downsample j12simd_h2v2_smooth_downsample
#define jsimd_h2v1_downsample j12simd_h2v1_downsample
#define jsimd_can_h2v2_upsample j12simd_can_h2v2_upsample
#define jsimd_can_h2v1_upsample j12simd_can_h2v1_upsample
#define jsimd_can_int_upsample j12simd_can_int_upsample
#define jsimd_h2v2_upsample j12simd_h2v2_upsample
#define jsimd_h2v1_upsample j12simd_h2v1_upsample
#define jsimd_int_upsample j12simd_int_upsample
#define jsimd_can_h2v2_fancy_upsample j12simd_can_h2v2_fancy_upsample
#define jsimd_can_h2v1_fancy_upsample j12simd_can_h2v1_fancy_upsample
#define jsimd_can_h1v2_fancy_upsample j12simd_can_h1v2_fancy_upsample
#define jsimd_h2v2_fancy_upsample j12simd_h2v2_fancy_upsample
#define jsimd_h2v1_fancy_upsample j12simd_h2v1_fancy_upsample
#define jsimd_h1v2_fancy_upsample j12simd_h1v2_fancy_upsample
#define jsimd_can_h2v2_merged_upsample j12simd_can_h2v2_merged_upsample
#define jsimd_can_h2v1_merged_upsample j12simd_can_h2v1_merged_upsample
#define jsimd_h2v2_merged_upsample j12simd_h2v2_merged_upsample
#define jsimd_h2v1_merged_upsample j12simd_h2v1_merged_upsample
#define jsimd_can_huff_encode_one_block j12simd_can_huff_encode_one_block
#define jsimd_huff_encode_one_block j12simd_huff_encode_one_block
#define jsimd_can_encode_mcu_AC_first_prepare \
j12simd_can_encode_mcu_AC_first_prepare
#define jsimd_encode_mcu_AC_first_prepare \
j12simd_encode_mcu_AC_first_prepare
#define jsimd_can_encode_mcu_AC_refine_prepare \
j12simd_can_encode_mcu_AC_refine_prepare
#define jsimd_encode_mcu_AC_refine_prepare \
j12simd_encode_mcu_AC_refine_prepare
#define jsimd_can_convsamp j12simd_can_convsamp
#define jsimd_can_convsamp_float j12simd_can_convsamp_float
#define jsimd_convsamp j12simd_convsamp
#define jsimd_convsamp_float j12simd_convsamp_float
#define jsimd_can_fdct_islow j12simd_can_fdct_islow
#define jsimd_can_fdct_ifast j12simd_can_fdct_ifast
#define jsimd_can_fdct_float j12simd_can_fdct_float
#define jsimd_fdct_islow j12simd_fdct_islow
#define jsimd_fdct_ifast j12simd_fdct_ifast
#define jsimd_fdct_float j12simd_fdct_float
#define jsimd_can_quantize j12simd_can_quantize
#define jsimd_can_quantize_float j12simd_can_quantize_float
#define jsimd_quantize j12simd_quantize
#define jsimd_quantize_float j12simd_quantize_float
#define jsimd_can_idct_2x2 j12simd_can_idct_2x2
#define jsimd_can_idct_4x4 j12simd_can_idct_4x4
#define jsimd_can_idct_6x6 j12simd_can_idct_6x6
#define jsimd_can_idct_12x12 j12simd_can_idct_12x12
#define jsimd_idct_2x2 j12simd_idct_2x2
#define jsimd_idct_4x4 j12simd_idct_4x4
#define jsimd_idct_6x6 j12simd_idct_6x6
#define jsimd_idct_12x12 j12simd_idct_12x12
#define jsimd_can_idct_islow j12simd_can_idct_islow
#define jsimd_can_idct_ifast j12simd_can_idct_ifast
#define jsimd_can_idct_float j12simd_can_idct_float
#define jsimd_idct_islow j12simd_idct_islow
#define jsimd_idct_ifast j12simd_idct_ifast
#define jsimd_idct_float j12simd_idct_float
#endif /* JPEG_INTERNALS */
#else /* BITS_IN_JSAMPLE == 12 */
#include "jpeglib.h"
#endif
#endif /* JPEGLIBINT_H */

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2009, 2015, D. R. Commander.
* Copyright (C) 2009, 2015, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -15,7 +15,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#ifdef QUANT_1PASS_SUPPORTED

View File

@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1996, Thomas G. Lane.
* libjpeg-turbo Modifications:
* Copyright (C) 2009, 2014-2015, 2020, D. R. Commander.
* Copyright (C) 2009, 2014-2015, 2020, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -22,7 +22,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#ifdef QUANT_2PASS_SUPPORTED

View File

@@ -2,7 +2,7 @@
* jsimd_none.c
*
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright (C) 2009-2011, 2014, D. R. Commander.
* Copyright (C) 2009-2011, 2014, 2022, D. R. Commander.
* Copyright (C) 2015-2016, 2018, Matthieu Darbois.
* Copyright (C) 2020, Arm Limited.
*
@@ -15,7 +15,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "jsimd.h"
#include "jdct.h"
#include "jsimddct.h"

View File

@@ -16,7 +16,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
/*

View File

@@ -1,7 +1,7 @@
LIBJPEGTURBO_@JPEG_LIB_VERSION_DECIMAL@ {
@MEM_SRCDST_FUNCTIONS@
local:
jsimd_*;
@SIMD_FUNCTIONS@;
jconst_*;
};

View File

@@ -11,10 +11,11 @@ For conditions of distribution and use, see the accompanying README.ijg file.
This file describes how to use the IJG JPEG library within an application
program. Read it if you want to write a program that uses the library.
The file example.txt provides heavily commented skeleton code for calling the
JPEG library. Also see jpeglib.h (the include file to be used by application
programs) for full details about data structures and function parameter lists.
The library source code, of course, is the ultimate reference.
The file example.c provides heavily commented code for calling the JPEG
library. Also see jpeglib.h and jpeg12lib.h (the include files to be used by
application programs) for full details about data structures and function
parameter lists. The library source code, of course, is the ultimate
reference.
Note that there have been *major* changes from the application interface
presented by IJG version 4 and earlier versions. The old design had several
@@ -29,6 +30,7 @@ TABLE OF CONTENTS
Overview:
Functions provided by the library
12-bit Data Precision
Outline of typical usage
Basic library usage:
Data formats
@@ -99,9 +101,7 @@ use.) Unsupported ISO options include:
* Lossless JPEG
* DNL marker
* Nonintegral subsampling ratios
We support both 8- and 12-bit data precision, but this is a compile-time
choice rather than a run-time choice; hence it is difficult to use both
precisions in a single application.
We support both 8- and 12-bit data precision.
By itself, the library handles only interchange JPEG datastreams --- in
particular the widely used JFIF file format. The library can be used by
@@ -110,6 +110,38 @@ are embedded in more complex file formats. (For example, this library is
used by the free LIBTIFF library to support JPEG compression in TIFF.)
12-bit Data Precision
---------------------
Support for JPEG images with 12-bit, rather than 8-bit, samples is provided
through a separate library, API, and header file (jpeg12lib.h instead of
jpeglib.h). Functions supporting 12-bit samples have a prefix of "jpeg12_"
instead of "jpeg_" and use the following data types, structures, and macros:
* J12SAMPLE instead of JSAMPLE
* J12SAMPROW instead of JSAMPROW
* J12SAMPARRAY instead of JSAMPARRAY
* J12SAMPIMAGE instead of JSAMPIMAGE
* MAXJ12SAMPLE instead of MAXJSAMPLE
* CENTERJ12SAMPLE instead of CENTERJSAMPLE
* jpeg12_common_struct instead of jpeg_common_struct
* j12_common_ptr instead of j_common_ptr
* jpeg12_compress_struct instead of jpeg_compress_struct
* j12_compress_ptr instead of j_compress_ptr
* jpeg12_decompress_struct instead of jpeg_decompress_struct
* j12_decompress_ptr instead of j_decompress_ptr
* jpeg12_error_mgr instead of jpeg_error_mgr
* jpeg12_progress_mgr instead of jpeg_progress_mgr
* jpeg12_destination_mgr instead of jpeg_destination_mgr
* jpeg12_source_mgr instead of jpeg_source_mgr
* jpeg12_memory_mgr instead of jpeg_memory_mgr
* jpeg12_marker_parser_method instead of jpeg_marker_parser_method
This allows both 8-bit and 12-bit precision to be used in a single application.
(Refer to example.c). Arithmetic coding and SIMD acceleration are not
currently implemented for 12-bit samples.
Outline of typical usage
------------------------
@@ -402,16 +434,13 @@ this variable as the loop counter, so that the loop test looks like
"while (cinfo.next_scanline < cinfo.image_height)".
Code for this step depends heavily on the way that you store the source data.
example.txt shows the following code for the case of a full-size 2-D source
example.c shows the following code for the case of a full-size 2-D source
array containing 3-byte RGB pixels:
JSAMPROW row_pointer[1]; /* pointer to a single row */
int row_stride; /* physical row width in buffer */
row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */
while (cinfo.next_scanline < cinfo.image_height) {
row_pointer[0] = &image_buffer[cinfo.next_scanline * row_stride];
row_pointer[0] = image_buffer[cinfo.next_scanline];
jpeg_write_scanlines(&cinfo, row_pointer, 1);
}
@@ -1445,7 +1474,7 @@ When the default error handler is used, any error detected inside the JPEG
routines will cause a message to be printed on stderr, followed by exit().
You can supply your own error handling routines to override this behavior
and to control the treatment of nonfatal warnings and trace/debug messages.
The file example.txt illustrates the most common case, which is to have the
The file example.c illustrates the most common case, which is to have the
application regain control after an error rather than exiting.
The JPEG library never writes any message directly; it always goes through
@@ -1462,7 +1491,7 @@ You may, if you wish, simply replace the entire JPEG error handling module
only replacing some of the routines depending on the behavior you need.
This is accomplished by calling jpeg_std_error() as usual, but then overriding
some of the method pointers in the jpeg_error_mgr struct, as illustrated by
example.txt.
example.c.
All of the error handling routines will receive a pointer to the JPEG object
(a j_common_ptr which points to either a jpeg_compress_struct or a
@@ -1473,7 +1502,7 @@ additional data which is not known to the JPEG library or the standard error
handler. The most convenient way to do this is to embed either the JPEG
object or the jpeg_error_mgr struct in a larger structure that contains
additional fields; then casting the passed pointer provides access to the
additional fields. Again, see example.txt for one way to do it. (Beginning
additional fields. Again, see example.c for one way to do it. (Beginning
with IJG version 6b, there is also a void pointer "client_data" in each
JPEG object, which the application can also use to find related data.
The library does not touch client_data at all.)
@@ -3064,8 +3093,7 @@ BITS_IN_JSAMPLE as 12 rather than 8. Note that this causes JSAMPLE to be
larger than a char, so it affects the surrounding application's image data.
The sample applications cjpeg and djpeg can support 12-bit mode only for PPM
and GIF file formats; you must disable the other file formats to compile a
12-bit cjpeg or djpeg. At present, a 12-bit library can handle *only* 12-bit
images, not both precisions.
12-bit cjpeg or djpeg.
Note that a 12-bit library always compresses in Huffman optimization mode,
in order to generate valid Huffman tables. This is necessary because our

View File

@@ -47,12 +47,23 @@ Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
!endif
!ifdef GCC
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg-@SO_MAJOR_VERSION@.dll"
!ifdef 12BIT
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg12-@SO_MAJOR_VERSION@.dll"
!endif
!else
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg@SO_MAJOR_VERSION@.dll"
!ifdef 12BIT
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg12-@SO_MAJOR_VERSION@.dll"
!endif
!endif
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}cjpeg.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}djpeg.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpegtran.exe"
!ifdef 12BIT
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}cjpeg12.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}djpeg12.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg12tran.exe"
!endif
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}tjbench.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}rdjpgcom.exe"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}wrjpgcom.exe"
@@ -62,14 +73,25 @@ Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
File "@CMAKE_CURRENT_BINARY_DIR@\libturbojpeg.a"
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg.dll.a"
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg.a"
!ifdef 12BIT
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg12.dll.a"
File "@CMAKE_CURRENT_BINARY_DIR@\libjpeg12.a"
!endif
!else
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg.lib"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}turbojpeg-static.lib"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg.lib"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg-static.lib"
!ifdef 12BIT
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg12.lib"
File "@CMAKE_CURRENT_BINARY_DIR@\${BUILDDIR}jpeg12-static.lib"
!endif
!endif
SetOutPath $INSTDIR\lib\pkgconfig
File "@CMAKE_CURRENT_BINARY_DIR@\pkgscripts\libjpeg.pc"
!ifdef 12BIT
File "@CMAKE_CURRENT_BINARY_DIR@\pkgscripts\libjpeg12.pc"
!endif
File "@CMAKE_CURRENT_BINARY_DIR@\pkgscripts\libturbojpeg.pc"
SetOutPath $INSTDIR\lib\cmake\@CMAKE_PROJECT_NAME@
File "@CMAKE_CURRENT_BINARY_DIR@\pkgscripts\@CMAKE_PROJECT_NAME@Config.cmake"
@@ -85,12 +107,15 @@ Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
File "@CMAKE_CURRENT_SOURCE_DIR@\jerror.h"
File "@CMAKE_CURRENT_SOURCE_DIR@\jmorecfg.h"
File "@CMAKE_CURRENT_SOURCE_DIR@\jpeglib.h"
!ifdef 12BIT
File "@CMAKE_CURRENT_SOURCE_DIR@\jpeg12lib.h"
!endif
File "@CMAKE_CURRENT_SOURCE_DIR@\turbojpeg.h"
SetOutPath $INSTDIR\doc
File "@CMAKE_CURRENT_SOURCE_DIR@\README.ijg"
File "@CMAKE_CURRENT_SOURCE_DIR@\README.md"
File "@CMAKE_CURRENT_SOURCE_DIR@\LICENSE.md"
File "@CMAKE_CURRENT_SOURCE_DIR@\example.txt"
File "@CMAKE_CURRENT_SOURCE_DIR@\example.c"
File "@CMAKE_CURRENT_SOURCE_DIR@\libjpeg.txt"
File "@CMAKE_CURRENT_SOURCE_DIR@\structure.txt"
File "@CMAKE_CURRENT_SOURCE_DIR@\usage.txt"
@@ -129,22 +154,39 @@ Section "Uninstall"
!ifdef GCC
Delete $INSTDIR\bin\libjpeg-@SO_MAJOR_VERSION@.dll
!ifdef 12BIT
Delete $INSTDIR\bin\libjpeg12-@SO_MAJOR_VERSION@.dll
!endif
Delete $INSTDIR\bin\libturbojpeg.dll
Delete $SYSDIR\libturbojpeg.dll
Delete $INSTDIR\lib\libturbojpeg.dll.a
Delete $INSTDIR\lib\libturbojpeg.a
Delete $INSTDIR\lib\libjpeg.dll.a
Delete $INSTDIR\lib\libjpeg.a
!ifdef 12BIT
Delete $INSTDIR\lib\libjpeg12.dll.a
Delete $INSTDIR\lib\libjpeg12.a
!endif
!else
Delete $INSTDIR\bin\jpeg@SO_MAJOR_VERSION@.dll
!ifdef 12BIT
Delete $INSTDIR\bin\jpeg12-@SO_MAJOR_VERSION@.dll
!endif
Delete $INSTDIR\bin\turbojpeg.dll
Delete $SYSDIR\turbojpeg.dll
Delete $INSTDIR\lib\jpeg.lib
Delete $INSTDIR\lib\jpeg-static.lib
!ifdef 12BIT
Delete $INSTDIR\lib\jpeg12.lib
Delete $INSTDIR\lib\jpeg12-static.lib
!endif
Delete $INSTDIR\lib\turbojpeg.lib
Delete $INSTDIR\lib\turbojpeg-static.lib
!endif
Delete $INSTDIR\lib\pkgconfig\libjpeg.pc
!ifdef 12BIT
Delete $INSTDIR\lib\pkgconfig\libjpeg12.pc
!endif
Delete $INSTDIR\lib\pkgconfig\libturbojpeg.pc
Delete $INSTDIR\lib\cmake\@CMAKE_PROJECT_NAME@\@CMAKE_PROJECT_NAME@Config.cmake
Delete $INSTDIR\lib\cmake\@CMAKE_PROJECT_NAME@\@CMAKE_PROJECT_NAME@ConfigVersion.cmake
@@ -156,6 +198,11 @@ Section "Uninstall"
Delete $INSTDIR\bin\cjpeg.exe
Delete $INSTDIR\bin\djpeg.exe
Delete $INSTDIR\bin\jpegtran.exe
!ifdef 12BIT
Delete $INSTDIR\bin\cjpeg12.exe
Delete $INSTDIR\bin\djpeg12.exe
Delete $INSTDIR\bin\jpeg12tran.exe
!endif
Delete $INSTDIR\bin\tjbench.exe
Delete $INSTDIR\bin\rdjpgcom.exe
Delete $INSTDIR\bin\wrjpgcom.exe
@@ -163,12 +210,15 @@ Section "Uninstall"
Delete $INSTDIR\include\jerror.h
Delete $INSTDIR\include\jmorecfg.h
Delete $INSTDIR\include\jpeglib.h
!ifdef 12BIT
Delete $INSTDIR\include\jpeg12lib.h
!endif
Delete $INSTDIR\include\turbojpeg.h
Delete $INSTDIR\uninstall_@VERSION@.exe
Delete $INSTDIR\doc\README.ijg
Delete $INSTDIR\doc\README.md
Delete $INSTDIR\doc\LICENSE.md
Delete $INSTDIR\doc\example.txt
Delete $INSTDIR\doc\example.c
Delete $INSTDIR\doc\libjpeg.txt
Delete $INSTDIR\doc\structure.txt
Delete $INSTDIR\doc\usage.txt

10
release/libjpeg12.pc.in Normal file
View File

@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: libjpeg12
Description: A 12-bit JPEG codec that provides the libjpeg API
Version: @VERSION@
Libs: -L${libdir} -ljpeg12
Cflags: -I${includedir}

View File

@@ -9,6 +9,7 @@
%define _enable_shared @ENABLE_SHARED@
%define _with_turbojpeg @WITH_TURBOJPEG@
%define _with_java @WITH_JAVA@
%define _with_12bit @WITH_12BIT@
%if "%{?__isa_bits:1}" == "1"
%define _bits %{__isa_bits}
@@ -174,6 +175,11 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/cjpeg
%{_bindir}/djpeg
%{_bindir}/jpegtran
%if "%{_with_12bit}" == "1"
%{_bindir}/cjpeg12
%{_bindir}/djpeg12
%{_bindir}/jpeg12tran
%endif
%if "%{_with_turbojpeg}" == "1"
%{_bindir}/tjbench
%endif
@@ -186,12 +192,23 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@.@SO_AGE@.@SO_MINOR_VERSION@
%{_libdir}/libjpeg.so.@SO_MAJOR_VERSION@
%{_libdir}/libjpeg.so
%if "%{_with_12bit}" == "1"
%{_libdir}/libjpeg12.so.@SO_MAJOR_VERSION@.@SO_AGE@.@SO_MINOR_VERSION@
%{_libdir}/libjpeg12.so.@SO_MAJOR_VERSION@
%{_libdir}/libjpeg12.so
%endif
%endif
%if "%{_enable_static}" == "1"
%{_libdir}/libjpeg.a
%if "%{_with_12bit}" == "1"
%{_libdir}/libjpeg12.a
%endif
%endif
%dir %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/libjpeg.pc
%if "%{_with_12bit}" == "1"
%{_libdir}/pkgconfig/libjpeg12.pc
%endif
%dir %{_libdir}/cmake
%dir %{_libdir}/cmake/@CMAKE_PROJECT_NAME@
%{_libdir}/cmake/@CMAKE_PROJECT_NAME@
@@ -211,6 +228,9 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/jerror.h
%{_includedir}/jmorecfg.h
%{_includedir}/jpeglib.h
%if "%{_with_12bit}" == "1"
%{_includedir}/jpeg12lib.h
%endif
%if "%{_with_turbojpeg}" == "1"
%{_includedir}/turbojpeg.h
%endif

View File

@@ -23,6 +23,10 @@ foreach(src ${JPEG_SOURCES})
set(JPEG_SRCS ${JPEG_SRCS} ../${src})
endforeach()
foreach(src ${JPEG12_SOURCES})
set(JPEG12_SRCS ${JPEG12_SRCS} ../${src})
endforeach()
if(WITH_SIMD AND (MSVC_IDE OR XCODE))
# This tells CMake that the "source" files haven't been generated yet
set_source_files_properties(${SIMD_OBJS} PROPERTIES GENERATED 1)
@@ -60,36 +64,89 @@ if(MSVC)
set_target_properties(jpeg PROPERTIES
RUNTIME_OUTPUT_NAME jpeg${SO_MAJOR_VERSION})
# The jsimd_*.c file is built using /MT, so this prevents a linker warning.
set_target_properties(jpeg PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT /NODEFAULTLIB:LIBCMTD")
set_target_properties(jpeg PROPERTIES LINK_FLAGS
"/NODEFAULTLIB:LIBCMT /NODEFAULTLIB:LIBCMTD")
elseif(MINGW)
set_target_properties(jpeg PROPERTIES SUFFIX -${SO_MAJOR_VERSION}.dll)
endif()
if(WITH_12BIT)
if(WIN32)
if(WITH_MEM_SRCDST)
set(DEFFILE ../win/jpeg12-${SO_MAJOR_VERSION}-memsrcdst.def)
else()
set(DEFFILE ../win/jpeg12-${SO_MAJOR_VERSION}.def)
endif()
endif()
add_library(jpeg12 SHARED ${JPEG12_SRCS} ${DEFFILE} ../jsimd_none.c)
set_property(TARGET jpeg12 PROPERTY COMPILE_FLAGS "-DBITS_IN_JSAMPLE=12")
set_target_properties(jpeg12 PROPERTIES SOVERSION ${SO_MAJOR_VERSION}
VERSION ${SO_MAJOR_VERSION}.${SO_AGE}.${SO_MINOR_VERSION})
if(APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.4))
set_target_properties(jpeg12 PROPERTIES MACOSX_RPATH 1)
endif()
if(MAPFLAG)
set_target_properties(jpeg12 PROPERTIES
LINK_FLAGS "${MAPFLAG}${CMAKE_CURRENT_BINARY_DIR}/../libjpeg12.map")
endif()
if(MSVC)
set_target_properties(jpeg12 PROPERTIES
RUNTIME_OUTPUT_NAME jpeg12-${SO_MAJOR_VERSION})
elseif(MINGW)
set_target_properties(jpeg12 PROPERTIES SUFFIX -${SO_MAJOR_VERSION}.dll)
endif()
endif()
if(WIN32)
set(USE_SETMODE "-DUSE_SETMODE")
endif()
if(WITH_12BIT)
set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
else()
set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
set(CJPEG_BMP_SOURCES ../rdbmp.c ../rdtarga.c)
set(DJPEG_BMP_SOURCES ../wrbmp.c ../wrtarga.c)
endif()
add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c
../rdswitch.c ${CJPEG_BMP_SOURCES})
set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdbmp.c ../rdgif.c ../rdppm.c
../rdswitch.c ../rdtarga.c)
set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS
"-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
target_link_libraries(cjpeg jpeg)
add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES})
set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS})
../wrbmp.c ../wrgif.c ../wrppm.c ../wrtarga.c)
set_property(TARGET djpeg PROPERTY COMPILE_FLAGS
"-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
target_link_libraries(djpeg jpeg)
add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c)
target_link_libraries(jpegtran jpeg)
set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "${USE_SETMODE}")
if(WITH_12BIT)
add_executable(cjpeg12 ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c
../rdswitch.c)
set_property(TARGET cjpeg12 PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=12 -DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
target_link_libraries(cjpeg12 jpeg12)
add_executable(djpeg12 ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c
../wrgif.c ../wrppm.c)
set_property(TARGET djpeg12 PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=12 -DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
target_link_libraries(djpeg12 jpeg12)
add_executable(jpeg12tran ../jpegtran.c ../cdjpeg.c ../rdswitch.c
../transupp.c)
target_link_libraries(jpeg12tran jpeg12)
set_property(TARGET jpeg12tran PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=12 ${USE_SETMODE}")
endif()
add_executable(example ../example.c)
if(WITH_12BIT)
target_link_libraries(example jpeg jpeg12)
set_property(TARGET example PROPERTY COMPILE_FLAGS "-DWITH_12BIT")
else()
target_link_libraries(example jpeg)
endif()
add_executable(jcstest ../jcstest.c)
target_link_libraries(jcstest jpeg)
@@ -105,3 +162,18 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND
install(FILES "$<TARGET_PDB_FILE:jpeg>"
DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
endif()
if(WITH_12BIT)
install(TARGETS jpeg12 EXPORT ${CMAKE_PROJECT_NAME}Targets
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS cjpeg12 djpeg12 jpeg12tran
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND
CMAKE_C_LINKER_SUPPORTS_PDB)
install(FILES "$<TARGET_PDB_FILE:jpeg12>"
DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
endif()
endif()

View File

@@ -57,10 +57,7 @@ Within these limits, any set of compression parameters allowed by the JPEG
spec should be readable for decompression. (We can be more restrictive about
what formats we can generate.) Although the system design allows for all
parameter values, some uncommon settings are not yet implemented and may
never be; nonintegral sampling ratios are the prime example. Furthermore,
we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a
run-time option, because most machines can store 8-bit pixels much more
compactly than 12-bit.
never be; nonintegral sampling ratios are the prime example.
By itself, the library handles only interchange JPEG datastreams --- in
particular the widely used JFIF file format. The library can be used by

View File

@@ -21,7 +21,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jpeglibint.h"
#include "transupp.h" /* My own external interface */
#include "jpegcomp.h"
#include <ctype.h> /* to declare isdigit() */

View File

@@ -53,7 +53,7 @@ extern void jpeg_mem_src_tj(j_decompress_ptr, const unsigned char *,
#define IS_POW2(x) (((x) & (x - 1)) == 0)
/* Error handling (based on example in example.txt) */
/* Error handling (based on example in example.c) */
static THREAD_LOCAL char errStr[JMSG_LENGTH_MAX] = "No error";
@@ -490,7 +490,7 @@ static tjhandle _tjInitCompress(tjinstance *this)
unsigned char *buf = buffer;
unsigned long size = 1;
/* This is also straight out of example.txt */
/* This is also straight out of example.c */
this->cinfo.err = jpeg_std_error(&this->jerr.pub);
this->jerr.pub.error_exit = my_error_exit;
this->jerr.pub.output_message = my_output_message;
@@ -1164,7 +1164,7 @@ static tjhandle _tjInitDecompress(tjinstance *this)
{
static unsigned char buffer[1];
/* This is also straight out of example.txt */
/* This is also straight out of example.c */
this->dinfo.err = jpeg_std_error(&this->jerr.pub);
this->jerr.pub.error_exit = my_error_exit;
this->jerr.pub.output_message = my_output_message;

View File

@@ -15,6 +15,16 @@ set_target_properties(@CMAKE_PROJECT_NAME@::jpeg PROPERTIES
list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg )
list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg "${_IMPORT_PREFIX}/lib/libjpeg.dll.a" "${_IMPORT_PREFIX}/bin/libjpeg-62.dll" )
# Import target "@CMAKE_PROJECT_NAME@::jpeg12" for configuration "Release"
set_property(TARGET @CMAKE_PROJECT_NAME@::jpeg12 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(@CMAKE_PROJECT_NAME@::jpeg12 PROPERTIES
IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/libjpeg12.dll.a"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/libjpeg12-62.dll"
)
list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg12 )
list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg12 "${_IMPORT_PREFIX}/lib/libjpeg12.dll.a" "${_IMPORT_PREFIX}/bin/libjpeg12-62.dll" )
# Import target "@CMAKE_PROJECT_NAME@::turbojpeg" for configuration "Release"
set_property(TARGET @CMAKE_PROJECT_NAME@::turbojpeg APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(@CMAKE_PROJECT_NAME@::turbojpeg PROPERTIES
@@ -45,5 +55,15 @@ set_target_properties(@CMAKE_PROJECT_NAME@::jpeg-static PROPERTIES
list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg-static )
list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg-static "${_IMPORT_PREFIX}/lib/libjpeg.a" )
# Import target "@CMAKE_PROJECT_NAME@::jpeg12-static" for configuration "Release"
set_property(TARGET @CMAKE_PROJECT_NAME@::jpeg12-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(@CMAKE_PROJECT_NAME@::jpeg12-static PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libjpeg12.a"
)
list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg12-static )
list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg12-static "${_IMPORT_PREFIX}/lib/libjpeg12.a" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

View File

@@ -1,25 +0,0 @@
#define JPEG_LIB_VERSION @JPEG_LIB_VERSION@
#define LIBJPEG_TURBO_VERSION @VERSION@
#define LIBJPEG_TURBO_VERSION_NUMBER @LIBJPEG_TURBO_VERSION_NUMBER@
#cmakedefine C_ARITH_CODING_SUPPORTED
#cmakedefine D_ARITH_CODING_SUPPORTED
#cmakedefine MEM_SRCDST_SUPPORTED
#cmakedefine WITH_SIMD
#define BITS_IN_JSAMPLE @BITS_IN_JSAMPLE@ /* use 8 or 12 */
#undef RIGHT_SHIFT_IS_UNSIGNED
/* Define "boolean" as unsigned char, not int, per Windows custom */
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
/* Define "INT32" as int, not long, per Windows custom */
#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */
typedef short INT16;
typedef signed int INT32;
#endif
#define XMD_H /* prevent jmorecfg.h from redefining it */

108
win/jpeg12-62-memsrcdst.def Normal file
View File

@@ -0,0 +1,108 @@
EXPORTS
j12copy_block_row @ 1 ;
j12copy_sample_rows @ 2 ;
j12div_round_up @ 3 ;
j12init_1pass_quantizer @ 4 ;
j12init_2pass_quantizer @ 5 ;
j12init_c_coef_controller @ 6 ;
j12init_c_main_controller @ 7 ;
j12init_c_master_control @ 8 ;
j12init_c_prep_controller @ 9 ;
j12init_color_converter @ 10 ;
j12init_color_deconverter @ 11 ;
j12init_compress_master @ 12 ;
j12init_d_coef_controller @ 13 ;
j12init_d_main_controller @ 14 ;
j12init_d_post_controller @ 15 ;
j12init_downsampler @ 16 ;
j12init_forward_dct @ 17 ;
j12init_huff_decoder @ 18 ;
j12init_huff_encoder @ 19 ;
j12init_input_controller @ 20 ;
j12init_inverse_dct @ 21 ;
j12init_marker_reader @ 22 ;
j12init_marker_writer @ 23 ;
j12init_master_decompress @ 24 ;
j12init_memory_mgr @ 25 ;
j12init_merged_upsampler @ 26 ;
j12init_phuff_decoder @ 27 ;
j12init_phuff_encoder @ 28 ;
j12init_upsampler @ 29 ;
jpeg12_CreateCompress @ 30 ;
jpeg12_CreateDecompress @ 31 ;
jpeg12_abort @ 32 ;
jpeg12_abort_compress @ 33 ;
jpeg12_abort_decompress @ 34 ;
jpeg12_add_quant_table @ 35 ;
jpeg12_alloc_huff_table @ 36 ;
jpeg12_alloc_quant_table @ 37 ;
jpeg12_calc_output_dimensions @ 38 ;
jpeg12_consume_input @ 39 ;
jpeg12_copy_critical_parameters @ 40 ;
jpeg12_default_colorspace @ 41 ;
jpeg12_destroy @ 42 ;
jpeg12_destroy_compress @ 43 ;
jpeg12_destroy_decompress @ 44 ;
jpeg12_fdct_float @ 45 ;
jpeg12_fdct_ifast @ 46 ;
jpeg12_fdct_islow @ 47 ;
jpeg12_fill_bit_buffer @ 48 ;
jpeg12_finish_compress @ 49 ;
jpeg12_finish_decompress @ 50 ;
jpeg12_finish_output @ 51 ;
jpeg12_free_large @ 52 ;
jpeg12_free_small @ 53 ;
jpeg12_gen_optimal_table @ 54 ;
jpeg12_get_large @ 55 ;
jpeg12_get_small @ 56 ;
jpeg12_has_multiple_scans @ 57 ;
jpeg12_huff_decode @ 58 ;
jpeg12_idct_1x1 @ 59 ;
jpeg12_idct_2x2 @ 60 ;
jpeg12_idct_4x4 @ 61 ;
jpeg12_idct_float @ 62 ;
jpeg12_idct_ifast @ 63 ;
jpeg12_idct_islow @ 64 ;
jpeg12_input_complete @ 65 ;
jpeg12_make_c_derived_tbl @ 66 ;
jpeg12_make_d_derived_tbl @ 67 ;
jpeg12_mem_available @ 68 ;
jpeg12_mem_init @ 69 ;
jpeg12_mem_term @ 70 ;
jpeg12_new_colormap @ 71 ;
jpeg12_open_backing_store @ 72 ;
jpeg12_quality_scaling @ 73 ;
jpeg12_read_coefficients @ 74 ;
jpeg12_read_header @ 75 ;
jpeg12_read_raw_data @ 76 ;
jpeg12_read_scanlines @ 77 ;
jpeg12_resync_to_restart @ 78 ;
jpeg12_save_markers @ 79 ;
jpeg12_set_colorspace @ 80 ;
jpeg12_set_defaults @ 81 ;
jpeg12_set_linear_quality @ 82 ;
jpeg12_set_marker_processor @ 83 ;
jpeg12_set_quality @ 84 ;
jpeg12_simple_progression @ 85 ;
jpeg12_start_compress @ 86 ;
jpeg12_start_decompress @ 87 ;
jpeg12_start_output @ 88 ;
jpeg12_std_error @ 89 ;
jpeg12_stdio_dest @ 90 ;
jpeg12_stdio_src @ 91 ;
jpeg12_suppress_tables @ 92 ;
jpeg12_write_coefficients @ 93 ;
jpeg12_write_m_byte @ 94 ;
jpeg12_write_m_header @ 95 ;
jpeg12_write_marker @ 96 ;
jpeg12_write_raw_data @ 97 ;
jpeg12_write_scanlines @ 98 ;
jpeg12_write_tables @ 99 ;
j12round_up @ 100 ;
j12zero_far @ 101 ;
jpeg12_mem_dest @ 102 ;
jpeg12_mem_src @ 103 ;
jpeg12_skip_scanlines @ 104 ;
jpeg12_crop_scanline @ 105 ;
jpeg12_read_icc_profile @ 106 ;
jpeg12_write_icc_profile @ 107 ;

106
win/jpeg12-62.def Normal file
View File

@@ -0,0 +1,106 @@
EXPORTS
j12copy_block_row @ 1 ;
j12copy_sample_rows @ 2 ;
j12div_round_up @ 3 ;
j12init_1pass_quantizer @ 4 ;
j12init_2pass_quantizer @ 5 ;
j12init_c_coef_controller @ 6 ;
j12init_c_main_controller @ 7 ;
j12init_c_master_control @ 8 ;
j12init_c_prep_controller @ 9 ;
j12init_color_converter @ 10 ;
j12init_color_deconverter @ 11 ;
j12init_compress_master @ 12 ;
j12init_d_coef_controller @ 13 ;
j12init_d_main_controller @ 14 ;
j12init_d_post_controller @ 15 ;
j12init_downsampler @ 16 ;
j12init_forward_dct @ 17 ;
j12init_huff_decoder @ 18 ;
j12init_huff_encoder @ 19 ;
j12init_input_controller @ 20 ;
j12init_inverse_dct @ 21 ;
j12init_marker_reader @ 22 ;
j12init_marker_writer @ 23 ;
j12init_master_decompress @ 24 ;
j12init_memory_mgr @ 25 ;
j12init_merged_upsampler @ 26 ;
j12init_phuff_decoder @ 27 ;
j12init_phuff_encoder @ 28 ;
j12init_upsampler @ 29 ;
jpeg12_CreateCompress @ 30 ;
jpeg12_CreateDecompress @ 31 ;
jpeg12_abort @ 32 ;
jpeg12_abort_compress @ 33 ;
jpeg12_abort_decompress @ 34 ;
jpeg12_add_quant_table @ 35 ;
jpeg12_alloc_huff_table @ 36 ;
jpeg12_alloc_quant_table @ 37 ;
jpeg12_calc_output_dimensions @ 38 ;
jpeg12_consume_input @ 39 ;
jpeg12_copy_critical_parameters @ 40 ;
jpeg12_default_colorspace @ 41 ;
jpeg12_destroy @ 42 ;
jpeg12_destroy_compress @ 43 ;
jpeg12_destroy_decompress @ 44 ;
jpeg12_fdct_float @ 45 ;
jpeg12_fdct_ifast @ 46 ;
jpeg12_fdct_islow @ 47 ;
jpeg12_fill_bit_buffer @ 48 ;
jpeg12_finish_compress @ 49 ;
jpeg12_finish_decompress @ 50 ;
jpeg12_finish_output @ 51 ;
jpeg12_free_large @ 52 ;
jpeg12_free_small @ 53 ;
jpeg12_gen_optimal_table @ 54 ;
jpeg12_get_large @ 55 ;
jpeg12_get_small @ 56 ;
jpeg12_has_multiple_scans @ 57 ;
jpeg12_huff_decode @ 58 ;
jpeg12_idct_1x1 @ 59 ;
jpeg12_idct_2x2 @ 60 ;
jpeg12_idct_4x4 @ 61 ;
jpeg12_idct_float @ 62 ;
jpeg12_idct_ifast @ 63 ;
jpeg12_idct_islow @ 64 ;
jpeg12_input_complete @ 65 ;
jpeg12_make_c_derived_tbl @ 66 ;
jpeg12_make_d_derived_tbl @ 67 ;
jpeg12_mem_available @ 68 ;
jpeg12_mem_init @ 69 ;
jpeg12_mem_term @ 70 ;
jpeg12_new_colormap @ 71 ;
jpeg12_open_backing_store @ 72 ;
jpeg12_quality_scaling @ 73 ;
jpeg12_read_coefficients @ 74 ;
jpeg12_read_header @ 75 ;
jpeg12_read_raw_data @ 76 ;
jpeg12_read_scanlines @ 77 ;
jpeg12_resync_to_restart @ 78 ;
jpeg12_save_markers @ 79 ;
jpeg12_set_colorspace @ 80 ;
jpeg12_set_defaults @ 81 ;
jpeg12_set_linear_quality @ 82 ;
jpeg12_set_marker_processor @ 83 ;
jpeg12_set_quality @ 84 ;
jpeg12_simple_progression @ 85 ;
jpeg12_start_compress @ 86 ;
jpeg12_start_decompress @ 87 ;
jpeg12_start_output @ 88 ;
jpeg12_std_error @ 89 ;
jpeg12_stdio_dest @ 90 ;
jpeg12_stdio_src @ 91 ;
jpeg12_suppress_tables @ 92 ;
jpeg12_write_coefficients @ 93 ;
jpeg12_write_m_byte @ 94 ;
jpeg12_write_m_header @ 95 ;
jpeg12_write_marker @ 96 ;
jpeg12_write_raw_data @ 97 ;
jpeg12_write_scanlines @ 98 ;
jpeg12_write_tables @ 99 ;
j12round_up @ 100 ;
j12zero_far @ 101 ;
jpeg12_skip_scanlines @ 102 ;
jpeg12_crop_scanline @ 103 ;
jpeg12_read_icc_profile @ 104 ;
jpeg12_write_icc_profile @ 105 ;

110
win/jpeg12-7-memsrcdst.def Normal file
View File

@@ -0,0 +1,110 @@
EXPORTS
j12copy_block_row @ 1 ;
j12copy_sample_rows @ 2 ;
j12div_round_up @ 3 ;
j12init_1pass_quantizer @ 4 ;
j12init_2pass_quantizer @ 5 ;
j12init_c_coef_controller @ 6 ;
j12init_c_main_controller @ 7 ;
j12init_c_master_control @ 8 ;
j12init_c_prep_controller @ 9 ;
j12init_color_converter @ 10 ;
j12init_color_deconverter @ 11 ;
j12init_compress_master @ 12 ;
j12init_d_coef_controller @ 13 ;
j12init_d_main_controller @ 14 ;
j12init_d_post_controller @ 15 ;
j12init_downsampler @ 16 ;
j12init_forward_dct @ 17 ;
j12init_huff_decoder @ 18 ;
j12init_huff_encoder @ 19 ;
j12init_input_controller @ 20 ;
j12init_inverse_dct @ 21 ;
j12init_marker_reader @ 22 ;
j12init_marker_writer @ 23 ;
j12init_master_decompress @ 24 ;
j12init_memory_mgr @ 25 ;
j12init_merged_upsampler @ 26 ;
j12init_phuff_decoder @ 27 ;
j12init_phuff_encoder @ 28 ;
j12init_upsampler @ 29 ;
jpeg12_CreateCompress @ 30 ;
jpeg12_CreateDecompress @ 31 ;
jpeg12_abort @ 32 ;
jpeg12_abort_compress @ 33 ;
jpeg12_abort_decompress @ 34 ;
jpeg12_add_quant_table @ 35 ;
jpeg12_alloc_huff_table @ 36 ;
jpeg12_alloc_quant_table @ 37 ;
jpeg12_calc_jpeg_dimensions @ 38 ;
jpeg12_calc_output_dimensions @ 39 ;
jpeg12_consume_input @ 40 ;
jpeg12_copy_critical_parameters @ 41 ;
jpeg12_default_colorspace @ 42 ;
jpeg12_default_qtables @ 43 ;
jpeg12_destroy @ 44 ;
jpeg12_destroy_compress @ 45 ;
jpeg12_destroy_decompress @ 46 ;
jpeg12_fdct_float @ 47 ;
jpeg12_fdct_ifast @ 48 ;
jpeg12_fdct_islow @ 49 ;
jpeg12_fill_bit_buffer @ 50 ;
jpeg12_finish_compress @ 51 ;
jpeg12_finish_decompress @ 52 ;
jpeg12_finish_output @ 53 ;
jpeg12_free_large @ 54 ;
jpeg12_free_small @ 55 ;
jpeg12_gen_optimal_table @ 56 ;
jpeg12_get_large @ 57 ;
jpeg12_get_small @ 58 ;
jpeg12_has_multiple_scans @ 59 ;
jpeg12_huff_decode @ 60 ;
jpeg12_idct_1x1 @ 61 ;
jpeg12_idct_2x2 @ 62 ;
jpeg12_idct_4x4 @ 63 ;
jpeg12_idct_float @ 64 ;
jpeg12_idct_ifast @ 65 ;
jpeg12_idct_islow @ 66 ;
jpeg12_input_complete @ 67 ;
jpeg12_make_c_derived_tbl @ 68 ;
jpeg12_make_d_derived_tbl @ 69 ;
jpeg12_mem_available @ 70 ;
jpeg12_mem_init @ 71 ;
jpeg12_mem_term @ 72 ;
jpeg12_new_colormap @ 73 ;
jpeg12_open_backing_store @ 74 ;
jpeg12_quality_scaling @ 75 ;
jpeg12_read_coefficients @ 76 ;
jpeg12_read_header @ 77 ;
jpeg12_read_raw_data @ 78 ;
jpeg12_read_scanlines @ 79 ;
jpeg12_resync_to_restart @ 80 ;
jpeg12_save_markers @ 81 ;
jpeg12_set_colorspace @ 82 ;
jpeg12_set_defaults @ 83 ;
jpeg12_set_linear_quality @ 84 ;
jpeg12_set_marker_processor @ 85 ;
jpeg12_set_quality @ 86 ;
jpeg12_simple_progression @ 87 ;
jpeg12_start_compress @ 88 ;
jpeg12_start_decompress @ 89 ;
jpeg12_start_output @ 90 ;
jpeg12_std_error @ 91 ;
jpeg12_stdio_dest @ 92 ;
jpeg12_stdio_src @ 93 ;
jpeg12_suppress_tables @ 94 ;
jpeg12_write_coefficients @ 95 ;
jpeg12_write_m_byte @ 96 ;
jpeg12_write_m_header @ 97 ;
jpeg12_write_marker @ 98 ;
jpeg12_write_raw_data @ 99 ;
jpeg12_write_scanlines @ 100 ;
jpeg12_write_tables @ 101 ;
j12round_up @ 102 ;
j12zero_far @ 103 ;
jpeg12_mem_dest @ 104 ;
jpeg12_mem_src @ 105 ;
jpeg12_skip_scanlines @ 106 ;
jpeg12_crop_scanline @ 107 ;
jpeg12_read_icc_profile @ 108 ;
jpeg12_write_icc_profile @ 109 ;

108
win/jpeg12-7.def Normal file
View File

@@ -0,0 +1,108 @@
EXPORTS
j12copy_block_row @ 1 ;
j12copy_sample_rows @ 2 ;
j12div_round_up @ 3 ;
j12init_1pass_quantizer @ 4 ;
j12init_2pass_quantizer @ 5 ;
j12init_c_coef_controller @ 6 ;
j12init_c_main_controller @ 7 ;
j12init_c_master_control @ 8 ;
j12init_c_prep_controller @ 9 ;
j12init_color_converter @ 10 ;
j12init_color_deconverter @ 11 ;
j12init_compress_master @ 12 ;
j12init_d_coef_controller @ 13 ;
j12init_d_main_controller @ 14 ;
j12init_d_post_controller @ 15 ;
j12init_downsampler @ 16 ;
j12init_forward_dct @ 17 ;
j12init_huff_decoder @ 18 ;
j12init_huff_encoder @ 19 ;
j12init_input_controller @ 20 ;
j12init_inverse_dct @ 21 ;
j12init_marker_reader @ 22 ;
j12init_marker_writer @ 23 ;
j12init_master_decompress @ 24 ;
j12init_memory_mgr @ 25 ;
j12init_merged_upsampler @ 26 ;
j12init_phuff_decoder @ 27 ;
j12init_phuff_encoder @ 28 ;
j12init_upsampler @ 29 ;
jpeg12_CreateCompress @ 30 ;
jpeg12_CreateDecompress @ 31 ;
jpeg12_abort @ 32 ;
jpeg12_abort_compress @ 33 ;
jpeg12_abort_decompress @ 34 ;
jpeg12_add_quant_table @ 35 ;
jpeg12_alloc_huff_table @ 36 ;
jpeg12_alloc_quant_table @ 37 ;
jpeg12_calc_jpeg_dimensions @ 38 ;
jpeg12_calc_output_dimensions @ 39 ;
jpeg12_consume_input @ 40 ;
jpeg12_copy_critical_parameters @ 41 ;
jpeg12_default_colorspace @ 42 ;
jpeg12_default_qtables @ 43 ;
jpeg12_destroy @ 44 ;
jpeg12_destroy_compress @ 45 ;
jpeg12_destroy_decompress @ 46 ;
jpeg12_fdct_float @ 47 ;
jpeg12_fdct_ifast @ 48 ;
jpeg12_fdct_islow @ 49 ;
jpeg12_fill_bit_buffer @ 50 ;
jpeg12_finish_compress @ 51 ;
jpeg12_finish_decompress @ 52 ;
jpeg12_finish_output @ 53 ;
jpeg12_free_large @ 54 ;
jpeg12_free_small @ 55 ;
jpeg12_gen_optimal_table @ 56 ;
jpeg12_get_large @ 57 ;
jpeg12_get_small @ 58 ;
jpeg12_has_multiple_scans @ 59 ;
jpeg12_huff_decode @ 60 ;
jpeg12_idct_1x1 @ 61 ;
jpeg12_idct_2x2 @ 62 ;
jpeg12_idct_4x4 @ 63 ;
jpeg12_idct_float @ 64 ;
jpeg12_idct_ifast @ 65 ;
jpeg12_idct_islow @ 66 ;
jpeg12_input_complete @ 67 ;
jpeg12_make_c_derived_tbl @ 68 ;
jpeg12_make_d_derived_tbl @ 69 ;
jpeg12_mem_available @ 70 ;
jpeg12_mem_init @ 71 ;
jpeg12_mem_term @ 72 ;
jpeg12_new_colormap @ 73 ;
jpeg12_open_backing_store @ 74 ;
jpeg12_quality_scaling @ 75 ;
jpeg12_read_coefficients @ 76 ;
jpeg12_read_header @ 77 ;
jpeg12_read_raw_data @ 78 ;
jpeg12_read_scanlines @ 79 ;
jpeg12_resync_to_restart @ 80 ;
jpeg12_save_markers @ 81 ;
jpeg12_set_colorspace @ 82 ;
jpeg12_set_defaults @ 83 ;
jpeg12_set_linear_quality @ 84 ;
jpeg12_set_marker_processor @ 85 ;
jpeg12_set_quality @ 86 ;
jpeg12_simple_progression @ 87 ;
jpeg12_start_compress @ 88 ;
jpeg12_start_decompress @ 89 ;
jpeg12_start_output @ 90 ;
jpeg12_std_error @ 91 ;
jpeg12_stdio_dest @ 92 ;
jpeg12_stdio_src @ 93 ;
jpeg12_suppress_tables @ 94 ;
jpeg12_write_coefficients @ 95 ;
jpeg12_write_m_byte @ 96 ;
jpeg12_write_m_header @ 97 ;
jpeg12_write_marker @ 98 ;
jpeg12_write_raw_data @ 99 ;
jpeg12_write_scanlines @ 100 ;
jpeg12_write_tables @ 101 ;
j12round_up @ 102 ;
j12zero_far @ 103 ;
jpeg12_skip_scanlines @ 104 ;
jpeg12_crop_scanline @ 105 ;
jpeg12_read_icc_profile @ 106 ;
jpeg12_write_icc_profile @ 107 ;

111
win/jpeg12-8.def Normal file
View File

@@ -0,0 +1,111 @@
EXPORTS
j12copy_block_row @ 1 ;
j12copy_sample_rows @ 2 ;
j12div_round_up @ 3 ;
j12init_1pass_quantizer @ 4 ;
j12init_2pass_quantizer @ 5 ;
j12init_c_coef_controller @ 6 ;
j12init_c_main_controller @ 7 ;
j12init_c_master_control @ 8 ;
j12init_c_prep_controller @ 9 ;
j12init_color_converter @ 10 ;
j12init_color_deconverter @ 11 ;
j12init_compress_master @ 12 ;
j12init_d_coef_controller @ 13 ;
j12init_d_main_controller @ 14 ;
j12init_d_post_controller @ 15 ;
j12init_downsampler @ 16 ;
j12init_forward_dct @ 17 ;
j12init_huff_decoder @ 18 ;
j12init_huff_encoder @ 19 ;
j12init_input_controller @ 20 ;
j12init_inverse_dct @ 21 ;
j12init_marker_reader @ 22 ;
j12init_marker_writer @ 23 ;
j12init_master_decompress @ 24 ;
j12init_memory_mgr @ 25 ;
j12init_merged_upsampler @ 26 ;
j12init_phuff_decoder @ 27 ;
j12init_phuff_encoder @ 28 ;
j12init_upsampler @ 29 ;
jpeg12_CreateCompress @ 30 ;
jpeg12_CreateDecompress @ 31 ;
jpeg12_abort @ 32 ;
jpeg12_abort_compress @ 33 ;
jpeg12_abort_decompress @ 34 ;
jpeg12_add_quant_table @ 35 ;
jpeg12_alloc_huff_table @ 36 ;
jpeg12_alloc_quant_table @ 37 ;
jpeg12_calc_jpeg_dimensions @ 38 ;
jpeg12_calc_output_dimensions @ 39 ;
jpeg12_consume_input @ 40 ;
jpeg12_copy_critical_parameters @ 41 ;
jpeg12_core_output_dimensions @ 42 ;
jpeg12_default_colorspace @ 43 ;
jpeg12_default_qtables @ 44 ;
jpeg12_destroy @ 45 ;
jpeg12_destroy_compress @ 46 ;
jpeg12_destroy_decompress @ 47 ;
jpeg12_fdct_float @ 48 ;
jpeg12_fdct_ifast @ 49 ;
jpeg12_fdct_islow @ 50 ;
jpeg12_fill_bit_buffer @ 51 ;
jpeg12_finish_compress @ 52 ;
jpeg12_finish_decompress @ 53 ;
jpeg12_finish_output @ 54 ;
jpeg12_free_large @ 55 ;
jpeg12_free_small @ 56 ;
jpeg12_gen_optimal_table @ 57 ;
jpeg12_get_large @ 58 ;
jpeg12_get_small @ 59 ;
jpeg12_has_multiple_scans @ 60 ;
jpeg12_huff_decode @ 61 ;
jpeg12_idct_1x1 @ 62 ;
jpeg12_idct_2x2 @ 63 ;
jpeg12_idct_4x4 @ 64 ;
jpeg12_idct_float @ 65 ;
jpeg12_idct_ifast @ 66 ;
jpeg12_idct_islow @ 67 ;
jpeg12_input_complete @ 68 ;
jpeg12_make_c_derived_tbl @ 69 ;
jpeg12_make_d_derived_tbl @ 70 ;
jpeg12_mem_available @ 71 ;
jpeg12_mem_dest @ 72 ;
jpeg12_mem_init @ 73 ;
jpeg12_mem_src @ 74 ;
jpeg12_mem_term @ 75 ;
jpeg12_new_colormap @ 76 ;
jpeg12_open_backing_store @ 77 ;
jpeg12_quality_scaling @ 78 ;
jpeg12_read_coefficients @ 79 ;
jpeg12_read_header @ 80 ;
jpeg12_read_raw_data @ 81 ;
jpeg12_read_scanlines @ 82 ;
jpeg12_resync_to_restart @ 83 ;
jpeg12_save_markers @ 84 ;
jpeg12_set_colorspace @ 85 ;
jpeg12_set_defaults @ 86 ;
jpeg12_set_linear_quality @ 87 ;
jpeg12_set_marker_processor @ 88 ;
jpeg12_set_quality @ 89 ;
jpeg12_simple_progression @ 90 ;
jpeg12_start_compress @ 91 ;
jpeg12_start_decompress @ 92 ;
jpeg12_start_output @ 93 ;
jpeg12_std_error @ 94 ;
jpeg12_stdio_dest @ 95 ;
jpeg12_stdio_src @ 96 ;
jpeg12_suppress_tables @ 97 ;
jpeg12_write_coefficients @ 98 ;
jpeg12_write_m_byte @ 99 ;
jpeg12_write_m_header @ 100 ;
jpeg12_write_marker @ 101 ;
jpeg12_write_raw_data @ 102 ;
jpeg12_write_scanlines @ 103 ;
jpeg12_write_tables @ 104 ;
j12round_up @ 105 ;
j12zero_far @ 106 ;
jpeg12_skip_scanlines @ 107 ;
jpeg12_crop_scanline @ 108 ;
jpeg12_read_icc_profile @ 109 ;
jpeg12_write_icc_profile @ 110 ;

View File

@@ -15,6 +15,16 @@ set_target_properties(@CMAKE_PROJECT_NAME@::jpeg PROPERTIES
list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg )
list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg "${_IMPORT_PREFIX}/lib/jpeg.lib" "${_IMPORT_PREFIX}/bin/jpeg62.dll" )
# Import target "@CMAKE_PROJECT_NAME@::jpeg12" for configuration "Release"
set_property(TARGET @CMAKE_PROJECT_NAME@::jpeg12 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(@CMAKE_PROJECT_NAME@::jpeg12 PROPERTIES
IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/jpeg12.lib"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/jpeg12-62.dll"
)
list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg12 )
list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg12 "${_IMPORT_PREFIX}/lib/jpeg12.lib" "${_IMPORT_PREFIX}/bin/jpeg12-62.dll" )
# Import target "@CMAKE_PROJECT_NAME@::turbojpeg" for configuration "Release"
set_property(TARGET @CMAKE_PROJECT_NAME@::turbojpeg APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(@CMAKE_PROJECT_NAME@::turbojpeg PROPERTIES
@@ -45,5 +55,15 @@ set_target_properties(@CMAKE_PROJECT_NAME@::jpeg-static PROPERTIES
list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg-static )
list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg-static "${_IMPORT_PREFIX}/lib/jpeg-static.lib" )
# Import target "@CMAKE_PROJECT_NAME@::jpeg12-static" for configuration "Release"
set_property(TARGET @CMAKE_PROJECT_NAME@::jpeg12-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(@CMAKE_PROJECT_NAME@::jpeg12-static PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/jpeg12-static.lib"
)
list(APPEND _IMPORT_CHECK_TARGETS @CMAKE_PROJECT_NAME@::jpeg12-static )
list(APPEND _IMPORT_CHECK_FILES_FOR_@CMAKE_PROJECT_NAME@::jpeg12-static "${_IMPORT_PREFIX}/lib/jpeg12-static.lib" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)