Add flags to the TurboJPEG API that allow the caller to force the use of either the fast or the accurate DCT/IDCT algorithms in the underlying codec.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@851 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/java/TJExample.java b/java/TJExample.java
index 36c1a8f..e726892 100644
--- a/java/TJExample.java
+++ b/java/TJExample.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C)2011 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011-2012 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -81,6 +81,12 @@
System.out.println(" for 4:2:0.)\n");
System.out.println("-display = Display output image (Output file need not be specified in this");
System.out.println(" case.)\n");
+ System.out.println("-fastupsample = Use the fastest chrominance upsampling algorithm available in");
+ System.out.println(" the underlying codec\n");
+ System.out.println("-fastdct = Use the fastest DCT/IDCT algorithms available in the underlying");
+ System.out.println(" codec\n");
+ System.out.println("-accuratedct = Use the most accurate DCT/IDCT algorithms available in the");
+ System.out.println(" underlying codec\n");
System.exit(1);
}
@@ -92,6 +98,7 @@
BufferedImage img = null; byte[] bmpBuf = null;
TJTransform xform = new TJTransform();
+ int flags = 0;
try {
@@ -187,6 +194,18 @@
}
if(argv[i].substring(0, 2).equalsIgnoreCase("-d"))
display = true;
+ if(argv[i].equalsIgnoreCase("-fastupsample")) {
+ System.out.println("Using fast upsampling code");
+ flags |= TJ.FLAG_FASTUPSAMPLE;
+ }
+ if(argv[i].equalsIgnoreCase("-fastdct")) {
+ System.out.println("Using fastest DCT/IDCT algorithm");
+ flags |= TJ.FLAG_FASTDCT;
+ }
+ if(argv[i].equalsIgnoreCase("-accuratedct")) {
+ System.out.println("Using most accurate DCT/IDCT algorithm");
+ flags |= TJ.FLAG_ACCURATEDCT;
+ }
}
}
String[] inFileTokens = argv[0].split("\\.");
@@ -247,8 +266,9 @@
height = scaleFactor.getScaled(height);
if(!outFormat.equalsIgnoreCase("jpg"))
- img = tjd.decompress(width, height, BufferedImage.TYPE_INT_RGB, 0);
- else bmpBuf = tjd.decompress(width, 0, height, TJ.PF_BGRX, 0);
+ img = tjd.decompress(width, height, BufferedImage.TYPE_INT_RGB,
+ flags);
+ else bmpBuf = tjd.decompress(width, 0, height, TJ.PF_BGRX, flags);
tjd.close();
}
else {
@@ -282,10 +302,10 @@
tjc.setSubsamp(outSubsamp);
tjc.setJPEGQuality(outQual);
if(img != null)
- jpegBuf = tjc.compress(img, 0);
+ jpegBuf = tjc.compress(img, flags);
else {
tjc.setSourceImage(bmpBuf, width, 0, height, TJ.PF_BGRX);
- jpegBuf = tjc.compress(0);
+ jpegBuf = tjc.compress(flags);
}
jpegSize = tjc.getCompressedSize();
tjc.close();
diff --git a/java/doc/allclasses-frame.html b/java/doc/allclasses-frame.html
index 73d5fb9..336473c 100644
--- a/java/doc/allclasses-frame.html
+++ b/java/doc/allclasses-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
All Classes
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/java/doc/allclasses-noframe.html b/java/doc/allclasses-noframe.html
index 8392bfd..ad7cd9e 100644
--- a/java/doc/allclasses-noframe.html
+++ b/java/doc/allclasses-noframe.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
All Classes
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/java/doc/constant-values.html b/java/doc/constant-values.html
index ca1f208..8cf0ae7 100644
--- a/java/doc/constant-values.html
+++ b/java/doc/constant-values.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
Constant Field Values
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
@@ -101,12 +101,24 @@
<TH ALIGN="left" COLSPAN="3">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
+<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<CODE>public static final int</CODE></FONT></TD>
+<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</A></CODE></TD>
+<TD ALIGN="right"><CODE>4096</CODE></TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
<CODE>public static final int</CODE></FONT></TD>
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</A></CODE></TD>
<TD ALIGN="right"><CODE>2</CODE></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
+<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<CODE>public static final int</CODE></FONT></TD>
+<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</A></CODE></TD>
+<TD ALIGN="right"><CODE>2048</CODE></TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
<CODE>public static final int</CODE></FONT></TD>
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</A></CODE></TD>
diff --git a/java/doc/deprecated-list.html b/java/doc/deprecated-list.html
index de71e8c..b7d3689 100644
--- a/java/doc/deprecated-list.html
+++ b/java/doc/deprecated-list.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
Deprecated List
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/java/doc/help-doc.html b/java/doc/help-doc.html
index 5beef37..fc2ff59 100644
--- a/java/doc/help-doc.html
+++ b/java/doc/help-doc.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
API Help
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/java/doc/index-all.html b/java/doc/index-all.html
index 8ee0112..69d4104 100644
--- a/java/doc/index-all.html
+++ b/java/doc/index-all.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
Index
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="./stylesheet.css" TITLE="Style">
@@ -199,30 +199,37 @@
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()"><B>finalize()</B></A> -
Method in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>
<DD>
+<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT"><B>FLAG_ACCURATEDCT</B></A> -
+Static variable in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
+<DD>Use the most accurate DCT/IDCT algorithm available in the underlying
+ codec.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><B>FLAG_BOTTOMUP</B></A> -
Static variable in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
<DD>The uncompressed source/destination image is stored in bottom-up (Windows,
OpenGL) order, not top-down (X11) order.
+<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT"><B>FLAG_FASTDCT</B></A> -
+Static variable in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
+<DD>Use the fastest DCT/IDCT algorithm available in the underlying codec.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE"><B>FLAG_FASTUPSAMPLE</B></A> -
Static variable in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
-<DD>Use fast, inaccurate chrominance upsampling routines in the JPEG
- decompressor (libjpeg and libjpeg-turbo versions only.)
+<DD>When decompressing, use the fastest chrominance upsampling algorithm
+ available in the underlying codec.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX"><B>FLAG_FORCEMMX</B></A> -
Static variable in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
<DD>Turn off CPU auto-detection and force TurboJPEG to use MMX code
- (IPP and 32-bit libjpeg-turbo versions only.)
+ (if the underlying codec supports it.)
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE"><B>FLAG_FORCESSE</B></A> -
Static variable in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
<DD>Turn off CPU auto-detection and force TurboJPEG to use SSE code
- (32-bit IPP and 32-bit libjpeg-turbo versions only.)
+ (if the underlying codec supports it.)
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2"><B>FLAG_FORCESSE2</B></A> -
Static variable in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
<DD>Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
- (32-bit IPP and 32-bit libjpeg-turbo versions only.)
+ (if the underlying codec supports it.)
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3"><B>FLAG_FORCESSE3</B></A> -
Static variable in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
<DD>Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
-(64-bit IPP version only.)
+ (if the underlying codec supports it.)
</DL>
<HR>
<A NAME="_G_"><!-- --></A><H2>
diff --git a/java/doc/index.html b/java/doc/index.html
index 9b36a3f..f958145 100644
--- a/java/doc/index.html
+++ b/java/doc/index.html
@@ -2,7 +2,7 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc on Wed Jun 06 03:10:33 CDT 2012-->
+<!-- Generated by javadoc on Fri Jun 29 18:36:27 CDT 2012-->
<TITLE>
Generated Documentation (Untitled)
</TITLE>
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJ.html b/java/doc/org/libjpegturbo/turbojpeg/TJ.html
index ac949a8..c031b1a 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/TJ.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/TJ.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
TJ
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
@@ -117,6 +117,15 @@
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</A></B></CODE>
+
+<BR>
+ Use the most accurate DCT/IDCT algorithm available in the underlying
+ codec.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</A></B></CODE>
<BR>
@@ -126,11 +135,19 @@
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</A></B></CODE>
+
+<BR>
+ Use the fastest DCT/IDCT algorithm available in the underlying codec.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</A></B></CODE>
<BR>
- Use fast, inaccurate chrominance upsampling routines in the JPEG
- decompressor (libjpeg and libjpeg-turbo versions only.)</TD>
+ When decompressing, use the fastest chrominance upsampling algorithm
+ available in the underlying codec.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -139,7 +156,7 @@
<BR>
Turn off CPU auto-detection and force TurboJPEG to use MMX code
- (IPP and 32-bit libjpeg-turbo versions only.)</TD>
+ (if the underlying codec supports it.)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -148,7 +165,7 @@
<BR>
Turn off CPU auto-detection and force TurboJPEG to use SSE code
- (32-bit IPP and 32-bit libjpeg-turbo versions only.)</TD>
+ (if the underlying codec supports it.)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -157,7 +174,7 @@
<BR>
Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
- (32-bit IPP and 32-bit libjpeg-turbo versions only.)</TD>
+ (if the underlying codec supports it.)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -166,7 +183,7 @@
<BR>
Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
-(64-bit IPP version only.)</TD>
+ (if the underlying codec supports it.)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -711,7 +728,7 @@
public static final int <B>FLAG_FORCEMMX</B></PRE>
<DL>
<DD>Turn off CPU auto-detection and force TurboJPEG to use MMX code
- (IPP and 32-bit libjpeg-turbo versions only.)
+ (if the underlying codec supports it.)
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX">Constant Field Values</A></DL>
@@ -724,7 +741,7 @@
public static final int <B>FLAG_FORCESSE</B></PRE>
<DL>
<DD>Turn off CPU auto-detection and force TurboJPEG to use SSE code
- (32-bit IPP and 32-bit libjpeg-turbo versions only.)
+ (if the underlying codec supports it.)
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE">Constant Field Values</A></DL>
@@ -737,7 +754,7 @@
public static final int <B>FLAG_FORCESSE2</B></PRE>
<DL>
<DD>Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
- (32-bit IPP and 32-bit libjpeg-turbo versions only.)
+ (if the underlying codec supports it.)
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2">Constant Field Values</A></DL>
@@ -750,7 +767,7 @@
public static final int <B>FLAG_FORCESSE3</B></PRE>
<DL>
<DD>Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
-(64-bit IPP version only.)
+ (if the underlying codec supports it.)
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3">Constant Field Values</A></DL>
@@ -762,12 +779,50 @@
<PRE>
public static final int <B>FLAG_FASTUPSAMPLE</B></PRE>
<DL>
-<DD>Use fast, inaccurate chrominance upsampling routines in the JPEG
- decompressor (libjpeg and libjpeg-turbo versions only.)
+<DD>When decompressing, use the fastest chrominance upsampling algorithm
+ available in the underlying codec. The default is to use smooth
+ upsampling, which creates a smooth transition between neighboring
+ chrominance components in order to reduce upsampling artifacts in the
+ decompressed image.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">Constant Field Values</A></DL>
</DL>
+<HR>
+
+<A NAME="FLAG_FASTDCT"><!-- --></A><H3>
+FLAG_FASTDCT</H3>
+<PRE>
+public static final int <B>FLAG_FASTDCT</B></PRE>
+<DL>
+<DD>Use the fastest DCT/IDCT algorithm available in the underlying codec. The
+ default if this flag is not specified is implementation-specific. The
+ libjpeg implementation, for example, uses the fast algorithm by default
+ when compressing, because this has been shown to have only a very slight
+ effect on accuracy, but it uses the accurate algorithm when decompressing,
+ because this has been shown to have a larger effect.
+<P>
+<DL>
+<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">Constant Field Values</A></DL>
+</DL>
+<HR>
+
+<A NAME="FLAG_ACCURATEDCT"><!-- --></A><H3>
+FLAG_ACCURATEDCT</H3>
+<PRE>
+public static final int <B>FLAG_ACCURATEDCT</B></PRE>
+<DL>
+<DD>Use the most accurate DCT/IDCT algorithm available in the underlying
+ codec. The default if this flag is not specified is
+ implementation-specific. The libjpeg implementation, for example, uses
+ the fast algorithm by default when compressing, because this has been
+ shown to have only a very slight effect on accuracy, but it uses the
+ accurate algorithm when decompressing, because this has been shown to have
+ a larger effect.
+<P>
+<DL>
+<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">Constant Field Values</A></DL>
+</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html
index e21a954..d7b6c22 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
TJCompressor
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html b/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html
index 49911ab..7ae4767 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/TJCustomFilter.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
TJCustomFilter
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html
index de5dcb9..cd5b9eb 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
TJDecompressor
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html b/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html
index 68e64b8..38e4c78 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/TJScalingFactor.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
TJScalingFactor
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html b/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html
index ff4a539..c521d53 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/TJTransform.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
TJTransform
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html
index 929b412..11f1d4e 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/TJTransformer.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
TJTransformer
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-frame.html b/java/doc/org/libjpegturbo/turbojpeg/package-frame.html
index f4b8348..b340c9d 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/package-frame.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/package-frame.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
org.libjpegturbo.turbojpeg
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-summary.html b/java/doc/org/libjpegturbo/turbojpeg/package-summary.html
index acca4fd..89d2e04 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/package-summary.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/package-summary.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
org.libjpegturbo.turbojpeg
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-tree.html b/java/doc/org/libjpegturbo/turbojpeg/package-tree.html
index 41b9c16..da7e743 100644
--- a/java/doc/org/libjpegturbo/turbojpeg/package-tree.html
+++ b/java/doc/org/libjpegturbo/turbojpeg/package-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
org.libjpegturbo.turbojpeg Class Hierarchy
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
diff --git a/java/doc/overview-tree.html b/java/doc/overview-tree.html
index 07caa97..b161e73 100644
--- a/java/doc/overview-tree.html
+++ b/java/doc/overview-tree.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
Class Hierarchy
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/java/doc/serialized-form.html b/java/doc/serialized-form.html
index b5fdd4d..b626f00 100644
--- a/java/doc/serialized-form.html
+++ b/java/doc/serialized-form.html
@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_31) on Wed Jun 06 03:10:33 CDT 2012 -->
+<!-- Generated by javadoc (build 1.6.0_33) on Fri Jun 29 18:36:27 CDT 2012 -->
<TITLE>
Serialized Form
</TITLE>
-<META NAME="date" CONTENT="2012-06-06">
+<META NAME="date" CONTENT="2012-06-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/java/org/libjpegturbo/turbojpeg/TJ.java b/java/org/libjpegturbo/turbojpeg/TJ.java
index 5e0c0b7..78a72f6 100644
--- a/java/org/libjpegturbo/turbojpeg/TJ.java
+++ b/java/org/libjpegturbo/turbojpeg/TJ.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C)2011 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011-2012 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -272,29 +272,51 @@
final public static int FLAG_BOTTOMUP = 2;
/**
* Turn off CPU auto-detection and force TurboJPEG to use MMX code
- * (IPP and 32-bit libjpeg-turbo versions only.)
+ * (if the underlying codec supports it.)
*/
final public static int FLAG_FORCEMMX = 8;
/**
* Turn off CPU auto-detection and force TurboJPEG to use SSE code
- * (32-bit IPP and 32-bit libjpeg-turbo versions only.)
+ * (if the underlying codec supports it.)
*/
final public static int FLAG_FORCESSE = 16;
/**
* Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
- * (32-bit IPP and 32-bit libjpeg-turbo versions only.)
+ * (if the underlying codec supports it.)
*/
final public static int FLAG_FORCESSE2 = 32;
/**
* Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
- *(64-bit IPP version only.)
+ * (if the underlying codec supports it.)
*/
final public static int FLAG_FORCESSE3 = 128;
/**
- * Use fast, inaccurate chrominance upsampling routines in the JPEG
- * decompressor (libjpeg and libjpeg-turbo versions only.)
+ * When decompressing, use the fastest chrominance upsampling algorithm
+ * available in the underlying codec. The default is to use smooth
+ * upsampling, which creates a smooth transition between neighboring
+ * chrominance components in order to reduce upsampling artifacts in the
+ * decompressed image.
*/
final public static int FLAG_FASTUPSAMPLE = 256;
+ /**
+ * Use the fastest DCT/IDCT algorithm available in the underlying codec. The
+ * default if this flag is not specified is implementation-specific. The
+ * libjpeg implementation, for example, uses the fast algorithm by default
+ * when compressing, because this has been shown to have only a very slight
+ * effect on accuracy, but it uses the accurate algorithm when decompressing,
+ * because this has been shown to have a larger effect.
+ */
+ final public static int FLAG_FASTDCT = 2048;
+ /**
+ * Use the most accurate DCT/IDCT algorithm available in the underlying
+ * codec. The default if this flag is not specified is
+ * implementation-specific. The libjpeg implementation, for example, uses
+ * the fast algorithm by default when compressing, because this has been
+ * shown to have only a very slight effect on accuracy, but it uses the
+ * accurate algorithm when decompressing, because this has been shown to have
+ * a larger effect.
+ */
+ final public static int FLAG_ACCURATEDCT = 4096;
/**