determine the effective weight to be used for each texel position. This allows
very low bit rates to be used with acceptable quality. This can also be used
to more efficiently encode blocks with low detail, or with strong vertical
or horizontal features.
For blocks which have a mixture of disparate colors, a single line in the
color space is not a good fit to the colors of the pixels in the original
image. It is therefore possible to partition the texels into multiple sets,
the pixels within each set having similar colors. For each of these
"partitions", we specify separate endpoint pairs, and choose which pair of
endpoints to use for a particular texel by looking up the partition index
from a partitioning pattern table. In ASTC, this partition table is actually
implemented as a function.
The endpoint encoding for each partition is independent.
For blocks which have uncorrelated channels - for example an image with a
transparency mask, or an image used as a normal map - it may be necessary
to specify two weights for each texel. Interpolation between the components
of the endpoint colors can then proceed independently for each "plane" of
the image. The assignment of channels to planes is selectable.
Since each of the above options is independent, it is possible to specify any
combination of channels, endpoint color encoding, weight encoding,
interpolation, multiple partitions and single or dual planes.
Since these values are specified per block, it is important that they are
represented with the minimum possible number of bits. As a result, these
values are packed together in ways which can be difficult to read, but
which are nevertheless highly amenable to hardware decode.
All of the values used as weights and color endpoint values can be specified
with a variable number of bits. The encoding scheme used allows a fine-
grained tradeoff between weight bits and color endpoint bits using "integer
sequence encoding". This can pack adjacent values together, allowing us to
use fractional numbers of bits per value.
Finally, a block may be just a single color. This is a so-called "void
extent block" and has a special coding which also allows it to identify
nearby regions of single color. This may be used to short-circuit fetching of
what would be identical blocks, and further reduce memory bandwidth.
C.2.5 LDR and HDR Modes
-------------------------
The decoding process for LDR content can be simplified if it is known in
advance that sRGB output is required. This selection is therefore included
as part of the global configuration.
The two modes differ in various ways.
-----------------------------------------------------------------------------
Operation LDR Mode HDR Mode
-----------------------------------------------------------------------------
Returned value Vector of FP16 values, Vector of FP16 values
or Vector of UNORM8 values.
sRGB compatible Yes No
LDR endpoint 16 bits, or 16 bits
7