tanteidan: tv: ed2: aa scenefilter
This commit is contained in:
parent
e29b8f0453
commit
6e93186ea6
@ -1,7 +1,8 @@
|
|||||||
import vapoursynth as vs
|
import vapoursynth as vs
|
||||||
|
|
||||||
from tanteidan_common import (PrettyConfig, PrettySource, antialias, deband,
|
from tanteidan_common import (PrettyConfig, PrettySource, antialias, deband,
|
||||||
denoise, finalize, regrain, stupid_op_scenefilter)
|
denoise, finalize, regrain, stupid_op_scenefilter,
|
||||||
|
wd_scenefilter)
|
||||||
|
|
||||||
from yt_common.automation import SelfRunner
|
from yt_common.automation import SelfRunner
|
||||||
from yt_common.source import waka_replace
|
from yt_common.source import waka_replace
|
||||||
@ -22,6 +23,7 @@ CONFIG: PrettyConfig = PrettyConfig(EPNUM)
|
|||||||
SOURCE: PrettySource = PrettySource(CONFIG)
|
SOURCE: PrettySource = PrettySource(CONFIG)
|
||||||
|
|
||||||
OP: Optional[int] = 0
|
OP: Optional[int] = 0
|
||||||
|
WELCOMING_DAYS: Optional[int] = 31864
|
||||||
|
|
||||||
WAKA_REPLACE: List[List[Range]] = [
|
WAKA_REPLACE: List[List[Range]] = [
|
||||||
[(1852, 1965), (31864, 32661)],
|
[(1852, 1965), (31864, 32661)],
|
||||||
@ -94,6 +96,8 @@ def filter() -> vs.VideoNode:
|
|||||||
deb = deband(den)
|
deb = deband(den)
|
||||||
aa = antialias(deb, strong=AA_STRONG, weak=AA_WEAK, noaa=AA_NONE)
|
aa = antialias(deb, strong=AA_STRONG, weak=AA_WEAK, noaa=AA_NONE)
|
||||||
scenefilter = stupid_op_scenefilter(aa, deb, OP)
|
scenefilter = stupid_op_scenefilter(aa, deb, OP)
|
||||||
|
if WELCOMING_DAYS is not None:
|
||||||
|
scenefilter = wd_scenefilter(aa, deb, WELCOMING_DAYS)
|
||||||
grain = regrain(scenefilter)
|
grain = regrain(scenefilter)
|
||||||
final = finalize(grain)
|
final = finalize(grain)
|
||||||
final.set_output()
|
final.set_output()
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
from .config import PrettyConfig, PrettySource # noqa: F401
|
from .config import PrettyConfig, PrettySource # noqa: F401
|
||||||
from .filter import antialias, deband, denoise, finalize, regrain, stupid_op_scenefilter # noqa: F401
|
from .filter import antialias, deband, denoise, finalize, regrain, stupid_op_scenefilter, wd_scenefilter # noqa: F401
|
||||||
|
@ -85,5 +85,14 @@ def stupid_op_scenefilter(aa: vs.VideoNode, deb: vs.VideoNode, start: Optional[i
|
|||||||
return sraa
|
return sraa
|
||||||
|
|
||||||
|
|
||||||
|
def wd_scenefilter(aa: vs.VideoNode, deb: vs.VideoNode, start: Optional[int]) -> vs.VideoNode:
|
||||||
|
# this does icky things to the credits but until we get NC it's way worth it
|
||||||
|
if start is None:
|
||||||
|
return aa
|
||||||
|
WD_AA_STRONG: List[Range] = [(start+1263, start+1355), (start+1468, start+1617)]
|
||||||
|
sraa = upscaled_sraa(deb, rfactor=1.6, downscaler=Bicubic(b=0, c=1/2).scale)
|
||||||
|
return replace_ranges(aa, sraa, WD_AA_STRONG)
|
||||||
|
|
||||||
|
|
||||||
def finalize(clip: vs.VideoNode) -> vs.VideoNode:
|
def finalize(clip: vs.VideoNode) -> vs.VideoNode:
|
||||||
return vsutil.depth(clip, 10)
|
return vsutil.depth(clip, 10)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user