Expand description
All Sk* types are accessible via skia_safe::
Enums§
- Plane
Config - 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
- Siting
- Describes how subsampled chroma values are sited relative to luma values.
- Subsampling
- 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§
- has_
alpha - Does the PlaneConfig have alpha values?
- num_
channels_ in_ plane - Number of Y, U, V, A channels in the ith plane for a given PlaneConfig (or None if i is invalid).
- num_
planes - Number of planes for a given PlaneConfig.
- plane_
dimensions - Given image dimensions, a planer configuration, subsampling, and origin, determine the expected size of each plane. Returns the expected planes. The input image dimensions are as displayed (after the planes have been transformed to the intended display orientation). The plane dimensions are output as the planes are stored in memory (may be rotated from image dimensions).
- plane_
subsampling_ factors SubsamplingFactors(Subsampling)
ifplane_index
refers to a U/V plane and otherwise(1, 1)
if inputs are valid. Invalid inputs consist of incompatible PlaneConfig Subsamplingplane_index
combinations.(0, 0)
is returned for invalid inputs.- subsampling_
factors - Ratio of Y/A values to U/V values in x and y.
Type Aliases§
- YUVA
Info - Specifies the structure of planes for a YUV image with optional alpha. The actual planar data is not part of this structure and depending on usage is in external textures or pixmaps.