]> granicus.if.org Git - libjpeg-turbo/commitdiff
Merge branch 'master' into dev
authorDRC <information@libjpeg-turbo.org>
Sat, 18 Nov 2017 01:00:53 +0000 (19:00 -0600)
committerDRC <information@libjpeg-turbo.org>
Sat, 18 Nov 2017 01:00:53 +0000 (19:00 -0600)
12 files changed:
1  2 
ChangeLog.md
cmakescripts/testclean.cmake
djpeg.1
djpeg.c
doc/html/group___turbo_j_p_e_g.html
java/TJBench.java
tjbench.c
tjbenchtest.in
tjbenchtest.java.in
tjexampletest.in
turbojpeg.c
turbojpeg.h

diff --cc ChangeLog.md
index f9b8bd7adc4d572667a9d2b97eec09844c06672b,d6299f119118e0ae1ae8ec32b5583e49f917b52b..2ac91e24454e7b10709ff020b8a08395904c8862
@@@ -77,9 -7,31 +77,31 @@@ particular transform
  when using the YUVImage constructor that creates an instance backed by separate
  image planes and allocates memory for the image planes.
  
 -2. Fixed an issue whereby the Java version of TJUnitTest would fail when
 +8. Fixed an issue whereby the Java version of TJUnitTest would fail when
  testing BufferedImage encoding/decoding on big endian systems.
  
 -3. Fixed a segfault in djpeg that would occur if an output format other than
++9. Fixed a segfault in djpeg that would occur if an output format other than
+ PPM/PGM was selected along with the `-crop` option.  The `-crop` option now
+ works with the GIF and Targa formats as well (unfortunately, it cannot be made
+ to work with the BMP and RLE formats due to the fact that those output engines
+ write scanlines in bottom-up order.)  djpeg will now exit gracefully if an
+ output format other than PPM/PGM, GIF, or Targa is selected along with the
+ `-crop` option.
 -4. Fixed an issue whereby `jpeg_skip_scanlines()` would segfault if color
++10. Fixed an issue whereby `jpeg_skip_scanlines()` would segfault if color
+ quantization was enabled.
 -5. TJBench (both C and Java versions) will now display usage information if any
 -command-line argument is unrecognized.  This prevents the program from silently
 -ignoring typos.
++11. TJBench (both C and Java versions) will now display usage information if
++any command-line argument is unrecognized.  This prevents the program from
++silently ignoring typos.
 -6. Fixed an access violation in tjbench.exe (Windows) that occurred when the
++12. Fixed an access violation in tjbench.exe (Windows) that occurred when the
+ program was used to decompress an existing JPEG image.
 -7. Fixed an ArrayIndexOutOfBoundsException in the TJExample Java program that
++13. Fixed an ArrayIndexOutOfBoundsException in the TJExample Java program that
+ occurred when attempting to decompress a JPEG image that had been compressed
+ with 4:1:1 chrominance subsampling.
  
  1.5.2
  =====
index 38bb03b0434a5e4aebc356b7d1c627d306e433e1,38bb03b0434a5e4aebc356b7d1c627d306e433e1..fc3fc25e965855fe18640bba2dc0f7f00cf90a7a
@@@ -29,7 -29,7 +29,9 @@@ file(GLOB FILE
    *_411_*.png
    *_411_*.ppm
    *_411_*.jpg
--  *_411.yuv)
++  *_411.yuv
++  tjbenchtest*.log
++  tjexampletest*.log)
  
  if(NOT FILES STREQUAL "")
    message(STATUS "Removing test files")
diff --cc djpeg.1
Simple merge
diff --cc djpeg.c
index 53a8009cc7aec7dba6644bc13548e9c986ce3f8f,96db4015de6b23f2792c1948899b86c043e80a8f..2fbb0b792de88bd0e37fa07698b573290cf9a6c2
+++ b/djpeg.c
  #include "cdjpeg.h"             /* Common decls for cjpeg/djpeg applications */
  #include "jversion.h"           /* for version message */
  #include "jconfigint.h"
