Closed Bug 771403 Opened 9 years ago Closed 9 years ago
Update libjpeg-turbo to version 1
We've already got the security fix (#4 below) via bug 759891. However, libjpeg-turbo 1.2.1 also features:  Creating or decoding a JPEG file that uses the RGB colorspace should now properly work when the input or output colorspace is one of the libjpeg-turbo colorspace extensions.  When libjpeg-turbo was built without SIMD support and merged (non-fancy) upsampling was used along with an alpha-enabled colorspace during decompression, the unused byte of the decompressed pixels was not being set to 0xFF. This has been fixed.  Fixed a bug whereby the libjpeg-turbo SSE2 SIMD code would not preserve the upper 64 bits of xmm6 and xmm7 on Win64 platforms, which violated the Win64 calling conventions.  Fixed a regression caused by 1.2.0 whereby decompressing corrupt JPEG images (specifically, images in which the component count was erroneously set to a large value) would cause libjpeg-turbo to segfault.  Worked around a severe performance issue with "Bobcat" (AMD Embedded APU) processors. The MASKMOVDQU instruction, which was used by the libjpeg-turbo SSE2 SIMD code, is apparently implemented in microcode on AMD processors, and it is painfully slow on Bobcat processors in particular. Eliminating the use of this instruction improved performance by an order of magnitude on Bobcat processors and by a small amount (typically 5%) on AMD desktop processors.  Added SIMD acceleration for performing 4:2:2 upsampling on NEON-capable ARM platforms. This speeds up the decompression of 4:2:2 JPEGs by 20-25% on such platforms.  Fixed a regression caused by 1.2.0 whereby, on Linux/x86 platforms running the 32-bit SSE2 SIMD code in libjpeg-turbo, decompressing a 4:2:0 or 4:2:2 JPEG image into a 32-bit (RGBX, BGRX, etc.) buffer without using fancy upsampling would produce several incorrect columns of pixels at the right-hand side of the output image if each row in the output image was not evenly divisible by 16 bytes. Patch is green on Try. Yes, I'll fix up the commit message before landing.
Attachment #639556 - Flags: review?(justin.lebar+bug)
Comment on attachment 639556 [details] [diff] [review] Upgrade to libjpeg-turbo 1.2.1 Thanks for doing this, Ryan.
Attachment #639556 - Flags: review?(justin.lebar+bug) → review+
Assignee: nobody → ryanvm
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.