lvsfunc.types

lvsfunc exposes a lot of custom types that are used internally. These are generally generic enough to allow other maintainers to make use of them as well.


class lvsfunc.types.Coefs(k0: float, phi: float, alpha: float, gamma: float)

Bases: NamedTuple

Coefficients for matrix conversions.

alpha: float

Alias for field number 2

gamma: float

Alias for field number 3

k0: float

Alias for field number 0

phi: float

Alias for field number 1

class lvsfunc.types.Coordinate(x, y)

Bases: object

Positive set of (x, y) coordinates.

Raises

ValueError – Negative values get passed.

x: int
y: int
class lvsfunc.types.Direction(value)

Bases: enum.IntEnum

Enum to simplify direction argument.

HORIZONTAL = 0
VERTICAL = 1
class lvsfunc.types.Matrix(value)

Bases: enum.IntEnum

Matrix coefficients (ITU-T H.265 Table E.5).

Raises

PermissionError_RESERVED gets called.

BT2020C = 10
BT2020NC = 9
BT470BG = 5
BT709 = 1
CHROMA_DERIVED_C = 13
CHROMA_DERIVED_NC = 12
FCC = 4
GBR = 0
ICTCP = 14
property RESERVED: NoReturn

Return PermissionError if called.

Return type

NoReturn

RGB = 0
SMPTE170M = 6
SMPTE2085 = 11
SMPTE240M = 7
UNKNOWN = 2
YCGCO = 8
class lvsfunc.types.Position(x, y)

Bases: lvsfunc.types.Coordinate

Position type for lvsfunc.mask.BoundingBox.

class lvsfunc.types.RegressClips(slope: vs.VideoNode, intercept: vs.VideoNode, correlation: vs.VideoNode)

Bases: NamedTuple

Regress clip types for lvsfunc.recon.regress().

correlation: vapoursynth.VideoNode

Alias for field number 2

intercept: vapoursynth.VideoNode

Alias for field number 1

slope: vapoursynth.VideoNode

Alias for field number 0

class lvsfunc.types.Resolution(width: int, height: int)

Bases: NamedTuple

Tuple representing a resolution.

height: int

Alias for field number 1

width: int

Height.

class lvsfunc.types.ScaleAttempt(descaled: vs.VideoNode, rescaled: vs.VideoNode, resolution: Resolution, diff: vs.VideoNode)

Bases: NamedTuple

Tuple representing a descale attempt.

descaled: vapoursynth.VideoNode

Descaled frame reupscaled with the same kernel.

diff: vapoursynth.VideoNode

Alias for field number 3

rescaled: vapoursynth.VideoNode

The native resolution.

resolution: lvsfunc.types.Resolution

The subtractive difference between the original and descaled frame.

class lvsfunc.types.SceneChangeMode(value)

Bases: enum.IntEnum

Size type for lvsfunc.render.find_scene_changes().

SCXVID = 1
WWXD = 0
WWXD_SCXVID_INTERSECTION = 3
WWXD_SCXVID_UNION = 2
class lvsfunc.types.Size(x, y)

Bases: lvsfunc.types.Coordinate

Size type for lvsfunc.mask.BoundingBox.

class lvsfunc.types.VSFunction(*args, **kwargs)

Bases: Protocol

VapourSynth function.