- #include "wrppm.h"
  
 +#ifndef HAVE_STDLIB_H           /* <stdlib.h> should declare free() */
 +extern void free (void *ptr);
 +#endif
 +
  #include <ctype.h>              /* to declare isprint() */
  
  #ifdef USE_CCOMMAND             /* command-line reader for Macintosh */
Simple merge
index 07338169fc80455dcbe2f5e121a45dcbc7051efe,ddc414c1ea99987f1b0cb4ece653b7711ff8d99d..16dfb988979fa584f869c6dc292b117d3c3e8217
@@@ -767,29 -733,25 +767,29 @@@ class TJBench 
              System.out.println("Using most accurate DCT/IDCT algorithm\n");
              flags |= TJ.FLAG_ACCURATEDCT;
            }
-           if (argv[i].equalsIgnoreCase("-progressive")) {
++          else if (argv[i].equalsIgnoreCase("-progressive")) {
 +            System.out.println("Using progressive entropy coding\n");
 +            flags |= TJ.FLAG_PROGRESSIVE;
 +          }
-           if (argv[i].equalsIgnoreCase("-rgb"))
+           else if (argv[i].equalsIgnoreCase("-rgb"))
              pf = TJ.PF_RGB;
-           if (argv[i].equalsIgnoreCase("-rgbx"))
+           else if (argv[i].equalsIgnoreCase("-rgbx"))
              pf = TJ.PF_RGBX;
-           if (argv[i].equalsIgnoreCase("-bgr"))
+           else if (argv[i].equalsIgnoreCase("-bgr"))
              pf = TJ.PF_BGR;
-           if (argv[i].equalsIgnoreCase("-bgrx"))
+           else if (argv[i].equalsIgnoreCase("-bgrx"))
              pf = TJ.PF_BGRX;
-           if (argv[i].equalsIgnoreCase("-xbgr"))
+           else if (argv[i].equalsIgnoreCase("-xbgr"))
              pf = TJ.PF_XBGR;
-           if (argv[i].equalsIgnoreCase("-xrgb"))
+           else if (argv[i].equalsIgnoreCase("-xrgb"))
              pf = TJ.PF_XRGB;
-           if (argv[i].equalsIgnoreCase("-bottomup"))
+           else if (argv[i].equalsIgnoreCase("-bottomup"))
              flags |= TJ.FLAG_BOTTOMUP;
-           if (argv[i].equalsIgnoreCase("-quiet"))
+           else if (argv[i].equalsIgnoreCase("-quiet"))
              quiet = 1;
-           if (argv[i].equalsIgnoreCase("-qq"))
+           else if (argv[i].equalsIgnoreCase("-qq"))
              quiet = 2;
-           if (argv[i].equalsIgnoreCase("-scale") && i < argv.length - 1) {
+           else if (argv[i].equalsIgnoreCase("-scale") && i < argv.length - 1) {
              int temp1 = 0, temp2 = 0;
              boolean match = false, scanned = true;
              Scanner scanner = new Scanner(argv[++i]).useDelimiter("/");
              } else
                usage();
            }
-           if (argv[i].equalsIgnoreCase("-hflip"))
+           else if (argv[i].equalsIgnoreCase("-hflip"))
              xformOp = TJTransform.OP_HFLIP;
-           if (argv[i].equalsIgnoreCase("-vflip"))
+           else if (argv[i].equalsIgnoreCase("-vflip"))
              xformOp = TJTransform.OP_VFLIP;
-           if (argv[i].equalsIgnoreCase("-transpose"))
+           else if (argv[i].equalsIgnoreCase("-transpose"))
              xformOp = TJTransform.OP_TRANSPOSE;
-           if (argv[i].equalsIgnoreCase("-transverse"))
+           else if (argv[i].equalsIgnoreCase("-transverse"))
              xformOp = TJTransform.OP_TRANSVERSE;
-           if (argv[i].equalsIgnoreCase("-rot90"))
+           else if (argv[i].equalsIgnoreCase("-rot90"))
              xformOp = TJTransform.OP_ROT90;
-           if (argv[i].equalsIgnoreCase("-rot180"))
+           else if (argv[i].equalsIgnoreCase("-rot180"))
              xformOp = TJTransform.OP_ROT180;
-           if (argv[i].equalsIgnoreCase("-rot270"))
+           else if (argv[i].equalsIgnoreCase("-rot270"))
              xformOp = TJTransform.OP_ROT270;
-           if (argv[i].equalsIgnoreCase("-grayscale"))
+           else if (argv[i].equalsIgnoreCase("-grayscale"))
              xformOpt |= TJTransform.OPT_GRAY;
-           if (argv[i].equalsIgnoreCase("-nooutput"))
+           else if (argv[i].equalsIgnoreCase("-nooutput"))
              xformOpt |= TJTransform.OPT_NOOUTPUT;
-           if (argv[i].equalsIgnoreCase("-copynone"))
++          else if (argv[i].equalsIgnoreCase("-copynone"))
 +            xformOpt |= TJTransform.OPT_COPYNONE;
-           if (argv[i].equalsIgnoreCase("-benchtime") && i < argv.length - 1) {
+           else if (argv[i].equalsIgnoreCase("-benchtime") && i < argv.length - 1) {
              double temp = -1;
              try {
                temp = Double.parseDouble(argv[++i]);
              } else
                usage();
            }
-           if (argv[i].equalsIgnoreCase("-stoponwarning"))
++          else if (argv[i].equalsIgnoreCase("-stoponwarning"))
 +            flags |= TJ.FLAG_STOPONWARNING;
-           if (argv[i].equalsIgnoreCase("-?"))
-             usage();
+           else usage();
          }
        }
  
