docs: all
mkdir -p ${srcdir}/doc; \
- javadoc -d ${srcdir}/doc -sourcepath ${srcdir} org.libjpegturbo.turbojpeg
+ javadoc -notimestamp -d ${srcdir}/doc -sourcepath ${srcdir} org.libjpegturbo.turbojpeg
endif
/*
- * Copyright (C)2009-2012 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2009-2013 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:
System.out.println(" codec");
System.out.println("-accuratedct = Use the most accurate DCT/IDCT algorithms available in the");
System.out.println(" underlying codec");
+ System.out.println("-440 = Test 4:4:0 chrominance subsampling instead of 4:2:2");
System.out.println("-quiet = Output results in tabular rather than verbose format");
System.out.println("-yuvencode = Encode RGB input as planar YUV rather than compressing as JPEG");
System.out.println("-yuvdecode = Decode JPEG image to planar YUV rather than RGB");
byte[] srcBuf = null; int w = 0, h = 0;
int minQual = -1, maxQual = -1;
int minArg = 1; int retval = 0;
+ boolean do440 = false;
try {
System.out.println("Using most accurate DCT/IDCT algorithm\n");
flags |= TJ.FLAG_ACCURATEDCT;
}
+ if (argv[i].equals("-440"))
+ do440 = true;
if (argv[i].equalsIgnoreCase("-rgb"))
pf = TJ.PF_RGB;
if (argv[i].equalsIgnoreCase("-rgbx"))
System.out.println("");
System.gc();
for (int i = maxQual; i >= minQual; i--)
- doTest(srcBuf, w, h, TJ.SAMP_422, i, argv[0]);
+ doTest(srcBuf, w, h, do440 ? TJ.SAMP_440 : TJ.SAMP_422, i, argv[0]);
System.out.println("");
System.gc();
for (int i = maxQual; i >= minQual; i--)
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
All Classes
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
All Classes
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
Constant Field Values
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
Deprecated List
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
API Help
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
Index
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="./stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc on Sat Apr 27 20:13:12 CDT 2013-->
<TITLE>
Generated Documentation (Untitled)
</TITLE>
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:11 CDT 2013 -->
<TITLE>
TJ
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<DL>
<DD>4:4:0 chrominance subsampling. The JPEG or YUV image will contain one
chrominance component for every 1x2 block of pixels in the source image.
+ Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.libjpegturbo.turbojpeg.TJ.SAMP_440">Constant Field Values</A></DL>
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.
+ default if this flag is not specified is implementation-specific. For
+ example, the implementation of TurboJPEG for libjpeg[-turbo] 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>
<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.
+ implementation-specific. For example, the implementation of TurboJPEG for
+ libjpeg[-turbo] 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>
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
TJCompressor
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
TJCustomFilter
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
TJDecompressor
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
TJScalingFactor
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
TJTransform
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
TJTransformer
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
org.libjpegturbo.turbojpeg
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
org.libjpegturbo.turbojpeg
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
org.libjpegturbo.turbojpeg Class Hierarchy
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
Class Hierarchy
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.6.0_43) on Sat Apr 27 20:13:12 CDT 2013 -->
<TITLE>
Serialized Form
</TITLE>
-<META NAME="date" CONTENT="2013-04-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
/**
* 4:4:0 chrominance subsampling. The JPEG or YUV image will contain one
* chrominance component for every 1x2 block of pixels in the source image.
+ * Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.
*/
public static final int SAMP_440 = 4;
public static final 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.
+ * default if this flag is not specified is implementation-specific. For
+ * example, the implementation of TurboJPEG for libjpeg[-turbo] 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.
*/
public static final 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.
+ * implementation-specific. For example, the implementation of TurboJPEG for
+ * libjpeg[-turbo] 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.
*/
public static final int FLAG_ACCURATEDCT = 4096;