Beatrice-Raws / VapourSynth-insaneAA

InsaneAA Anti-Aliasing Script
MIT License
20 stars 3 forks source link
descale eedi3 nnedi3

InsaneAA Anti-Aliasing Script (VS port)

Original idea by tonik & tophf, edited and ported by DJATOM. Use this script to fix ugly upscaled anime BDs.

Processing chain:

1) extract luma from clip; 2) apply Descale to it; 3) resize luma with Spline36 for smooth edges; 4) merge "smooth" clip with Descale clip according to descale_strength; 5) re-upscale it back to 1080p (or clip's original resolution) using eedi3+nnedi3 method; 6) merge rescaled clip with source clip using lines mask. This should prevent noise and textures distortion; 7) combine merged clip with color planes.

Prerequisites:

Basic usage:

import insaneAA
insaneAA.insaneAA(clip, external_aa=None, external_mask=None, faster_aa=False, eedi3_mode=insaneAA.EEDI3Mode.CPU, eedi3_device=-1, eedi3_opt=0, nnedi3_mode=insaneAA.NNEDI3Mode.NNEDI3, nnedi3_device=-1, nnedi3_opt=0, descale_strength=0.3, kernel='bilinear', bicubic_b=1/3, bicubic_c=1/3, lanczos_taps=3, descale_width=None, descale_height=720, pscrn=1, alpha=0.2, beta=0.25, gamma=1000.0, nrad=2, mdis=20, nsize=0, nns=4, output_mode=insaneAA.ClipMode.FULL, input_mode=insaneAA.ClipMode.FULL)