# The libjpeg-turbo build system has never supported and will never support
# being integrated into another build system using add_subdirectory(), because
# doing so would require that we (minimally):
#
# 1. avoid using certain CMake variables, such as CMAKE_SOURCE_DIR,
# CMAKE_BINARY_DIR, and CMAKE_PROJECT_NAME;
# 2. avoid using implicit include directories and relative paths;
# 3. optionally provide a way to skip the installation of libjpeg-turbo
# components when the 'install' target is built;
# 4. optionally provide a way to postfix target names, to avoid namespace
# conflicts;
# 5. restructure the top-level CMakeLists.txt so that it properly sets the
# PROJECT_VERSION variable; and
# 6. design automated regression tests to ensure that new commits don't break
# any of the above.
#
# Even if we did all of that, issues would still arise, because it is
# impossible for an upstream build system to anticipate the widely varying
# needs of every downstream build system. That's why the CMake
# ExternalProject_Add() function exists. Downstream projects that wish to
# integrate libjpeg-turbo as a subdirectory should either use
# ExternalProject_Add() or make downstream modifications to the libjpeg-turbo
# build system to suit their specific needs. Please do not file bug reports,
# feature requests, or pull requests regarding this.
if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
message(FATAL_ERROR "The ${CMAKE_PROJECT_NAME} build system cannot be integrated into another build system using add_subdirectory(). Use ExternalProject_Add() instead.")
endif()
# CMake 3.14 and later sets CMAKE_MACOSX_BUNDLE to TRUE by default when
# CMAKE_SYSTEM_NAME is iOS, tvOS, or watchOS, which breaks the libjpeg-turbo
# build. (Specifically, when CMAKE_MACOSX_BUNDLE is TRUE, executables for
# Apple platforms are built as application bundles, which causes CMake to
# complain that our install() directives for executables do not specify a
# BUNDLE DESTINATION. Even if CMake did not complain, building executables as
# application bundles would break our iOS packages.)
set(CMAKE_MACOSX_BUNDLE FALSE)
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY
GENERATOR_IS_MULTI_CONFIG)
# If the GENERATOR_IS_MULTI_CONFIG property doesn't exist (CMake < 3.9), then
# set the GENERATOR_IS_MULTI_CONFIG variable manually if the generator is
# Visual Studio or Xcode (the only multi-config generators in CMake < 3.9).
if(NOT GENERATOR_IS_MULTI_CONFIG AND (MSVC_IDE OR XCODE))
set(GENERATOR_IS_MULTI_CONFIG TRUE)
endif()
# NOTE: On Windows, this does nothing except when using MinGW or Cygwin.
# CMAKE_BUILD_TYPE has no meaning in Visual Studio, and it always defaults to
# Debug when using NMake.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
# When the prefix is /opt/${CMAKE_PROJECT_NAME}, we assume that an "official"
# build is being created, and thus we install things into specific locations.
set(DIRLIST "BINDIR;DATAROOTDIR;DOCDIR;INCLUDEDIR;LIBDIR")
if(UNIX)
list(APPEND DIRLIST "MANDIR")
endif()
foreach(dir ${DIRLIST})
# CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_DOCDIR, CMAKE_INSTALL_INCLUDEDIR,
# CMAKE_INSTALL_LIBDIR, and CMAKE_INSTALL_MANDIR cannot be blank, because
# either CMake will fail to configure the build, or install() will attempt to
# install files to the root directory.
if(NOT dir STREQUAL "DATAROOTDIR" AND NOT CMAKE_INSTALL_${dir})
message(FATAL_ERROR "CMAKE_INSTALL_${dir} cannot be blank")
endif()
report_directory(${dir})
endforeach()
option(ENABLE_SHARED "Build shared libraries" TRUE)
boolean_number(ENABLE_SHARED)
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_ARITH_DEC
"Include arithmetic decoding support when emulating the libjpeg v6b API/ABI"
TRUE)
boolean_number(WITH_ARITH_DEC)
option(WITH_ARITH_ENC
"Include arithmetic encoding support when emulating the libjpeg v6b API/ABI"
TRUE)
boolean_number(WITH_ARITH_ENC)
if(CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
set(WITH_JAVA 0)
else()
option(WITH_JAVA
"Build TurboJPEG Java API and JNI wrapper for the TurboJPEG API library (implies ENABLE_SHARED=1 and WITH_TURBOJPEG=1)"
FALSE)
boolean_number(WITH_JAVA)
endif()
option(WITH_JPEG7
"Emulate libjpeg v7 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)"
FALSE)
boolean_number(WITH_JPEG7)
option(WITH_JPEG8
"Emulate libjpeg v8 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)"
FALSE)
boolean_number(WITH_JPEG8)
option(WITH_SIMD "Include SIMD extensions, if available for this platform"
TRUE)
boolean_number(WITH_SIMD)
option(WITH_TURBOJPEG
"Include the TurboJPEG API library and associated command-line tools/test programs"
TRUE)
boolean_number(WITH_TURBOJPEG)
option(WITH_TOOLS
"Build command-line tools (Disabling this disables WITH_TESTS)" TRUE)
boolean_number(WITH_TOOLS)
option(WITH_TESTS "Enable regression tests, and build associated test programs (WARNING: Disable this at your own risk. If a build is not validated with the regression tests, then it is the responsibility of the builder to ensure, via other means, that the build produces mathematically correct results.)"
TRUE)
boolean_number(WITH_TESTS)
if(NOT WITH_TOOLS)
set(WITH_TESTS 0)
endif()
option(WITH_FUZZ "Build fuzz targets" FALSE)
# Explicitly setting CMAKE_POSITION_INDEPENDENT_CODE=FALSE disables PIC for all
# targets, which will cause the shared library builds to fail. Thus, if shared
# libraries are enabled and CMAKE_POSITION_INDEPENDENT_CODE is explicitly set
# to FALSE, we need to unset it, thus restoring the default behavior
# (automatically using PIC for shared library targets.)
if(DEFINED CMAKE_POSITION_INDEPENDENT_CODE AND
NOT CMAKE_POSITION_INDEPENDENT_CODE AND ENABLE_SHARED)
unset(CMAKE_POSITION_INDEPENDENT_CODE CACHE)
endif()
# This causes SO_MAJOR_VERSION/SO_MINOR_VERSION to reset to defaults if
# WITH_JPEG7 or WITH_JPEG8 has changed.
if((DEFINED WITH_JPEG7_INT AND NOT WITH_JPEG7 EQUAL WITH_JPEG7_INT) OR
(DEFINED WITH_JPEG8_INT AND NOT WITH_JPEG8 EQUAL WITH_JPEG8_INT))
set(FORCE_SO_VERSION "FORCE")
endif()
set(WITH_JPEG7_INT ${WITH_JPEG7} CACHE INTERNAL "")
set(WITH_JPEG8_INT ${WITH_JPEG8} CACHE INTERNAL "")
set(SO_MAJOR_VERSION ${DEFAULT_SO_MAJOR_VERSION} CACHE STRING
"Major version of the libjpeg API shared library (default: ${DEFAULT_SO_MAJOR_VERSION})"
${FORCE_SO_VERSION})
set(SO_MINOR_VERSION ${DEFAULT_SO_MINOR_VERSION} CACHE STRING
"Minor version of the libjpeg API shared library (default: ${DEFAULT_SO_MINOR_VERSION})"
${FORCE_SO_VERSION})
# Because the TurboJPEG API library uses versioned symbols and changes the
# names of functions whenever they are modified in a backward-incompatible
# manner, it is always backward-ABI-compatible with itself, so the major and
# minor SO versions don't change. However, we increase the middle number (the
# SO "age") whenever functions are added to the API, because adding functions
# affects forward API/ABI compatibility.
set(TURBOJPEG_SO_MAJOR_VERSION 0)
# 0: TurboJPEG 1.3.x API
# 1: TurboJPEG 1.4.x API
# The TurboJPEG 1.5.x API modified some of the function prototypes, adding
# the const keyword in front of pointers to unmodified buffers, but that did
# not affect forward API/ABI compatibility.
# 2: TurboJPEG 2.0.x API
# The TurboJPEG 2.1.x API modified the behavior of the tjDecompressHeader3()
# function so that it accepts "abbreviated table specification" (AKA
# "tables-only") datastreams as well as JPEG images, but that did not affect
# forward API/ABI compatibility.
# 3: TurboJPEG 3.0.x API
# 4: TurboJPEG 3.1.x API
set(TURBOJPEG_SO_AGE 4)
set(TURBOJPEG_SO_VERSION 0.${TURBOJPEG_SO_AGE}.0)
if(MSVC_LIKE)
option(WITH_CRT_DLL
"Link all ${CMAKE_PROJECT_NAME} libraries and executables with the C run-time DLL (msvcr*.dll) instead of the static C run-time library (libcmt*.lib.) The default is to use the C run-time DLL only with the libraries and executables that need it."
FALSE)
boolean_number(WITH_CRT_DLL)
if(NOT WITH_CRT_DLL)
# Use the static C library for all build types
if(CMAKE_VERSION VERSION_EQUAL "3.15" OR
CMAKE_VERSION VERSION_GREATER "3.15")
if(CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDebug)
elseif(MSVC_IDE)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
endif()
message(STATUS "Visual C++ run-time library: ${CMAKE_MSVC_RUNTIME_LIBRARY} (WITH_CRT_DLL = ${WITH_CRT_DLL})")
elseif(MSVC)
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
endif()
endforeach()
endif()
endif()
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
# Use the maximum optimization level for release builds
foreach(build_type RELEASE RELWITHDEBINFO)
if(CMAKE_C_FLAGS_${build_type} MATCHES "-O2" AND
CMAKE_C_FLAGS_${build_type}_INITIALIZED_TO_DEFAULT)
string(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_${build_type}
"${CMAKE_C_FLAGS_${build_type}}")
endif()
endforeach()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
if(CMAKE_C_COMPILER_ID MATCHES "SunPro")
# Use the maximum optimization level for release builds
foreach(build_type RELEASE RELWITHDEBINFO)
if(CMAKE_C_FLAGS_${build_type} MATCHES "-xO3" AND
CMAKE_C_FLAGS_${build_type}_INITIALIZED_TO_DEFAULT)
string(REGEX REPLACE "-xO3" "-xO5" CMAKE_C_FLAGS_${build_type}
"${CMAKE_C_FLAGS_${build_type}}")
endif()
if(CMAKE_C_FLAGS_${build_type} MATCHES "-xO2" AND
CMAKE_C_FLAGS_${build_type}_INITIALIZED_TO_DEFAULT)
string(REGEX REPLACE "-xO2" "-xO5" CMAKE_C_FLAGS_${build_type}
"${CMAKE_C_FLAGS_${build_type}}")
endif()
endforeach()
endif()
endif()
if(UNIX)
if(CMAKE_CROSSCOMPILING)
set(RIGHT_SHIFT_IS_UNSIGNED 0)
else()
include(CheckCSourceRuns)
check_c_source_runs("
#include <stdio.h>
#include <stdlib.h>
static int is_shifting_signed (long arg) {
long res = arg >> 4;
if (res == -0x7F7E80CL)
return 1; /* right shift is signed */
/* see if unsigned-shift hack will fix it. */
/* we can't just test exact value since it depends on width of long... */
res |= 0xFFFFFFFFL << (32-4);
if (res == -0x7F7E80CL)
return 0; /* right shift is unsigned */
printf(\"Right shift isn't acting as I expect it to.\\\\n\");
printf(\"I fear the JPEG software will not work at all.\\\\n\\\\n\");
return 0; /* try it with unsigned anyway */
}
int main (void) {
exit(is_shifting_signed(-0x7F7E80B1L));
}" RIGHT_SHIFT_IS_UNSIGNED)
endif()
endif()
if(NOT WIN32)
check_c_source_compiles("extern const int table[1]; const int __attribute__((visibility(\"hidden\"))) table[1] = { 0 }; int main(void) { return table[0]; }"
HIDDEN_WORKS)
if(HIDDEN_WORKS)
set(HIDDEN "__attribute__((visibility(\"hidden\")))")
message(STATUS "HIDDEN = ${HIDDEN}")
endif()
endif()
if(MSVC)
set(THREAD_LOCAL "__declspec(thread)")
else()
set(THREAD_LOCAL "__thread")
endif()
check_c_source_compiles("static ${THREAD_LOCAL} int i; int main(void) { i = 0; return i; }"
HAVE_THREAD_LOCAL)
if(HAVE_THREAD_LOCAL)
message(STATUS "THREAD_LOCAL = ${THREAD_LOCAL}")
else()
message(WARNING "Thread-local storage is not available. The TurboJPEG API library's global error handler will not be thread-safe.")
unset(THREAD_LOCAL)
endif()
if(UNIX AND NOT APPLE)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map "VERS_1 { global: *; };")
set(CMAKE_REQUIRED_FLAGS
"-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
check_c_source_compiles("int main(void) { return 0; }" HAVE_VERSION_SCRIPT)
set(CMAKE_REQUIRED_FLAGS)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
if(HAVE_VERSION_SCRIPT)
message(STATUS "Linker supports GNU-style version scripts")
set(MAPFLAG "-Wl,--version-script,")
set(TJMAPFLAG "-Wl,--version-script,")
else()
message(STATUS "Linker does not support GNU-style version scripts")
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
# The Solaris linker doesn't like our version script for the libjpeg API
# library, but the version script for the TurboJPEG API library should
# still work.
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map
"VERS_1 { global: foo; local: *; }; VERS_2 { global: foo2; } VERS_1;")
set(CMAKE_REQUIRED_FLAGS "-Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/conftest.map -shared")
check_c_source_compiles("int foo() { return 0; } int foo2() { return 2; }"
HAVE_MAPFILE)
set(CMAKE_REQUIRED_FLAGS)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
if(HAVE_MAPFILE)
message(STATUS "Linker supports mapfiles")
set(TJMAPFLAG "-Wl,-M,")
else()
message(STATUS "Linker does not support mapfiles")
endif()
endif()
endif()
endif()
# We have to generate these here, because if the build system tries and fails
# to enable the SIMD extensions, the value of WITH_SIMD will have changed.
configure_file(src/jconfig.h.in jconfig.h)
configure_file(src/jconfigint.h.in jconfigint.h)
# The output of the floating point DCT/IDCT algorithms differs depending on the
# type of floating point math used, so the FLOATTEST8 and FLOATTEST12 CMake
# variables must be set in order to tell the testing system which floating
# point results it should expect:
#
# sse = validate against the expected results from the libjpeg-turbo SSE SIMD
# extensions
# no-fp-contract = validate against the expected results from the C code when
# floating point expression contraction is disabled (the
# default with Clang 13 and earlier, when building for
# platforms that lack fused multiply-add [FMA] instructions,
# or when passing -ffp-contract=off to GCC or Clang)
# fp-contract = validate against the expected results from the C code when
# floating point expression contraction is enabled (the default
# with Clang 14 and later, with GCC when building for platforms
# that have fused multiply-add [FMA] instructions, or when
# passing -ffp-contract=fast to GCC or -ffp-contract=on to Clang)
# 387 = validate against the expected results from the C code when the 387 FPU
# is being used for floating point math (which is generally the default
# with x86 compilers)
# msvc = validate against the expected results from the C code when compiled
# with a 32-bit version of Visual C++ and /arch:IA32 (which was the
# default in Visual C++ 2010 and earlier)
if(CPU_TYPE STREQUAL "x86_64" OR CPU_TYPE STREQUAL "i386")
if(WITH_SIMD)
set(DEFAULT_FLOATTEST8 sse)
elseif(CPU_TYPE STREQUAL "x86_64")
set(DEFAULT_FLOATTEST8 no-fp-contract)
endif()
elseif(CPU_TYPE STREQUAL "powerpc" OR CPU_TYPE STREQUAL "arm64")
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang")
# Xcode 14.3 and later
set(MIN_FP_CONTRACT_VERSION 14.0.1)
else()
set(MIN_FP_CONTRACT_VERSION 14.0.0)
endif()
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL ${MIN_FP_CONTRACT_VERSION} OR
CMAKE_C_COMPILER_VERSION VERSION_GREATER ${MIN_FP_CONTRACT_VERSION})
set(DEFAULT_FLOATTEST8 fp-contract)
else()
set(DEFAULT_FLOATTEST8 no-fp-contract)
endif()
elseif(CMAKE_COMPILER_IS_GNUCC)
set(DEFAULT_FLOATTEST8 fp-contract)
endif()
# else we can't really set an intelligent default for FLOATTEST8. The
# appropriate value could be no-fp-contract, fp-contract, 387, or msvc,
# depending on the compiler and compiler options. We leave it to the user to
# set FLOATTEST8 manually.
endif()
# This causes FLOATTEST8 to reset to the default value if WITH_SIMD has
# changed.
if(DEFINED WITH_SIMD_INT AND NOT WITH_SIMD EQUAL WITH_SIMD_INT)
set(FORCE_FLOATTEST8 "FORCE")
endif()
set(WITH_SIMD_INT ${WITH_SIMD} CACHE INTERNAL "")
set(FLOATTEST8 ${DEFAULT_FLOATTEST8} CACHE STRING
"The type of floating point math used by the 8-bit-per-sample floating point DCT/IDCT algorithms. This tells the testing system which numerical results it should expect from those tests. [sse = ${CMAKE_PROJECT_NAME} x86/x86-64 SIMD extensions, no-fp-contract = generic FPU with floating point expression contraction disabled, fp-contract = generic FPU with floating point expression contraction enabled, 387 = 387 FPU, msvc = 32-bit Visual Studio + 387 FPU] (default = ${DEFAULT_FLOATTEST8})"
${FORCE_FLOATTEST8})
message(STATUS "FLOATTEST8 = ${FLOATTEST8}")
if(FLOATTEST8)
string(TOUPPER ${FLOATTEST8} FLOATTEST8_UC)
string(REGEX REPLACE "-" "_" FLOATTEST8_UC ${FLOATTEST8_UC})
string(TOLOWER ${FLOATTEST8} FLOATTEST8)
if(NOT FLOATTEST8 STREQUAL "sse" AND
NOT FLOATTEST8 STREQUAL "no-fp-contract" AND
NOT FLOATTEST8 STREQUAL "fp-contract" AND NOT FLOATTEST8 STREQUAL "387" AND
NOT FLOATTEST8 STREQUAL "msvc")
message(FATAL_ERROR "\"${FLOATTEST8}\" is not a valid value for FLOATTEST8.")
endif()
endif()
if(CPU_TYPE STREQUAL "x86_64")
set(DEFAULT_FLOATTEST12 no-fp-contract)
elseif(CPU_TYPE STREQUAL "powerpc" OR CPU_TYPE STREQUAL "arm64")
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang")
# Xcode 14.3 and later
set(MIN_FP_CONTRACT_VERSION 14.0.1)
else()
set(MIN_FP_CONTRACT_VERSION 14.0.0)
endif()
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL ${MIN_FP_CONTRACT_VERSION} OR
CMAKE_C_COMPILER_VERSION VERSION_GREATER ${MIN_FP_CONTRACT_VERSION})
set(DEFAULT_FLOATTEST12 fp-contract)
else()
set(DEFAULT_FLOATTEST12 no-fp-contract)
endif()
elseif(CMAKE_COMPILER_IS_GNUCC)
set(DEFAULT_FLOATTEST12 fp-contract)
endif()
# else we can't really set an intelligent default for FLOATTEST12. The
# appropriate value could be no-fp-contract, fp-contract, or something else,
# depending on the compiler and compiler options. We leave it to the user to
# set FLOATTEST12 manually.
endif()
set(FLOATTEST12 ${DEFAULT_FLOATTEST12} CACHE STRING
"The type of floating point math used by the 12-bit-per-sample floating point DCT/IDCT algorithms. This tells the testing system which numerical results it should expect from those tests. [sse = ${CMAKE_PROJECT_NAME} x86/x86-64 SIMD extensions, no-fp-contract = generic FPU with floating point expression contraction disabled, fp-contract = generic FPU with floating point expression contraction enabled, 387 = 387 FPU, msvc = 32-bit Visual Studio + 387 FPU] (default = ${DEFAULT_FLOATTEST12})")
message(STATUS "FLOATTEST12 = ${FLOATTEST12}")
if(FLOATTEST12)
string(TOUPPER ${FLOATTEST12} FLOATTEST12_UC)
string(REGEX REPLACE "-" "_" FLOATTEST12_UC ${FLOATTEST12_UC})
string(TOLOWER ${FLOATTEST12} FLOATTEST12)
if(NOT FLOATTEST12 STREQUAL "sse" AND
NOT FLOATTEST12 STREQUAL "no-fp-contract" AND
NOT FLOATTEST12 STREQUAL "fp-contract" AND
NOT FLOATTEST12 STREQUAL "387" AND
NOT FLOATTEST12 STREQUAL "msvc")
message(FATAL_ERROR "\"${FLOATTEST12}\" is not a valid value for FLOATTEST12.")
endif()
endif()
# These tests are carefully crafted to provide full coverage of as many of
# the underlying algorithms as possible (including all of the
# SIMD-accelerated ones.)
# Lossless (all arguments other than -lossless and -restart should have no
# effect)
add_bittest(cjpeg16 lossless
"-lossless;4;-restart;1;-quality;1;-grayscale;-optimize;-dct;float;-smooth;100;-baseline;-qslots;1,0,0;-sample;1x2,3x4,2x1"
testout16_lossless.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_LOSSLESS})
add_bittest(djpeg16 lossless
"-fast;-scale;1/8;-dct;float;-dither;none;-nosmooth;-onepass"
testout16_lossless.ppm testout16_lossless.jpg
${MD5_PPM_LOSSLESS} cjpeg16-${libtype}-lossless)
# Lossless (all arguments other than -lossless and -restart should have no
# effect)
add_bittest(${cjpeg} lossless
"-lossless;4;-restart;1;-quality;1;-grayscale;-optimize;-dct;float;-smooth;100;-baseline;-qslots;1,0,0;-sample;1x2,3x4,2x1"
${testout}_lossless.jpg ${TESTIMAGES}/testorig.ppm
${MD5_JPEG_LOSSLESS})
add_bittest(${djpeg} lossless
"-fast;-scale;1/8;-dct;float;-dither;none;-nosmooth;-onepass"
${testout}_lossless.ppm ${testout}_lossless.jpg
${MD5_PPM_LOSSLESS} ${cjpeg}-${libtype}-lossless)
# Partial decode tests. These tests are designed to cover all of the
# possible code paths in jpeg_skip_scanlines().
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.