Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: README-turbo.txt

Issue 10386084: Update libjpeg-turbo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libjpeg_turbo/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « README.chromium ('k') | cjpeg.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README-turbo.txt
===================================================================
--- README-turbo.txt (revision 134206)
+++ README-turbo.txt (working copy)
@@ -3,31 +3,31 @@
*******************************************************************************
libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX,
-SSE2, etc.) to accelerate baseline JPEG compression and decompression on x86
-and x86-64 systems. On such systems, libjpeg-turbo is generally 2-4x as fast
-as the unmodified version of libjpeg, all else being equal.
+SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86,
+x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as
+fast as the unmodified version of libjpeg, all else being equal.
libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, but
the TigerVNC and VirtualGL projects made numerous enhancements to the codec in
2009, including improved support for Mac OS X, 64-bit support, support for
-32-bit and big endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman
-encoding/decoding, and various bug fixes. The goal was to produce a fully open
-source codec that could replace the partially closed source TurboJPEG/IPP codec
-used by VirtualGL and TurboVNC. libjpeg-turbo generally performs in the range
-of 80-120% of TurboJPEG/IPP. It is faster in some areas but slower in others.
+32-bit and big-endian pixel formats (RGBX, XBGR, etc.), accelerated Huffman
+encoding/decoding, and various bug fixes. The goal was to produce a fully
+open-source codec that could replace the partially closed-source TurboJPEG/IPP
+codec used by VirtualGL and TurboVNC. libjpeg-turbo generally achieves 80-120%
+of the performance of TurboJPEG/IPP. It is faster in some areas but slower in
+others.
In early 2010, libjpeg-turbo spun off into its own independent project, with
the goal of making high-speed JPEG compression/decompression technology
-available to a broader range of users and developers. The libjpeg-turbo shared
-libraries can be used as drop-in replacements for libjpeg on most systems.
+available to a broader range of users and developers.
*******************************************************************************
** License
*******************************************************************************
-libjpeg-turbo is licensed under a non-restrictive, BSD-style license
-(see README.) The TurboJPEG/OSS wrapper (both C and Java versions) and
+Most of libjpeg-turbo inherits the non-restrictive, BSD-style license used by
+libjpeg (see README.) The TurboJPEG/OSS wrapper (both C and Java versions) and
associated test programs bear a similar license, which is reproduced below:
Redistribution and use in source and binary forms, with or without
@@ -62,16 +62,16 @@
libjpeg-turbo includes two APIs that can be used to compress and decompress
JPEG images:
- TurboJPEG/OSS: This API wraps libjpeg-turbo and provides an easy-to-use
- interface for compressing and decompressing JPEG images in memory. It also
- provides some features that would not be straightforward to implement using
- the underlying libjpeg API, such as generating planar YUV images and
- performing multiple simultaneous lossless transforms on an image. The Java
- interface for libjpeg-turbo is written on top of TurboJPEG/OSS.
+ TurboJPEG API: This API provides an easy-to-use interface for compressing
+ and decompressing JPEG images in memory. It also provides some functionality
+ that would not be straightforward to achieve using the underlying libjpeg
+ API, such as generating planar YUV images and performing multiple
+ simultaneous lossless transforms on an image. The Java interface for
+ libjpeg-turbo is written on top of the TurboJPEG API.
- libjpeg API: This is the industry standard API for compressing and
- decompressing JPEG images. It is more difficult to use than TurboJPEG/OSS
- but also more powerful. libjpeg-turbo is both API/ABI-compatible and
+ libjpeg API: This is the de facto industry-standard API for compressing and
+ decompressing JPEG images. It is more difficult to use than the TurboJPEG
+ API but also more powerful. libjpeg-turbo is both API/ABI-compatible and
mathematically compatible with libjpeg v6b. It can also optionally be
configured to be API/ABI-compatible with libjpeg v7 and v8 (see below.)
@@ -101,13 +101,13 @@
architecture.
System administrators can also replace the libjpeg sym links in /usr/{lib} with
-links to the libjpeg dynamic library located in /opt/libjpeg-turbo/{lib}. This
-will effectively accelerate every dynamically linked libjpeg application on the
-system.
+links to the libjpeg-turbo dynamic library located in /opt/libjpeg-turbo/{lib}.
+This will effectively accelerate every application that uses the libjpeg
+dynamic library on the system.
The libjpeg-turbo SDK for Visual C++ installs the libjpeg-turbo DLL
-(jpeg62.dll, jpeg7.dll, or jpeg8.dll, depending on whether libjpeg v6b, v7, or
-v8 emulation is enabled) into c:\libjpeg-turbo[64]\bin, and the PATH
+(jpeg62.dll, jpeg7.dll, or jpeg8.dll, depending on whether it was built with
+libjpeg v6b, v7, or v8 emulation) into c:\libjpeg-turbo[64]\bin, and the PATH
environment variable can be modified such that this directory is searched
before any others that might contain a libjpeg DLL. However, if a libjpeg
DLL exists in an application's install directory, then Windows will load this
@@ -117,16 +117,16 @@
application's install directory to accelerate it.
The version of the libjpeg-turbo DLL distributed in the libjpeg-turbo SDK for
-Visual C++ requires the Visual C++ 2008 C run time DLL (msvcr90.dll).
+Visual C++ requires the Visual C++ 2008 C run-time DLL (msvcr90.dll).
msvcr90.dll ships with more recent versions of Windows, but users of older
Windows releases can obtain it from the Visual C++ 2008 Redistributable
Package, which is available as a free download from Microsoft's web site.
-NOTE: Features of libjpeg that require passing a C run time structure, such
+NOTE: Features of libjpeg that require passing a C run-time structure, such
as a file handle, from an application to libjpeg will probably not work with
the version of the libjpeg-turbo DLL distributed in the libjpeg-turbo SDK for
Visual C++, unless the application is also built to use the Visual C++ 2008 C
-run time DLL. In particular, this affects jpeg_stdio_dest() and
+run-time DLL. In particular, this affects jpeg_stdio_dest() and
jpeg_stdio_src().
Mac applications typically embed their own copies of the libjpeg dylib inside
@@ -146,7 +146,7 @@
libjpeg-turbo is a drop-in replacement for the TurboJPEG/IPP SDK used by
VirtualGL 2.1.x and TurboVNC 0.6 (and prior.) libjpeg-turbo contains a wrapper
library (TurboJPEG/OSS) that emulates the TurboJPEG API using libjpeg-turbo
-instead of the closed source Intel Performance Primitives. You can replace the
+instead of the closed-source Intel Performance Primitives. You can replace the
TurboJPEG/IPP package on Linux systems with the libjpeg-turbo package in order
to make existing releases of VirtualGL 2.1.x and TurboVNC 0.x use the new codec
at run time. Note that the 64-bit libjpeg-turbo packages contain only 64-bit
@@ -157,7 +157,7 @@
You can also build the VirtualGL 2.1.x and TurboVNC 0.6 source code with
the libjpeg-turbo SDK instead of TurboJPEG/IPP. It should work identically.
libjpeg-turbo also includes static library versions of TurboJPEG/OSS, which
-are used to build TurboVNC 1.0 and later.
+are used to build VirtualGL 2.2 and TurboVNC 1.0 and later.
========================================
Using libjpeg-turbo in Your Own Programs
@@ -256,25 +256,18 @@
libjpeg v7 and v8 API/ABI support
=================================
-libjpeg v7 and v8 added new features to the API/ABI, and, unfortunately, the
-compression and decompression structures were extended in a backward-
-incompatible manner to accommodate these features. Thus, programs that are
+With libjpeg v7 and v8, new features were added that necessitated extending the
+compression and decompression structures. Unfortunately, due to the exposed
+nature of those structures, extending them also necessitated breaking backward
+ABI compatibility with previous libjpeg releases. Thus, programs that are
built to use libjpeg v7 or v8 did not work with libjpeg-turbo, since it is
based on the libjpeg v6b code base. Although libjpeg v7 and v8 are still not
as widely used as v6b, enough programs (including a few Linux distros) have
made the switch that it was desirable to provide support for the libjpeg v7/v8
-API/ABI in libjpeg-turbo.
+API/ABI in libjpeg-turbo. Although libjpeg-turbo can now be configured as a
+drop-in replacement for libjpeg v7 or v8, it should be noted that not all of
+the features in libjpeg v7 and v8 are supported (see below.)
-Some of the libjpeg v7 and v8 features -- DCT scaling, to name one -- involve
-deep modifications to the code that cannot be accommodated by libjpeg-turbo
-without either breaking compatibility with libjpeg v6b or producing an
-unsupportable mess. In order to fully support libjpeg v8 with all of its
-features, we would have to essentially port the SIMD extensions to the libjpeg
-v8 code base and maintain two separate code trees. We are hesitant to do this
-until/unless the newer libjpeg code bases garner more community support and
-involvement and until/unless we have some notion of whether future libjpeg
-releases will also be backward-incompatible.
-
By passing an argument of --with-jpeg7 or --with-jpeg8 to configure, or an
argument of -DWITH_JPEG7=1 or -DWITH_JPEG8=1 to cmake, you can build a version
of libjpeg-turbo that emulates the libjpeg v7 or v8 API/ABI, so that programs
@@ -292,6 +285,11 @@
for convenience purposes. It has always been possible to implement this
feature with libjpeg v6b (see rdswitch.c for an example.)
+-- libjpeg: IDCT scaling extensions in decompressor
+ libjpeg-turbo supports IDCT scaling with scaling factors of 1/8, 1/4, 3/8,
+ 1/2, 5/8, 3/4, 7/8, 9/8, 5/4, 11/8, 3/2, 13/8, 7/4, 15/8, and 2/1 (only 1/4
+ and 1/2 are SIMD-accelerated.)
+
-- cjpeg: 32-bit BMP support
-- jpegtran: lossless cropping
@@ -312,18 +310,29 @@
-- libjpeg: DCT scaling in compressor
cinfo.scale_num and cinfo.scale_denom are silently ignored.
+ There is no technical reason why DCT scaling cannot be supported, but
+ without the SmartScale extension (see below), it would only be able to
+ down-scale using ratios of 1/2, 8/15, 4/7, 8/13, 2/3, 8/11, 4/5, and 8/9,
+ which is of limited usefulness.
--- libjpeg: IDCT scaling extensions in decompressor
- libjpeg-turbo still supports IDCT scaling with scaling factors of 1/2, 1/4,
- and 1/8 (same as libjpeg v6b.)
+-- libjpeg: SmartScale
+ cinfo.block_size is silently ignored.
+ SmartScale is an extension to the JPEG format that allows for DCT block
+ sizes other than 8x8. It would be difficult to support this feature while
+ retaining backward compatibility with libjpeg v6b.
-- libjpeg: Fancy downsampling in compressor
cinfo.do_fancy_downsampling is silently ignored.
+ This requires the DCT scaling feature, which is not supported.
-- jpegtran: Scaling
- Seems to depend on the DCT scaling feature, which isn't supported.
+ This requires both the DCT scaling and SmartScale features, which are not
+ supported.
+-- Lossless RGB JPEG files
+ This requires the SmartScale feature, which is not supported.
+
*******************************************************************************
** Performance pitfalls
*******************************************************************************
@@ -333,12 +342,13 @@
===============
The optimized Huffman decoder in libjpeg-turbo does not handle restart markers
-in a way that makes libjpeg happy, so it is necessary to use the slow Huffman
-decoder when decompressing a JPEG image that has restart markers. This can
-cause the decompression performance to drop by as much as 20%, but the
-performance will still be much much greater than that of libjpeg v6b. Many
-consumer packages, such as PhotoShop, use restart markers when generating JPEG
-images, so images generated by those programs will experience this issue.
+in a way that makes the rest of the libjpeg infrastructure happy, so it is
+necessary to use the slow Huffman decoder when decompressing a JPEG image that
+has restart markers. This can cause the decompression performance to drop by
+as much as 20%, but the performance will still be much greater than that of
+libjpeg. Many consumer packages, such as PhotoShop, use restart markers when
+generating JPEG images, so images generated by those programs will experience
+this issue.
===============================================
Fast Integer Forward DCT at High Quality Levels
« no previous file with comments | « README.chromium ('k') | cjpeg.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698