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, phi, alpha, gamma)

Bases: NamedTuple

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

A positive set of (x, y) coordinates.

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)

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 type

NoReturn

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

Bases: lvsfunc.types.Coordinate

class lvsfunc.types.RegressClips(slope, intercept, correlation)

Bases: NamedTuple

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

Height.

width: int

Width.

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 in native resolution.

diff: vapoursynth.VideoNode

The subtractive difference between the original and descaled frame.

rescaled: vapoursynth.VideoNode

Descaled frame reupscaled with the same kernel.

resolution: lvsfunc.types.Resolution

The native resolution.

class lvsfunc.types.SceneChangeMode(value)

Bases: enum.IntEnum

An enumeration.

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

Bases: lvsfunc.types.Coordinate

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

Bases: Protocol