Doc: Further clarify MCU definition

This commit is contained in:
DRC
2024-09-01 11:23:31 -04:00
parent 7ec70ee891
commit 797c6ccd98
7 changed files with 60 additions and 42 deletions

View File

@@ -3485,7 +3485,7 @@ If you choose option 1, then <code>dstSizes[i]</code> should be set to the size
</div><div class="memdoc"> </div><div class="memdoc">
<p>iMCU height (in pixels) for a given level of chrominance subsampling </p> <p>iMCU height (in pixels) for a given level of chrominance subsampling </p>
<p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each component are interleaved in a single scan. If the image uses chrominance subsampling, then multiple luminance blocks are stored together, followed by a single block for each chrominance component. The combination of the full-resolution luminance block(s) and the (possibly subsampled) chrominance blocks corresponding to the same pixels is called a "Minimum Coded Unit" (MCU.) In a non-interleaved lossy JPEG image, each component is stored in a separate scan, and an MCU is a single DCT block, so we use the term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in an interleaved JPEG image. For the common case of interleaved JPEG images, an iMCU is the same as an MCU.</p> <p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each component are interleaved in a single scan. If the image uses chrominance subsampling, then multiple luminance blocks are stored together, followed by a single block for each chrominance component. The minimum set of full-resolution luminance block(s) and corresponding (possibly subsampled) chrominance blocks necessary to represent at least one DCT block per component is called a "Minimum Coded Unit" or "MCU". (For example, an MCU in an interleaved lossy JPEG image that uses 4:2:2 subsampling consists of two luminance blocks followed by one block for each chrominance component.) In a non-interleaved lossy JPEG image, each component is stored in a separate scan, and an MCU is a single DCT block, so we use the term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in an interleaved JPEG image. For the common case of interleaved JPEG images, an iMCU is the same as an MCU.</p>
<p>iMCU sizes:</p><ul> <p>iMCU sizes:</p><ul>
<li>8x8 for no subsampling or grayscale</li> <li>8x8 for no subsampling or grayscale</li>
<li>16x8 for 4:2:2</li> <li>16x8 for 4:2:2</li>
@@ -3518,7 +3518,7 @@ If you choose option 1, then <code>dstSizes[i]</code> should be set to the size
</div><div class="memdoc"> </div><div class="memdoc">
<p>iMCU width (in pixels) for a given level of chrominance subsampling </p> <p>iMCU width (in pixels) for a given level of chrominance subsampling </p>
<p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each component are interleaved in a single scan. If the image uses chrominance subsampling, then multiple luminance blocks are stored together, followed by a single block for each chrominance component. The combination of the full-resolution luminance block(s) and the (possibly subsampled) chrominance blocks corresponding to the same pixels is called a "Minimum Coded Unit" (MCU.) In a non-interleaved lossy JPEG image, each component is stored in a separate scan, and an MCU is a single DCT block, so we use the term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in an interleaved JPEG image. For the common case of interleaved JPEG images, an iMCU is the same as an MCU.</p> <p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each component are interleaved in a single scan. If the image uses chrominance subsampling, then multiple luminance blocks are stored together, followed by a single block for each chrominance component. The minimum set of full-resolution luminance block(s) and corresponding (possibly subsampled) chrominance blocks necessary to represent at least one DCT block per component is called a "Minimum Coded Unit" or "MCU". (For example, an MCU in an interleaved lossy JPEG image that uses 4:2:2 subsampling consists of two luminance blocks followed by one block for each chrominance component.) In a non-interleaved lossy JPEG image, each component is stored in a separate scan, and an MCU is a single DCT block, so we use the term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in an interleaved JPEG image. For the common case of interleaved JPEG images, an iMCU is the same as an MCU.</p>
<p>iMCU sizes:</p><ul> <p>iMCU sizes:</p><ul>
<li>8x8 for no subsampling or grayscale</li> <li>8x8 for no subsampling or grayscale</li>
<li>16x8 for 4:2:2</li> <li>16x8 for 4:2:2</li>

Binary file not shown.

View File

