diff --git a/Bishounen Tanteidan/03/03.vpy b/Bishounen Tanteidan/03/03.vpy index 615186e..0cb4e01 100644 --- a/Bishounen Tanteidan/03/03.vpy +++ b/Bishounen Tanteidan/03/03.vpy @@ -1,7 +1,8 @@ import vapoursynth as vs 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.source import waka_replace @@ -22,6 +23,7 @@ CONFIG: PrettyConfig = PrettyConfig(EPNUM) SOURCE: PrettySource = PrettySource(CONFIG) OP: Optional[int] = 0 +WELCOMING_DAYS: Optional[int] = 31864 WAKA_REPLACE: List[List[Range]] = [ [(1852, 1965), (31864, 32661)], @@ -94,6 +96,8 @@ def filter() -> vs.VideoNode: deb = deband(den) aa = antialias(deb, strong=AA_STRONG, weak=AA_WEAK, noaa=AA_NONE) scenefilter = stupid_op_scenefilter(aa, deb, OP) + if WELCOMING_DAYS is not None: + scenefilter = wd_scenefilter(aa, deb, WELCOMING_DAYS) grain = regrain(scenefilter) final = finalize(grain) final.set_output() diff --git a/Bishounen Tanteidan/tanteidan_common/__init__.py b/Bishounen Tanteidan/tanteidan_common/__init__.py index cf2f4dd..06a2899 100644 --- a/Bishounen Tanteidan/tanteidan_common/__init__.py +++ b/Bishounen Tanteidan/tanteidan_common/__init__.py @@ -1,2 +1,2 @@ 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 diff --git a/Bishounen Tanteidan/tanteidan_common/filter.py b/Bishounen Tanteidan/tanteidan_common/filter.py index 5c3a723..92cd582 100644 --- a/Bishounen Tanteidan/tanteidan_common/filter.py +++ b/Bishounen Tanteidan/tanteidan_common/filter.py @@ -85,5 +85,14 @@ def stupid_op_scenefilter(aa: vs.VideoNode, deb: vs.VideoNode, start: Optional[i 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: return vsutil.depth(clip, 10)