Enums§
- Data type for Y, U, V, and possibly A channels independent of how values are packed into planes.
- Specifies how YUV (and optionally A) are divided among planes. Planes are separated by underscores in the enum value names. Within each plane the pixmap/texture channels are mapped to the YUVA channels in the order specified, e.g. for kY_UV Y is in channel 0 of plane 0, U is in channel 0 of plane 1, and V is in channel 1 of plane 1. Channel ordering within a pixmap/texture given the channels it contains: A: 0:A Luminance/Gray: 0:Gray Luminance/Gray + Alpha: 0:Gray, 1:A RG 0:R, 1:G RGB 0:R, 1:G, 2:B RGBA 0:R, 1:G, 2:B, 3:A
- UV subsampling is also specified in the enum value names using J:a:b notation (e.g. 4:2:0 is 1/2 horizontal and 1/2 vertical resolution for U and V). If alpha is present it is not sub- sampled. Note that Subsampling values other than k444 are only valid with PlaneConfig values that have U and V in different planes than Y (and A, if present).
Functions§
- Gets the default ColorType to use with
num_channels
channels, each represented as DataType. Returns ColorType::Unknown if no such color type. - If the ColorType is supported for YUVA pixmaps this will return the number of YUVA channels that can be stored in a plane of this color type and what the DataType is of those channels. If the ColorType is not supported as a YUVA plane the number of channels is reported as 0 and the DataType returned should be ignored.