[6] All symbols in the libjpeg-turbo dynamic library are now versioned, even
when the library is built with libjpeg v6b emulation.
-[7] Added arithmetic encoding and decoding support.
+[7] Added arithmetic encoding and decoding support (can be disabled via
+configure options)
Significant changes since 1.0.0
HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h
-libjpeg_la_SOURCES = $(HDRS) jaricom.c jcapimin.c jcapistd.c jcarith.c \
- jccoefct.c jccolor.c jcdctmgr.c jchuff.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 jdarith.c \
- jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.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
+libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
+ jcdctmgr.c jchuff.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 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
+
+if WITH_ARITH
+
+libjpeg_la_SOURCES += jaricom.c
+
+endif
+
+if WITH_ARITH_ENC
+
+libjpeg_la_SOURCES += jcarith.c
+
+endif
+
+if WITH_ARITH_DEC
+
+libjpeg_la_SOURCES += jdarith.c
+
+endif
libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpegl.c turbojpeg.h \
turbojpeg-mapfile
endif
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg
cmp $(srcdir)/testimg.bmp testout.bmp
+if WITH_ARITH_ENC
./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testorig.ppm
cmp $(srcdir)/testimgari.jpg testoutari.jpg
+ ./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimgint.jpg
+ cmp $(srcdir)/testimgari.jpg testouta.jpg
+endif
+if WITH_ARITH_DEC
./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimgari.jpg
cmp $(srcdir)/testimgari.ppm testoutari.ppm
- ./jpegtran -arithmetic -outfile testouta.jpg testoutint.jpg
- cmp $(srcdir)/testimgari.jpg testouta.jpg
- ./jpegtran -outfile testouta.jpg testoutari.jpg
+ ./jpegtran -outfile testouta.jpg $(srcdir)/testimgari.jpg
cmp $(srcdir)/testimgint.jpg testouta.jpg
+endif
./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testorig.ppm
cmp $(srcdir)/testimgp.jpg testoutp.jpg
./jpegtran -outfile testoutt.jpg testoutp.jpg
-- libjpeg: Fancy downsampling in compressor
cinfo.do_fancy_downsampling is silently ignored.
--- libjpeg: Arithmetic coding/decoding
- Not supported due to patent concerns.
-
-- jpegtran: Scaling
Seems to depend on the DCT scaling feature, which isn't supported.
AC_SUBST(VERSION_SCRIPT_FLAG)
AC_SUBST(ANON_VERSION_SCRIPT_FLAG)
+AC_MSG_CHECKING([whether to use arithmetic encoding])
+AC_ARG_WITH([arith-enc],
+ AC_HELP_STRING([--without-arith-enc], [Omit arithmetic encoding support]))
+if test "x$with_arith_enc" = "xno"; then
+ AC_MSG_RESULT(no)
+else
+ AC_DEFINE([C_ARITH_CODING_SUPPORTED], [1], [Support arithmetic encoding])
+ AC_MSG_RESULT(yes)
+fi
+AM_CONDITIONAL([WITH_ARITH_ENC], [test "x$with_arith_enc" != "xno"])
+
+AC_MSG_CHECKING([whether to use arithmetic decoding])
+AC_ARG_WITH([arith-dec],
+ AC_HELP_STRING([--without-arith-dec], [Omit arithmetic decoding support]))
+if test "x$with_arith_dec" = "xno"; then
+ AC_MSG_RESULT(no)
+else
+ AC_DEFINE([D_ARITH_CODING_SUPPORTED], [1], [Support arithmetic decoding])
+ AC_MSG_RESULT(yes)
+fi
+AM_CONDITIONAL([WITH_ARITH_DEC], [test "x$with_arith_dec" != "xno"])
+
+AM_CONDITIONAL([WITH_ARITH], [test "x$with_arith_dec" != "xno" -o "x$with_arith_enc" != "xno"])
+
# SIMD is optional
AC_ARG_WITH([simd],
AC_HELP_STRING([--without-simd],[Omit accelerated SIMD routines.]))
*/
#define JPEG_LIB_VERSION 62 /* Version 6b */
+/* Support arithmetic encoding */
+#undef C_ARITH_CODING_SUPPORTED
+
+/* Support arithmetic decoding */
+#undef D_ARITH_CODING_SUPPORTED
+
/* Define if your compiler supports prototypes */
#undef HAVE_PROTOTYPES
/* For maintenance convenience, list is alphabetical by message code name */
JMESSAGE(JERR_ARITH_NOTIMPL,
- "Sorry, there are legal restrictions on arithmetic coding")
+ "Sorry, arithmetic coding is not implemented")
JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix")
JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix")
JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode")
/* Encoder capability options: */
-#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
/* Decoder capability options: */
-#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */