alpha ¶
FloatIterArr module-attribute
¶
FineDehaloMask ¶
Bases: CustomIntEnum
dehalo_alpha ¶
dehalo_alpha(
clip: VideoNode,
rx: FloatIterArr = 2.0,
ry: FloatIterArr | None = None,
darkstr: FloatIterArr = 0.0,
brightstr: FloatIterArr = 1.0,
lowsens: FloatIterArr = 50.0,
highsens: FloatIterArr = 50.0,
sigma_mask: float | bool = False,
ss: FloatIterArr = 1.5,
planes: PlanesT = 0,
show_mask: bool = False,
mask_radius: RadiusT = 1,
downscaler: ScalerT = Mitchell,
upscaler: ScalerT = BSpline,
supersampler: ScalerT = Lanczos(3),
supersampler_ref: ScalerT = Mitchell,
pre_ss: float = 1.0,
pre_supersampler: ScalerT = Nnedi3(0, field=0, shifter=NoShift),
pre_downscaler: ScalerT = Point,
mask_coords: Sequence[int] | None = None,
func: FuncExceptT | None = None,
) -> VideoNode
Reduce halo artifacts by nuking everything around edges (and also the edges actually).
rx
, ry
, darkstr
, brightstr
, lowsens
, highsens
, ss
are all configurable per plane and iteration. tuple
means iteration, list
plane.
rx=(2.0, [2.0, 2.4], [2.2, 2.0, 2.1])
means three iterations. * 1st => 2.0 for all planes * 2nd => 2.0 for luma, 2.4 for chroma * 3rd => 2.2 for luma, 2.0 for u, 2.1 for v
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
rx
¶FloatIterArr
, default:2.0
) –Horizontal radius for halo removal.
-
ry
¶FloatIterArr | None
, default:None
) –Vertical radius for halo removal.
-
darkstr
¶FloatIterArr
, default:0.0
) –Strength factor for dark halos.
-
brightstr
¶FloatIterArr
, default:1.0
) –Strength factor for bright halos.
-
lowsens
¶FloatIterArr
, default:50.0
) –Sensitivity setting for defining how weak the dehalo has to be to get fully accepted.
-
highsens
¶FloatIterArr
, default:50.0
) –Sensitivity setting for define how strong the dehalo has to be to get fully discarded.
-
sigma_mask
¶float | bool
, default:False
) –Blurring strength for the mask.
-
ss
¶FloatIterArr
, default:1.5
) –Supersampling factor, to avoid creation of aliasing.
-
planes
¶PlanesT
, default:0
) –Planes to process.
-
show_mask
¶bool
, default:False
) –Whether to show the computed halo mask.
-
mask_radius
¶RadiusT
, default:1
) –Mask expanding radius with
gradient
. -
downscaler
¶ScalerT
, default:Mitchell
) –Scaler used to downscale the clip.
-
upscaler
¶ScalerT
, default:BSpline
) –Scaler used to upscale the downscaled clip.
-
supersampler
¶ScalerT
, default:Lanczos(3)
) –Scaler used to supersampler the rescaled clip to
ss
factor. -
supersampler_ref
¶ScalerT
, default:Mitchell
) –Reference scaler used to clamp the supersampled clip. Has to be blurrier.
-
pre_ss
¶float
, default:1.0
) –Supersampling rate used before anything else.
-
pre_supersampler
¶ScalerT
, default:Nnedi3(0, field=0, shifter=NoShift)
) –Supersampler used for
pre_ss
. -
pre_downscaler
¶ScalerT
, default:Point
) –Downscaler used for undoing the upscaling done by
pre_supersampler
. -
func
¶FuncExceptT | None
, default:None
) –Function from where this function was called.
Returns:
-
VideoNode
–Dehaloed clip.
Source code
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 487 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 526 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 |
|
dehalo_merge ¶
dehalo_merge(
clip: VideoNode,
dehalo: VideoNode,
darkstr: list[float] | float = 0.0,
brightstr: list[float] | float = 1.0,
lowsens: list[float] | float = 50.0,
highsens: list[float] | float = 50.0,
sigma_mask: float | bool = False,
ss: list[float] | float = 1.5,
planes: PlanesT = 0,
show_mask: bool = False,
mask_radius: RadiusT = 1,
supersampler: ScalerT = Lanczos(3),
supersampler_ref: ScalerT = Mitchell,
pre_ss: float = 1.0,
pre_supersampler: ScalerT = Nnedi3(0, field=0, shifter=NoShift),
pre_downscaler: ScalerT = Point,
mask_coords: Sequence[int] | None = None,
func: FuncExceptT | None = None,
) -> VideoNode
Merge dehaloed clip onto the source clip.
darkstr
, brightstr
, lowsens
, highsens
, ss
are all configurable per plane.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
dehalo
¶VideoNode
) –Dehaloed clip.
-
darkstr
¶list[float] | float
, default:0.0
) –Strength factor for dark halos.
-
brightstr
¶list[float] | float
, default:1.0
) –Strength factor for bright halos.
-
lowsens
¶list[float] | float
, default:50.0
) –Sensitivity setting for defining how weak the dehalo has to be to get fully accepted.
-
highsens
¶list[float] | float
, default:50.0
) –Sensitivity setting for define how strong the dehalo has to be to get fully discarded.
-
sigma_mask
¶float | bool
, default:False
) –Blurring strength for the mask.
-
ss
¶list[float] | float
, default:1.5
) –Supersampling factor, to avoid creation of aliasing.
-
planes
¶PlanesT
, default:0
) –Planes to process.
-
show_mask
¶bool
, default:False
) –Whether to show the computed halo mask.
-
mask_radius
¶RadiusT
, default:1
) –Mask expanding radius with
gradient
. -
supersampler
¶ScalerT
, default:Lanczos(3)
) –Scaler used to supersampler the rescaled clip to
ss
factor. -
supersampler_ref
¶ScalerT
, default:Mitchell
) –Reference scaler used to clamp the supersampled clip. Has to be blurrier.
-
pre_ss
¶float
, default:1.0
) –Supersampling rate used before anything else.
-
pre_supersampler
¶ScalerT
, default:Nnedi3(0, field=0, shifter=NoShift)
) –Supersampler used for
pre_ss
. -
pre_downscaler
¶ScalerT
, default:Point
) –Downscaler used for undoing the upscaling done by
pre_supersampler
. -
func
¶FuncExceptT | None
, default:None
) –Function from where this function was called.
Returns:
-
VideoNode
–Merged clip.
Source code
704 705 706 707 708 709 710 711 712 713 714 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 747 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 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 |
|
dehalo_sigma ¶
dehalo_sigma(
clip: VideoNode,
brightstr: FloatIterArr = 1.0,
darkstr: FloatIterArr = 0.0,
lowsens: FloatIterArr = 50.0,
highsens: FloatIterArr = 50.0,
ss: FloatIterArr = 1.5,
blur_func: Prefilter = GAUSS,
planes: PlanesT = 0,
supersampler: ScalerT = Lanczos(3),
supersampler_ref: ScalerT = Mitchell,
pre_ss: float = 1.0,
pre_supersampler: ScalerT = Nnedi3(0, field=0, shifter=NoShift),
pre_downscaler: ScalerT = Point,
mask_radius: RadiusT = 1,
sigma_mask: float | bool = False,
mask_coords: Sequence[int] | None = None,
show_mask: bool = False,
func: FuncExceptT | None = None,
**kwargs: Any
) -> VideoNode
Source code
568 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 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
|
dehalomicron ¶
dehalomicron(
clip: VideoNode,
brz: float = 0.075,
sigma: float = 1.55,
sigma0: float = 1.15,
ss: float = 1.65,
pre_ss: bool = True,
dampen: (
float | list[float] | tuple[float | list[float], bool | None]
) = 0.65,
sigma_ref: float = 4.3333,
planes: PlanesT = 0,
fdehalo_kwargs: KwargsT | None = None,
**kwargs: Any
) -> VideoNode
Source code
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 |
|
fine_dehalo2 ¶
fine_dehalo2(
clip: VideoNode,
mode: OneDimConvModeT = HV,
radius: int = 2,
mask_radius: int = 2,
brightstr: float = 1.0,
darkstr: float = 1.0,
dark: bool | None = True,
show_mask: bool = False,
) -> VideoNode
Halo removal function for 2nd order halos.
Parameters:
-
clip
¶VideoNode
) –Source clip.
-
mode
¶OneDimConvModeT
, default:HV
) –Horizontal/Vertical or both ways.
-
radius
¶int
, default:2
) –Radius for the fixing convolution.
-
mask_radius
¶int
, default:2
) –Radius for mask growing.
-
brightstr
¶float
, default:1.0
) –Strength factor for bright halos.
-
darkstr
¶float
, default:1.0
) –Strength factor for dark halos.
-
dark
¶bool | None
, default:True
) –Whether to filter for dark or bright haloing. None for disable merging with source clip.
-
show_mask
¶bool
, default:False
) –Whether to return the computed mask.
Returns:
-
VideoNode
–Dehaloed clip.
Source code
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 404 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 449 450 451 452 |
|