YUVAInfo

class YUVAInfo

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.

Classes

PlanarConfig

Specifies how YUV (and optionally A) are divided among planes. Planes are

Siting

Describes how subsampled chroma values are sited relative to luma values.

Methods

HasAlpha

Does the PlanarConfig have alpha values?

NumChannelsInPlane

Number of Y, U, V, A channels in the ith plane for a given PlanarConfig (or 0 if i is invalid).

NumPlanes

Number of planes for a given PlanarConfig.

PlaneDimensions

Given image dimensions, a planar configuration, and origin, determine the expected size of each plane.

__init__

Overloaded function.

computeTotalBytes

Given a per-plane row bytes, determine size to allocate for all planes.

dimensions

Dimensions of the full resolution image (after planes have been oriented to how the image is displayed as indicated by fOrigin).

hasAlpha

height

numChannelsInPlane

numPlanes

origin

planarConfig

planeDimensions

Returns the number of planes and initializes planeDimensions[0]..planeDimensions[<ret>] to the expected dimensions for each plane.

sitingX

sitingY

width

yuvColorSpace

Attributes

kCentered

kMaxPlanes

kUYVA_4444

kUYV_444

kYUVA_4444

kYUV_444

kY_UV_420

kY_UV_A_4204

kY_U_V_410

kY_U_V_411

kY_U_V_420

kY_U_V_422

kY_U_V_440

kY_U_V_444

kY_U_V_A_4204

kY_VU_420

kY_VU_A_4204

kY_V_U_420

kY_V_U_A_4204

Methods

static YUVAInfo.HasAlpha(config: skia.YUVAInfo.PlanarConfig) bool

Does the PlanarConfig have alpha values?

static YUVAInfo.NumChannelsInPlane(config: skia.YUVAInfo.PlanarConfig, i: int) int

Number of Y, U, V, A channels in the ith plane for a given PlanarConfig (or 0 if i is invalid).

static YUVAInfo.NumPlanes(config: skia.YUVAInfo.PlanarConfig) int

Number of planes for a given PlanarConfig.

static YUVAInfo.PlaneDimensions(imageDimensions: skia.ISize, config: skia.YUVAInfo.PlanarConfig, origin: skia.EncodedOrigin) list[skia.ISize]

Given image dimensions, a planar configuration, and origin, determine the expected size of each plane. Returns a list of expected planes.

The input image dimensions are as displayed (after the planes have been transformed to the intended display orientation).

YUVAInfo.__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: skia.YUVAInfo) -> None

  2. __init__(self: skia.YUVAInfo, dimensions: skia.ISize, config: skia.YUVAInfo.PlanarConfig, yuvColorSpace: skia.YUVColorSpace, origin: skia.EncodedOrigin = <EncodedOrigin.kTopLeft_EncodedOrigin: 1>, sittingX: skia.YUVAInfo.Siting = <Siting.kCentered: 0>, sittingY: skia.YUVAInfo.Siting = <Siting.kCentered: 0>) -> None

    ‘dimensions’ should specify the size of the full resolution image (after planes have been oriented to how the image is displayed as indicated by ‘origin’).

YUVAInfo.computeTotalBytes(self: skia.YUVAInfo, rowBytes: list[int], returnPlaneSizes: bool = False) object

Given a per-plane row bytes, determine size to allocate for all planes. Optionally retrieves the per-plane byte sizes if returnPlaneSizes is True. If total size overflows will return SIZE_MAX and set all planeSizes to SIZE_MAX.

YUVAInfo.dimensions(self: skia.YUVAInfo) skia.ISize

Dimensions of the full resolution image (after planes have been oriented to how the image is displayed as indicated by fOrigin).

YUVAInfo.hasAlpha(self: skia.YUVAInfo) bool
YUVAInfo.height(self: skia.YUVAInfo) int
YUVAInfo.numChannelsInPlane(self: skia.YUVAInfo, i: int) int
YUVAInfo.numPlanes(self: skia.YUVAInfo) int
YUVAInfo.origin(self: skia.YUVAInfo) skia.EncodedOrigin
YUVAInfo.planarConfig(self: skia.YUVAInfo) skia.YUVAInfo.PlanarConfig
YUVAInfo.planeDimensions(self: skia.YUVAInfo) list[skia.ISize]

Returns the number of planes and initializes planeDimensions[0]..planeDimensions[<ret>] to the expected dimensions for each plane. Dimensions are as stored in memory, before transformation to image display space as indicated by origin().

YUVAInfo.sitingX(self: skia.YUVAInfo) skia.YUVAInfo.Siting
YUVAInfo.sitingY(self: skia.YUVAInfo) skia.YUVAInfo.Siting
YUVAInfo.width(self: skia.YUVAInfo) int
YUVAInfo.yuvColorSpace(self: skia.YUVAInfo) skia.YUVColorSpace

Attributes

YUVAInfo.kCentered = <Siting.kCentered: 0>
YUVAInfo.kMaxPlanes = 4
YUVAInfo.kUYVA_4444 = <PlanarConfig.kUYVA_4444: 16>
YUVAInfo.kUYV_444 = <PlanarConfig.kUYV_444: 14>
YUVAInfo.kYUVA_4444 = <PlanarConfig.kYUVA_4444: 15>
YUVAInfo.kYUV_444 = <PlanarConfig.kYUV_444: 13>
YUVAInfo.kY_UV_420 = <PlanarConfig.kY_UV_420: 9>
YUVAInfo.kY_UV_A_4204 = <PlanarConfig.kY_UV_A_4204: 11>
YUVAInfo.kY_U_V_410 = <PlanarConfig.kY_U_V_410: 6>
YUVAInfo.kY_U_V_411 = <PlanarConfig.kY_U_V_411: 5>
YUVAInfo.kY_U_V_420 = <PlanarConfig.kY_U_V_420: 2>
YUVAInfo.kY_U_V_422 = <PlanarConfig.kY_U_V_422: 1>
YUVAInfo.kY_U_V_440 = <PlanarConfig.kY_U_V_440: 4>
YUVAInfo.kY_U_V_444 = <PlanarConfig.kY_U_V_444: 0>
YUVAInfo.kY_U_V_A_4204 = <PlanarConfig.kY_U_V_A_4204: 7>
YUVAInfo.kY_VU_420 = <PlanarConfig.kY_VU_420: 10>
YUVAInfo.kY_VU_A_4204 = <PlanarConfig.kY_VU_A_4204: 12>
YUVAInfo.kY_V_U_420 = <PlanarConfig.kY_V_U_420: 3>
YUVAInfo.kY_V_U_A_4204 = <PlanarConfig.kY_V_U_A_4204: 8>