]> granicus.if.org Git - libjpeg-turbo/log
libjpeg-turbo
8 years agoMerge branch '1.2.x' into 1.3.x 1.3.x
DRC [Fri, 5 Feb 2016 00:46:13 +0000 (18:46 -0600)]
Merge branch '1.2.x' into 1.3.x

8 years agoPrevent overread when decoding malformed JPEG 1.2.x
DRC [Fri, 5 Feb 2016 00:34:38 +0000 (18:34 -0600)]
Prevent overread when decoding malformed JPEG

The accelerated Huffman decoder was previously invoked if there were
> 128 bytes in the input buffer.  However, it is possible to construct a
JPEG image with Huffman blocks > 430 bytes in length
(http://stackoverflow.com/questions/2734678/jpeg-calculating-max-size).
While such images are pathological and could never be created by a
JPEG compressor, it is conceivable that an attacker could use such an
artifially-constructed image to trigger an input buffer overrun in the
libjpeg-turbo decompressor and thus gain access to some of the data on
the calling program's heap.

This patch simply increases the minimum buffer size for the accelerated
Huffman decoder to 512 bytes, which should (hopefully) accommodate any
possible input.

This addresses a major issue (LJT-01-005) identified in a security audit
by Cure53.

9 years agoUpdate x86[-64] assembler recommendations
DRC [Tue, 4 Aug 2015 04:58:40 +0000 (23:58 -0500)]
Update x86[-64] assembler recommendations
NASM 2.11.08 has a bug that prevents it from properly assembling a
macho64 version of libjpeg-turbo (the resulting binary generates corrupt
images.)  2.11.09 works properly.  YASM also works properly and has been
a supported alternative since libjpeg-turbo 1.2.

9 years agoUpdate x86[-64] assembler recommendations
DRC [Tue, 4 Aug 2015 04:56:09 +0000 (23:56 -0500)]
Update x86[-64] assembler recommendations
NASM 2.11.08 has a bug that prevents it from properly assembling a
macho64 version of libjpeg-turbo (the resulting binary generates corrupt
images.)  2.11.09 works properly.  YASM also works properly and has been
a supported alternative since libjpeg-turbo 1.2.

9 years agoFix rare bug: right shift by a negative # of bits
DRC [Tue, 21 Jul 2015 21:43:39 +0000 (16:43 -0500)]
Fix rare bug: right shift by a negative # of bits
Under very rare circumstances, decompressing specific corrupt JPEG
images would create a situation whereby GET_BITS(1) was invoked
from within HUFF_DECODE_FAST() when bits_left=0. This produced a right
shift by a negative number of bits, which is undefined in C.

9 years agoFix rare bug: right shift by a negative # of bits
DRC [Tue, 21 Jul 2015 21:43:39 +0000 (16:43 -0500)]
Fix rare bug: right shift by a negative # of bits
Under very rare circumstances, decompressing specific corrupt JPEG
images would create a situation whereby GET_BITS(1) was invoked
from within HUFF_DECODE_FAST() when bits_left=0. This produced a right
shift by a negative number of bits, which is undefined in C.

9 years agoConvert svn:ignore properties to .gitignore
DRC [Mon, 27 Jul 2015 08:50:34 +0000 (03:50 -0500)]
Convert svn:ignore properties to .gitignore

9 years agoConvert svn:ignore properties to .gitignore 1.1.x
DRC [Mon, 27 Jul 2015 08:50:34 +0000 (03:50 -0500)]
Convert svn:ignore properties to .gitignore

9 years agoConvert svn:ignore properties to .gitignore 1.0.x
DRC [Mon, 27 Jul 2015 08:50:34 +0000 (03:50 -0500)]
Convert svn:ignore properties to .gitignore

9 years agoConvert svn:ignore properties to .gitignore
DRC [Mon, 27 Jul 2015 08:50:34 +0000 (03:50 -0500)]
Convert svn:ignore properties to .gitignore

9 years agoOops. Need to set the alpha channel when using TYPE_4BYTE_ABGR*. This has no bearin...
DRC [Tue, 27 Jan 2015 21:00:22 +0000 (21:00 +0000)]
Oops.  Need to set the alpha channel when using TYPE_4BYTE_ABGR*.  This has no bearing on the actual tests, but it prevents the PNG pre-encode reference images for those tests from being blank.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1526 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix Huffman local buffer overrun discovered by Debian developers when attempting...
DRC [Sat, 22 Nov 2014 22:24:41 +0000 (22:24 +0000)]
Fix Huffman local buffer overrun discovered by Debian developers when attempting to transform a junk image using ImageMagick:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768369

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1427 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoMake TJCompressor.close() and TJDecompressor.close() idempotent
DRC [Fri, 21 Nov 2014 15:35:33 +0000 (15:35 +0000)]
Make TJCompressor.close() and TJDecompressor.close() idempotent

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1420 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoSometimes the sampling factors in grayscale images can be > 1 (for instance, if compr...
DRC [Fri, 21 Nov 2014 15:33:19 +0000 (15:33 +0000)]
Sometimes the sampling factors in grayscale images can be > 1 (for instance, if compressing using 'cjpeg -sample 2x2 -grayscale'.)  Technically, sampling factors have no meaning with grayscale JPEGs, and the libjpeg decompressor ignores them in that case.  Thus, the TurboJPEG decompressor should ignore them as well.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1419 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix build on OS X PowerPC platforms
DRC [Sat, 30 Aug 2014 13:55:08 +0000 (13:55 +0000)]
Fix build on OS X PowerPC platforms

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1397 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoEnsure that tjFree() is used for any JPEG buffers that might have been dynamically...
DRC [Fri, 22 Aug 2014 19:59:51 +0000 (19:59 +0000)]
Ensure that tjFree() is used for any JPEG buffers that might have been dynamically allocated by the compress/transform functions.  To keep things simple, we use tjAlloc() for the statically-allocated buffer as well, so that tjFree() can always be used to free the buffer, regardless of whether it was allocated by tjbench or by the TurboJPEG library.  This fixes crashes that occurred on Windows when running tjunittest or tjbench with the -alloc flag.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1384 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoDon't use sudo when building a Debian package unless the user is non-root
DRC [Fri, 22 Aug 2014 17:21:09 +0000 (17:21 +0000)]
Don't use sudo when building a Debian package unless the user is non-root

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1381 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoExtend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in...
DRC [Fri, 22 Aug 2014 02:57:34 +0000 (02:57 +0000)]
Extend tjbenchtest so that it tests the dynamic JPEG buffer allocation feature in TurboJPEG.  Disable the tiling feature in TJBench whenever dynamic buffer allocation is enabled (because the tiling feature requires a separate buffer for each tile, using it successfully with dynamic buffer allocation would require a separate TurboJPEG compressor instance for each tile, and it's not worth going to that trouble right now.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1372 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoRun the TurboJPEG conformance tests out of a directory in /tmp (for improved performa...
DRC [Fri, 22 Aug 2014 02:51:16 +0000 (02:51 +0000)]
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+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1371 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoActually, we need to increase the size of BUFSIZE, not just the size of _buffer....
DRC [Thu, 21 Aug 2014 03:38:14 +0000 (03:38 +0000)]
Actually, we need to increase the size of BUFSIZE, not just the size of _buffer.  The previous patch might have cause problems if, for instance, state->free_in_buffer was 127 but 129 bytes were compressed.  In that case, only 127 of the 129 bytes would have been written to the file.  Also document the fix.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1366 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix an extremely rare crash that can occur when compressing a very high-frequency...
DRC [Thu, 21 Aug 2014 01:55:22 +0000 (01:55 +0000)]
Fix an extremely rare crash that can occur when compressing a very high-frequency MCU using quality 100 and no subsampling, and when dynamically allocating the JPEG buffer in the destination manager.  Even with a test program designed specifically to reproduce the crash, it only occurred once in about 25 million iterations.  More details here:  https://sourceforge.net/p/libjpeg-turbo/bugs/64

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1365 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoMake the wrapped functions static
DRC [Fri, 15 Aug 2014 16:40:34 +0000 (16:40 +0000)]
Make the wrapped functions static

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1358 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoWhitespace formatting tweaks
DRC [Fri, 15 Aug 2014 16:20:59 +0000 (16:20 +0000)]
Whitespace formatting tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1357 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoAllow the int pixel versions of the various TurboJPEG JNI functions to share the...
DRC [Fri, 15 Aug 2014 16:20:06 +0000 (16:20 +0000)]
Allow the int pixel versions of the various TurboJPEG JNI functions to share the same code as the byte pixel versions.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1356 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoAdd descriptions to help sort out which function goes with which version of the API.
DRC [Fri, 15 Aug 2014 15:40:02 +0000 (15:40 +0000)]
Add descriptions to help sort out which function goes with which version of the API.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1353 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoCompiler warnings
DRC [Fri, 15 Aug 2014 14:44:09 +0000 (14:44 +0000)]
Compiler warnings

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1352 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoClean up exception handling in the JNI code. The exception is actually not thrown...
DRC [Thu, 14 Aug 2014 17:24:01 +0000 (17:24 +0000)]
Clean up exception handling in the JNI code.  The exception is actually not thrown until the function exits, so we can let the code fall through to bailout: if the TurboJPEG C function fails.  Also, per the JNI spec, no other JNI functions can be called between GetPrimitiveArrayCritical() and ReleasePrimitiveArrayCritical().  This hasn't caused any problems thus far, but better safe than sorry.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1347 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoClean up notes using the doxygen @note command
DRC [Sun, 10 Aug 2014 17:25:51 +0000 (17:25 +0000)]
Clean up notes using the doxygen @note command

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1340 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix a display issue in the documentation for tjDecompress2() (doxygen treats a star...
DRC [Sun, 10 Aug 2014 16:39:32 +0000 (16:39 +0000)]
Fix a display issue in the documentation for tjDecompress2() (doxygen treats a star at the beginning of the line as a list bullet);  make the documentation more readable by displaying fixed-width text (which is used to refer to variables and functions) in a different color.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1338 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoInclude "Installed-Size" field in the deb-control file to prevent Ubuntu from complaining
DRC [Thu, 17 Jul 2014 08:25:32 +0000 (08:25 +0000)]
Include "Installed-Size" field in the deb-control file to prevent Ubuntu from complaining

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1330 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoBig oops. wrjpgcom on Windows was being built using the rdjpgcom source.
DRC [Sun, 22 Jun 2014 20:50:14 +0000 (20:50 +0000)]
Big oops.  wrjpgcom on Windows was being built using the rdjpgcom source.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1327 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoBig oops. wrjpgcom on Windows was being built using the rdjpgcom source.
DRC [Sun, 22 Jun 2014 20:48:38 +0000 (20:48 +0000)]
Big oops.  wrjpgcom on Windows was being built using the rdjpgcom source.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1326 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoPrevent a buffer overrun if the comment begins with a literal quote character and...
DRC [Sun, 22 Jun 2014 20:38:54 +0000 (20:38 +0000)]
Prevent a buffer overrun if the comment begins with a literal quote character and the string exceeds 65k characters.  Also prevent comments longer than 65k characters from being written, since this will produce an incorrect JPEG file.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1324 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoOur copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer...
DRC [Wed, 28 May 2014 20:28:30 +0000 (20:28 +0000)]
Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.

We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1320 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoOur copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer...
DRC [Wed, 28 May 2014 20:27:42 +0000 (20:27 +0000)]
Our copyright string is longer than JMSG_LENGTH_MAX, and this was causing a buffer overrun if output_message() was called with msg_code set to JMSG_COPYRIGHT, or if format_message() was called with msg_code set to JMSG_COPYRIGHT and with a buffer of length JMSG_LENGTH_MAX.

We can't simply increase JMSG_LENGTH_MAX, because it is part of the libjpeg API, and it is generally assumed that a buffer of this length will be passed to format_message().  Thus, the easiest solution is simply to use a shorter copyright string for JMSG_COPYRIGHT.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1319 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFurther copyright header cleanup
DRC [Sun, 18 May 2014 17:51:00 +0000 (17:51 +0000)]
Further copyright header cleanup

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1309 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoClean up code formatting in the SIMD interface functions
DRC [Thu, 15 May 2014 19:46:48 +0000 (19:46 +0000)]
Clean up code formatting in the SIMD interface functions

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1306 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoMinor tweak to improve code readability
DRC [Wed, 14 May 2014 14:57:01 +0000 (14:57 +0000)]
Minor tweak to improve code readability

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1299 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoThe x86/x86-64 SIMD extensions were originally designed to accommodate changing the...
DRC [Tue, 13 May 2014 18:41:33 +0000 (18:41 +0000)]
The x86/x86-64 SIMD extensions were originally designed to accommodate changing the value of RGB_*, but this apparently broke when RGB-to-gray colorspace conversion was accelerated.  Further, the ARM NEON extensions have always assumed that JCS_RGB behaves identically to JCS_EXT_RGB.  Rather than fix these issues, it makes more sense to just stop claiming that we support changing the values of RGB_*, since doing so is no longer necessary.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1298 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoDocument -rgb option in djpeg man page; "gray-scale"="grayscale"
DRC [Mon, 12 May 2014 09:08:39 +0000 (09:08 +0000)]
Document -rgb option in djpeg man page;  "gray-scale"="grayscale"

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1293 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoUse 2-space indentation for the enums, to be consistent with the structs
DRC [Mon, 12 May 2014 00:34:08 +0000 (00:34 +0000)]
Use 2-space indentation for the enums, to be consistent with the structs

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1291 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoDocument the fact that the fast integer FDCT is not fully accelerated for quality...
DRC [Sun, 11 May 2014 23:14:43 +0000 (23:14 +0000)]
Document the fact that the fast integer FDCT is not fully accelerated for quality levels above 97 + additional wordsmithing

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1289 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoProvide a more thorough description of the trade-offs between the various DCT/IDCT...
DRC [Sun, 11 May 2014 09:46:28 +0000 (09:46 +0000)]
Provide a more thorough description of the trade-offs between the various DCT/IDCT algorithms, based on new resarch

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1286 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoConvert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the...
DRC [Sun, 11 May 2014 09:36:25 +0000 (09:36 +0000)]
Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJPEG retains the use of tabs for historical reasons.  They were annoying in the libjpeg code primarily because they were not consistently used and because they were used to format as well as indent the code.  In the case of TurboJPEG, tabs are used just to indent the code, so even if the editor assumes a different tab width, the code will still be readable.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1285 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoAndroid build instructions
DRC [Tue, 6 May 2014 21:59:31 +0000 (21:59 +0000)]
Android build instructions

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1273 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoWordsmithing
DRC [Tue, 6 May 2014 20:56:01 +0000 (20:56 +0000)]
Wordsmithing

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1271 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoWe use __CHAR_UNSIGNED__ (automatically defined by the AC_C_CHAR_UNSIGNED macro)...
DRC [Sun, 20 Apr 2014 19:13:10 +0000 (19:13 +0000)]
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1264 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoThis patch accomplishes the following:
DRC [Sun, 20 Apr 2014 09:17:11 +0000 (09:17 +0000)]
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1258 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoWork around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap...
DRC [Sun, 20 Apr 2014 07:36:33 +0000 (07:36 +0000)]
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:

       delta = cur0 * 2;
       cur0 += delta;          /* form error * 3 */
       errorptr[0] = (FSERROR) (bpreverr0 + cur0);
       cur0 += delta;          /* form error * 5 */
       bpreverr0 = belowerr0 + cur0;
       cur0 += delta;          /* form error * 7 */

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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1255 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoPrevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every...
DRC [Sun, 20 Apr 2014 07:35:16 +0000 (07:35 +0000)]
Prevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every time a merge is done.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1254 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoWork around an issue in Visual C++ 2010 and 2013 that was causing the 256-bit bitmap...
DRC [Sun, 20 Apr 2014 07:22:21 +0000 (07:22 +0000)]
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:

       delta = cur0 * 2;
       cur0 += delta;          /* form error * 3 */
       errorptr[0] = (FSERROR) (bpreverr0 + cur0);
       cur0 += delta;          /* form error * 5 */
       bpreverr0 = belowerr0 + cur0;
       cur0 += delta;          /* form error * 7 */

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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1253 632fc199-4ca6-4c93-a231-07263d6284db

10 years ago1.3.2
DRC [Sun, 20 Apr 2014 07:20:31 +0000 (07:20 +0000)]
1.3.2

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1252 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoMinor comment correction (we support the full range of IDCT scaling factors now.)
DRC [Fri, 18 Apr 2014 07:58:29 +0000 (07:58 +0000)]
Minor comment correction (we support the full range of IDCT scaling factors now.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1250 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoClarify how to do a 64-bit build using the Visual Studio IDE
DRC [Fri, 18 Apr 2014 07:50:17 +0000 (07:50 +0000)]
Clarify how to do a 64-bit build using the Visual Studio IDE

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1248 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoUpdate Windows build instructions
DRC [Fri, 18 Apr 2014 02:46:59 +0000 (02:46 +0000)]
Update Windows build instructions

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1246 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix warnings about unused variables when building with GCC 4.8.x
DRC [Thu, 17 Apr 2014 00:47:18 +0000 (00:47 +0000)]
Fix warnings about unused variables when building with GCC 4.8.x

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1242 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix compiler warning ("always_inline function might not be inlinable") when building...
DRC [Wed, 16 Apr 2014 23:37:23 +0000 (23:37 +0000)]
Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC;  Unix EOL

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1240 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoSet the BUILD environment variable properly when building with MinGW implementations...
DRC [Wed, 16 Apr 2014 23:30:38 +0000 (23:30 +0000)]
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

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1238 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoRemove trailing spaces
DRC [Tue, 15 Apr 2014 03:43:44 +0000 (03:43 +0000)]
Remove trailing spaces

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1236 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoModify svn:ignore so that it lists only files generated in-tree by autoreconf -fiv...
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1219 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoMake iOS build instructions more generic and applicable to all versions of Xcode...
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1217 632fc199-4ca6-4c93-a231-07263d6284db

10 years agogit-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1202 632fc1... 1.3.1
DRC [Sat, 22 Mar 2014 20:42:01 +0000 (20:42 +0000)]
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1202 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoSince we're now maintaining our own Cygwin pseudo-repository directories instead...
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1195 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoRHEL 6 (and probably other platforms as well) sets _defaultdocdir=%{_datadir}/doc...
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1193 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoPrevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every...
DRC [Fri, 21 Mar 2014 09:35:53 +0000 (09:35 +0000)]
Prevent svn:mergeinfo from being modified on Makefile.am and simd/jsimd*.c every time a merge is done.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1192 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix compiler warning about unused function when building with the libjpeg v6b API/ABI
DRC [Fri, 21 Mar 2014 09:29:28 +0000 (09:29 +0000)]
Fix compiler warning about unused function when building with the libjpeg v6b API/ABI

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1189 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix compiler warning ("always_inline function might not be inlinable") when building...
DRC [Fri, 21 Mar 2014 09:22:21 +0000 (09:22 +0000)]
Fix compiler warning ("always_inline function might not be inlinable") when building with recent versions of GCC

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1187 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoEnable silent build (can be overridden with 'make V=1') if the version of autotools...
DRC [Fri, 21 Mar 2014 08:36:06 +0000 (08:36 +0000)]
Enable silent build (can be overridden with 'make V=1') if the version of autotools being used is new enough.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1185 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix an error that occurred when trying to use the lossless transform feature without...
DRC [Mon, 17 Mar 2014 10:14:18 +0000 (10:14 +0000)]
Fix an error that occurred when trying to use the lossless transform feature without specifying -quiet;  formatting tweak

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1181 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoMove the garbage collection of the JPEG tiles into the decompression function to...
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1179 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoUpdate (C) year
DRC [Sun, 16 Mar 2014 19:33:23 +0000 (19:33 +0000)]
Update (C) year

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1175 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoDon't use deprecated constructor
DRC [Sun, 16 Mar 2014 19:33:07 +0000 (19:33 +0000)]
Don't use deprecated constructor

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1174 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoDoc tweaks
DRC [Sun, 16 Mar 2014 18:43:42 +0000 (18:43 +0000)]
Doc tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1173 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoGo ahead and deprecate the old constructor in 1.3.1 instead of in 1.4, since it uses...
DRC [Sun, 16 Mar 2014 18:00:59 +0000 (18:00 +0000)]
Go ahead and deprecate the old constructor in 1.3.1 instead of in 1.4, since it uses a deprecated method

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1172 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoAdd @Deprecated to the deprecated Java methods, so javac will actually print deprecat...
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1171 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoWhitespace tweaks
DRC [Thu, 13 Mar 2014 08:32:11 +0000 (08:32 +0000)]
Whitespace tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1160 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix a segfault that would occur in decompress-only mode if -alloc was specified witho...
DRC [Wed, 12 Mar 2014 06:15:51 +0000 (06:15 +0000)]
Fix a segfault that would occur in decompress-only mode if -alloc was specified without -tile.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1155 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoWordsmithing & formatting tweaks
DRC [Tue, 11 Mar 2014 09:46:50 +0000 (09:46 +0000)]
Wordsmithing & formatting tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1154 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoBack-port the -subsamp option from 1.4 rather than use the hackish approach of replac...
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1153 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoOops. This was apparently the victim of an overly aggressive search/replace.
DRC [Tue, 11 Mar 2014 08:25:59 +0000 (08:25 +0000)]
Oops.  This was apparently the victim of an overly aggressive search/replace.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1152 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoSilence warning in CMake 2.8.12 and later
DRC [Tue, 11 Mar 2014 06:30:21 +0000 (06:30 +0000)]
Silence warning in CMake 2.8.12 and later

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1150 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix the build of the Java classes when using MSVC 2010 and later. Something in the...
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.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1148 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix Windows build
DRC [Mon, 10 Mar 2014 21:38:11 +0000 (21:38 +0000)]
Fix Windows build

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1147 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFormatting tweaks
DRC [Mon, 10 Mar 2014 21:37:54 +0000 (21:37 +0000)]
Formatting tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1146 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoAdd a blank line before the alpha-enabled colorspace tests in order to improve readab...
DRC [Sat, 8 Mar 2014 20:31:31 +0000 (20:31 +0000)]
Add a blank line before the alpha-enabled colorspace tests in order to improve readability

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1140 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoOops. We need to call start_pass() on the color converter in order to allocate the...
DRC [Thu, 6 Mar 2014 20:03:37 +0000 (20:03 +0000)]
Oops.  We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1137 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoOops. We need to call start_pass() on the color converter in order to allocate the...
DRC [Thu, 6 Mar 2014 19:51:29 +0000 (19:51 +0000)]
Oops.  We need to call start_pass() on the color converter in order to allocate the conversion tables used by the plain C code.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1136 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix regression introduced in r1128 that caused SIMD detection to malfunction for...
DRC [Thu, 6 Mar 2014 09:29:25 +0000 (09:29 +0000)]
Fix regression introduced in r1128 that caused SIMD detection to malfunction for ARM platforms (and probably ARM64 and MIPS as well.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1135 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoRemove unused code (the destination manager is not used during YUV encoding, there...
DRC [Fri, 28 Feb 2014 05:27:55 +0000 (05:27 +0000)]
Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1129 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix autoconf warnings
DRC [Fri, 28 Feb 2014 05:26:24 +0000 (05:26 +0000)]
Fix autoconf warnings

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1128 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoUse C-style comments
DRC [Fri, 28 Feb 2014 05:23:26 +0000 (05:23 +0000)]
Use C-style comments

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1127 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoRemove unused code (the destination manager is not used during YUV encoding, there...
DRC [Fri, 28 Feb 2014 05:19:43 +0000 (05:19 +0000)]
Remove unused code (the destination manager is not used during YUV encoding, there are no virtual arrays to realize, and jinit_c_prep_controller() is unnecessary because we are not using smoothing.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1126 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix an issue that prevented tjEncodeYUV2() and TJCompressor.encodeYUV() from working...
DRC [Tue, 11 Feb 2014 10:16:42 +0000 (10:16 +0000)]
Fix an issue that prevented tjEncodeYUV2() 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 tjEncodeYUV2() 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.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1121 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix an issue that prevented tjEncodeYUV2() and TJCompressor.encodeYUV() from working...
DRC [Tue, 11 Feb 2014 09:56:12 +0000 (09:56 +0000)]
Fix an issue that prevented tjEncodeYUV2() 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 tjEncodeYUV2() 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.)

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1120 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFurther examination of the code reveals that this change is unnecessary. The histogr...
DRC [Fri, 7 Feb 2014 19:06:03 +0000 (19:06 +0000)]
Further examination of the code reveals that this change is unnecessary.  The histogram stores a count of each color in the image, so it will always contain at least one non-zero element, and thus the total can never be zero.  Since the histogram is generated from the image data and not read from the header, there is no chance that header corruption would affect it.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1116 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFix several potential overflow issues identified by the community.
DRC [Thu, 6 Feb 2014 19:31:50 +0000 (19:31 +0000)]
Fix several potential overflow issues identified by the community.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1114 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFormatting tweak
DRC [Thu, 6 Feb 2014 19:31:23 +0000 (19:31 +0000)]
Formatting tweak

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1113 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoRemove trailing space
DRC [Thu, 6 Feb 2014 19:15:03 +0000 (19:15 +0000)]
Remove trailing space

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1111 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoFormatting tweaks
DRC [Wed, 5 Feb 2014 07:40:00 +0000 (07:40 +0000)]
Formatting tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1107 632fc199-4ca6-4c93-a231-07263d6284db

10 years agoInclude instructions for building iOS binaries using Xcode 4.6.x and Xcode 5.0.
DRC [Wed, 29 Jan 2014 19:32:23 +0000 (19:32 +0000)]
Include instructions for building iOS binaries using Xcode 4.6.x and Xcode 5.0.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1102 632fc199-4ca6-4c93-a231-07263d6284db