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.
This commit is contained in:
@@ -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 @@ public class TJExample implements TJCustomFilter {
|
||||
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 @@ public class TJExample implements TJCustomFilter {
|
||||
|
||||
BufferedImage img = null; byte[] bmpBuf = null;
|
||||
TJTransform xform = new TJTransform();
|
||||
int flags = 0;
|
||||
|
||||
try {
|
||||
|
||||
@@ -187,6 +194,18 @@ public class TJExample implements TJCustomFilter {
|
||||
}
|
||||
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 @@ public class TJExample implements TJCustomFilter {
|
||||
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 @@ public class TJExample implements TJCustomFilter {
|
||||
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();
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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 @@ org.libjpegturbo.*</FONT></TH>
|
||||
<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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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 @@ Method in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg
|
||||
<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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 @@ TurboJPEG utility class (cannot be instantiated)
|
||||
<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 @@ TurboJPEG utility class (cannot be instantiated)
|
||||
<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 @@ TurboJPEG utility class (cannot be instantiated)
|
||||
|
||||
<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 @@ TurboJPEG utility class (cannot be instantiated)
|
||||
|
||||
<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 @@ TurboJPEG utility class (cannot be instantiated)
|
||||
|
||||
<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 @@ TurboJPEG utility class (cannot be instantiated)
|
||||
|
||||
<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 @@ FLAG_FORCEMMX</H3>
|
||||
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 @@ FLAG_FORCESSE</H3>
|
||||
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 @@ FLAG_FORCESSE2</H3>
|
||||
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 @@ FLAG_FORCESSE3</H3>
|
||||
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 @@ FLAG_FASTUPSAMPLE</H3>
|
||||
<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 ======== -->
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
|
||||
@@ -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 class TJ {
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user