This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# finesharp.py - finesharp module for VapourSynth | |
# Original author: Didee (http://forum.doom9.org/showthread.php?t=166082) | |
# Requirement: VapourSynth r48 or later | |
# Rev: 2020-11-03 | |
from vapoursynth import core, GRAY, YUV | |
def spline(x, coordinates): | |
def get_matrix(px, py, l): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sharpaamcmod.py 2020-11-03 | |
from vapoursynth import core, VideoNode, GRAY | |
import havsfunc as haf | |
__version__ = "1.1.1" | |
def sharpaamcmod(orig, dark=20, thin=10, sharp=0, smooth=0, stabilize=False, | |
tradius=2, aapel=2, aaov=None, aablk=None, aatype='sangnom'): | |
"""Ported from: http://forum.doom9.org/showthread.php?p=1673928 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" scoll.py +++ Script Collection for VapourSynth: ++++++++++++++++++++++++++++++++++++++++++++++ | |
""" | |
import vapoursynth as vs | |
try: | |
import havsfunc as haf | |
except: | |
HAS_HAF = False | |
else: | |
HAS_HAF = True | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vapoursynth as vs | |
def clamp(minimum, x, maximum): | |
return int(max(minimum, min(round(x), maximum))) | |
def m4(x, m=4.0): | |
return 16 if x < 16 else int(round(x / m) * m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vapoursynth import core | |
def _sharpen(clip, strength, planes): | |
blur = core.tcanny.TCanny(clip, sigma=strength, mode=-1, planes=planes) | |
return core.std.Expr([clip, blur], "x x + y -") | |
def mcdegrainsharp(clip, frames=2, bblur=0.3, csharp=0.3, bsrch=True, | |
thsad=400, plane=4): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vapoursynth import core, GRAY, YUV | |
__version__ = "1.0.3" | |
def knlm_yuv(clip, d=[None, None, None], a=[None, None, None], s=[None, None, None], cmode=None, wmode=None, | |
h=[None, None, None], rclip=None, device_type=None, info=None, planes=[0]): | |
""" | |
Enhanced version of knlmeanscl that supports filtering of all planes on the same call and | |
pads the image so borders don't be left unfiltered. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vapoursynth import core | |
__version__ = "1.1.0" | |
def nnedi3_rpow2(clip, rfactor=2, width=None, height=None, correct_shift=True, | |
kernel="spline36", nsize=0, nns=3, qual=None, etype=None, pscrn=None, | |
opt=True, int16_prescreener=None, int16_predictor=None, exp=None, upsizer=None): | |
"""nnedi3_rpow2 is for enlarging images by powers of 2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vapoursynth import core, GRAY | |
__version__ = "1.1.1" | |
def _clamp(minimum, value, maximum): | |
return int(max(minimum, min(round(value), maximum))) | |
def _m4(value, mult=4.0): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vapoursynth import core, RGBS, YUV444PS | |
__version__ = '1.1.1' | |
def hdr2sdr(clip, source_peak=1000, ldr_nits=100, output_foramt=YUV420P8, input_range='limited', output_range='limited', dither='error_diffusion'): | |
"""Converts HDR footage to SDR. | |
https://forum.doom9.org/showthread.php?p=1800667#post1800667 | |
Args: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Parse blu-ray .mpls | |
Code from https://gist.github.com/dk00/0a0634c5666cf1b8ab9f | |
""" | |
import os | |
import collections | |
import io | |
import struct | |
import json | |
import argparse | |
from vapoursynth import core |
OlderNewer