]> granicus.if.org Git - libjpeg-turbo/commitdiff
Merge branch '1.3.x' into 1.4.x
authorDRC <information@libjpeg-turbo.org>
Fri, 5 Feb 2016 00:47:07 +0000 (18:47 -0600)
committerDRC <information@libjpeg-turbo.org>
Fri, 5 Feb 2016 00:48:22 +0000 (18:48 -0600)
1  2 
ChangeLog.txt
jdhuff.c

diff --cc ChangeLog.txt
index b126bd1919fc44d2f63116c46aea2f61fd82f3ac,55d5c3544c339a0e1329b01b913e6edfd490332e..101a0669047b2d7654b1fd5719218b927bba56df
 -1.3.2
 +1.4.3
  =====
  
 -[1] Worked around an issue with Visual C++ 2010 and later that caused incorrect
 -pixels to be generated when decompressing a JPEG image to a 256-color bitmap,
 -if compiler optimization was enabled when libjpeg-turbo was built.  This caused
 -the regression tests to fail when doing a release build under Visual C++ 2010
 -and later.
 +[1] Fixed a regression caused by 1.4.1[6] that prevented 32-bit and 64-bit
 +libjpeg-turbo RPMs from being installed simultaneously on recent Red Hat/Fedora
 +distributions.  This was due to the addition of a macro in jconfig.h that
 +allows the Huffman codec to determine the word size at compile time.  Since
 +that macro differs between 32-bit and 64-bit builds, this caused a conflict
 +between the i386 and x86_64 RPMs (any differing files, other than executables,
 +are not allowed when 32-bit and 64-bit RPMs are installed simultaneously.)
 +Since the macro is used only internally, it has been moved into jconfigint.h.
  
 -[2] Fixed a segfault that occurred when calling output_message() with msg_code
 -set to JMSG_COPYRIGHT.
