tanteidan: tv: 04 small deband scenefilter
not like it fucking matters because mpv's debander destroys it anyway
This commit is contained in:
parent
04a9ca3cff
commit
26725817cb
@ -5,11 +5,13 @@ from tanteidan_common import (PrettyConfig, PrettySource, antialias, deband,
|
||||
wd_scenefilter)
|
||||
|
||||
from yt_common.automation import SelfRunner
|
||||
from yt_common.denoise import bm3d
|
||||
from yt_common.source import waka_replace
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
from lvsfunc.dehardsub import HardsubSign, HardsubSignFade, HardsubMask, bounded_dehardsub
|
||||
from lvsfunc.misc import replace_ranges
|
||||
from lvsfunc.types import Range
|
||||
|
||||
import os
|
||||
@ -86,6 +88,11 @@ AA_NONE: List[Range] = TITLECARDS + [ # chapter 2 title cards are insanely deta
|
||||
(20821, 21039),
|
||||
]
|
||||
|
||||
STUPID_DENOISE: List[Range] = [
|
||||
(11435, 11626),
|
||||
(12026, 12115),
|
||||
]
|
||||
|
||||
|
||||
def filter_basic() -> vs.VideoNode:
|
||||
wakas, ref = SOURCE.source()
|
||||
@ -101,6 +108,7 @@ def filter() -> vs.VideoNode:
|
||||
src = filter_basic()
|
||||
den = denoise(src)
|
||||
deb = deband(den)
|
||||
deb = replace_ranges(deb, bm3d(src, sigma=4, radius=1), STUPID_DENOISE)
|
||||
aa = antialias(deb, stronger=AA_STRONGER, strong=AA_STRONG, weak=AA_WEAK, noaa=AA_NONE)
|
||||
scenefilter = stupid_op_scenefilter(aa, deb, OP)
|
||||
if WELCOMING_DAYS is not None:
|
||||
|
@ -22,12 +22,12 @@ def bm3d(clip: vs.VideoNode, matrix_s: str = "709", sigma: Union[float, List[flo
|
||||
def to_fullgray(clip: vs.VideoNode) -> vs.VideoNode:
|
||||
return get_y(clip).resize.Point(format=vs.GRAYS, range_in=Range.LIMITED, range=Range.FULL)
|
||||
|
||||
sigmal = [sigma] * 3 if isinstance(sigma, float) else sigma + [sigma[-1]]*(3-len(sigma))
|
||||
sigmal = [sigma] * 3 if not isinstance(sigma, list) else sigma + [sigma[-1]]*(3-len(sigma))
|
||||
sigmal = [sigmal[0], 0, 0] if isGray else sigmal
|
||||
isGray = True if sigmal[1] == 0 and sigmal[2] == 0 else isGray
|
||||
if len(sigmal) != 3:
|
||||
raise ValueError("bm3d: 'invalid number of sigma parameters supplied'")
|
||||
radiusl = [0, 0] if radius is None else [radius] * 2 if isinstance(radius, int) \
|
||||
radiusl = [0, 0] if radius is None else [radius] * 2 if not isinstance(radius, list) \
|
||||
else radius + [radius[-1]]*(2-len(radius))
|
||||
if len(radiusl) != 2:
|
||||
raise ValueError("bm3d: 'invalid number or radius parameters supplied'")
|
||||
|
Loading…
x
Reference in New Issue
Block a user