diff --cc tjbench.c
index a62751015bfe96b9ccea8e087f5ae54213bcdb82,76b61cdf2fe22f0944da145d9edd116f70920f09..9b7a48bc8a2b29d002c8b9f05766451d2169e525
+++ b/tjbench.c
@@@ -890,22 -849,17 +889,22 @@@ int main(int argc, char *argv[]
                                printf("Using most accurate DCT/IDCT algorithm\n\n");
                                flags|=TJFLAG_ACCURATEDCT;
                        }
-                       if(!strcasecmp(argv[i], "-progressive"))
++                      else if(!strcasecmp(argv[i], "-progressive"))
 +                      {
 +                              printf("Using progressive entropy coding\n\n");
 +                              flags|=TJFLAG_PROGRESSIVE;
 +                      }
-                       if(!strcasecmp(argv[i], "-rgb")) pf=TJPF_RGB;
-                       if(!strcasecmp(argv[i], "-rgbx")) pf=TJPF_RGBX;
-                       if(!strcasecmp(argv[i], "-bgr")) pf=TJPF_BGR;
-                       if(!strcasecmp(argv[i], "-bgrx")) pf=TJPF_BGRX;
-                       if(!strcasecmp(argv[i], "-xbgr")) pf=TJPF_XBGR;
-                       if(!strcasecmp(argv[i], "-xrgb")) pf=TJPF_XRGB;
-                       if(!strcasecmp(argv[i], "-cmyk")) pf=TJPF_CMYK;
-                       if(!strcasecmp(argv[i], "-bottomup")) flags|=TJFLAG_BOTTOMUP;
-                       if(!strcasecmp(argv[i], "-quiet")) quiet=1;
-                       if(!strcasecmp(argv[i], "-qq")) quiet=2;
-                       if(!strcasecmp(argv[i], "-scale") && i<argc-1)
+                       else if(!strcasecmp(argv[i], "-rgb")) pf=TJPF_RGB;
+                       else if(!strcasecmp(argv[i], "-rgbx")) pf=TJPF_RGBX;
+                       else if(!strcasecmp(argv[i], "-bgr")) pf=TJPF_BGR;
+                       else if(!strcasecmp(argv[i], "-bgrx")) pf=TJPF_BGRX;
+                       else if(!strcasecmp(argv[i], "-xbgr")) pf=TJPF_XBGR;
+                       else if(!strcasecmp(argv[i], "-xrgb")) pf=TJPF_XRGB;
+                       else if(!strcasecmp(argv[i], "-cmyk")) pf=TJPF_CMYK;
+                       else if(!strcasecmp(argv[i], "-bottomup")) flags|=TJFLAG_BOTTOMUP;
+                       else if(!strcasecmp(argv[i], "-quiet")) quiet=1;
+                       else if(!strcasecmp(argv[i], "-qq")) quiet=2;
+                       else if(!strcasecmp(argv[i], "-scale") && i<argc-1)
                        {
                                int temp1=0, temp2=0, match=0;
                                if(sscanf(argv[++i], "%d/%d", &temp1, &temp2)==2)
                                }
                                else usage(argv[0]);
                        }
