Doc: "MCU block" = "iMCU" or "MCU"
The JPEG-1 spec never uses the term "MCU block". That term is rarely
used in other literature to describe the equivalent of an MCU in an
interleaved JPEG image, but the libjpeg documentation uses "iMCU" to
describe the same thing. "iMCU" is a better term, since the equivalent
of an interleaved MCU can contain multiple DCT blocks (or samples in
lossless mode) that are only grouped together if the image is
interleaved.
In the case of restart markers, "MCU block" was used in the libjpeg
documentation instead of "MCU", but "MCU" is more accurate and less
confusing. (The restart interval is literally in MCUs, where one MCU
is one data unit in a non-interleaved JPEG image and multiple data units
in a multi-component interleaved JPEG image.)
In the case of 9b704f96b2, the issue was
actually with progressive JPEG images exactly two DCT blocks wide, not
two MCU blocks wide.
This commit also defines "MCU" and "MCU row" in the description of the
various restart marker options/parameters. Although an MCU row is
technically always a row of samples in lossless mode, "sample row" was
confusing, since it is used in other places to describe a row of samples
for a single component (whereas an MCU row in a typical lossless JPEG
image consists of a row of interleaved samples for all components.)
This commit is contained in:
@@ -222,8 +222,8 @@ public class TJDecompressor implements Closeable {
|
||||
* with the JPEG image width and height (see {@link #getWidth} and
|
||||
* {@link #getHeight}.) When decompressing into a planar YUV image, an
|
||||
* intermediate buffer copy will be performed if the width or height of the
|
||||
* scaled destination image is not an even multiple of the MCU block size
|
||||
* (see {@link TJ#getMCUWidth TJ.getMCUWidth()} and {@link TJ#getMCUHeight
|
||||
* scaled destination image is not an even multiple of the iMCU size (see
|
||||
* {@link TJ#getMCUWidth TJ.getMCUWidth()} and {@link TJ#getMCUHeight
|
||||
* TJ.getMCUHeight()}.) Note that decompression scaling is not available
|
||||
* (and the specified scaling factor is ignored) when decompressing lossless
|
||||
* JPEG images (see {@link TJ#PARAM_LOSSLESS}), since the IDCT algorithm is
|
||||
@@ -255,11 +255,11 @@ public class TJDecompressor implements Closeable {
|
||||
* @param croppingRegion <code>java.awt.Rectangle</code> instance that
|
||||
* specifies a subregion of the JPEG image to decompress, or
|
||||
* {@link TJ#UNCROPPED} for no cropping. The left boundary of the cropping
|
||||
* region must be evenly divisible by the scaled MCU block width, which can
|
||||
* be determined by calling {@link TJScalingFactor#getScaled
|
||||
* region must be evenly divisible by the scaled iMCU width, which can be
|
||||
* determined by calling {@link TJScalingFactor#getScaled
|
||||
* TJScalingFactor.getScaled()} with the specified scaling factor (see
|
||||
* {@link #setScalingFactor setScalingFactor()}) and the MCU block width
|
||||
* (see {@link TJ#getMCUWidth TJ.getMCUWidth()}) for the level of chrominance
|
||||
* {@link #setScalingFactor setScalingFactor()}) and the iMCU width (see
|
||||
* {@link TJ#getMCUWidth TJ.getMCUWidth()}) for the level of chrominance
|
||||
* subsampling in the JPEG image (see {@link TJ#PARAM_SUBSAMP}.) The
|
||||
* cropping region should be specified relative to the scaled image
|
||||
* dimensions. Unless <code>croppingRegion</code> is {@link TJ#UNCROPPED},
|
||||
|
||||
Reference in New Issue
Block a user