diff options
author | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2014-08-17 12:23:49 +0000 |
---|---|---|
committer | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2014-08-17 12:23:49 +0000 |
commit | 7cf01068d01ad27a42b682b81e1829073f00680a (patch) | |
tree | 2dbb715e1f2e148b178920da98ea63ee59272a59 /java/doc/org/libjpegturbo/turbojpeg/YUVImage.html | |
parent | 13d2bd8952748c7d38282b8fbc6a5c6a33de43e5 (diff) |
Refactored YUVImage Java class so that it supports both unified YUV image buffers as well as separate YUV image planes; modified the JNI functions accordingly and added new helper functions to the TurboJPEG C API (tjPlaneWidth(), tjPlaneHeight(), tjPlaneSizeYUV()) to facilitate those modifications; changed potentially confusing "component width" and "component height" terms to "plane width" and "plane height" and modified variable names in turbojpeg.c to reflect this; numerous other documentation tweaks
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1360 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'java/doc/org/libjpegturbo/turbojpeg/YUVImage.html')
-rw-r--r-- | java/doc/org/libjpegturbo/turbojpeg/YUVImage.html | 319 |
1 files changed, 272 insertions, 47 deletions
diff --git a/java/doc/org/libjpegturbo/turbojpeg/YUVImage.html b/java/doc/org/libjpegturbo/turbojpeg/YUVImage.html index 3e7a6e8..0a3e0a5 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/YUVImage.html +++ b/java/doc/org/libjpegturbo/turbojpeg/YUVImage.html @@ -108,20 +108,18 @@ extends java.lang.Object</pre> image format consisting of Y, Cb, and Cr image planes. <p> Each plane is simply a 2D array of bytes, each byte representing the value - of one of the components at a particular location in the image. The - "component width" and "component height" of each plane are determined by the - image width, height, and level of chrominance subsampling. For the - luminance plane, the component width is the image width padded to the - nearest multiple of the horizontal subsampling factor (2 in the case of - 4:2:0 and 4:2:2, 4 in the case of 4:1:1, 1 in the case of 4:4:4 or - grayscale.) Similarly, the component height of the luminance plane is the - image height padded to the nearest multiple of the vertical subsampling - factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4 or - grayscale.) The component width of the chrominance planes is equal to the - component width of the luminance plane divided by the horizontal subsampling - factor, and the component height of the chrominance planes is equal to the - component height of the luminance plane divided by the vertical subsampling - factor. + of one of the components (Y, Cb, or Cr) at a particular location in the + image. The width and height of each plane are determined by the image + width, height, and level of chrominance subsampling. The luminance plane + width is the image width padded to the nearest multiple of the horizontal + subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of + 4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane + height is the image height padded to the nearest multiple of the vertical + subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4 + or grayscale.) The chrominance plane width is equal to the luminance plane + width divided by the horizontal subsampling factor, and the chrominance + plane height is equal to the luminance plane height divided by the vertical + subsampling factor. <p> For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is used, then the luminance plane would be 36 x 35 bytes, and each of the @@ -151,18 +149,26 @@ extends java.lang.Object</pre> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#handle">handle</a></strong></code> </td> </tr> <tr class="rowColor"> -<td class="colFirst"><code>protected byte[]</code></td> -<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvBuf">yuvBuf</a></strong></code> </td> -</tr> -<tr class="altColor"> <td class="colFirst"><code>protected int</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvHeight">yuvHeight</a></strong></code> </td> </tr> +<tr class="altColor"> +<td class="colFirst"><code>protected int[]</code></td> +<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvOffsets">yuvOffsets</a></strong></code> </td> +</tr> <tr class="rowColor"> <td class="colFirst"><code>protected int</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPad">yuvPad</a></strong></code> </td> </tr> <tr class="altColor"> +<td class="colFirst"><code>protected byte[][]</code></td> +<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPlanes">yuvPlanes</a></strong></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>protected int[]</code></td> +<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvStrides">yuvStrides</a></strong></code> </td> +</tr> +<tr class="altColor"> <td class="colFirst"><code>protected int</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvSubsamp">yuvSubsamp</a></strong></code> </td> </tr> @@ -185,21 +191,42 @@ extends java.lang.Object</pre> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> -<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[], int, int, int, int)">YUVImage</a></strong>(byte[] yuvImage, +<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[][],%20int[],%20int,%20int[],%20int,%20int)">YUVImage</a></strong>(byte[][] planes, + int[] offsets, + int width, + int[] strides, + int height, + int subsamp)</code> +<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image + planes.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[],%20int,%20int,%20int,%20int)">YUVImage</a></strong>(byte[] yuvImage, int width, int pad, int height, int subsamp)</code> -<div class="block">Create a <code>YUVImage</code> instance from an existing YUV planar image +<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image buffer.</div> </td> </tr> +<tr class="altColor"> +<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int[],%20int,%20int)">YUVImage</a></strong>(int width, + int[] strides, + int height, + int subsamp)</code> +<div class="block">Create a new <code>YUVImage</code> instance backed by separate image + planes, and allocate memory for the image planes.</div> +</td> +</tr> <tr class="rowColor"> -<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int, int, int, int)">YUVImage</a></strong>(int width, +<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int,%20int,%20int)">YUVImage</a></strong>(int width, int pad, int height, int subsamp)</code> -<div class="block">Create a <code>YUVImage</code> instance with a new image buffer.</div> +<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image + buffer, and allocate memory for the image buffer.</div> </td> </tr> </table> @@ -220,48 +247,80 @@ extends java.lang.Object</pre> <tr class="altColor"> <td class="colFirst"><code>byte[]</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getBuf()">getBuf</a></strong>()</code> -<div class="block">Returns the YUV image buffer</div> +<div class="block">Returns the YUV image buffer (if this image is stored in a unified + buffer rather than separate image planes.)</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getHeight()">getHeight</a></strong>()</code> -<div class="block">Returns the height of the YUV image.</div> +<div class="block">Returns the height of the YUV image (or subregion.)</div> </td> </tr> <tr class="altColor"> +<td class="colFirst"><code>int[]</code></td> +<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getOffsets()">getOffsets</a></strong>()</code> +<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger + YUV image.</div> +</td> +</tr> +<tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPad()">getPad</a></strong>()</code> -<div class="block">Returns the line padding used in the YUV image buffer.</div> +<div class="block">Returns the line padding used in the YUV image buffer (if this image is + stored in a unified buffer rather than separate image planes.)</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>byte[][]</code></td> +<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPlanes()">getPlanes</a></strong>()</code> +<div class="block">Returns the YUV image planes.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSize()">getSize</a></strong>()</code> -<div class="block">Returns the size (in bytes) of the YUV image buffer</div> +<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is + stored in a unified buffer rather than separate image planes.)</div> </td> </tr> <tr class="altColor"> +<td class="colFirst"><code>int[]</code></td> +<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getStrides()">getStrides</a></strong>()</code> +<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div> +</td> +</tr> +<tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSubsamp()">getSubsamp</a></strong>()</code> <div class="block">Returns the level of chrominance subsampling used in the YUV image.</div> </td> </tr> -<tr class="rowColor"> +<tr class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getWidth()">getWidth</a></strong>()</code> -<div class="block">Returns the width of the YUV image.</div> +<div class="block">Returns the width of the YUV image (or subregion.)</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[][],%20int[],%20int,%20int[],%20int,%20int)">setBuf</a></strong>(byte[][] planes, + int[] offsets, + int width, + int[] strides, + int height, + int subsamp)</code> +<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[], int, int, int, int)">setBuf</a></strong>(byte[] yuvImage, +<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[],%20int,%20int,%20int,%20int)">setBuf</a></strong>(byte[] yuvImage, int width, int pad, int height, int subsamp)</code> -<div class="block">Assign an existing YUV planar image buffer to this <code>YUVImage</code> - instance.</div> +<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div> </td> </tr> </table> @@ -295,13 +354,31 @@ extends java.lang.Object</pre> <pre>protected long handle</pre> </li> </ul> -<a name="yuvBuf"> +<a name="yuvPlanes"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> -<h4>yuvBuf</h4> -<pre>protected byte[] yuvBuf</pre> +<h4>yuvPlanes</h4> +<pre>protected byte[][] yuvPlanes</pre> +</li> +</ul> +<a name="yuvOffsets"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>yuvOffsets</h4> +<pre>protected int[] yuvOffsets</pre> +</li> +</ul> +<a name="yuvStrides"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>yuvStrides</h4> +<pre>protected int[] yuvStrides</pre> </li> </ul> <a name="yuvPad"> @@ -348,6 +425,31 @@ extends java.lang.Object</pre> <!-- --> </a> <h3>Constructor Detail</h3> +<a name="YUVImage(int, int[], int, int)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>YUVImage</h4> +<pre>public YUVImage(int width, + int[] strides, + int height, + int subsamp) + throws java.lang.Exception</pre> +<div class="block">Create a new <code>YUVImage</code> instance backed by separate image + planes, and allocate memory for the image planes.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes + per line in the corresponding plane of the YUV image. Setting the stride + for any plane to 0 is the same as setting it to the plane width (see + <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the + strides for all planes will be set to their respective plane widths. When + using this constructor, the stride for each plane must be equal to or + greater than the plane width.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV + image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.Exception</code></dd></dl> +</li> +</ul> <a name="YUVImage(int, int, int, int)"> <!-- --> </a> @@ -359,7 +461,8 @@ extends java.lang.Object</pre> int height, int subsamp) throws java.lang.Exception</pre> -<div class="block">Create a <code>YUVImage</code> instance with a new image buffer.</div> +<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image + buffer, and allocate memory for the image buffer.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - Each line of each plane in the YUV image buffer will be padded to this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd> @@ -367,6 +470,44 @@ extends java.lang.Object</pre> <dd><code>java.lang.Exception</code></dd></dl> </li> </ul> +<a name="YUVImage(byte[][], int[], int, int[], int, int)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>YUVImage</h4> +<pre>public YUVImage(byte[][] planes, + int[] offsets, + int width, + int[] strides, + int height, + int subsamp) + throws java.lang.Exception</pre> +<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image + planes.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr) + image planes (or just the Y plane, if the image is grayscale.) These + planes can be contiguous or non-contiguous in memory. Plane + <code>i</code> should be at least <code>offsets[i] + + <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a>(i, width, strides[i], height, subsamp)</code> + bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a + subregion of a larger image, then <code>offsets[i]</code> specifies the + offset (in bytes) of the subregion within plane <code>i</code> of the + larger image. Setting this to null is the same as setting the offsets for + all planes to 0.</dd><dd><code>width</code> - width (in pixels) of the new YUV image (or subregion)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes + per line in the corresponding plane of the YUV image. Setting the stride + for any plane to 0 is the same as setting it to the plane width (see + <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the + strides for all planes will be set to their respective plane widths. You + can adjust the strides in order to add an arbitrary amount of line padding + to each plane or to specify that this <code>YUVImage</code> instance is a + subregion of a larger image (in which case, <code>strides[i]</code> should + be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the new YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV + image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.Exception</code></dd></dl> +</li> +</ul> <a name="YUVImage(byte[], int, int, int, int)"> <!-- --> </a> @@ -379,10 +520,10 @@ extends java.lang.Object</pre> int height, int subsamp) throws java.lang.Exception</pre> -<div class="block">Create a <code>YUVImage</code> instance from an existing YUV planar image +<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image buffer.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar - image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for + image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for this buffer. The Y, U (Cb), and V (Cr) image planes are stored sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For @@ -401,6 +542,43 @@ extends java.lang.Object</pre> <!-- --> </a> <h3>Method Detail</h3> +<a name="setBuf(byte[][], int[], int, int[], int, int)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setBuf</h4> +<pre>public void setBuf(byte[][] planes, + int[] offsets, + int width, + int[] strides, + int height, + int subsamp) + throws java.lang.Exception</pre> +<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr) + image planes (or just the Y plane, if the image is grayscale.) These + planes can be contiguous or non-contiguous in memory. Plane + <code>i</code> should be at least <code>offsets[i] + + <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a>(i, width, strides[i], height, subsamp)</code> + bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a + subregion of a larger image, then <code>offsets[i]</code> specifies the + offset (in bytes) of the subregion within plane <code>i</code> of the + larger image. Setting this to null is the same as setting the offsets for + all planes to 0.</dd><dd><code>width</code> - width (in pixels) of the YUV image (or subregion)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes + per line in the corresponding plane of the YUV image. Setting the stride + for any plane to 0 is the same as setting it to the plane width (see + <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the + strides for all planes will be set to their respective plane widths. You + can adjust the strides in order to add an arbitrary amount of line padding + to each plane or to specify that this <code>YUVImage</code> image is a + subregion of a larger image (in which case, <code>strides[i]</code> should + be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV + image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.Exception</code></dd></dl> +</li> +</ul> <a name="setBuf(byte[], int, int, int, int)"> <!-- --> </a> @@ -413,10 +591,9 @@ extends java.lang.Object</pre> int height, int subsamp) throws java.lang.Exception</pre> -<div class="block">Assign an existing YUV planar image buffer to this <code>YUVImage</code> - instance.</div> +<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar - image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int, int, int, int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for + image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for this buffer. The Y, U (Cb), and V (Cr) image planes are stored sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For @@ -435,8 +612,8 @@ extends java.lang.Object</pre> <h4>getWidth</h4> <pre>public int getWidth() throws java.lang.Exception</pre> -<div class="block">Returns the width of the YUV image.</div> -<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the YUV image</dd> +<div class="block">Returns the width of the YUV image (or subregion.)</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the YUV image (or subregion)</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.Exception</code></dd></dl> </li> @@ -449,8 +626,8 @@ extends java.lang.Object</pre> <h4>getHeight</h4> <pre>public int getHeight() throws java.lang.Exception</pre> -<div class="block">Returns the height of the YUV image.</div> -<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the YUV image</dd> +<div class="block">Returns the height of the YUV image (or subregion.)</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the YUV image (or subregion)</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.Exception</code></dd></dl> </li> @@ -463,12 +640,43 @@ extends java.lang.Object</pre> <h4>getPad</h4> <pre>public int getPad() throws java.lang.Exception</pre> -<div class="block">Returns the line padding used in the YUV image buffer.</div> +<div class="block">Returns the line padding used in the YUV image buffer (if this image is + stored in a unified buffer rather than separate image planes.)</div> <dl><dt><span class="strong">Returns:</span></dt><dd>the line padding used in the YUV image buffer</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.Exception</code></dd></dl> </li> </ul> +<a name="getStrides()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getStrides</h4> +<pre>public int[] getStrides() + throws java.lang.Exception</pre> +<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>the number of bytes per line of each plane in the YUV image</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.Exception</code></dd></dl> +</li> +</ul> +<a name="getOffsets()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getOffsets</h4> +<pre>public int[] getOffsets() + throws java.lang.Exception</pre> +<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger + YUV image.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>the offsets (in bytes) of each plane within the planes of a larger + YUV image</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.Exception</code></dd></dl> +</li> +</ul> <a name="getSubsamp()"> <!-- --> </a> @@ -484,6 +692,21 @@ extends java.lang.Object</pre> <dd><code>java.lang.Exception</code></dd></dl> </li> </ul> +<a name="getPlanes()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getPlanes</h4> +<pre>public byte[][] getPlanes() + throws java.lang.Exception</pre> +<div class="block">Returns the YUV image planes. If the image is stored in a unified buffer, + then all image planes will point to that buffer.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image planes</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.Exception</code></dd></dl> +</li> +</ul> <a name="getBuf()"> <!-- --> </a> @@ -492,7 +715,8 @@ extends java.lang.Object</pre> <h4>getBuf</h4> <pre>public byte[] getBuf() throws java.lang.Exception</pre> -<div class="block">Returns the YUV image buffer</div> +<div class="block">Returns the YUV image buffer (if this image is stored in a unified + buffer rather than separate image planes.)</div> <dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image buffer</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.Exception</code></dd></dl> @@ -506,7 +730,8 @@ extends java.lang.Object</pre> <h4>getSize</h4> <pre>public int getSize() throws java.lang.Exception</pre> -<div class="block">Returns the size (in bytes) of the YUV image buffer</div> +<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is + stored in a unified buffer rather than separate image planes.)</div> <dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV image buffer</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.lang.Exception</code></dd></dl> |