Commit Graph

104 Commits

Author SHA1 Message Date
DRC
60ba1963fe Make TJCompressor.close() and TJDecompressor.close() idempotent
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1415 632fc199-4ca6-4c93-a231-07263d6284db
2014-11-18 21:45:02 +00:00
DRC
c62f3f40be Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.) Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1373 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-22 03:00:37 +00:00
DRC
ce6f3d8cd2 Refactored YUVImage Java class so that it supports both unified YUV image buffers as well as separate YUV image planes; modified the JNI functions accordingly and added new helper functions to the TurboJPEG C API (tjPlaneWidth(), tjPlaneHeight(), tjPlaneSizeYUV()) to facilitate those modifications; changed potentially confusing "component width" and "component height" terms to "plane width" and "plane height" and modified variable names in turbojpeg.c to reflect this; numerous other documentation tweaks
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1360 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-17 12:23:49 +00:00
DRC
ba67ec6270 Fix build broken by r1349
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1351 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:40:36 +00:00
DRC
7def1fcf5b Restore backward compatibility between libjpeg-turbo 1.3.x JAR and the new JNI library
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1349 632fc199-4ca6-4c93-a231-07263d6284db
2014-08-15 14:01:21 +00:00
DRC
22505838cb Clean up and consolidate notes regarding the YUV image format. This also corrects a factual error regarding the padding of the luminance plane-- because we now support 4:1:1, the component width is not necessarily padded to the nearest multiple of 2 if horizontal subsampling is used. 2014-08-10 20:12:17 +00:00
DRC
0d25e86574 Remove trailing spaces (+ one additional tab in TJUnitTest.java that was missed in the previous commit) 2014-05-09 18:06:58 +00:00
DRC
87768cc42c Fix Windows build 2014-03-22 23:03:03 +00:00
DRC
c4f4d18352 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 2014-03-17 11:14:52 +00:00
DRC
5bfddde8fd Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet; formatting tweak 2014-03-17 10:19:42 +00:00
DRC
b7d9250185 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. 2014-03-17 10:13:17 +00:00
DRC
821a20d0e8 Generate the Java documentation using javadoc 7, to improve readability. 2014-03-16 23:12:25 +00:00
DRC
a35cc3acf8 This should have been checked in with the previous commit. 2014-03-16 22:59:51 +00:00
DRC
9e9df11625 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 2014-03-16 22:56:26 +00:00
DRC
80d2fe24c8 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. 2014-03-14 08:53:33 +00:00
DRC
b0073a2851 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. 2014-03-14 04:32:03 +00:00
DRC
68a89e0170 Formatting tweak 2014-03-14 04:27:03 +00:00
DRC
e4552b8143 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. 2014-03-11 06:24:46 +00:00
DRC
040c688263 Fix an issue that prevented tjEncodeYUV3() and TJCompressor.encodeYUV() from working properly if the source image was very tiny. Basically, jpeg_start_compress() was attempting to write the JPEG headers, which was overrunning the YUV buffer. This patch removes the call to jpeg_start_compress() in tjEncodeYUV3() and replaces it with calls to the individual routines that are necessary to initialize the color converter and downsampler. TJUnitTest has also been modified to test for this condition (the buffer size regression test now works in YUV mode.) 2014-02-11 09:45:18 +00:00
DRC
540789427c Per the conventions of the image compression and digital video communities, use "YCbCr" to describe the JPEG colorspace and "YUV" to describe an image format consisting of Y, Cb, and Cr planes (this partially reverts r960.) 2013-11-25 21:12:23 +00:00
DRC
3b80b515fe Add the ability to test scaling when decompressing to YUV; compression from YUV to JPEG; and YUV padding. Replace clunky -411 and -440 parameters with a -subsamp parameter that allows any of the subsampling options to be tested in isolation. 2013-11-05 19:53:12 +00:00
DRC
b767b5e6bb Deprecate and undocument the FORCE{MMX|SSE|SSE2|SSE3} flags. These were originally introduced in TurboJPEG/IPP as a way to override the automatic CPU selection in the underlying IPP codec, which was closed source. They are not meaningful anymore, since libjpeg-turbo provides environment variables to accomplish the same thing and since it no longer necessarily uses x86 SIMD code behind the scenes. 2013-10-31 07:11:39 +00:00
DRC
a7fa97cda5 Extend the TurboJPEG Java API to support compressing JPEG images from YUV planar images 2013-10-31 05:04:51 +00:00
DRC
ae0631474a Oops. Forgot to implement access method for the colorspace & extend TJBench 2013-08-23 07:13:59 +00:00
DRC
ff3d754f29 Wordsmithing 2013-08-23 06:38:59 +00:00
DRC
0fb3247f9a Add CMYK support to the TurboJPEG Java API & clean up a few things in the C API 2013-08-23 04:45:43 +00:00
DRC
45b2cca4c0 Add 4:1:1 subsampling support in the TurboJPEG Java API 2013-08-18 11:04:21 +00:00
DRC
2296d513c1 Add note regarding the fact that 4:4:0 lacks full SIMD support; Add an option for benchmarking 4:4:0 subsampling in TJBench; Wordsmithing; Disable timestamp in generated HTML files to make diffing and merging easier 2013-08-18 10:39:30 +00:00
DRC
22be928d5a Fix incorrect data output and buffer overruns in the new tjDecompressToYUV2() function whenever scaling is used along with a 4:2:0 JPEG image; extend tjunittest and TJUnitTest to test for these issues. 2013-05-07 21:17:35 +00:00
DRC
6586b254ee Clean up the output of tjunittest and TJUnitTest 2013-05-04 23:41:33 +00:00
DRC
4fcdeb795d Extend the TurboJPEG Java API to support generating YUV images with arbitrary padding and to support image scaling when decompressing to YUV 2013-04-28 01:32:52 +00:00
DRC
771fbdeb99 Fix backward compatibility between the Java classes and the 1.2.x JNI library (as long as the 1.3 Java features are not used.) 2013-04-27 23:25:17 +00:00
DRC
7440604f2b Correct misuse of the word "pitch" + more code formatting tweaks 2013-04-27 20:55:45 +00:00
DRC
aaa5ae742a Code formatting tweaks 2013-04-27 12:38:20 +00:00
DRC
2f83944e9b Java doc tweaks 2013-04-27 01:08:55 +00:00
DRC
0803520704 Minor doc tweaks + ChangeLog update 2013-04-24 06:40:25 +00:00
DRC
61130e332a In order to avoid a functional regression with previous releases, the JAR file needs to be able to load either the 64-bit or 32-bit JNI library on Un*x systems. 2013-04-24 06:21:24 +00:00
DRC
3d625746d4 Move the TurboJPEG DLLs back into the system directory on Windows platforms. For Windows, it doesn't really simplify the build system to install these libraries in c:\libjpeg-turbo*, and it introduces potential problems with loading the JNI library. Specifically, if a user linked their Java app against the 64-bit libjpeg-turbo SDK and then used a 32-bit JVM at run time, they would not be able to load the 32-bit turbojpeg.dll without manipulating java.library.path or the PATH environment (and vice versa for building against the 32-bit libjpeg-turbo SDK and using a 64-bit JVM at run time.) 2013-04-24 05:26:42 +00:00
DRC
b8614f5d9f Older versions of automake don't support multiple _JAVA primaries, but we don't actually have to specify a "dist" primary, since the Java sources are already included under EXTRA_DIST. 2013-04-24 03:36:30 +00:00
DRC
931a4929bb Fix 'make dist' 2013-04-24 03:15:23 +00:00
DRC
2de2cf9e54 Further enhancements/fixes to the packaging system:
-- The Mac and Cygwin packages will now be created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc., with the exception that the docs are always installed under /usr/share/doc/{package_name}-{version} on Cygwin and /Library/Documentation/{package_name} on Mac.
-- Fixed a duplicate filename warning when generating RPMs with the default prefix of /opt/libjpeg-turbo.
-- Moved the TurboJPEG libraries out of the system directory on Windows and Mac.  It is no longer necessary to put them there, since we are not trying to be backward compatible with TurboJPEG/IPP anymore.
-- Fixed an issue whereby building the "installer" target on Windows would not build the Java JAR file, thus causing an error if the JAR had not been previously built.
-- Building the "install" target on Windows will now install libjpeg-turbo into c:\libjpeg-turbo[-gcc][64] (the same directories used by the installers.)  This can be overridden by setting CMAKE_INSTALL_PREFIX.
-- The Java classes on all platforms will now look for the JNI library in the directory under which the build/packaging system installs it.
2013-04-23 22:29:00 +00:00
DRC
f42e2be51a Overhaul Linux/Unix packaging system, primarily to avoid conflicts with vendor-supplied libjpeg-turbo packages (such as in Fedora and RHEL 6.) This also streamlines the packaging system somewhat, since it is no longer necessary to move the TurboJPEG libraries into the system library directory. Relocating those libraries was originally done to provide backward compatibility with TurboJPEG/IPP, but that package is long obsolete, and the software that formerly used it has been linking statically with libjpeg-turbo for quite some time.
If the default prefix (/opt/libjpeg-turbo) is used, then we now always install 32-bit libraries in /opt/libjpeg-turbo/lib32 and 64-bit libraries in /opt/libjpeg-turbo/lib64 instead of trying to conform to the Debian or Red Hat conventions.  The RPM and DEB packages will now be created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc., with the exception that the docs are always installed under /usr/share/doc/{package_name}-{version}.
2013-04-19 04:25:14 +00:00
DRC
9f8a003137 Eliminated the awkward and confusing "TurboJPEG/OSS" designation, since there are no other active implementations of the TurboJPEG API anymore; don't refer to the libjpeg API library as "libjpeg-turbo" anymore, since that can be confusing; ARM v7s build instructions 2013-01-21 23:42:12 +00:00
DRC
fc9fec465f ImageIO.read() returns null if the input image type is not supported (which occurs when trying to read a PPM file), so output a friendly error instead of letting the next line throw a null pointer exception. 2013-01-19 06:43:27 +00:00
DRC
70d3c1aeec Add a Java version of TJBench and extend the TurboJPEG Java API to support it (this involved adding a polymorphic method in TJCompressor that accepts x and y offsets into a larger buffer, similar to the previous modification that had been done to TJDecompressor.) 2012-09-24 02:27:55 +00:00
DRC
a6c9eaf155 If libturbojpeg.jnilib is not found on Mac systems, specifically look for it under /usr/lib, since /usr/lib isn't part of the default java.library.path on that platform. 2012-08-24 02:44:39 +00:00
DRC
019d51d4f1 Add flags to the TurboJPEG API that allow the caller to force the use of either the fast or the accurate DCT/IDCT algorithms in the underlying codec. 2012-06-29 23:46:38 +00:00
DRC
448d12d298 Add x, y parameters to TJDecompressor so that it can be used to decompress to an arbitrary position in the destination image (TurboVNC needs this.) 2012-06-06 08:41:06 +00:00
DRC
6de1345133 Fix the behavior of the alpha-enabled colorspace constants whenever libjpeg-turbo is built without SIMD support and merged upsampling is used. 2012-03-16 14:30:46 +00:00
DRC
c1e4151607 Added new alpha channel colorspace constants/pixel formats, so applications can specify that they need the unused byte in a 4-component RGB output buffer set to 0xFF when decompressing. 2011-12-19 02:21:03 +00:00