diff --git a/doc/html/group___turbo_j_p_e_g.html b/doc/html/group___turbo_j_p_e_g.html index 7a72821e..b0ab0277 100644 --- a/doc/html/group___turbo_j_p_e_g.html +++ b/doc/html/group___turbo_j_p_e_g.html @@ -684,7 +684,8 @@ Variables

Chrominance subsampling options.

-

When an image is converted from the RGB to the YUV colorspace as part of the JPEG compression process, some of the U and V (chrominance) components can be discarded or averaged together to produce a smaller image with little perceptible loss of image clarity (the human eye is more sensitive to small changes in brightness than small changes in color.) This is called "chrominance subsampling".

+

When an image is converted from the RGB to the YCbCr colorspace as part of the JPEG compression process, some of the Cb and Cr (chrominance) components can be discarded or averaged together to produce a smaller image with little perceptible loss of image clarity (the human eye is more sensitive to small changes in brightness than small changes in color.) This is called "chrominance subsampling".

+

NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the convention of the digital video community, the TurboJPEG API uses "YUV" to refer to an image format consisting of Y, Cb, and Cr image planes.

Enumerator
TJSAMP_444 

4:4:4 chrominance subsampling (no chrominance subsampling).

@@ -1169,7 +1170,8 @@ If you choose option 1, *jpegSize should be set to the size of your

Decompress a JPEG image to a YUV planar image.

-

This function performs JPEG decompression but leaves out the color conversion step, so a planar YUV image is generated instead of an RGB image. The padding of the planes in this image is the same as in the images generated by tjEncodeYUV2(). Note that, if the width or height of the image is not an even multiple of the MCU block size (see tjMCUWidth and tjMCUHeight), then an intermediate buffer copy will be performed within TurboJPEG.

+

This function performs JPEG decompression but leaves out the color conversion step, so a planar YUV image is generated instead of an RGB image. The padding of the planes in this image is the same as in the images generated by tjEncodeYUV2(). Note that, if the width or height of the image is not an even multiple of the MCU block size (see tjMCUWidth and tjMCUHeight), then an intermediate buffer copy will be performed within TurboJPEG.

+

NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the convention of the digital video community, the TurboJPEG API uses "YUV" to refer to an image format consisting of Y, Cb, and Cr image planes.

Parameters
@@ -1276,7 +1278,8 @@ If you choose option 1, *jpegSize should be set to the size of your

Encode an RGB or grayscale image into a YUV planar image.

-

This function uses the accelerated color conversion routines in TurboJPEG's underlying codec to produce a planar YUV image that is suitable for X Video. Specifically, if the chrominance components are subsampled along the horizontal dimension, then the width of the luminance plane is padded to the nearest multiple of 2 in the output image (same goes for the height of the luminance plane, if the chrominance components are subsampled along the vertical dimension.) Also, each line of each plane in the output image is padded to 4 bytes. Although this will work with any subsampling option, it is really only useful in combination with TJ_420, which produces an image compatible with the I420 (AKA "YUV420P") format.

+

This function uses the accelerated color conversion routines in TurboJPEG's underlying codec to produce a planar YUV image that is suitable for X Video. Specifically, if the chrominance components are subsampled along the horizontal dimension, then the width of the luminance plane is padded to the nearest multiple of 2 in the output image (same goes for the height of the luminance plane, if the chrominance components are subsampled along the vertical dimension.) Also, each line of each plane in the output image is padded to 4 bytes. Although this will work with any subsampling option, it is really only useful in combination with TJ_420, which produces an image compatible with the I420 (AKA "YUV420P") format.

+

NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the convention of the digital video community, the TurboJPEG API uses "YUV" to refer to an image format consisting of Y, Cb, and Cr image planes.

