docs ¶
Classes:
-
Example
–Example Kernel class for documentation purposes.
Example ¶
Bases: Kernel
Example Kernel class for documentation purposes.
Methods:
-
descale
–Perform a regular descaling operation.
-
ensure_obj
– -
from_param
– -
get_clean_kwargs
– -
get_descale_args
– -
get_implemented_funcs
– -
get_params_args
– -
get_resample_args
– -
get_scale_args
– -
kernel_radius
– -
multi
– -
pretty_string
– -
resample
–Perform a regular resampling operation.
-
scale
–Perform a regular scaling operation.
-
shift
–Perform a regular shifting operation.
-
supersample
–
Attributes:
-
b
– -
c
– -
descale_function
(Callable[..., ConstantFormatVideoNode]
) –Descale function called internally when descaling
-
kwargs
(KwargsT
) –Arguments passed to the internal scale function
-
resample_function
(Callable[..., ConstantFormatVideoNode]
) –Resample function called internally when resampling
-
scale_function
(Callable[..., VideoNode]
) –Scale function called internally when scaling
Source code
21 22 23 24 |
|
descale_function instance-attribute
¶
descale_function: Callable[..., ConstantFormatVideoNode]
Descale function called internally when descaling
kwargs instance-attribute
¶
kwargs: KwargsT = kwargs
Arguments passed to the internal scale function
resample_function instance-attribute
¶
resample_function: Callable[..., ConstantFormatVideoNode]
Resample function called internally when resampling
scale_function instance-attribute
¶
scale_function: Callable[..., VideoNode]
Scale function called internally when scaling
descale ¶
descale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: ShiftT = (0, 0),
**kwargs: Any
) -> ConstantFormatVideoNode
Perform a regular descaling operation.
Parameters:
-
clip
¶VideoNode
) –Input clip
-
width
¶int | None
, default:None
) –Output width
-
height
¶int | None
, default:None
) –Output height
-
shift
¶ShiftT
, default:(0, 0)
) –Shift clip during the operation. Expects a tuple of (src_top, src_left).
Source code
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
ensure_obj classmethod
¶
ensure_obj(
kernel: ScalerT | KernelT | None = ...,
/,
func_except: FuncExceptT | None = None,
) -> Scaler
ensure_obj(
kernel: DescalerT | KernelT | None = ...,
/,
func_except: FuncExceptT | None = None,
) -> Descaler
ensure_obj(
kernel: ResamplerT | KernelT | None = ...,
/,
func_except: FuncExceptT | None = None,
) -> Resampler
ensure_obj(
kernel: str | type[BaseScaler] | BaseScaler | None = None,
/,
func_except: FuncExceptT | None = None,
) -> BaseScaler
Source code
647 648 649 650 651 652 653 654 |
|
from_param classmethod
¶
from_param(
kernel: KernelT | None = ..., /, func_except: FuncExceptT | None = None
) -> type[Kernel]
from_param(
kernel: ScalerT | KernelT | None = ...,
/,
func_except: FuncExceptT | None = None,
) -> type[Scaler]
from_param(
kernel: DescalerT | KernelT | None = ...,
/,
func_except: FuncExceptT | None = None,
) -> type[Descaler]
from_param(
kernel: ResamplerT | KernelT | None = ...,
/,
func_except: FuncExceptT | None = None,
) -> type[Resampler]
from_param(
kernel: str | type[BaseScaler] | BaseScaler | None = None,
/,
func_except: FuncExceptT | None = None,
) -> type[BaseScaler]
Source code
611 612 613 614 615 616 617 |
|
get_clean_kwargs ¶
Source code
216 217 |
|
get_descale_args ¶
get_descale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
673 674 675 676 677 678 679 680 681 682 683 |
|
get_implemented_funcs ¶
Source code
701 702 |
|
get_params_args ¶
get_params_args(
is_descale: bool,
clip: VideoNode,
width: int | None = None,
height: int | None = None,
**kwargs: Any
) -> KwargsT
Source code
656 657 658 659 |
|
get_resample_args ¶
get_resample_args(
clip: VideoNode,
format: int | VideoFormatT | HoldsVideoFormatT,
matrix: MatrixT | None,
matrix_in: MatrixT | None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
|
get_scale_args ¶
get_scale_args(
clip: VideoNode,
shift: tuple[TopShift, LeftShift] = (0, 0),
width: int | None = None,
height: int | None = None,
*funcs: Callable[..., Any],
**kwargs: Any
) -> KwargsT
Source code
661 662 663 664 665 666 667 668 669 670 671 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
210 211 212 213 214 |
|
multi ¶
multi(
clip: VideoNode,
multi: float = 2.0,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
272 273 274 275 276 277 278 279 280 281 |
|
pretty_string ¶
pretty_string() -> str
Source code
225 226 227 |
|
resample ¶
resample(
clip: VideoNode,
format: int | VideoFormatT | HoldsVideoFormatT,
matrix: MatrixT | None = None,
matrix_in: MatrixT | None = None,
**kwargs: Any
) -> ConstantFormatVideoNode
Perform a regular resampling operation.
Parameters:
-
clip
¶VideoNode
) –Input clip
-
format
¶int | VideoFormatT | HoldsVideoFormatT
) –Output format
-
matrix
¶MatrixT | None
, default:None
) –Output matrix. If
None
, will take the matrix from the input clip's frameprops. -
matrix_in
¶MatrixT | None
, default:None
) –Input matrix. If
None
, will take the matrix from the input clip's frameprops.
Source code
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[float, float] = (0, 0),
**kwargs: Any
) -> VideoNode
Perform a regular scaling operation.
Parameters:
-
clip
¶VideoNode
) –Input clip
-
width
¶int | None
, default:None
) –Output width
-
height
¶int | None
, default:None
) –Output height
-
shift
¶tuple[float, float]
, default:(0, 0)
) –Shift clip during the operation. Expects a tuple of (src_top, src_left).
Source code
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
shift ¶
shift(
clip: VideoNode,
shifts_or_shift_top: tuple[float, float] | float | list[float] = 0.0,
shift_left: float | list[float] = 0.0,
/,
**kwargs: Any,
) -> VideoNode
Perform a regular shifting operation.
Parameters:
-
clip
¶VideoNode
) –Input clip
-
shift
¶Shift clip during the operation. Expects a tuple of (src_top, src_left) or two top, left arrays for shifting planes individually.
Source code
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
supersample ¶
supersample(
clip: VideoNode,
rfactor: float = 2.0,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Source code
257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
|