-                       if(!strcasecmp(argv[i], "-hflip")) xformop=TJXOP_HFLIP;
-                       if(!strcasecmp(argv[i], "-vflip")) xformop=TJXOP_VFLIP;
-                       if(!strcasecmp(argv[i], "-transpose")) xformop=TJXOP_TRANSPOSE;
-                       if(!strcasecmp(argv[i], "-transverse")) xformop=TJXOP_TRANSVERSE;
-                       if(!strcasecmp(argv[i], "-rot90")) xformop=TJXOP_ROT90;
-                       if(!strcasecmp(argv[i], "-rot180")) xformop=TJXOP_ROT180;
-                       if(!strcasecmp(argv[i], "-rot270")) xformop=TJXOP_ROT270;
-                       if(!strcasecmp(argv[i], "-grayscale")) xformopt|=TJXOPT_GRAY;
-                       if(!strcasecmp(argv[i], "-custom")) customFilter=dummyDCTFilter;
-                       if(!strcasecmp(argv[i], "-nooutput")) xformopt|=TJXOPT_NOOUTPUT;
-                       if(!strcasecmp(argv[i], "-copynone")) xformopt|=TJXOPT_COPYNONE;
-                       if(!strcasecmp(argv[i], "-benchtime") && i<argc-1)
+                       else if(!strcasecmp(argv[i], "-hflip")) xformop=TJXOP_HFLIP;
+                       else if(!strcasecmp(argv[i], "-vflip")) xformop=TJXOP_VFLIP;
+                       else if(!strcasecmp(argv[i], "-transpose")) xformop=TJXOP_TRANSPOSE;
+                       else if(!strcasecmp(argv[i], "-transverse")) xformop=TJXOP_TRANSVERSE;
+                       else if(!strcasecmp(argv[i], "-rot90")) xformop=TJXOP_ROT90;
+                       else if(!strcasecmp(argv[i], "-rot180")) xformop=TJXOP_ROT180;
+                       else if(!strcasecmp(argv[i], "-rot270")) xformop=TJXOP_ROT270;
+                       else if(!strcasecmp(argv[i], "-grayscale")) xformopt|=TJXOPT_GRAY;
+                       else if(!strcasecmp(argv[i], "-custom")) customFilter=dummyDCTFilter;
+                       else if(!strcasecmp(argv[i], "-nooutput")) xformopt|=TJXOPT_NOOUTPUT;
++                      else if(!strcasecmp(argv[i], "-copynone")) xformopt|=TJXOPT_COPYNONE;
+                       else if(!strcasecmp(argv[i], "-benchtime") && i<argc-1)
                        {
                                double temp=atof(argv[++i]);
                                if(temp>0.0) benchtime=temp;
                                        }
                                }
                        }
