types ¶
Type Aliases:
-
BotFieldLeftShift–Type alias for the bottom field's horizontal shift in pixels.
-
BotFieldTopShift–Type alias for the bottom field's vertical shift in pixels.
-
Center–Type alias for the center point of the sigmoid curve, determining the midpoint of the transition.
-
FieldShift–Type alias for shifts in interlaced content.
-
LeftShift–Type alias for horizontal shift in pixels (left).
-
ShiftT–Deprecated type alias for shift in both horizontal and vertical directions.
-
Slope–Type alias for the slope of the sigmoid curve, controlling the steepness of the transition.
-
TopFieldLeftShift–Type alias for the top field's horizontal shift in pixels.
-
TopFieldTopShift–Type alias for the top field's vertical shift in pixels.
-
TopShift–Type alias for vertical shift in pixels (top).
Classes:
BotFieldLeftShift ¶
BotFieldLeftShift = float
Type alias for the bottom field's horizontal shift in pixels.
Used when processing interlaced video to describe the horizontal shift of the bottom field.
BotFieldTopShift ¶
BotFieldTopShift = float
Type alias for the bottom field's vertical shift in pixels.
Used when processing interlaced video to describe the vertical shift of the bottom field.
Center ¶
Center = float
Type alias for the center point of the sigmoid curve, determining the midpoint of the transition.
FieldShift ¶
FieldShift = tuple[
TopShift | tuple[TopFieldTopShift, BotFieldTopShift],
LeftShift | tuple[TopFieldLeftShift, BotFieldLeftShift],
]
Type alias for shifts in interlaced content.
Represents separate shifts for top and bottom fields.
LeftShift ¶
LeftShift = float
Type alias for horizontal shift in pixels (left).
Represents the amount of horizontal offset when scaling a video.
ShiftT ¶
ShiftT = (
tuple[TopShift, LeftShift]
| tuple[
TopShift | tuple[TopFieldTopShift, BotFieldTopShift],
LeftShift | tuple[TopFieldLeftShift, BotFieldLeftShift],
]
)
Deprecated type alias for shift in both horizontal and vertical directions.
Can either represent a single shift (for progressive video) or separate shifts for top and bottom fields (for interlaced video).
The first value in the tuple represents vertical shift, and the second represents horizontal shift.
Slope ¶
Slope = float
Type alias for the slope of the sigmoid curve, controlling the steepness of the transition.
TopFieldLeftShift ¶
TopFieldLeftShift = float
Type alias for the top field's horizontal shift in pixels.
Used when processing interlaced video to describe the horizontal shift of the top field.
TopFieldTopShift ¶
TopFieldTopShift = float
Type alias for the top field's vertical shift in pixels.
Used when processing interlaced video to describe the vertical shift of the top field.
TopShift ¶
TopShift = float
Type alias for vertical shift in pixels (top).
Represents the amount of vertical offset when scaling a video.
BorderHandling ¶
Bases: CustomIntEnum
Methods:
Attributes:
pad_amount cached ¶
Source code in vskernels/types.py
51 52 53 54 55 56 | |
prepare_clip ¶
prepare_clip(
clip: VideoNode,
min_pad: int = 2,
shift: tuple[TopShift, LeftShift] = (0, 0),
) -> tuple[VideoNode, tuple[TopShift, LeftShift]]
Source code in vskernels/types.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
SampleGridModel ¶
Bases: CustomIntEnum
Methods:
Attributes:
__call__ ¶
__call__(
width: int,
height: int,
src_width: float,
src_height: float,
shift: tuple[float, float],
kwargs: dict[str, Any],
) -> tuple[dict[str, Any], tuple[float, float]]
Source code in vskernels/types.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
for_dst ¶
for_dst(
clip: VideoNode,
width: int,
height: int,
shift: tuple[float, float],
**kwargs: Any
) -> tuple[dict[str, Any], tuple[float, float]]
Source code in vskernels/types.py
84 85 86 87 88 89 90 | |
for_src ¶
for_src(
clip: VideoNode,
width: int,
height: int,
shift: tuple[float, float],
**kwargs: Any
) -> tuple[dict[str, Any], tuple[float, float]]
Source code in vskernels/types.py
92 93 94 95 96 97 98 | |