@@ -2199,14 +2199,17 @@ public static final&nbsp;int FLAG_LIMITSCANS</pre>
<p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each <p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each
component are interleaved in a single scan. If the image uses chrominance component are interleaved in a single scan. If the image uses chrominance
subsampling, then multiple luminance blocks are stored together, followed subsampling, then multiple luminance blocks are stored together, followed
by a single block for each chrominance component. The combination of the by a single block for each chrominance component. The minimum set of
full-resolution luminance block(s) and the (possibly subsampled) full-resolution luminance block(s) and corresponding (possibly subsampled)
chrominance blocks corresponding to the same pixels is called a "Minimum chrominance blocks necessary to represent at least one DCT block per
Coded Unit" (MCU.) In a non-interleaved lossy JPEG image, each component component is called a "Minimum Coded Unit" or "MCU". (For example, an MCU
is stored in a separate scan, and an MCU is a single DCT block, so we use in an interleaved lossy JPEG image that uses 4:2:2 subsampling consists of
the term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in two luminance blocks followed by one block for each chrominance
an interleaved JPEG image. For the common case of interleaved JPEG component.) In a non-interleaved lossy JPEG image, each component is
images, an iMCU is the same as an MCU.</div> stored in a separate scan, and an MCU is a single DCT block, so we use the
term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in an
interleaved JPEG image. For the common case of interleaved JPEG images,
an iMCU is the same as an MCU.</div>
<dl> <dl>
<dt><span class="paramLabel">Parameters:</span></dt> <dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>subsamp</code> - the level of chrominance subsampling (one of <dd><code>subsamp</code> - the level of chrominance subsampling (one of
@@ -2228,14 +2231,17 @@ public static final&nbsp;int FLAG_LIMITSCANS</pre>
<p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each <p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each
component are interleaved in a single scan. If the image uses chrominance component are interleaved in a single scan. If the image uses chrominance
subsampling, then multiple luminance blocks are stored together, followed subsampling, then multiple luminance blocks are stored together, followed
by a single block for each chrominance component. The combination of the by a single block for each chrominance component. The minimum set of
full-resolution luminance block(s) and the (possibly subsampled) full-resolution luminance block(s) and corresponding (possibly subsampled)
chrominance blocks corresponding to the same pixels is called a "Minimum chrominance blocks necessary to represent at least one DCT block per
Coded Unit" (MCU.) In a non-interleaved lossy JPEG image, each component component is called a "Minimum Coded Unit" or "MCU". (For example, an MCU
is stored in a separate scan, and an MCU is a single DCT block, so we use in an interleaved lossy JPEG image that uses 4:2:2 subsampling consists of
the term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in two luminance blocks followed by one block for each chrominance
an interleaved JPEG image. For the common case of interleaved JPEG component.) In a non-interleaved lossy JPEG image, each component is
images, an iMCU is the same as an MCU.</div> stored in a separate scan, and an MCU is a single DCT block, so we use the
term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in an
interleaved JPEG image. For the common case of interleaved JPEG images,
an iMCU is the same as an MCU.</div>
<dl> <dl>
<dt><span class="paramLabel">Parameters:</span></dt> <dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>subsamp</code> - the level of chrominance subsampling (one of <dd><code>subsamp</code> - the level of chrominance subsampling (one of

Binary file not shown.

Binary file not shown.

View File

@@ -126,14 +126,17 @@ public final class TJ {
* <p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each * <p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each
* component are interleaved in a single scan. If the image uses chrominance * component are interleaved in a single scan. If the image uses chrominance
* subsampling, then multiple luminance blocks are stored together, followed * subsampling, then multiple luminance blocks are stored together, followed
* by a single block for each chrominance component. The combination of the * by a single block for each chrominance component. The minimum set of
* full-resolution luminance block(s) and the (possibly subsampled) * full-resolution luminance block(s) and corresponding (possibly subsampled)
* chrominance blocks corresponding to the same pixels is called a "Minimum * chrominance blocks necessary to represent at least one DCT block per
* Coded Unit" (MCU.) In a non-interleaved lossy JPEG image, each component * component is called a "Minimum Coded Unit" or "MCU". (For example, an MCU
* is stored in a separate scan, and an MCU is a single DCT block, so we use * in an interleaved lossy JPEG image that uses 4:2:2 subsampling consists of
* the term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in * two luminance blocks followed by one block for each chrominance
* an interleaved JPEG image. For the common case of interleaved JPEG * component.) In a non-interleaved lossy JPEG image, each component is
* images, an iMCU is the same as an MCU. * stored in a separate scan, and an MCU is a single DCT block, so we use the
* term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in an
* interleaved JPEG image. For the common case of interleaved JPEG images,
* an iMCU is the same as an MCU.
* *
* @param subsamp the level of chrominance subsampling (one of * @param subsamp the level of chrominance subsampling (one of
* {@link #SAMP_444 SAMP_*}) * {@link #SAMP_444 SAMP_*})
@@ -156,14 +159,17 @@ public final class TJ {
* <p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each * <p>In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each
* component are interleaved in a single scan. If the image uses chrominance * component are interleaved in a single scan. If the image uses chrominance
* subsampling, then multiple luminance blocks are stored together, followed * subsampling, then multiple luminance blocks are stored together, followed
* by a single block for each chrominance component. The combination of the * by a single block for each chrominance component. The minimum set of
* full-resolution luminance block(s) and the (possibly subsampled) * full-resolution luminance block(s) and corresponding (possibly subsampled)
* chrominance blocks corresponding to the same pixels is called a "Minimum * chrominance blocks necessary to represent at least one DCT block per
* Coded Unit" (MCU.) In a non-interleaved lossy JPEG image, each component * component is called a "Minimum Coded Unit" or "MCU". (For example, an MCU
* is stored in a separate scan, and an MCU is a single DCT block, so we use * in an interleaved lossy JPEG image that uses 4:2:2 subsampling consists of
* the term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in * two luminance blocks followed by one block for each chrominance
* an interleaved JPEG image. For the common case of interleaved JPEG * component.) In a non-interleaved lossy JPEG image, each component is
* images, an iMCU is the same as an MCU. * stored in a separate scan, and an MCU is a single DCT block, so we use the
* term "iMCU" (interleaved MCU) to refer to the equivalent of an MCU in an
* interleaved JPEG image. For the common case of interleaved JPEG images,
* an iMCU is the same as an MCU.
* *
* @param subsamp the level of chrominance subsampling (one of * @param subsamp the level of chrominance subsampling (one of
* {@link #SAMP_444 SAMP_*}) * {@link #SAMP_444 SAMP_*})

View File

@@ -201,10 +201,13 @@ enum TJSAMP {
* In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each * In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each
* component are interleaved in a single scan. If the image uses chrominance * component are interleaved in a single scan. If the image uses chrominance
* subsampling, then multiple luminance blocks are stored together, followed by * subsampling, then multiple luminance blocks are stored together, followed by
* a single block for each chrominance component. The combination of the * a single block for each chrominance component. The minimum set of
* full-resolution luminance block(s) and the (possibly subsampled) chrominance * full-resolution luminance block(s) and corresponding (possibly subsampled)
* blocks corresponding to the same pixels is called a "Minimum Coded Unit" * chrominance blocks necessary to represent at least one DCT block per
* (MCU.) In a non-interleaved lossy JPEG image, each component is stored in a * component is called a "Minimum Coded Unit" or "MCU". (For example, an MCU
* in an interleaved lossy JPEG image that uses 4:2:2 subsampling consists of
* two luminance blocks followed by one block for each chrominance component.)
* In a non-interleaved lossy JPEG image, each component is stored in a
* separate scan, and an MCU is a single DCT block, so we use the term "iMCU" * separate scan, and an MCU is a single DCT block, so we use the term "iMCU"
* (interleaved MCU) to refer to the equivalent of an MCU in an interleaved * (interleaved MCU) to refer to the equivalent of an MCU in an interleaved
* JPEG image. For the common case of interleaved JPEG images, an iMCU is the * JPEG image. For the common case of interleaved JPEG images, an iMCU is the
@@ -226,10 +229,13 @@ static const int tjMCUWidth[TJ_NUMSAMP] = { 8, 16, 16, 8, 8, 32, 8 };
* In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each * In a typical lossy JPEG image, 8x8 blocks of DCT coefficients for each
* component are interleaved in a single scan. If the image uses chrominance * component are interleaved in a single scan. If the image uses chrominance
* subsampling, then multiple luminance blocks are stored together, followed by * subsampling, then multiple luminance blocks are stored together, followed by
* a single block for each chrominance component. The combination of the * a single block for each chrominance component. The minimum set of
* full-resolution luminance block(s) and the (possibly subsampled) chrominance * full-resolution luminance block(s) and corresponding (possibly subsampled)
* blocks corresponding to the same pixels is called a "Minimum Coded Unit" * chrominance blocks necessary to represent at least one DCT block per
* (MCU.) In a non-interleaved lossy JPEG image, each component is stored in a * component is called a "Minimum Coded Unit" or "MCU". (For example, an MCU
* in an interleaved lossy JPEG image that uses 4:2:2 subsampling consists of
* two luminance blocks followed by one block for each chrominance component.)
* In a non-interleaved lossy JPEG image, each component is stored in a
* separate scan, and an MCU is a single DCT block, so we use the term "iMCU" * separate scan, and an MCU is a single DCT block, so we use the term "iMCU"
* (interleaved MCU) to refer to the equivalent of an MCU in an interleaved * (interleaved MCU) to refer to the equivalent of an MCU in an interleaved
* JPEG image. For the common case of interleaved JPEG images, an iMCU is the * JPEG image. For the common case of interleaved JPEG images, an iMCU is the