-                       if(!strcasecmp(argv[i], "-componly")) componly=1;
-                       if(!strcasecmp(argv[i], "-nowrite")) dowrite=0;
-                       if(!strcasecmp(argv[i], "-stoponwarning")) flags|=TJFLAG_STOPONWARNING;
+                       else if(!strcasecmp(argv[i], "-componly")) componly=1;
+                       else if(!strcasecmp(argv[i], "-nowrite")) dowrite=0;
++                      else if(!strcasecmp(argv[i], "-stoponwarning")) flags|=TJFLAG_STOPONWARNING;
+                       else usage(argv[0]);
                }
        }
  
diff --cc tjbenchtest.in
Simple merge
Simple merge
index 619d04f9a1a4f276db287de711a90cc14a7e753e,4cb9e9d9d8c60ae34e1238d5ac46484a37c534f9..d251977a13a919db0126dfda153ee9f54b25d850
@@@ -20,10 -20,10 +20,10 @@@ runme(
  }
  
  IMAGES="vgl_5674_0098.bmp vgl_6434_0018a.bmp vgl_6548_0026a.bmp nightshot_iso_100.bmp"
 -IMGDIR=@srcdir@/testimages
 +IMGDIR=@CMAKE_CURRENT_SOURCE_DIR@/testimages
- OUTDIR=__tjexampletest_output
+ OUTDIR=`mktemp -d /tmp/__tjexampletest_output.XXXXXX`
 -EXEDIR=.
 -JAVA="@JAVA@ -cp java/turbojpeg.jar -Djava.library.path=.libs"
 +EXEDIR=@CMAKE_CURRENT_BINARY_DIR@
 +JAVA="@Java_JAVA_EXECUTABLE@ -cp $EXEDIR/java/turbojpeg.jar -Djava.library.path=$EXEDIR"
  
  if [ -d $OUTDIR ]; then
        rm -rf $OUTDIR
@@@ -85,9 -85,9 +85,9 @@@ for image in $IMAGES; d
  
        # Scaled decompression
        for scale in 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8; do
 -              scalearg=`echo $scale | sed s@_@/@g`
 +              scalearg=`echo $scale | sed 's/\_/\//g'`
                for samp in GRAY 420 422 444; do
-                       $EXEDIR/djpeg -rgb -bmp -scale ${scalearg} $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg >$OUTDIR/${basename}_${samp}_${scale}_djpeg.bmp
+                       runme $EXEDIR/djpeg -rgb -bmp -scale ${scalearg} -outfile $OUTDIR/${basename}_${samp}_${scale}_djpeg.bmp $OUTDIR/${basename}_${samp}_fast_cjpeg.jpg
                        runme $JAVA TJExample $OUTDIR/${basename}_${samp}_fast.jpg $OUTDIR/${basename}_${samp}_${scale}.bmp -scale ${scalearg}
                        runme cmp -i 54:54 $OUTDIR/${basename}_${samp}_${scale}.bmp $OUTDIR/${basename}_${samp}_${scale}_djpeg.bmp
                        rm $OUTDIR/${basename}_${samp}_${scale}.bmp
        for xform in hflip vflip transpose transverse rot90 rot180 rot270; do
                for samp in GRAY 444 422 420; do
                        for scale in 2_1 15_8 7_4 13_8 3_2 11_8 5_4 9_8 7_8 3_4 5_8 1_2 3_8 1_4 1_8; do
 -                              scalearg=`echo $scale | sed s@_@/@g`
 +                              scalearg=`echo $scale | sed 's/\_/\//g'`