Parameters
handlea handle to a TurboJPEG decompressor or transformer instance
diff --git a/java/doc/index.html b/java/doc/index.html index 87aed330..356cd1d9 100644 --- a/java/doc/index.html +++ b/java/doc/index.html @@ -9,8 +9,42 @@ Generated Documentation (Untitled) targetPage = "" + window.location.search; if (targetPage != "" && targetPage != "undefined") targetPage = targetPage.substring(1); - if (targetPage.indexOf(":") != -1) + if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage))) targetPage = "undefined"; + function validURL(url) { + var pos = url.indexOf(".html"); + if (pos == -1 || pos != url.length - 5) + return false; + var allowNumber = false; + var allowSep = false; + var seenDot = false; + for (var i = 0; i < url.length - 5; i++) { + var ch = url.charAt(i); + if ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + ch == '$' || + ch == '_') { + allowNumber = true; + allowSep = true; + } else if ('0' <= ch && ch <= '9' + || ch == '-') { + if (!allowNumber) + return false; + } else if (ch == '/' || ch == '.') { + if (!allowSep) + return false; + allowNumber = false; + allowSep = false; + if (ch == '.') + seenDot = true; + if (ch == '/' && seenDot) + return false; + } else { + return false; + } + } + return true; + } function loadFrames() { if (targetPage != "" && targetPage != "undefined") top.classFrame.location = top.targetPage; diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html index bc3d67e7..7fa3d0fa 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJCompressor.html @@ -590,6 +590,10 @@ public void encodeYUV(byte[] dstBuf, Although this will work with any subsampling option, it is really only useful in combination with TJ.SAMP_420, which produces an image compatible with the I420 (AKA "YUV420P") format. +

+ NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the + convention of the digital video community, the TurboJPEG API uses "YUV" to + refer to an image format consisting of Y, Cb, and Cr image planes.

Parameters:
dstBuf - buffer that will receive the YUV planar image. Use diff --git a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html index 832e4741..a437c16d 100644 --- a/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html +++ b/java/doc/org/libjpegturbo/turbojpeg/TJDecompressor.html @@ -841,6 +841,10 @@ public void decompressToYUV(byte[] dstBuf, that, if the width or height of the image is not an even multiple of the MCU block size (see TJ.getMCUWidth(int) and TJ.getMCUHeight(int)), then an intermediate buffer copy will be performed within TurboJPEG. +

+ NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the + convention of the digital video community, the TurboJPEG API uses "YUV" to + refer to an image format consisting of Y, Cb, and Cr image planes.

Parameters:
dstBuf - buffer that will receive the YUV planar image. Use diff --git a/java/org/libjpegturbo/turbojpeg/TJCompressor.java b/java/org/libjpegturbo/turbojpeg/TJCompressor.java index f8f82acc..52ae6138 100644 --- a/java/org/libjpegturbo/turbojpeg/TJCompressor.java +++ b/java/org/libjpegturbo/turbojpeg/TJCompressor.java @@ -344,6 +344,10 @@ public class TJCompressor { * Although this will work with any subsampling option, it is really only * useful in combination with {@link TJ#SAMP_420}, which produces an image * compatible with the I420 (AKA "YUV420P") format. + *

+ * NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the + * convention of the digital video community, the TurboJPEG API uses "YUV" to + * refer to an image format consisting of Y, Cb, and Cr image planes. * * @param dstBuf buffer that will receive the YUV planar image. Use * {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer diff --git a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java index c2d361e1..46d1d5fd 100644 --- a/java/org/libjpegturbo/turbojpeg/TJDecompressor.java +++ b/java/org/libjpegturbo/turbojpeg/TJDecompressor.java @@ -368,6 +368,10 @@ public class TJDecompressor { * that, if the width or height of the image is not an even multiple of the * MCU block size (see {@link TJ#getMCUWidth} and {@link TJ#getMCUHeight}), * then an intermediate buffer copy will be performed within TurboJPEG. + *

+ * NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the + * convention of the digital video community, the TurboJPEG API uses "YUV" to + * refer to an image format consisting of Y, Cb, and Cr image planes. * * @param dstBuf buffer that will receive the YUV planar image. Use * {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer diff --git a/turbojpeg.h b/turbojpeg.h index 02f3a837..941aa572 100644 --- a/turbojpeg.h +++ b/turbojpeg.h @@ -53,12 +53,16 @@ /** * Chrominance subsampling options. - * When an image is converted from the RGB to the YUV colorspace as part of - * the JPEG compression process, some of the U and V (chrominance) components + * When an image is converted from the RGB to the YCbCr colorspace as part of + * the JPEG compression process, some of the Cb and Cr (chrominance) components * can be discarded or averaged together to produce a smaller image with little * perceptible loss of image clarity (the human eye is more sensitive to small * changes in brightness than small changes in color.) This is called * "chrominance subsampling". + *

+ * NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the + * convention of the digital video community, the TurboJPEG API uses "YUV" to + * refer to an image format consisting of Y, Cb, and Cr image planes. */ enum TJSAMP { @@ -611,6 +615,10 @@ DLLEXPORT unsigned long DLLCALL tjBufSizeYUV(int width, int height, * padded to 4 bytes. Although this will work with any subsampling option, it * is really only useful in combination with TJ_420, which produces an image * compatible with the I420 (AKA "YUV420P") format. + *

+ * NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the + * convention of the digital video community, the TurboJPEG API uses "YUV" to + * refer to an image format consisting of Y, Cb, and Cr image planes. * * @param handle a handle to a TurboJPEG compressor or transformer instance * @param srcBuf pointer to an image buffer containing RGB or grayscale pixels @@ -742,6 +750,10 @@ DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle, * that, if the width or height of the image is not an even multiple of the MCU * block size (see #tjMCUWidth and #tjMCUHeight), then an intermediate buffer * copy will be performed within TurboJPEG. + *

+ * NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the + * convention of the digital video community, the TurboJPEG API uses "YUV" to + * refer to an image format consisting of Y, Cb, and Cr image planes. * * @param handle a handle to a TurboJPEG decompressor or transformer instance * @param jpegBuf pointer to a buffer containing the JPEG image to decompress

handlea handle to a TurboJPEG compressor or transformer instance