DRC [Tue, 6 May 2014 21:03:35 +0000 (21:03 +0000)]
Replace our custom version of Android.mk with instructions on how to build a libjpeg-turbo SDK for Android using autotools. Upon consulting with AOSP, it appears that Android.mk isn't really necessary except when building libjpeg-turbo for use by the Android platform itself, and it makes more sense for them to maintain the makefile for that purpose rather than for it to be upstreamed. ndk-build has serious limitations that prevent it from being used to generate static libjpeg-turbo libraries (mainly, it isn't possible to combine pre-built objects from one module into a static library for another module, which is necessary because the SIMD extensions sometimes have to be built with different CFLAGS than the rest of the code.) In general, it's just better not to introduce a new build system.
We use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro) rather than CHAR_IS_UNSIGNED (defined by custom autoconf code in libjpeg that we didn't port over), although I doubt it matters on any of the platforms we support.
We use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro) rather than CHAR_IS_UNSIGNED (defined by custom autoconf code in libjpeg that we didn't port over), although I doubt it matters on any of the platforms we support.
This patch accomplishes the following:
-- Auto-generates HAVE_LOCALE_H macro and adds it to jconfig.h (this is used by rdjpgcom.c.)
-- Reconciles the description and ordering of macros between config.h.in and jconfig.h.in, so the two files can be easily diffed.
-- Eliminates the use of the autoheader-generated config.h in the project and moves relevant internal-only macros into a new file, jconfigint.h. This is to avoid "already defined" warnings in files that were including both config.h (to get the internal autotools package information or the INLINE definition) and jconfig.h.
This patch accomplishes the following:
-- Auto-generates HAVE_LOCALE_H macro and adds it to jconfig.h (this is used by rdjpgcom.c.)
-- Reconciles the description and ordering of macros between config.h.in and jconfig.h.in, so the two files can be easily diffed.
-- Eliminates the use of the autoheader-generated config.h in the project and moves relevant internal-only macros into a new file, jconfigint.h. This is to avoid "already defined" warnings in files that were including both config.h (to get the internal autotools package information or the INLINE definition) and jconfig.h.
Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!) Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be. At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.
Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!) Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be. At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.
Work around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap test in the regression tests to fail. More specifically, when optimization is enabled in these versions of Visual C++, the optimizer seems to get confused by the following code block:
Each time cur0 is incremented by delta, the compiled code doubles the value of delta (WTF?!) Thus, by the time the end of the block is reached, cur0 is equal to 15 times its former self, not 7 times its former self as it should be. At any rate, it was a lot simpler to just refactor the code so that it uses multiplication.
Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance); Only set CMP0022 if it is supported (older CMake implementations don't support it); Remove trailing spaces
Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance); Only set CMP0022 if it is supported (older CMake implementations don't support it); Remove trailing spaces
DRC [Fri, 28 Mar 2014 18:50:30 +0000 (18:50 +0000)]
Integrate a slightly modified version of Mozilla's patch for precomputing the bit-counting LUT. This is useful if the table needs to be shared among multiple processes, although the primary reason for doing that is reduced footprint on mobile devices, which are probably already covered by the clz intrinsic code.
DRC [Thu, 27 Mar 2014 20:47:39 +0000 (20:47 +0000)]
Modify svn:ignore so that it lists only files generated in-tree by autoreconf -fiv. It's pretty much impossible to maintain an up-to-date list of files generated by the actual build, so we'll just assume that the user will do an out-of-tree build if they want to avoid cluttering up their 'svn status' display.
DRC [Thu, 27 Mar 2014 20:43:57 +0000 (20:43 +0000)]
Modify svn:ignore so that it lists only files generated in-tree by autoreconf -fiv. It's pretty much impossible to maintain an up-to-date list of files generated by the actual build, so we'll just assume that the user will do an out-of-tree build if they want to avoid cluttering up their 'svn status' display.
DRC [Thu, 27 Mar 2014 03:36:04 +0000 (03:36 +0000)]
Make iOS build instructions more generic and applicable to all versions of Xcode; modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1.
DRC [Thu, 27 Mar 2014 03:35:21 +0000 (03:35 +0000)]
Make iOS build instructions more generic and applicable to all versions of Xcode; modify iOS build procedure for Xcode 5.0 and later to fix a build issue with Xcode 5.1.
DRC [Sun, 23 Mar 2014 18:06:11 +0000 (18:06 +0000)]
Remove any claims of support for OS X 10.4 "Tiger" (the packaging system overhaul produces packages that require Leopard or later, and I haven't been able to test Tiger for years anyhow.) Update TurboJPEG shared library version.
DRC [Sun, 23 Mar 2014 15:21:20 +0000 (15:21 +0000)]
Remove the sections about replacing libjpeg at run time and compile time. These were written before O/S distributions started shipping libjpeg-turbo, and they are either pedantic or no longer relevant. Also remove any text that assumes the use of our official project binaries. Notes specific to the official binaries have been moved into the project wiki.
DRC [Sat, 22 Mar 2014 20:51:38 +0000 (20:51 +0000)]
Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository.
DRC [Fri, 21 Mar 2014 23:34:53 +0000 (23:34 +0000)]
Since we're now maintaining our own Cygwin pseudo-repository directories instead of recommending that users install these packages from a local source, it makes more sense to name the packages according to Cygwin specs, so they can be copied as-is into the pseudo-repository.
DRC [Fri, 21 Mar 2014 11:01:00 +0000 (11:01 +0000)]
RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir. Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it.
DRC [Fri, 21 Mar 2014 11:00:00 +0000 (11:00 +0000)]
RHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc, which screws things up, since we're overriding _datadir. Since we intend _defaultdocdir to be /usr/share/doc, just be explicit about it.
DRC [Mon, 17 Mar 2014 11:14:52 +0000 (11:14 +0000)]
Extend YUVImage class to allow reuse of the same buffer with different metadata; port TJBench changes that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; add YUV encode/decode tests to the Java version of tjbenchtest
DRC [Mon, 17 Mar 2014 10:13:17 +0000 (10:13 +0000)]
Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
DRC [Mon, 17 Mar 2014 10:12:11 +0000 (10:12 +0000)]
Move the garbage collection of the JPEG tiles into the decompression function to increase the chances that tiled decompression of large images will succeed without an OutOfMemoryError.
DRC [Sun, 16 Mar 2014 22:56:26 +0000 (22:56 +0000)]
Extend the YUV decode functionality to the TurboJPEG Java API, and port the TJUnitTest modifications that treat YUV encoding/decoding as an intermediate step of the JPEG compression/decompression pipeline rather than a separate test case; Add the ability to encode YUV images from an arbitrary position in a large image buffer; Significantly refactor the handling of YUV images; numerous doc tweaks; other Java API cleanup and usability improvements
DRC [Sat, 15 Mar 2014 13:25:11 +0000 (13:25 +0000)]
Add @Deprecated to the deprecated Java methods, so javac will actually print deprecation warnings, as opposed to just listing the methods as deprecated in javadoc; remove the use of the deprecated methods by our own test programs.
DRC [Sat, 15 Mar 2014 08:48:53 +0000 (08:48 +0000)]
As with tjDecompressToYUV*(), tjCompressFromYUV() also conditionally uses an intermediate buffer if the source image dimensions do not fall on MCU boundaries.
DRC [Fri, 14 Mar 2014 08:53:33 +0000 (08:53 +0000)]
Streamline the BufferedImage functionality in the compressor so that it works the same way as compressing a "normal" image, and deprecate the old BufferedImage methods and other redundant methods. Eliminate the use of deprecated features in the test programs.
DRC [Fri, 14 Mar 2014 04:32:03 +0000 (04:32 +0000)]
Remove benchmarks. They were originally intended as a way of measuring overhead for small compress/decompress operations, but using TJBench with a small image is a better way to accomplish that.
DRC [Thu, 13 Mar 2014 21:19:12 +0000 (21:19 +0000)]
Actually, the issue with nightshot_iso_100 is unrelated to the image size. Reducing the size to 128x95, the same size as vgl_6548_0026, does not eliminate the problem. The issue seems to always occur when decompression scaling is enabled. It is unclear at this point whether this is a bug or expected behavior, but the pixels generated by the split decompression functions appear correct. They are just slightly different (but not visibly so) from the pixels generated by the monolithic decompression function.
DRC [Thu, 13 Mar 2014 20:33:43 +0000 (20:33 +0000)]
If we have transformed a 4:2:2 or 4:4:0 image in any way that transposes the horizontal and vertical dimensions, then we need to inform the decompression function that the subsampling type has changed. Otherwise, tjDecodeYUV() will not produce correct results.
DRC [Wed, 12 Mar 2014 06:51:39 +0000 (06:51 +0000)]
Since we now have a complete set of YUV functions, TJBench can be greatly simplified. It now tests YUV encoding/decoding as an intermediate step of JPEG compression/decompression, which eliminates the need for a separate YUV mode. Several other things have been streamlined in the process.
DRC [Tue, 11 Mar 2014 08:28:47 +0000 (08:28 +0000)]
Back-port the -subsamp option from 1.4 rather than use the hackish approach of replacing 4:2:2 with 4:4:0. This has the added advantage of allowing the user to test only a specific level of subsampling.
DRC [Tue, 11 Mar 2014 06:24:46 +0000 (06:24 +0000)]
Fix the build of the Java classes when using MSVC 2010 and later. Something in the recesses of my brain is telling me that I tried this before and it failed under some circumstances, but it must have been a bug in an older CMake implementation. CMake 2.8.8 and later seem to work fine with this patch. This patch also updates the minimum required version to 2.8.8, because 2.8.8 fixed another issue that was preventing the SIMD code from building under MSVC 2010 and later.
DRC [Tue, 11 Mar 2014 06:21:46 +0000 (06:21 +0000)]
Fix the build of the Java classes when using MSVC 2010 and later. Something in the recesses of my brain is telling me that I tried this before and it failed under some circumstances, but it must have been a bug in an older CMake implementation. CMake 2.8.8 and later seem to work fine with this patch. This patch also updates the minimum required version to 2.8.8, because 2.8.8 fixed another issue that was preventing the SIMD code from building under MSVC 2010 and later.