-                               $EXEDIR/djpeg -rgb -bmp -scale ${scalearg} $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg >$OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.bmp
+                               runme $EXEDIR/djpeg -rgb -bmp -scale ${scalearg} -outfile $OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.bmp $OUTDIR/${basename}_${samp}_${xform}_jpegtran.jpg
                                runme $JAVA TJExample $OUTDIR/${basename}_${samp}_fast.jpg $OUTDIR/${basename}_${samp}_${xform}_${scale}.bmp -$xform -scale ${scalearg} -crop 16,16,70x60
                                runme cmp -i 54:54 $OUTDIR/${basename}_${samp}_${xform}_${scale}.bmp $OUTDIR/${basename}_${samp}_${xform}_${scale}_jpegtran.bmp
                                rm $OUTDIR/${basename}_${samp}_${xform}_${scale}.bmp
diff --cc turbojpeg.c
Simple merge
diff --cc turbojpeg.h
index c4e48cca0869657ac6615038206666afae8296e7,307dc6f044732760a6dc6830e7a81c7afb4dcd92..f7fef7b322191bed05c9e0f20bdf947b8a7f3078
@@@ -717,11 -666,10 +716,11 @@@ DLLEXPORT tjhandle DLLCALL tjInitCompre
   * @param jpegQual the image quality of the generated JPEG image (1 = worst,
   * 100 = best)
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
  */
  DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, const unsigned char *srcBuf,
    int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf,
   * @param jpegQual the image quality of the generated JPEG image (1 = worst,
   * 100 = best)
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
  */
  DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle,
    const unsigned char *srcBuf, int width, int pad, int height, int subsamp,
   * @param jpegQual the image quality of the generated JPEG image (1 = worst,
   * 100 = best)
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
  */
  DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
    const unsigned char **srcPlanes, int width, const int *strides, int height,
@@@ -1014,11 -960,10 +1013,11 @@@ DLLEXPORT int tjPlaneHeight(int compone
   * Video, <tt>subsamp</tt> should be set to @ref TJSAMP_420.  This produces an
   * image compatible with the I420 (AKA "YUV420P") format.
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
  */
  DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle,
    const unsigned char *srcBuf, int width, int pitch, int height,
   * Video, <tt>subsamp</tt> should be set to @ref TJSAMP_420.  This produces an
   * image compatible with the I420 (AKA "YUV420P") format.
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
  */
  DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle,
    const unsigned char *srcBuf, int width, int pitch, int height,
@@@ -1182,11 -1125,10 +1181,11 @@@ DLLEXPORT tjscalingfactor* DLLCALL tjGe
   * @param pixelFormat pixel format of the destination image (see @ref
   * TJPF "Pixel formats".)
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
   */
  DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle,
    const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf,
   * block height (see #tjMCUHeight), then an intermediate buffer copy will be
   * performed within TurboJPEG.
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
   */
  DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
    const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf,
   * block height (see #tjMCUHeight), then an intermediate buffer copy will be
   * performed within TurboJPEG.
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
   */
  DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
    const unsigned char *jpegBuf, unsigned long jpegSize,
   * @param pixelFormat pixel format of the destination image (see @ref TJPF
   * "Pixel formats".)
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
   */
  DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf,
    int pad, int subsamp, unsigned char *dstBuf, int width, int pitch,
   * @param pixelFormat pixel format of the destination image (see @ref TJPF
   * "Pixel formats".)
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
   */
  DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
    const unsigned char **srcPlanes, const int *strides, int subsamp,
@@@ -1476,11 -1414,10 +1475,11 @@@ DLLEXPORT tjhandle DLLCALL tjInitTransf
   * which specifies the transform parameters and/or cropping region for the
   * corresponding transformed output image.
   *
-  * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+  * @param flags the bitwise OR of one or more of the @ref TJFLAG_ACCURATEDCT
   * "flags"
   *
 - * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
 + * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr2()
 + * and #tjGetErrorCode().)
   */
  DLLEXPORT int DLLCALL tjTransform(tjhandle handle,
    const unsigned char *jpegBuf, unsigned long jpegSize, int n,