vivy: tv: 01 adjustments before release
This commit is contained in:
parent
91748bd7b7
commit
fdf970e97d
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
||||
*.aac
|
||||
*.m4a
|
||||
*.h265
|
||||
*.eac3
|
||||
cudnn_data/
|
||||
*.webm
|
||||
ffmpeg2pass*.log
|
||||
|
@ -7,7 +7,7 @@ import sys
|
||||
sys.path.append("..")
|
||||
|
||||
from vivy_common import (HardsubSign, Range, bounded_dehardsub, antialias, deband, denoise, # noqa: E402
|
||||
finalize, fsrcnnx_rescale, source)
|
||||
finalize, fsrcnnx_rescale, letterbox_edgefix, source)
|
||||
|
||||
core = vs.core
|
||||
|
||||
@ -33,14 +33,18 @@ PIXELSHIT: List[Range] = [
|
||||
]
|
||||
NOSCALE: List[Range] = CREDITS + PIXELSHIT
|
||||
NOAA: List[Range] = PIXELSHIT
|
||||
LETTERBOX: List[Range] = [
|
||||
(659, 14071)
|
||||
]
|
||||
|
||||
waka, funi = source(EPNUM)
|
||||
waka, ref = source(EPNUM)
|
||||
waka = waka[:37301] + core.std.BlankClip(waka, length=6) + waka[37301:]
|
||||
|
||||
src = bounded_dehardsub(waka, funi, SIGNS_RU)
|
||||
src = bounded_dehardsub(waka, ref, SIGNS_RU)
|
||||
rescale = fsrcnnx_rescale(src, NOSCALE)
|
||||
den = denoise(rescale)
|
||||
deb = deband(den)
|
||||
aa = antialias(deb, NOAA)
|
||||
final = finalize(aa)
|
||||
edgefix = letterbox_edgefix(aa, LETTERBOX)
|
||||
final = finalize(edgefix)
|
||||
final.set_output()
|
||||
|
@ -45,10 +45,10 @@ PIXELSHIT: List[Range] = [
|
||||
NOSCALE: List[Range] = CREDITS + PIXELSHIT
|
||||
NOAA: List[Range] = PIXELSHIT
|
||||
|
||||
waka, funi = source(EPNUM)
|
||||
waka, ref = source(EPNUM)
|
||||
waka = waka[:32344] + waka[32349:]
|
||||
|
||||
src = bounded_dehardsub(waka, funi, SIGNS_RU)
|
||||
src = bounded_dehardsub(waka, ref, SIGNS_RU)
|
||||
rescale = fsrcnnx_rescale(src, NOSCALE)
|
||||
den = denoise(rescale)
|
||||
deb = deband(den)
|
||||
|
@ -1,3 +1,3 @@
|
||||
from .dehardsub import HardsubSign, bounded_dehardsub # noqa: F401
|
||||
from .filter import antialias, deband, denoise, finalize, fsrcnnx_rescale # noqa: F401
|
||||
from .filter import antialias, deband, denoise, finalize, fsrcnnx_rescale, letterbox_edgefix # noqa: F401
|
||||
from .util import Range, glob_crc, source # noqa: F401
|
||||
|
@ -3,6 +3,7 @@ import kagefunc as kgf
|
||||
import lvsfunc as lvf
|
||||
import vardefunc as vdf
|
||||
|
||||
from awsmfunc import bbmod
|
||||
from mvsfunc import BM3D
|
||||
from typing import List, Optional
|
||||
|
||||
@ -29,6 +30,11 @@ def fsrcnnx_rescale(src: vs.VideoNode, noscale: Optional[List[Range]] = None) ->
|
||||
return lvf.misc.replace_ranges(descale, src, noscale) if noscale else descale
|
||||
|
||||
|
||||
def letterbox_edgefix(clip: vs.VideoNode, ranges: List[Range]) -> vs.VideoNode:
|
||||
edgefix = bbmod(clip.std.Crop(top=132, bottom=132), top=2, bottom=2, blur=500).std.AddBorders(top=132, bottom=132)
|
||||
return lvf.misc.replace_ranges(clip, edgefix, ranges)
|
||||
|
||||
|
||||
def denoise(clip: vs.VideoNode) -> vs.VideoNode:
|
||||
bm3d = BM3D(clip, sigma=[1.5, 0], depth=16)
|
||||
knl = core.knlm.KNLMeansCL(clip, d=3, a=2, h=0.4, channels="UV", device_type='gpu', device_id=0)
|
||||
@ -36,7 +42,7 @@ def denoise(clip: vs.VideoNode) -> vs.VideoNode:
|
||||
|
||||
|
||||
def deband(clip: vs.VideoNode) -> vs.VideoNode:
|
||||
return clip.neo_f3kdb.Deband(range=18, y=32, cb=24, cr=24, grainy=24, grainc=0, output_depth=16, sample_mode=4)
|
||||
return vdf.dumb3kdb(clip, radius=18, threshold=36, grain=[24, 0])
|
||||
|
||||
|
||||
def antialias(clip: vs.VideoNode, noaa: Optional[List[Range]] = None) -> vs.VideoNode:
|
||||
|
Loading…
x
Reference in New Issue
Block a user