nnedi3 ¶
This module implements wrappers for the Neural Network Edge Directed Interpolation (3rd gen.)
Classes:
-
NNEDI3
–Base class for NNEDI3 interpolating methods.
-
Nnedi3
–Full implementation of the NNEDI3 anti-aliaser
-
Nnedi3DR
–Concrete implementation of NNEDI3 used as a double-rater.
-
Nnedi3SS
–Concrete implementation of NNEDI3 used as a supersampler.
NNEDI3 dataclass
¶
NNEDI3(
nsize: int = 0,
nns: int = 4,
qual: int = 2,
etype: int = 0,
pscrn: int = 1,
opencl: bool = False,
*,
field: int = 0,
drop_fields: bool = True,
transpose_first: bool = False,
shifter: KernelT = Catrom,
scaler: ScalerT | None = None
)
Bases: _FullInterpolate
, Interpolater
Base class for NNEDI3 interpolating methods.
Methods:
-
copy
–Returns a new Antialiaser class replacing specified fields with new values
-
full_interpolate
– -
get_aa_args
– -
interpolate
– -
is_full_interpolate_enabled
– -
shift_interpolate
–Applies a post-shifting interpolation operation to the interpolated clip.
Attributes:
-
drop_fields
(bool
) –Whether to discard the unused field based on the
field
setting. -
etype
(int
) –The set of weights used in the predictor neural network. Possible values:
-
field
(int
) –Controls the mode of operation and which field is kept in the resized image.
-
nns
(int
) –Number of neurons in the predictor neural network. Possible values:
-
nsize
(int
) –Size of the local neighbourhood around each pixel used by the predictor neural network.
-
opencl
(bool
) –Enables the use of the OpenCL variant.
-
pscrn
(int
) –The prescreener used to decide which pixels should be processed by the predictor neural network,
-
qual
(int
) –The number of different neural network predictions that are blended together to compute the final output value.
-
scaler
(ScalerT | None
) –Scaler used for additional scaling operations. If None, default to
shifter
-
shifter
(KernelT
) –Kernel used for shifting operations. Default to Catrom.
-
transpose_first
(bool
) –Transpose the clip before any operation.
drop_fields class-attribute
instance-attribute
¶
drop_fields: bool = True
Whether to discard the unused field based on the field
setting.
etype class-attribute
instance-attribute
¶
etype: int = 0
The set of weights used in the predictor neural network. Possible values: - 0: Weights trained to minimise absolute error. - 1: Weights trained to minimise squared error.
field class-attribute
instance-attribute
¶
field: int = 0
Controls the mode of operation and which field is kept in the resized image. - 0: Same rate, keeps the bottom field. - 1: Same rate, keeps the top field. - 2: Double rate (alternates each frame), starts with the bottom field. - 3: Double rate (alternates each frame), starts with the top field.
nns class-attribute
instance-attribute
¶
nns: int = 4
Number of neurons in the predictor neural network. Possible values: - 0: 16 - 1: 32 - 2: 64 - 3: 128 - 4: 256
nsize class-attribute
instance-attribute
¶
nsize: int = 0
Size of the local neighbourhood around each pixel used by the predictor neural network. Possible settings: - 0: 8x6 - 1: 16x6 - 2: 32x6 - 3: 48x6 - 4: 8x4 - 5: 16x4 - 6: 32x4
opencl class-attribute
instance-attribute
¶
opencl: bool = False
Enables the use of the OpenCL variant. Note that this will only work if full interpolation can be performed.
pscrn class-attribute
instance-attribute
¶
pscrn: int = 1
The prescreener used to decide which pixels should be processed by the predictor neural network, and which can be handled by simple cubic interpolation. Since most pixels can be handled by cubic interpolation, using the prescreener generally results in much faster processing. Possible values: - 0: No prescreening. No pixels will be processed with cubic interpolation. This is really slow. - 1: Old prescreener. - 2: New prescreener level 0. - 3: New prescreener level 1. - 4: New prescreener level 2.
The new prescreener is not available with float input.
qual class-attribute
instance-attribute
¶
qual: int = 2
The number of different neural network predictions that are blended together to compute the final output value. Each neural network was trained on a different set of training data. Blending the results of these different networks improves generalisation to unseen data. Possible values are 1 and 2.
scaler class-attribute
instance-attribute
¶
scaler: ScalerT | None = None
Scaler used for additional scaling operations. If None, default to shifter
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Default to Catrom.
transpose_first class-attribute
instance-attribute
¶
transpose_first: bool = False
Transpose the clip before any operation.
copy ¶
copy(**kwargs: Any) -> Self
Returns a new Antialiaser class replacing specified fields with new values
Source code
137 138 139 |
|
full_interpolate ¶
full_interpolate(
clip: VideoNode, double_y: bool, double_x: bool, **kwargs: Any
) -> ConstantFormatVideoNode
Source code
112 113 114 115 116 117 |
|
get_aa_args ¶
Source code
92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
interpolate ¶
Source code
106 107 108 109 110 |
|
is_full_interpolate_enabled ¶
Source code
89 90 |
|
shift_interpolate ¶
Applies a post-shifting interpolation operation to the interpolated clip.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
inter
¶VideoNode
) –Interpolated clip.
-
double_y
¶bool
) –Whether the height has been doubled
Returns:
-
ConstantFormatVideoNode
–Shifted clip.
Source code
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
Nnedi3 dataclass
¶
Nnedi3(
nsize: int = 0,
nns: int = 4,
qual: int = 2,
etype: int = 0,
pscrn: int = 1,
opencl: bool = False,
*,
field: int = 0,
drop_fields: bool = True,
transpose_first: bool = False,
shifter: KernelT = Catrom,
scaler: ScalerT | None = None
)
Bases: Nnedi3DR
, Nnedi3SS
, Antialiaser
Full implementation of the NNEDI3 anti-aliaser
Methods:
-
aa
– -
copy
–Returns a new Antialiaser class replacing specified fields with new values
-
draa
– -
full_interpolate
– -
get_aa_args
– -
get_sr_args
–Retrieves arguments for single rating processing.
-
get_ss_args
–Retrieves arguments for super sampling processing.
-
interpolate
– -
is_full_interpolate_enabled
– -
kernel_radius
– -
scale
–Scale the given clip using super sampling method.
-
shift_interpolate
–Applies a post-shifting interpolation operation to the interpolated clip.
Attributes:
-
drop_fields
(bool
) –Whether to discard the unused field based on the
field
setting. -
etype
(int
) –The set of weights used in the predictor neural network. Possible values:
-
field
(int
) –Controls the mode of operation and which field is kept in the resized image.
-
merge_func
(Callable[[VideoNode, VideoNode], ConstantFormatVideoNode]
) –Function used to merge the clips after the double-rate operation.
-
nns
(int
) –Number of neurons in the predictor neural network. Possible values:
-
nsize
(int
) –Size of the local neighbourhood around each pixel used by the predictor neural network.
-
opencl
(bool
) –Enables the use of the OpenCL variant.
-
pscrn
(int
) –The prescreener used to decide which pixels should be processed by the predictor neural network,
-
qual
(int
) –The number of different neural network predictions that are blended together to compute the final output value.
-
scaler
(ScalerT | None
) –Scaler used for additional scaling operations. If None, default to
shifter
-
shifter
(KernelT
) –Kernel used for shifting operations. Default to Catrom.
-
transpose_first
(bool
) –Transpose the clip before any operation.
drop_fields class-attribute
instance-attribute
¶
drop_fields: bool = True
Whether to discard the unused field based on the field
setting.
etype class-attribute
instance-attribute
¶
etype: int = 0
The set of weights used in the predictor neural network. Possible values: - 0: Weights trained to minimise absolute error. - 1: Weights trained to minimise squared error.
field class-attribute
instance-attribute
¶
field: int = 0
Controls the mode of operation and which field is kept in the resized image. - 0: Same rate, keeps the bottom field. - 1: Same rate, keeps the top field. - 2: Double rate (alternates each frame), starts with the bottom field. - 3: Double rate (alternates each frame), starts with the top field.
merge_func class-attribute
instance-attribute
¶
merge_func: Callable[[VideoNode, VideoNode], ConstantFormatVideoNode] = Merge
Function used to merge the clips after the double-rate operation.
nns class-attribute
instance-attribute
¶
nns: int = 4
Number of neurons in the predictor neural network. Possible values: - 0: 16 - 1: 32 - 2: 64 - 3: 128 - 4: 256
nsize class-attribute
instance-attribute
¶
nsize: int = 0
Size of the local neighbourhood around each pixel used by the predictor neural network. Possible settings: - 0: 8x6 - 1: 16x6 - 2: 32x6 - 3: 48x6 - 4: 8x4 - 5: 16x4 - 6: 32x4
opencl class-attribute
instance-attribute
¶
opencl: bool = False
Enables the use of the OpenCL variant. Note that this will only work if full interpolation can be performed.
pscrn class-attribute
instance-attribute
¶
pscrn: int = 1
The prescreener used to decide which pixels should be processed by the predictor neural network, and which can be handled by simple cubic interpolation. Since most pixels can be handled by cubic interpolation, using the prescreener generally results in much faster processing. Possible values: - 0: No prescreening. No pixels will be processed with cubic interpolation. This is really slow. - 1: Old prescreener. - 2: New prescreener level 0. - 3: New prescreener level 1. - 4: New prescreener level 2.
The new prescreener is not available with float input.
qual class-attribute
instance-attribute
¶
qual: int = 2
The number of different neural network predictions that are blended together to compute the final output value. Each neural network was trained on a different set of training data. Blending the results of these different networks improves generalisation to unseen data. Possible values are 1 and 2.
scaler class-attribute
instance-attribute
¶
scaler: ScalerT | None = None
Scaler used for additional scaling operations. If None, default to shifter
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Default to Catrom.
transpose_first class-attribute
instance-attribute
¶
transpose_first: bool = False
Transpose the clip before any operation.
aa ¶
aa(
clip: VideoNode, dir: AADirection = BOTH, /, **kwargs: Any
) -> ConstantFormatVideoNode
aa(
clip: VideoNode,
y_or_dir: bool | AADirection = True,
x: bool = True,
/,
**kwargs: Any,
) -> ConstantFormatVideoNode
Source code
324 325 326 327 328 329 330 331 332 333 334 |
|
copy ¶
copy(**kwargs: Any) -> Self
Returns a new Antialiaser class replacing specified fields with new values
Source code
137 138 139 |
|
draa ¶
draa(
clip: VideoNode, y: bool = True, x: bool = True, /, **kwargs: Any
) -> ConstantFormatVideoNode
draa(
clip: VideoNode, dir: AADirection = BOTH, /, **kwargs: Any
) -> ConstantFormatVideoNode
draa(
clip: VideoNode,
y_or_dir: bool | AADirection = True,
x: bool = True,
/,
**kwargs: Any,
) -> ConstantFormatVideoNode
Source code
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
|
full_interpolate ¶
full_interpolate(
clip: VideoNode, double_y: bool, double_x: bool, **kwargs: Any
) -> ConstantFormatVideoNode
Source code
112 113 114 115 116 117 |
|
get_aa_args ¶
Source code
92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
get_sr_args ¶
Retrieves arguments for single rating processing.
Parameters:
Returns:
Source code
287 288 289 290 291 292 293 294 295 |
|
get_ss_args ¶
Retrieves arguments for super sampling processing.
Parameters:
Returns:
Source code
178 179 180 181 182 183 184 185 186 |
|
interpolate ¶
Source code
106 107 108 109 110 |
|
is_full_interpolate_enabled ¶
Source code
89 90 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
123 124 125 126 127 128 129 130 131 132 133 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Scale the given clip using super sampling method.
Parameters:
-
clip
¶VideoNode
) –The input clip to be scaled.
-
width
¶int | None
, default:None
) –The target width for scaling. If None, the width of the input clip will be used.
-
height
¶int | None
, default:None
) –The target height for scaling. If None, the height of the input clip will be used.
-
shift
¶tuple[TopShift, LeftShift]
, default:(0, 0)
) –A tuple representing the shift values for the y and x axes.
-
**kwargs
¶Any
, default:{}
) –Additional arguments to be passed to the
interpolate
orfull_interpolate
methods.
Returns:
-
VideoNode
–The scaled clip.
Source code
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
|
shift_interpolate ¶
Applies a post-shifting interpolation operation to the interpolated clip.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
inter
¶VideoNode
) –Interpolated clip.
-
double_y
¶bool
) –Whether the height has been doubled
Returns:
-
ConstantFormatVideoNode
–Shifted clip.
Source code
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
Nnedi3DR dataclass
¶
Nnedi3DR(
nsize: int = 0,
nns: int = 4,
qual: int = 2,
etype: int = 0,
pscrn: int = 1,
opencl: bool = False,
*,
field: int = 0,
drop_fields: bool = True,
transpose_first: bool = False,
shifter: KernelT = Catrom,
scaler: ScalerT | None = None
)
Bases: Nnedi3SR
, DoubleRater
Concrete implementation of NNEDI3 used as a double-rater.
Methods:
-
aa
– -
copy
–Returns a new Antialiaser class replacing specified fields with new values
-
draa
– -
full_interpolate
– -
get_aa_args
– -
get_sr_args
–Retrieves arguments for single rating processing.
-
interpolate
– -
is_full_interpolate_enabled
– -
shift_interpolate
–Applies a post-shifting interpolation operation to the interpolated clip.
Attributes:
-
drop_fields
(bool
) –Whether to discard the unused field based on the
field
setting. -
etype
(int
) –The set of weights used in the predictor neural network. Possible values:
-
field
(int
) –Controls the mode of operation and which field is kept in the resized image.
-
merge_func
(Callable[[VideoNode, VideoNode], ConstantFormatVideoNode]
) –Function used to merge the clips after the double-rate operation.
-
nns
(int
) –Number of neurons in the predictor neural network. Possible values:
-
nsize
(int
) –Size of the local neighbourhood around each pixel used by the predictor neural network.
-
opencl
(bool
) –Enables the use of the OpenCL variant.
-
pscrn
(int
) –The prescreener used to decide which pixels should be processed by the predictor neural network,
-
qual
(int
) –The number of different neural network predictions that are blended together to compute the final output value.
-
scaler
(ScalerT | None
) –Scaler used for additional scaling operations. If None, default to
shifter
-
shifter
(KernelT
) –Kernel used for shifting operations. Default to Catrom.
-
transpose_first
(bool
) –Transpose the clip before any operation.
drop_fields class-attribute
instance-attribute
¶
drop_fields: bool = True
Whether to discard the unused field based on the field
setting.
etype class-attribute
instance-attribute
¶
etype: int = 0
The set of weights used in the predictor neural network. Possible values: - 0: Weights trained to minimise absolute error. - 1: Weights trained to minimise squared error.
field class-attribute
instance-attribute
¶
field: int = 0
Controls the mode of operation and which field is kept in the resized image. - 0: Same rate, keeps the bottom field. - 1: Same rate, keeps the top field. - 2: Double rate (alternates each frame), starts with the bottom field. - 3: Double rate (alternates each frame), starts with the top field.
merge_func class-attribute
instance-attribute
¶
merge_func: Callable[[VideoNode, VideoNode], ConstantFormatVideoNode] = Merge
Function used to merge the clips after the double-rate operation.
nns class-attribute
instance-attribute
¶
nns: int = 4
Number of neurons in the predictor neural network. Possible values: - 0: 16 - 1: 32 - 2: 64 - 3: 128 - 4: 256
nsize class-attribute
instance-attribute
¶
nsize: int = 0
Size of the local neighbourhood around each pixel used by the predictor neural network. Possible settings: - 0: 8x6 - 1: 16x6 - 2: 32x6 - 3: 48x6 - 4: 8x4 - 5: 16x4 - 6: 32x4
opencl class-attribute
instance-attribute
¶
opencl: bool = False
Enables the use of the OpenCL variant. Note that this will only work if full interpolation can be performed.
pscrn class-attribute
instance-attribute
¶
pscrn: int = 1
The prescreener used to decide which pixels should be processed by the predictor neural network, and which can be handled by simple cubic interpolation. Since most pixels can be handled by cubic interpolation, using the prescreener generally results in much faster processing. Possible values: - 0: No prescreening. No pixels will be processed with cubic interpolation. This is really slow. - 1: Old prescreener. - 2: New prescreener level 0. - 3: New prescreener level 1. - 4: New prescreener level 2.
The new prescreener is not available with float input.
qual class-attribute
instance-attribute
¶
qual: int = 2
The number of different neural network predictions that are blended together to compute the final output value. Each neural network was trained on a different set of training data. Blending the results of these different networks improves generalisation to unseen data. Possible values are 1 and 2.
scaler class-attribute
instance-attribute
¶
scaler: ScalerT | None = None
Scaler used for additional scaling operations. If None, default to shifter
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Default to Catrom.
transpose_first class-attribute
instance-attribute
¶
transpose_first: bool = False
Transpose the clip before any operation.
aa ¶
aa(
clip: VideoNode, dir: AADirection = BOTH, /, **kwargs: Any
) -> ConstantFormatVideoNode
aa(
clip: VideoNode,
y_or_dir: bool | AADirection = True,
x: bool = True,
/,
**kwargs: Any,
) -> ConstantFormatVideoNode
Source code
324 325 326 327 328 329 330 331 332 333 334 |
|
copy ¶
copy(**kwargs: Any) -> Self
Returns a new Antialiaser class replacing specified fields with new values
Source code
137 138 139 |
|
draa ¶
draa(
clip: VideoNode, y: bool = True, x: bool = True, /, **kwargs: Any
) -> ConstantFormatVideoNode
draa(
clip: VideoNode, dir: AADirection = BOTH, /, **kwargs: Any
) -> ConstantFormatVideoNode
draa(
clip: VideoNode,
y_or_dir: bool | AADirection = True,
x: bool = True,
/,
**kwargs: Any,
) -> ConstantFormatVideoNode
Source code
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
|
full_interpolate ¶
full_interpolate(
clip: VideoNode, double_y: bool, double_x: bool, **kwargs: Any
) -> ConstantFormatVideoNode
Source code
112 113 114 115 116 117 |
|
get_aa_args ¶
Source code
92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
get_sr_args ¶
Retrieves arguments for single rating processing.
Parameters:
Returns:
Source code
287 288 289 290 291 292 293 294 295 |
|
interpolate ¶
Source code
106 107 108 109 110 |
|
is_full_interpolate_enabled ¶
Source code
89 90 |
|
shift_interpolate ¶
Applies a post-shifting interpolation operation to the interpolated clip.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
inter
¶VideoNode
) –Interpolated clip.
-
double_y
¶bool
) –Whether the height has been doubled
Returns:
-
ConstantFormatVideoNode
–Shifted clip.
Source code
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
Nnedi3SR dataclass
¶
Nnedi3SR(
nsize: int = 0,
nns: int = 4,
qual: int = 2,
etype: int = 0,
pscrn: int = 1,
opencl: bool = False,
*,
field: int = 0,
drop_fields: bool = True,
transpose_first: bool = False,
shifter: KernelT = Catrom,
scaler: ScalerT | None = None
)
Bases: NNEDI3
, SingleRater
Concrete implementation of NNEDI3 used as a single-rater.
Methods:
-
aa
– -
copy
–Returns a new Antialiaser class replacing specified fields with new values
-
full_interpolate
– -
get_aa_args
– -
get_sr_args
–Retrieves arguments for single rating processing.
-
interpolate
– -
is_full_interpolate_enabled
– -
shift_interpolate
–Applies a post-shifting interpolation operation to the interpolated clip.
Attributes:
-
drop_fields
(bool
) –Whether to discard the unused field based on the
field
setting. -
etype
(int
) –The set of weights used in the predictor neural network. Possible values:
-
field
(int
) –Controls the mode of operation and which field is kept in the resized image.
-
nns
(int
) –Number of neurons in the predictor neural network. Possible values:
-
nsize
(int
) –Size of the local neighbourhood around each pixel used by the predictor neural network.
-
opencl
(bool
) –Enables the use of the OpenCL variant.
-
pscrn
(int
) –The prescreener used to decide which pixels should be processed by the predictor neural network,
-
qual
(int
) –The number of different neural network predictions that are blended together to compute the final output value.
-
scaler
(ScalerT | None
) –Scaler used for additional scaling operations. If None, default to
shifter
-
shifter
(KernelT
) –Kernel used for shifting operations. Default to Catrom.
-
transpose_first
(bool
) –Transpose the clip before any operation.
drop_fields class-attribute
instance-attribute
¶
drop_fields: bool = True
Whether to discard the unused field based on the field
setting.
etype class-attribute
instance-attribute
¶
etype: int = 0
The set of weights used in the predictor neural network. Possible values: - 0: Weights trained to minimise absolute error. - 1: Weights trained to minimise squared error.
field class-attribute
instance-attribute
¶
field: int = 0
Controls the mode of operation and which field is kept in the resized image. - 0: Same rate, keeps the bottom field. - 1: Same rate, keeps the top field. - 2: Double rate (alternates each frame), starts with the bottom field. - 3: Double rate (alternates each frame), starts with the top field.
nns class-attribute
instance-attribute
¶
nns: int = 4
Number of neurons in the predictor neural network. Possible values: - 0: 16 - 1: 32 - 2: 64 - 3: 128 - 4: 256
nsize class-attribute
instance-attribute
¶
nsize: int = 0
Size of the local neighbourhood around each pixel used by the predictor neural network. Possible settings: - 0: 8x6 - 1: 16x6 - 2: 32x6 - 3: 48x6 - 4: 8x4 - 5: 16x4 - 6: 32x4
opencl class-attribute
instance-attribute
¶
opencl: bool = False
Enables the use of the OpenCL variant. Note that this will only work if full interpolation can be performed.
pscrn class-attribute
instance-attribute
¶
pscrn: int = 1
The prescreener used to decide which pixels should be processed by the predictor neural network, and which can be handled by simple cubic interpolation. Since most pixels can be handled by cubic interpolation, using the prescreener generally results in much faster processing. Possible values: - 0: No prescreening. No pixels will be processed with cubic interpolation. This is really slow. - 1: Old prescreener. - 2: New prescreener level 0. - 3: New prescreener level 1. - 4: New prescreener level 2.
The new prescreener is not available with float input.
qual class-attribute
instance-attribute
¶
qual: int = 2
The number of different neural network predictions that are blended together to compute the final output value. Each neural network was trained on a different set of training data. Blending the results of these different networks improves generalisation to unseen data. Possible values are 1 and 2.
scaler class-attribute
instance-attribute
¶
scaler: ScalerT | None = None
Scaler used for additional scaling operations. If None, default to shifter
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Default to Catrom.
transpose_first class-attribute
instance-attribute
¶
transpose_first: bool = False
Transpose the clip before any operation.
aa ¶
aa(
clip: VideoNode, dir: AADirection = BOTH, /, **kwargs: Any
) -> ConstantFormatVideoNode
aa(
clip: VideoNode,
y_or_dir: bool | AADirection = True,
x: bool = True,
/,
**kwargs: Any,
) -> ConstantFormatVideoNode
Source code
324 325 326 327 328 329 330 331 332 333 334 |
|
copy ¶
copy(**kwargs: Any) -> Self
Returns a new Antialiaser class replacing specified fields with new values
Source code
137 138 139 |
|
full_interpolate ¶
full_interpolate(
clip: VideoNode, double_y: bool, double_x: bool, **kwargs: Any
) -> ConstantFormatVideoNode
Source code
112 113 114 115 116 117 |
|
get_aa_args ¶
Source code
92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
get_sr_args ¶
Retrieves arguments for single rating processing.
Parameters:
Returns:
Source code
287 288 289 290 291 292 293 294 295 |
|
interpolate ¶
Source code
106 107 108 109 110 |
|
is_full_interpolate_enabled ¶
Source code
89 90 |
|
shift_interpolate ¶
Applies a post-shifting interpolation operation to the interpolated clip.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
inter
¶VideoNode
) –Interpolated clip.
-
double_y
¶bool
) –Whether the height has been doubled
Returns:
-
ConstantFormatVideoNode
–Shifted clip.
Source code
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
Nnedi3SS dataclass
¶
Nnedi3SS(
nsize: int = 0,
nns: int = 4,
qual: int = 2,
etype: int = 0,
pscrn: int = 1,
opencl: bool = False,
*,
field: int = 0,
drop_fields: bool = True,
transpose_first: bool = False,
shifter: KernelT = Catrom,
scaler: ScalerT | None = None
)
Bases: NNEDI3
, SuperSampler
Concrete implementation of NNEDI3 used as a supersampler.
Methods:
-
copy
–Returns a new Antialiaser class replacing specified fields with new values
-
full_interpolate
– -
get_aa_args
– -
get_ss_args
–Retrieves arguments for super sampling processing.
-
interpolate
– -
is_full_interpolate_enabled
– -
kernel_radius
– -
scale
–Scale the given clip using super sampling method.
-
shift_interpolate
–Applies a post-shifting interpolation operation to the interpolated clip.
Attributes:
-
drop_fields
(bool
) –Whether to discard the unused field based on the
field
setting. -
etype
(int
) –The set of weights used in the predictor neural network. Possible values:
-
field
(int
) –Controls the mode of operation and which field is kept in the resized image.
-
nns
(int
) –Number of neurons in the predictor neural network. Possible values:
-
nsize
(int
) –Size of the local neighbourhood around each pixel used by the predictor neural network.
-
opencl
(bool
) –Enables the use of the OpenCL variant.
-
pscrn
(int
) –The prescreener used to decide which pixels should be processed by the predictor neural network,
-
qual
(int
) –The number of different neural network predictions that are blended together to compute the final output value.
-
scaler
(ScalerT | None
) –Scaler used for additional scaling operations. If None, default to
shifter
-
shifter
(KernelT
) –Kernel used for shifting operations. Default to Catrom.
-
transpose_first
(bool
) –Transpose the clip before any operation.
drop_fields class-attribute
instance-attribute
¶
drop_fields: bool = True
Whether to discard the unused field based on the field
setting.
etype class-attribute
instance-attribute
¶
etype: int = 0
The set of weights used in the predictor neural network. Possible values: - 0: Weights trained to minimise absolute error. - 1: Weights trained to minimise squared error.
field class-attribute
instance-attribute
¶
field: int = 0
Controls the mode of operation and which field is kept in the resized image. - 0: Same rate, keeps the bottom field. - 1: Same rate, keeps the top field. - 2: Double rate (alternates each frame), starts with the bottom field. - 3: Double rate (alternates each frame), starts with the top field.
nns class-attribute
instance-attribute
¶
nns: int = 4
Number of neurons in the predictor neural network. Possible values: - 0: 16 - 1: 32 - 2: 64 - 3: 128 - 4: 256
nsize class-attribute
instance-attribute
¶
nsize: int = 0
Size of the local neighbourhood around each pixel used by the predictor neural network. Possible settings: - 0: 8x6 - 1: 16x6 - 2: 32x6 - 3: 48x6 - 4: 8x4 - 5: 16x4 - 6: 32x4
opencl class-attribute
instance-attribute
¶
opencl: bool = False
Enables the use of the OpenCL variant. Note that this will only work if full interpolation can be performed.
pscrn class-attribute
instance-attribute
¶
pscrn: int = 1
The prescreener used to decide which pixels should be processed by the predictor neural network, and which can be handled by simple cubic interpolation. Since most pixels can be handled by cubic interpolation, using the prescreener generally results in much faster processing. Possible values: - 0: No prescreening. No pixels will be processed with cubic interpolation. This is really slow. - 1: Old prescreener. - 2: New prescreener level 0. - 3: New prescreener level 1. - 4: New prescreener level 2.
The new prescreener is not available with float input.
qual class-attribute
instance-attribute
¶
qual: int = 2
The number of different neural network predictions that are blended together to compute the final output value. Each neural network was trained on a different set of training data. Blending the results of these different networks improves generalisation to unseen data. Possible values are 1 and 2.
scaler class-attribute
instance-attribute
¶
scaler: ScalerT | None = None
Scaler used for additional scaling operations. If None, default to shifter
shifter class-attribute
instance-attribute
¶
Kernel used for shifting operations. Default to Catrom.
transpose_first class-attribute
instance-attribute
¶
transpose_first: bool = False
Transpose the clip before any operation.
copy ¶
copy(**kwargs: Any) -> Self
Returns a new Antialiaser class replacing specified fields with new values
Source code
137 138 139 |
|
full_interpolate ¶
full_interpolate(
clip: VideoNode, double_y: bool, double_x: bool, **kwargs: Any
) -> ConstantFormatVideoNode
Source code
112 113 114 115 116 117 |
|
get_aa_args ¶
Source code
92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
get_ss_args ¶
Retrieves arguments for super sampling processing.
Parameters:
Returns:
Source code
178 179 180 181 182 183 184 185 186 |
|
interpolate ¶
Source code
106 107 108 109 110 |
|
is_full_interpolate_enabled ¶
Source code
89 90 |
|
kernel_radius ¶
kernel_radius() -> int
Source code
123 124 125 126 127 128 129 130 131 132 133 |
|
scale ¶
scale(
clip: VideoNode,
width: int | None = None,
height: int | None = None,
shift: tuple[TopShift, LeftShift] = (0, 0),
**kwargs: Any
) -> VideoNode
Scale the given clip using super sampling method.
Parameters:
-
clip
¶VideoNode
) –The input clip to be scaled.
-
width
¶int | None
, default:None
) –The target width for scaling. If None, the width of the input clip will be used.
-
height
¶int | None
, default:None
) –The target height for scaling. If None, the height of the input clip will be used.
-
shift
¶tuple[TopShift, LeftShift]
, default:(0, 0)
) –A tuple representing the shift values for the y and x axes.
-
**kwargs
¶Any
, default:{}
) –Additional arguments to be passed to the
interpolate
orfull_interpolate
methods.
Returns:
-
VideoNode
–The scaled clip.
Source code
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
|
shift_interpolate ¶
Applies a post-shifting interpolation operation to the interpolated clip.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
inter
¶VideoNode
) –Interpolated clip.
-
double_y
¶bool
) –Whether the height has been doubled
Returns:
-
ConstantFormatVideoNode
–Shifted clip.
Source code
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|