#[non_exhaustive]#[repr(u8)]pub enum Block {
Pixel = 0,
Sub1x2 = 1,
Sub1x4 = 2,
Sub2x2 = 3,
Sub2x4 = 4,
Sub4x4 = 5,
Pack1x2 = 6,
Pack1x4 = 7,
Pack1x8 = 8,
Yuv422 = 9,
Yuy2 = 10,
Yuv411 = 11,
}
Expand description
How many pixels are described by a single texel unit.
Also each pixel in a block to order of channels, i.e. provides the link between SampleParts and SampleBits. Note that some block layouts may have less channel than the sample if channels are not encoded separately, for example block compressed layouts.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pixel = 0
Each texel is a single pixel.
Sub1x2 = 1
Each texel refers to two pixels across width.
Sub1x4 = 2
Each texel refers to four pixels across width.
Sub2x2 = 3
Each texel refers to a two-by-two block.
Sub2x4 = 4
Each texel refers to a two-by-four block.
Sub4x4 = 5
Each texel refers to a four-by-four block.
Pack1x2 = 6
Each texel contains channels for two pixels, consecutively.
Pack1x4 = 7
Each texel contains channels for four pixels, consecutively.
Pack1x8 = 8
Each texel contains channels for eight pixels, consecutively.
Yuv422 = 9
Yuy2 = 10
Yuv422 with different order of channels.