aboutsummaryrefslogtreecommitdiff
path: root/libjpeg.txt
diff options
context:
space:
mode:
authordcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2014-05-11 09:48:11 +0000
committerdcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2014-05-11 09:48:11 +0000
commit06a3e7709328309ea427162ab8e6e558b231b614 (patch)
treef8118d9f2b23987f1852d2a14af1c6d80e31a027 /libjpeg.txt
parentc89ec9dd288c4f4422d1ffdd9cf4d950f1a765aa (diff)
Provide a more thorough description of the trade-offs between the various DCT/IDCT algorithms, based on new resarch
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1287 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'libjpeg.txt')
-rw-r--r--libjpeg.txt55
1 files changed, 44 insertions, 11 deletions
diff --git a/libjpeg.txt b/libjpeg.txt
index d110738..afc002b 100644
--- a/libjpeg.txt
+++ b/libjpeg.txt
@@ -3,7 +3,7 @@ USING THE IJG JPEG LIBRARY
This file was part of the Independent JPEG Group's software:
Copyright (C) 1994-2011, Thomas G. Lane, Guido Vollbeding.
Modifications:
-Copyright (C) 2010, D. R. Commander.
+Copyright (C) 2010, 2014, D. R. Commander.
For conditions of distribution and use, see the accompanying README file.
@@ -886,14 +886,23 @@ J_DCT_METHOD dct_method
JDCT_FLOAT: floating-point method
JDCT_DEFAULT: default method (normally JDCT_ISLOW)
JDCT_FASTEST: fastest method (normally JDCT_IFAST)
- The FLOAT method is very slightly more accurate than the ISLOW method,
- but may give different results on different machines due to varying
- roundoff behavior. The integer methods should give the same results
- on all machines. On machines with sufficiently fast FP hardware, the
- floating-point method may also be the fastest. The IFAST method is
- considerably less accurate than the other two; its use is not
- recommended if high quality is a concern. JDCT_DEFAULT and
- JDCT_FASTEST are macros configurable by each installation.
+ In libjpeg-turbo, JDCT_IFAST is generally about 5-15% faster than
+ JDCT_ISLOW when using the x86/x86-64 SIMD extensions (results may vary
+ with other SIMD implementations, or when using libjpeg-turbo without
+ SIMD extensions.) For quality levels of 90 and below, there should be
+ little or no perceptible difference between the two algorithms. For
+ quality levels above 90, however, the difference between JDCT_IFAST and
+ JDCT_ISLOW becomes more pronounced. With quality=97, for instance,
+ JDCT_IFAST incurs generally about a 1-3 dB loss (in PSNR) relative to
+ JDCT_ISLOW, but this can be larger for some images. Do not use
+ JDCT_IFAST with quality levels above 97. The algorithm often
+ degenerates at quality=98 and above and can actually produce a more
+ lossy image than if lower quality levels had been used. JDCT_FLOAT is
+ mostly a legacy feature. It does not produce significantly more
+ accurate results than the ISLOW method, and it is much slower. The
+ FLOAT method may also give different results on different machines due
+ to varying roundoff behavior, whereas the integer methods should give
+ the same results on all machines.
J_COLOR_SPACE jpeg_color_space
int num_components
@@ -1170,8 +1179,32 @@ int actual_number_of_colors
Additional decompression parameters that the application may set include:
J_DCT_METHOD dct_method
- Selects the algorithm used for the DCT step. Choices are the same
- as described above for compression.
+ Selects the algorithm used for the DCT step. Choices are:
+ JDCT_ISLOW: slow but accurate integer algorithm
+ JDCT_IFAST: faster, less accurate integer method
+ JDCT_FLOAT: floating-point method
+ JDCT_DEFAULT: default method (normally JDCT_ISLOW)
+ JDCT_FASTEST: fastest method (normally JDCT_IFAST)
+ In libjpeg-turbo, JDCT_IFAST is generally about 5-15% faster than
+ JDCT_ISLOW when using the x86/x86-64 SIMD extensions (results may vary
+ with other SIMD implementations, or when using libjpeg-turbo without
+ SIMD extensions.) If the JPEG image was compressed using a quality
+ level of 85 or below, then there should be little or no perceptible
+ difference between the two algorithms. When decompressing images that
+ were compressed using quality levels above 85, however, the difference
+ between JDCT_IFAST and JDCT_ISLOW becomes more pronounced. With images
+ compressed using quality=97, for instance, JDCT_IFAST incurs generally
+ about a 4-6 dB loss (in PSNR) relative to JDCT_ISLOW, but this can be
+ larger for some images. If you can avoid it, do not use JDCT_IFAST
+ when decompressing images that were compressed using quality levels
+ above 97. The algorithm often degenerates for such images and can
+ actually produce a more lossy output image than if the JPEG image had
+ been compressed using lower quality levels. JDCT_FLOAT is mostly a
+ legacy feature. It does not produce significantly more accurate
+ results than the ISLOW method, and it is much slower. The FLOAT method
+ may also give different results on different machines due to varying
+ roundoff behavior, whereas the integer methods should give the same
+ results on all machines.
boolean do_fancy_upsampling
If TRUE, do careful upsampling of chroma components. If FALSE,