Re-work TJBUFSIZE() to take into account the level of chrominance subsampling
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@668 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/java/doc/allclasses-frame.html b/java/doc/allclasses-frame.html
index 038f9ad..1ed402a 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
All Classes
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 964f111..dd2f4f1 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
All Classes
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 17936ea..abfbf15 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
Constant Field Values
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
diff --git a/java/doc/deprecated-list.html b/java/doc/deprecated-list.html
index ac6d82c..f8ea290 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
Deprecated List
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 27fbb7f..1733e1f 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
API Help
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 af5f275..8940402 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
Index
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<LINK REL ="stylesheet" TYPE="text/css" HREF="./stylesheet.css" TITLE="Style">
@@ -80,10 +80,11 @@
<A NAME="_B_"><!-- --></A><H2>
<B>B</B></H2>
<DL>
-<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int)"><B>bufSize(int, int)</B></A> -
+<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><B>bufSize(int, int, int)</B></A> -
Static method in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
<DD>Returns the maximum size of the buffer (in bytes) required to hold a JPEG
- image with the given width and height.
+ image with the given width and height, and level of chrominance
+ subsampling.
<DT><A HREF="./org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int)"><B>bufSizeYUV(int, int, int)</B></A> -
Static method in class org.libjpegturbo.turbojpeg.<A HREF="./org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
<DD>Returns the size of the buffer (in bytes) required to hold a YUV planar
diff --git a/java/doc/index.html b/java/doc/index.html
index abf4dd4..64965ea 100644
--- a/java/doc/index.html
+++ b/java/doc/index.html
@@ -2,7 +2,7 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc on Fri Apr 01 20:49:05 CDT 2011-->
+<!-- Generated by javadoc on Mon Jul 11 21:40:35 CDT 2011-->
<TITLE>
Generated Documentation (Untitled)
</TITLE>
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJ.html b/java/doc/org/libjpegturbo/turbojpeg/TJ.html
index 86e33d6..6c07d32 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_24) on Fri Apr 01 20:49:04 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
TJ
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
@@ -309,12 +309,14 @@
<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#bufSize(int, int)">bufSize</A></B>(int width,
- int height)</CODE>
+<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)">bufSize</A></B>(int width,
+ int height,
+ int jpegSubsamp)</CODE>
<BR>
Returns the maximum size of the buffer (in bytes) required to hold a JPEG
- image with the given width and height.</TD>
+ image with the given width and height, and level of chrominance
+ subsampling.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -821,20 +823,24 @@
</DL>
<HR>
-<A NAME="bufSize(int, int)"><!-- --></A><H3>
+<A NAME="bufSize(int, int, int)"><!-- --></A><H3>
bufSize</H3>
<PRE>
public static int <B>bufSize</B>(int width,
- int height)
+ int height,
+ int jpegSubsamp)
throws java.lang.Exception</PRE>
<DL>
<DD>Returns the maximum size of the buffer (in bytes) required to hold a JPEG
- image with the given width and height.
+ image with the given width and height, and level of chrominance
+ subsampling.
<P>
<DD><DL>
-<DT><B>Parameters:</B><DD><CODE>width</CODE> - the width (in pixels) of the JPEG image<DD><CODE>height</CODE> - the height (in pixels) of the JPEG image
+<DT><B>Parameters:</B><DD><CODE>width</CODE> - the width (in pixels) of the JPEG image<DD><CODE>height</CODE> - the height (in pixels) of the JPEG image<DD><CODE>jpegSubsamp</CODE> - the level of chrominance subsampling to be used when
+ generating the JPEG image (one of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.SAMP_*</CODE></A>)
<DT><B>Returns:</B><DD>the maximum size of the buffer (in bytes) required to hold a JPEG
- image with the given width and height
+ image with the given width and height, and level of chrominance
+ subsampling
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
@@ -854,7 +860,7 @@
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>width</CODE> - the width (in pixels) of the YUV image<DD><CODE>height</CODE> - the height (in pixels) of the YUV image<DD><CODE>subsamp</CODE> - the level of chrominance subsampling used in the YUV
- image
+ image (one of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.SAMP_*</CODE></A>)
<DT><B>Returns:</B><DD>the size of the buffer (in bytes) required to hold a YUV planar
image with the given width, height, and level of chrominance subsampling
<DT><B>Throws:</B>
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html
index b9a8fc4..566c877 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
TJCompressor
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
@@ -421,7 +421,7 @@
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dstBuf</CODE> - buffer which will receive the JPEG image. Use
- <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int)"><CODE>TJ.bufSize(int, int)</CODE></A> to determine the maximum size for this buffer based on
+ <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the maximum size for this buffer based on
the image width and height.<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
@@ -462,7 +462,7 @@
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>srcImage</CODE> - a <code>BufferedImage</code> instance containing RGB or
grayscale pixels to be compressed<DD><CODE>dstBuf</CODE> - buffer which will receive the JPEG image. Use
- <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int)"><CODE>TJ.bufSize(int, int)</CODE></A> to determine the maximum size for this buffer based on
+ <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the maximum size for this buffer based on
the image width and height.<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html
index f610afe..4d37d71 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
TJDecompressor
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 867f418..166acfb 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
TJScalingFactor
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 fecccea..bb64cc3 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
TJTransform
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 d3da485..280b82f 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
TJTransformer
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
@@ -313,7 +313,7 @@
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dstBufs</CODE> - an array of image buffers. <code>dstbufs[i]</code> will
receive a JPEG image that has been transformed using the parameters in
- <code>transforms[i]</code>. Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int)"><CODE>TJ.bufSize(int, int)</CODE></A> to determine the
+ <code>transforms[i]</code>. Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the
maximum size for each buffer based on the cropped width and height.<DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of
which specifies the transform parameters and/or cropping region for the
corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJ.FLAG_*</CODE></A>
diff --git a/java/doc/org/libjpegturbo/turbojpeg/package-frame.html b/java/doc/org/libjpegturbo/turbojpeg/package-frame.html
index 4338f9b..cb1e2b8 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
org.libjpegturbo.turbojpeg
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 733d88d..caf1b95 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
org.libjpegturbo.turbojpeg
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 ee04a10..58d8672 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
org.libjpegturbo.turbojpeg Class Hierarchy
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 8a19a88..6ba3d6d 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
Class Hierarchy
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<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 90d6ff8..3f08701 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_24) on Fri Apr 01 20:49:05 CDT 2011 -->
+<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 11 21:40:35 CDT 2011 -->
<TITLE>
Serialized Form
</TITLE>
-<META NAME="date" CONTENT="2011-04-01">
+<META NAME="date" CONTENT="2011-07-11">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">