Encodes the representation of a single channel within an image.


enum MPSImageFeatureChannelFormat : UInt


A pixel in an MPSImage object may have many channels in it, sometimes many more than 4, that exceed the limit of what a MTLPixelFormat value can encode. The storage format for a single channel within a pixel can be given by the MPSImageFeatureChannelFormat type. The number of channels is defined by the featureChannels property of an MPSImage object. The size of the pixel is the size of the channel format multiplied by the number of feature channels. No padding is allowed, except to round out to a full byte.



case unorm8

uint8_t type with value [0,255] and encoding [0,1.0].

case unorm16

uint16_t type with value [0,65535] and encoding [0,1.0].

case float16

IEEE-754 16-bit floating-point type (half precision). Representable normal range is +-[2^-14, 65504], 0, INF, NaN. 11 bits of precision + exponent.

case float32

IEEE-754 32-bit floating-point type (single precision, standard float type in C). 24 bits of precision + exponent.

Enumeration Cases

See Also

Supporting Types

protocol MPSHandle

The protocol that provides resource identification.