++[2] Fixed an issue in the accelerated Huffman decoder that could have caused
++the decoder to read past the end of the input buffer when a malformed,
++specially-crafted JPEG image was being decompressed.  In prior versions of
++libjpeg-turbo, the accelerated Huffman decoder was invoked (in most cases) only
++if there were > 128 bytes of data in the input buffer.  However, it is possible
++to construct a JPEG image in which a single Huffman block is over 430 bytes
++long, so this version of libjpeg-turbo activates the accelerated Huffman
++decoder only if there are > 512 bytes of data in the input buffer.
 -[3] Fixed an issue whereby wrjpgcom was allowing comments longer than 65k
 -characters to be passed on the command line, which was causing it to generate
 -incorrect JPEG files.
 -[4] Fixed a bug in the build system that was causing the Windows version of
 -wrjpgcom to be built using the rdjpgcom code.
 +1.4.2
 +=====
 +
 +[1] Fixed an issue whereby cjpeg would segfault if a Windows bitmap with a
 +negative width or height was used as an input image (Windows bitmaps can have
 +a negative height if they are stored in top-down order, but such files are
 +rare and not supported by libjpeg-turbo.)
 +
 +[2] Fixed an issue whereby, under certain circumstances, libjpeg-turbo would
 +incorrectly encode certain JPEG images when quality=100 and the fast integer
 +forward DCT were used.  This was known to cause 'make test' to fail when the
 +library was built with '-march=haswell' on x86 systems.
 +
 +[3] Fixed an issue whereby libjpeg-turbo would crash when built with the latest
 +& greatest development version of the Clang/LLVM compiler.  This was caused by
 +an x86-64 ABI conformance issue in some of libjpeg-turbo's 64-bit SSE2 SIMD
 +routines.  Those routines were incorrectly using a 64-bit mov instruction to
 +transfer a 32-bit JDIMENSION argument, whereas the x86-64 ABI allows the upper
 +(unused) 32 bits of a 32-bit argument's register to be undefined.  The new
 +Clang/LLVM optimizer uses load combining to transfer multiple adjacent 32-bit
 +structure members into a single 64-bit register, and this exposed the ABI
 +conformance issue.
 +
 +[4] Fixed a bug in the MIPS DSPr2 4:2:0 "plain" (non-fancy and non-merged)
 +upsampling routine that caused a buffer overflow (and subsequent segfault) when
 +decompressing a 4:2:0 JPEG image whose scaled output width was less than 16
 +pixels.  The "plain" upsampling routines are normally only used when
 +decompressing a non-YCbCr JPEG image, but they are also used when decompressing
 +a JPEG image whose scaled output height is 1.
 +
 +[5] Fixed various negative left shifts and other issues reported by the GCC and
 +Clang undefined behavior sanitizers.  None of these was known to pose a
 +security threat, but removing the warnings makes it easier to detect actual
 +security issues, should they arise in the future.
 +
 +
 +1.4.1
 +=====
  
 -[5] Fixed an extremely rare bug that could cause the Huffman encoder's local
 -buffer to overrun when a very high-frequency MCU is compressed using quality
 -100 and no subsampling, and when the JPEG output buffer is being dynamically
 -resized by the destination manager.  This issue was so rare that, even with a
 -test program specifically designed to make the bug occur (by injecting random
 -high-frequency YUV data into the compressor), it was reproducible only once in
 -about every 25 million iterations.
 +[1] tjbench now properly handles CMYK/YCCK JPEG files.  Passing an argument of
 +-cmyk (instead of, for instance, -rgb) will cause tjbench to internally convert
 +the source bitmap to CMYK prior to compression, to generate YCCK JPEG files,
 +and to internally convert the decompressed CMYK pixels back to RGB after
 +decompression (the latter is done automatically if a CMYK or YCCK JPEG is
 +passed to tjbench as a source image.)  The CMYK<->RGB conversion operation is
 +not benchmarked.  NOTE: The quick & dirty CMYK<->RGB conversions that tjbench
 +uses are suitable for testing only.  Proper conversion between CMYK and RGB
 +requires a color management system.
 +
 +[2] 'make test' now performs additional bitwise regression tests using tjbench,
 +mainly for the purpose of testing compression from/decompression to a subregion
 +of a larger image buffer.
 +
 +[3] 'make test' no longer tests the regression of the floating point DCT/IDCT
 +by default, since the results of those tests can vary if the algorithms in
 +question are not implemented using SIMD instructions on a particular platform.
 +See the comments in Makefile.am for information on how to re-enable the tests
 +and to specify an expected result for them based on the particulars of your
 +platform.
 +
 +[4] The NULL color conversion routines have been significantly optimized,
 +which speeds up the compression of RGB and CMYK JPEGs by 5-20% when using
 +64-bit code and 0-3% when using 32-bit code, and the decompression of those
 +images by 10-30% when using 64-bit code and 3-12% when using 32-bit code.
 +
 +[5] Fixed an "illegal instruction" error that occurred when djpeg from a
 +SIMD-enabled libjpeg-turbo MIPS build was executed with the -nosmooth option on
 +a MIPS machine that lacked DSPr2 support.  The MIPS SIMD routines for h2v1 and
 +h2v2 merged upsampling were not properly checking for the existence of DSPr2.
 +
 +[6] Performance has been improved significantly on 64-bit non-Linux and
 +non-Windows platforms (generally 10-20% faster compression and 5-10% faster
 +decompression.)  Due to an oversight, the 64-bit version of the accelerated
 +Huffman codec was not being compiled in when libjpeg-turbo was built on
 +platforms other than Windows or Linux.  Oops.
 +
 +[7] Fixed an extremely rare bug in the Huffman encoder that caused 64-bit
 +builds of libjpeg-turbo to incorrectly encode a few specific test images when
 +quality=98, an optimized Huffman table, and the slow integer forward DCT were
 +used.
 +
 +[8] The Windows (CMake) build system now supports building only static or only
 +shared libraries.  This is accomplished by adding either -DENABLE_STATIC=0 or
 +-DENABLE_SHARED=0 to the CMake command line.
 +
 +[9] TurboJPEG API functions will now return an error code if a warning is
 +triggered in the underlying libjpeg API.  For instance, if a JPEG file is
 +corrupt, the TurboJPEG decompression functions will attempt to decompress
 +as much of the image as possible, but those functions will now return -1 to
 +indicate that the decompression was not entirely successful.
 +
 +[10] Fixed a bug in the MIPS DSPr2 4:2:2 fancy upsampling routine that caused a
 +buffer overflow (and subsequent segfault) when decompressing a 4:2:2 JPEG image
 +in which the right-most MCU was 5 or 6 pixels wide.
 +
 +
 +1.4.0
 +=====
  
 -[6] Fixed a build issue on OS X PowerPC platforms (md5cmp failed to build
 +[1] Fixed a build issue on OS X PowerPC platforms (md5cmp failed to build
  because OS X does not provide the le32toh() and htole32() functions.)
  
 -[7] The close() method in the TJCompressor and TJDecompressor Java classes is
 +[2] The non-SIMD RGB565 color conversion code did not work correctly on big
 +endian machines.  This has been fixed.
 +
 +[3] Fixed an issue in tjPlaneSizeYUV() whereby it would erroneously return 1
 +instead of -1 if componentID was > 0 and subsamp was TJSAMP_GRAY.
 +
 +[3] Fixed an issue in tjBufSizeYUV2() whereby it would erroneously return 0
 +instead of -1 if width was < 1.
 +
 +[5] The Huffman encoder now uses clz and bsr instructions for bit counting on
 +ARM64 platforms (see 1.4 beta1 [5].)
 +
 +[6] The close() method in the TJCompressor and TJDecompressor Java classes is
  now idempotent.  Previously, that method would call the native tjDestroy()
  function even if the TurboJPEG instance had already been destroyed.  This
  caused an exception to be thrown during finalization, if the close() method had
diff --cc jdhuff.c
Simple merge