qtgmc ¶
Classes:
-
QTempGaussMC–Quick Temporal Gaussian Motion Compensated (QTGMC)
QTGMCArgs ¶
Namespace containing helper TypedDict definitions for various argument groups.
Classes:
-
Blur–Arguments available when passing to MVTools.flow_blur.
-
Compensate–Arguments available when passing to MVTools.compensate.
-
Degrain–Arguments available when passing to the internal
binomial_degrainmethod, -
Mask–Arguments available when passing to MVTools.mask.
-
MaskShimmer–Arguments available when passing to the internal
_mask_shimmermethod through -
PrefilterToFullRange–Arguments available when passing to prefilter_to_full_range.
Blur ¶
Compensate ¶
Degrain ¶
Bases: TypedDict
Arguments available when passing to the internal binomial_degrain method, calling MVTools.degrain through QTempGaussMC.basic and QTempGaussMC.source_match or directly calling MVTools.degrain through QTempGaussMC.final
Attributes:
Mask ¶
MaskShimmer ¶
Bases: TypedDict
Arguments available when passing to the internal _mask_shimmer method through QTempGaussMC.prefilter, QTempGaussMC.basic and QTempGaussMC.final.
Attributes:
-
erosion_distance(int) –How much to deflate then reflate to remove thin areas.
-
over_dilation(int) –Extra inflation to ensure areas to restore back are fully caught.
QTempGaussMC ¶
Bases: VSObject
Quick Temporal Gaussian Motion Compensated (QTGMC)
A very high quality deinterlacer with a range of features for both quality and convenience. These include extensive noise processing capabilities, support for repair of progressive material, precision source matching, shutter speed simulation, etc.
Originally based on TempGaussMC by Didée.
Basic usage
deinterlace = QTempGaussMC().deinterlace(clip)
Refer to the AviSynth QTGMC documentation and the havsfunc implementation for detailed explanations of the underlying algorithm.
These resources remain relevant, as the core algorithm used here is largely similar.
Note that parameter names differ in this implementation due to a complete rewrite. A mapping between vsjetpack and havsfunc parameters is available here.
Examples:
- ...
- Passing a progressive input to reduce shimmering (equivalent to
InputType=2, ProgSADMask=12):Or:clip = QTempGaussMC().basic(mask_args={"ml": 12}).repair(clip)clip = QTempGaussMC(basic_mask_args={"ml": 12}).repair(clip)
Parameters:
-
(**kwargs¶Any, default:{}) –Additional arguments to be passed to the parameter stage methods. Use the method's name as prefix to pass an argument to the respective method.
Example for passing tr=1 to the prefilter stage:
prefilter_tr=1.
Classes:
-
BackBlendMode–When to back blend (blurred) difference between pre & post sharpened clip.
-
InputType–Processing routine to use for the input.
-
LosslessMode–When to put exact source fields into result & clean any artifacts.
-
NoiseDeintMode–When noise is taken from interlaced source, how to 'deinterlace' it before restoring.
-
NoiseProcessMode–How to handle processing noise in the source.
-
SearchPostProcess–Prefiltering to apply in order to assist with motion search.
-
SharpenLimitMode–How to limit and when to apply re-sharpening of the clip.
-
SharpenMode–How to re-sharpen the clip after temporal smoothing.
-
SourceMatchMode–Creates higher fidelity output with extra processing.
Methods:
-
analyze–Configure parameters for the motion analysis stage.
-
back_blend–Configure parameters for the back_blend stage.
-
basic–Configure parameters for the basic stage.
-
bob–Bob interlaced input. Motion blur stage FPS divisor is ignored.
-
deinterlace–Deinterlace interlaced input. Motion blur stage FPS divisor is respected.
-
denoise–Configure parameters for the denoise stage.
-
deshimmer–Deshimmer progressive input.
-
final–Configure parameters for the final stage.
-
lossless–Configure parameter for the lossless stage.
-
motion_blur–Configure parameters for the motion blur stage.
-
prefilter–Configure parameters for the prefilter stage.
-
repair–Repair badly deinterlaced input.
-
sharpen–Configure parameters for the sharpen stage.
-
sharpen_limit–Configure parameters for the sharpen_limit stage.
-
source_match–Configure parameters for the source_match stage.
Attributes:
-
basic_output(VideoNode) –Output of the basic stage.
-
bobbed(VideoNode) –High quality bobbed clip, initial spatial interpolation.
-
clip(VideoNode) –Clip to process.
-
compat_clip– -
compat_input_type– -
compat_tff– -
denoise_output(VideoNode) –Output of the denoise stage.
-
draft(VideoNode) –Draft processed clip, used as a base for prefiltering & denoising.
-
final_output(VideoNode) –Output of the final stage.
-
input(VideoNode) –Prepared input clip for high quality interpolation.
-
motion_blur_output(VideoNode) –Output of the motion blur stage.
-
mv(MVTools) –MVTools instance used during processing.
-
noise(VideoNode) –Extracted noise when noise processing is enabled.
-
prefilter_output(VideoNode) –Output of the prefilter stage.
-
sharpen_limit_radius(int) – -
sharpen_strength(float) – -
source_match_bobber(Bobber) –
Source code in vsdeinterlace/qtgmc.py
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | |
bobbed instance-attribute ¶
bobbed: VideoNode
High quality bobbed clip, initial spatial interpolation.
draft instance-attribute ¶
draft: VideoNode
Draft processed clip, used as a base for prefiltering & denoising.
motion_blur_output instance-attribute ¶
motion_blur_output: VideoNode
Output of the motion blur stage.
BackBlendMode ¶
Bases: CustomIntEnum
When to back blend (blurred) difference between pre & post sharpened clip.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
BOTH–Perform back-blending both before and after sharpness limiting.
-
POSTLIMIT–Perform back-blending after sharpness limiting.
-
PRELIMIT–Perform back-blending prior to sharpness limiting.
BOTH class-attribute instance-attribute ¶
BOTH = 2
Perform back-blending both before and after sharpness limiting.
POSTLIMIT class-attribute instance-attribute ¶
POSTLIMIT = 1
Perform back-blending after sharpness limiting.
PRELIMIT class-attribute instance-attribute ¶
PRELIMIT = 0
Perform back-blending prior to sharpness limiting.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
InputType ¶
Bases: CustomIntEnum
Processing routine to use for the input.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
INTERLACE–Deinterlace interlaced input.
-
PROGRESSIVE–Deshimmer general progressive material that contains less severe problems.
-
REPAIR–Repair badly deinterlaced material with considerable horizontal artifacts.
PROGRESSIVE class-attribute instance-attribute ¶
PROGRESSIVE = 1
Deshimmer general progressive material that contains less severe problems.
REPAIR class-attribute instance-attribute ¶
REPAIR = 2
Repair badly deinterlaced material with considerable horizontal artifacts.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
LosslessMode ¶
Bases: CustomIntEnum
When to put exact source fields into result & clean any artifacts.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
NONE–Do not restore source fields.
-
POSTSMOOTH–Restore source fields after final temporal smooth. True lossless but less stable.
-
PRESHARPEN–Restore source fields prior to re-sharpening. Not exactly lossless.
POSTSMOOTH class-attribute instance-attribute ¶
POSTSMOOTH = 2
Restore source fields after final temporal smooth. True lossless but less stable.
PRESHARPEN class-attribute instance-attribute ¶
PRESHARPEN = 1
Restore source fields prior to re-sharpening. Not exactly lossless.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
NoiseDeintMode ¶
Bases: CustomIntEnum
When noise is taken from interlaced source, how to 'deinterlace' it before restoring.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
BOB–Bob source noise, results in coarse noise.
-
GENERATE–Generates fresh noise lines.
-
WEAVE–Double weave source noise, lags behind by one frame.
WEAVE class-attribute instance-attribute ¶
WEAVE = 0
Double weave source noise, lags behind by one frame.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
NoiseProcessMode ¶
Bases: CustomIntEnum
How to handle processing noise in the source.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
DENOISE–Denoise source & optionally restore some noise back at the end of basic or final stages.
-
IDENTIFY–Identify noise only & optionally restore some noise back at the end of basic or final stages.
DENOISE class-attribute instance-attribute ¶
DENOISE = 1
Denoise source & optionally restore some noise back at the end of basic or final stages.
IDENTIFY class-attribute instance-attribute ¶
IDENTIFY = 0
Identify noise only & optionally restore some noise back at the end of basic or final stages.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
SearchPostProcess ¶
Bases: CustomIntEnum
Prefiltering to apply in order to assist with motion search.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
GAUSSBLUR–Gaussian blur.
-
GAUSSBLUR_EDGESOFTEN–Gaussian blur & edge softening.
GAUSSBLUR_EDGESOFTEN class-attribute instance-attribute ¶
GAUSSBLUR_EDGESOFTEN = 1
Gaussian blur & edge softening.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
SharpenLimitMode ¶
Bases: CustomIntEnum
How to limit and when to apply re-sharpening of the clip.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
SPATIAL_POSTSMOOTH–Spatial sharpness limiting after the final stage.
-
SPATIAL_PRESMOOTH–Spatial sharpness limiting prior to final stage.
-
TEMPORAL_POSTSMOOTH–Temporal sharpness limiting after the final stage.
-
TEMPORAL_PRESMOOTH–Temporal sharpness limiting prior to final stage.
SPATIAL_POSTSMOOTH class-attribute instance-attribute ¶
SPATIAL_POSTSMOOTH = 2
Spatial sharpness limiting after the final stage.
SPATIAL_PRESMOOTH class-attribute instance-attribute ¶
SPATIAL_PRESMOOTH = 0
Spatial sharpness limiting prior to final stage.
TEMPORAL_POSTSMOOTH class-attribute instance-attribute ¶
TEMPORAL_POSTSMOOTH = 3
Temporal sharpness limiting after the final stage.
TEMPORAL_PRESMOOTH class-attribute instance-attribute ¶
TEMPORAL_PRESMOOTH = 1
Temporal sharpness limiting prior to final stage.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
SharpenMode ¶
Bases: CustomIntEnum
How to re-sharpen the clip after temporal smoothing.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
UNSHARP–Re-sharpening using unsharpening.
-
UNSHARP_MINMAX–Re-sharpening using unsharpening clamped to the local 3x3 min/max average.
UNSHARP_MINMAX class-attribute instance-attribute ¶
UNSHARP_MINMAX = 1
Re-sharpening using unsharpening clamped to the local 3x3 min/max average.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
SourceMatchMode ¶
Bases: CustomIntEnum
Creates higher fidelity output with extra processing. Will capture more source detail and reduce oversharpening / haloing.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
BASIC–Conservative halfway stage that rarely introduces artifacts.
-
NONE–No source match processing.
-
REFINED–Restores almost exact source detail but is sensitive to noise & can introduce occasional aliasing.
-
TWICE_REFINED–Restores almost exact source detail.
BASIC class-attribute instance-attribute ¶
BASIC = 1
Conservative halfway stage that rarely introduces artifacts.
REFINED class-attribute instance-attribute ¶
REFINED = 2
Restores almost exact source detail but is sensitive to noise & can introduce occasional aliasing.
TWICE_REFINED class-attribute instance-attribute ¶
TWICE_REFINED = 3
Restores almost exact source detail.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
analyze ¶
analyze(
*,
force_tr: int = 0,
preset: Mapping[str, Any] = HQ_SAD,
blksize: int | tuple[int, int] = 16,
overlap: int | tuple[int, int] = 2,
refine: int = 1,
thsad_recalc: int | None = None,
thscd: int | tuple[int | None, float | None] | None = (180, 38.5)
) -> Self
Configure parameters for the motion analysis stage.
Parameters:
-
(force_tr¶int, default:0) –Always analyze motion to at least this, even if otherwise unnecessary.
-
(preset¶Mapping[str, Any], default:HQ_SAD) –MVTools preset defining base values for the MVTools object.
-
(blksize¶int | tuple[int, int], default:16) –Size of a block. Larger blocks are less sensitive to noise, are faster, but also less accurate.
-
(overlap¶int | tuple[int, int], default:2) –The blksize divisor for block overlap. Larger overlapping reduces blocking artifacts.
-
(refine¶int, default:1) –Number of times to recalculate motion vectors with halved block size.
-
(thsad_recalc¶int | None, default:None) –Only bad quality new vectors with a SAD above this will be re-estimated by search. thsad value is scaled to 8x8 block size.
-
(thscd¶int | tuple[int | None, float | None] | None, default:(180, 38.5)) –Scene change detection thresholds:
- First value: SAD threshold for considering a block changed between frames.
- Second value: Percentage of changed blocks needed to trigger a scene change.
Source code in vsdeinterlace/qtgmc.py
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | |
back_blend ¶
Configure parameters for the back_blend stage.
Parameters:
-
(mode¶BackBlendMode, default:PRELIMIT) –Specifies at which stage to perform back-blending.
-
(sigma¶float, default:1.4) –Gaussian blur sigma.
Source code in vsdeinterlace/qtgmc.py
666 667 668 669 670 671 672 673 674 675 676 677 678 | |
basic ¶
basic(
*,
tr: int = 2,
thsad: int | tuple[int, int] = 640,
bobber: BobberLike = NNEDI3(nsize=1),
noise_restore: float = 0,
degrain_args: Degrain | None = None,
mask_args: Mask | None = {"ml": 10},
mask_shimmer_args: MaskShimmer | None = {"erosion_distance": 0}
) -> Self
Configure parameters for the basic stage.
Parameters:
-
(tr¶int, default:2) –Temporal radius of the motion compensated binomial smooth.
-
(thsad¶int | tuple[int, int], default:640) –Thsad of the motion compensated binomial smooth.
-
(bobber¶BobberLike, default:NNEDI3(nsize=1)) –Bobber to use for initial spatial interpolation.
-
(noise_restore¶float, default:0) –How much noise to restore after this stage.
-
(degrain_args¶Degrain | None, default:None) –Arguments passed to the binomial_degrain call.
-
(mask_args¶Mask | None, default:{'ml': 10}) –Arguments passed to MVTools.mask for repair.
-
(mask_shimmer_args¶MaskShimmer | None, default:{'erosion_distance': 0}) –Arguments passed to the mask_shimmer call:
- erosion_distance: How much to deflate then reflate to remove thin areas. Default is 0 for this stage.
- over_dilation: Extra inflation to ensure areas to restore back are fully caught. Default is 0.
Source code in vsdeinterlace/qtgmc.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | |
bob ¶
bob(clip: VideoNode, tff: FieldBasedLike | bool | None = None) -> VideoNode
Bob interlaced input. Motion blur stage FPS divisor is ignored.
Parameters:
-
(clip¶VideoNode) –Input clip.
-
(tff¶FieldBasedLike | bool | None, default:None) –Field order (top-field-first). If None, inferred from the clip. Defaults to None.
Returns:
-
VideoNode–Bobbed clip.
Source code in vsdeinterlace/qtgmc.py
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 | |
deinterlace ¶
deinterlace(
clip: VideoNode | None = None, tff: FieldBasedLike | bool | None = None
) -> VideoNode
Deinterlace interlaced input. Motion blur stage FPS divisor is respected.
Parameters:
-
(clip¶VideoNode | None, default:None) –Input clip.
-
(tff¶FieldBasedLike | bool | None, default:None) –Field order (top-field-first). If None, inferred from the clip. Defaults to None.
Returns:
-
VideoNode–Deinterlaced clip.
Source code in vsdeinterlace/qtgmc.py
1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 | |
denoise ¶
denoise(
*,
tr: int = 1,
func: DFTTest | _DenoiseFuncTr = DFTTest(sigma=8),
mode: NoiseProcessMode = IDENTIFY,
deint: NoiseDeintMode = GENERATE,
mc_denoise: bool = True,
stabilize: tuple[float, float] | Literal[False] = (0.6, 0.2),
func_comp_args: Compensate | None = None,
stabilize_comp_args: Compensate | None = None
) -> Self
Configure parameters for the denoise stage.
Parameters:
-
(tr¶int, default:1) –Temporal radius of the denoising function & it's motion compensation.
-
(func¶DFTTest | _DenoiseFuncTr, default:DFTTest(sigma=8)) –Denoising function to use.
-
(mode¶NoiseProcessMode, default:IDENTIFY) –Noise handling method to use.
-
(deint¶NoiseDeintMode, default:GENERATE) –Noise deinterlacing method to use.
-
(mc_denoise¶bool, default:True) –Whether to perform motion-compensated denoising.
-
(stabilize¶tuple[float, float] | Literal[False], default:(0.6, 0.2)) –Weights to use when blending source noise with compensated noise.
-
(func_comp_args¶Compensate | None, default:None) –Arguments passed to MVTools.compensate for denoising.
-
(stabilize_comp_args¶Compensate | None, default:None) –Arguments passed to MVTools.compensate for stabilization.
Source code in vsdeinterlace/qtgmc.py
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | |
deshimmer ¶
deshimmer(clip: VideoNode) -> VideoNode
Deshimmer progressive input.
Parameters:
-
(clip¶VideoNode) –Input clip.
Returns:
-
VideoNode–Deshimmered clip.
Source code in vsdeinterlace/qtgmc.py
1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 | |
final ¶
final(
*,
tr: int = 1,
thsad: int | tuple[int, int] = 256,
noise_restore: float = 0,
degrain_args: Degrain | None = None,
mask_shimmer_args: MaskShimmer | None = {"erosion_distance": 4}
) -> Self
Configure parameters for the final stage.
Parameters:
-
(tr¶int, default:1) –Temporal radius of the motion compensated smooth.
-
(thsad¶int | tuple[int, int], default:256) –Thsad of the motion compensated smooth.
-
(noise_restore¶float, default:0) –How much noise to restore after this stage.
-
(degrain_args¶Degrain | None, default:None) –Arguments passed to MVTools.degrain.
-
(mask_shimmer_args¶MaskShimmer | None, default:{'erosion_distance': 4}) –Arguments passed to the mask_shimmer call:
- erosion_distance: How much to deflate then reflate to remove thin areas. Default is 4 for this stage.
- over_dilation: Extra inflation to ensure areas to restore back are fully caught. Default is 0.
Source code in vsdeinterlace/qtgmc.py
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 | |
lossless ¶
Configure parameter for the lossless stage.
Parameters:
-
(mode¶LosslessMode, default:NONE) –Specifies at which stage to re-weave the original fields.
-
(anti_comb¶bool, default:True) –Whether to apply combing reduction post-processing.
Source code in vsdeinterlace/qtgmc.py
615 616 617 618 619 620 621 622 623 624 625 626 627 | |
motion_blur ¶
motion_blur(
*,
shutter_angle: tuple[float, float] = (180, 180),
fps_divisor: int = 1,
blur_args: Blur | None = None,
mask_args: Mask | None = {"ml": 4}
) -> Self
Configure parameters for the motion blur stage.
Parameters:
-
(shutter_angle¶tuple[float, float], default:(180, 180)) –Tuple containing the source and output shutter angle. Will apply motion blur if they do not match.
-
(fps_divisor¶int, default:1) –Factor by which to reduce framerate.
-
(blur_args¶Blur | None, default:None) –Arguments passed to MVTools.flow_blur.
-
(mask_args¶Mask | None, default:{'ml': 4}) –Arguments passed to MVTools.mask.
Source code in vsdeinterlace/qtgmc.py
748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | |
prefilter ¶
prefilter(
*,
tr: int = 2,
sc_threshold: float = 0.1,
postprocess: SearchPostProcess = GAUSSBLUR_EDGESOFTEN,
strength: tuple[float, float] | Literal[False] = (1.9, 0.1),
limit: tuple[float, float, float] = (3, 7, 2),
bias: float = 0.51,
range_expansion_args: PrefilterToFullRange | None = None,
mask_shimmer_args: MaskShimmer | None = {"erosion_distance": 4}
) -> Self
Configure parameters for the prefilter stage.
Parameters:
-
(tr¶int, default:2) –Radius of the initial temporal binomial smooth.
-
(sc_threshold¶float, default:0.1) –Threshold for scene changes, disables sc detection if False.
-
(postprocess¶SearchPostProcess, default:GAUSSBLUR_EDGESOFTEN) –Post-processing routine to use.
-
(strength¶tuple[float, float] | Literal[False], default:(1.9, 0.1)) –Tuple containing gaussian blur sigma & blend weight of the blur.
-
(limit¶tuple[float, float, float], default:(3, 7, 2)) –3-step limiting (8-bit) thresholds for the gaussian blur post-processing. Only for SearchPostProcess.GAUSSBLUR_EDGESOFTEN.
-
(bias¶float, default:0.51) –Bias for blending the gaussian blurred clip with the limited output. Only for SearchPostProcess.GAUSSBLUR_EDGESOFTEN.
-
(range_expansion_args¶PrefilterToFullRange | None, default:None) –Arguments passed to prefilter_to_full_range.
-
(mask_shimmer_args¶MaskShimmer | None, default:{'erosion_distance': 4}) –Arguments passed to the mask_shimmer call:
- erosion_distance: How much to deflate then reflate to remove thin areas. Default is 4 for this stage.
- over_dilation: Extra inflation to ensure areas to restore back are fully caught. Default is 0.
Source code in vsdeinterlace/qtgmc.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | |
repair ¶
repair(clip: VideoNode, tff: FieldBasedLike | bool | None = None) -> VideoNode
Repair badly deinterlaced input.
Parameters:
-
(clip¶VideoNode) –Input clip.
-
(tff¶FieldBasedLike | bool | None, default:None) –Field order (top-field-first). If None, inferred from the clip. Defaults to None.
Returns:
-
VideoNode–Repaired clip.
Source code in vsdeinterlace/qtgmc.py
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 | |
sharpen ¶
sharpen(
*,
mode: SharpenMode = UNSHARP_MINMAX,
strength: float | None = None,
clamp: float | tuple[float, float] = 1,
thin: float = 0
) -> Self
Configure parameters for the sharpen stage.
Parameters:
-
(mode¶SharpenMode, default:UNSHARP_MINMAX) –Specifies the type of sharpening to use. Defaults to SharpenMode.UNSHARP_MINMAX.
-
(strength¶float | None, default:None) –Sharpening strength. Defaults to 1 for SourceMatchMode.NONE or 0 otherwise.
-
(clamp¶float | tuple[float, float], default:1) –Clamp the sharpening strength of SharpenMode.UNSHARP_MINMAX to the min/max average plus/minus this.
-
(thin¶float, default:0) –How much to vertically thin edges.
Source code in vsdeinterlace/qtgmc.py
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 | |
sharpen_limit ¶
sharpen_limit(
*,
mode: SharpenLimitMode = TEMPORAL_PRESMOOTH,
radius: int | None = None,
clamp: float | tuple[float, float] = 0,
comp_args: Compensate | None = None
) -> Self
Configure parameters for the sharpen_limit stage.
Parameters:
-
(mode¶SharpenLimitMode, default:TEMPORAL_PRESMOOTH) –Specifies type of limiting & at which stage to perform it.
-
(radius¶int | None, default:None) –Radius of sharpness limiting. Defaults to 1 for SourceMatchMode.NONE or 0 otherwise.
-
(clamp¶float | tuple[float, float], default:0) –How much undershoot/overshoot to allow.
-
(comp_args¶Compensate | None, default:None) –Arguments passed to MVTools.compensate for temporal limiting.
Source code in vsdeinterlace/qtgmc.py
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | |
source_match ¶
source_match(
*,
tr: int = 1,
bobber: BobberLike | None = None,
mode: SourceMatchMode = NONE,
similarity: float = 0.5,
enhance: float = 0.5,
degrain_args: Degrain | None = None
) -> Self
Configure parameters for the source_match stage.
Parameters:
-
(tr¶int, default:1) –Temporal radius of the refinement motion compensated binomial smooth.
-
(bobber¶BobberLike | None, default:None) –Bobber to use for refined spatial interpolation. Defaults to the basic bobber.
-
(mode¶SourceMatchMode, default:NONE) –Specifies number of refinement steps to perform.
-
(similarity¶float, default:0.5) –Temporal similarity of the error created by smoothing.
-
(enhance¶float, default:0.5) –Sharpening strength prior to source match refinement.
-
(degrain_args¶Degrain | None, default:None) –Arguments passed to the binomial_degrain call.
Source code in vsdeinterlace/qtgmc.py
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 | |