Giter VIP home page Giter VIP logo

avisynth-scripts's Introduction

Originally since 15 a 3D character artist with a strong focus on technical areas like lighting, realistic shading and specially color management, as well as UX/workflow.

Repurposed to image synthesis (image/video restoration), computer vision and color science programmer proficient in AviSynth, GPU Shading language, and some Python. Also proficient in AutoHotkey, a power tool scripting language.

My future endeavours comprise cross-platform mobile/Desktop APP development in view of making a change in people daily lives.

Skills:

My abilities are comprehension and simplification of complex matters, pragmatic coder but accuracy foremost, implementing figures derivations when not commented instead of pasting "magic numbers". Also a strong awareness of user experience (UX).

Tools:

Maya  Blender  ZBrush  Substance Designer  Substance Painter  Nuke  Photoshop  AVS+  AHK  Python  OpenGL 

Learning:

Android  Dart  Flutter  SQLite  Visual Studio Code  LaTEX 

GitHub Stats:

Donating

Visual Studio Code  Visual Studio Code 

Social:

ArtStation  YouTube 

avisynth-scripts's People

Contributors

asd-g avatar dogway avatar realfinder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avisynth-scripts's Issues

function duplicates

I seen some your plugin have same function name, i think you need rename it to don't meet any errors
"SmoothLevels" : "[PluginFunction]"
"SmoothLevels" : "C:\Program Files (x86)\AviSynth+\plugins+\GradePack.v1.1.avsi"
"SatMask" : "C:\Program Files (x86)\AviSynth+\plugins+\GradePack.v1.1.avsi"
"SatMask" : "C:\Program Files (x86)\AviSynth+\plugins+\Utils-r42.avsi"

QTGMC - Fix Chroma oversharpening

Chroma is sharpened, starting from this line:

# Resharpen to counteract temporal blurs. Little sharpening needed for source-match mode since it has already recovered sharpness from source
which is never a good idea.
So add better limiting or devise a new method for sharpening chroma (median sharpening, etc)

ResizersPack.avsi line 360 error

Have an error in line 360:

Return "$"+string(Y,2))+string(U,2))+string(V,2)) }

I just removed the extra close brackets, and it works again in AVSPmod... but not sure if it is doing what it is supposed to.
Return "$"+string(Y,2)+string(U,2)+string(V,2) }

Can't test anymore tonight now.
Thanks.

I seen some function duplicates between your scripts

"m4" : "C:\Program Files (x86)\AviSynth+\plugins+\DeblockPack.avsi"
"m4" : "C:\Program Files (x86)\AviSynth+\plugins+\GrainFactory3mod.avsi"
"OPP2RGB" : "C:\Program Files (x86)\AviSynth+\plugins+\DeblockPack.avsi"
"OPP2RGB" : "C:\Program Files (x86)\AviSynth+\plugins+\SharpenersPack.avsi"
"Pad" : "C:\Program Files (x86)\AviSynth+\plugins+\DeblockPack.avsi"
"Pad" : "C:\Program Files (x86)\AviSynth+\plugins+\SharpenersPack.avsi"
"RGB2OPP" : "C:\Program Files (x86)\AviSynth+\plugins+\DeblockPack.avsi"
"RGB2OPP" : "C:\Program Files (x86)\AviSynth+\plugins+\SharpenersPack.avsi"

Ylevels & YlevelsS different parameter with YLevels.avsi, i think need change name
"YlevelsS" : "C:\Program Files (x86)\AviSynth+\plugins+\DeblockPack.avsi"
"YlevelsS" : "C:\Program Files (x86)\AviSynth+\plugins+\YLevels_mt2021.07.04.avsi"
"Ylevels" : "C:\Program Files (x86)\AviSynth+\plugins+\DeblockPack.avsi"
"Ylevels" : "C:\Program Files (x86)\AviSynth+\plugins+\YLevels_mt2021.07.04.avsi"

deep_resize rotates clip when resizing from 720x480 to <902x480

This is an odd one, one of the last commits broke deep_resize in an unexpected way.

ColorBarsHD()
BicubicResize(720,480)

Correct output, 720x480

ColorBarsHD()
BicubicResize(720,480)
deep_resize(872,480)

Output flipped by -90º, 480x872

ColorBarsHD()
BicubicResize(720,480)
deep_resize(902,480)

Correct output, 902x480

While fiddling around with width numbers, I found out any target width of 902 and below would get the clip rotated: anything equal or above has normal behavior.
I can't pinpoint what commit I was using before this behavior appeared, but I'm almost sure it wasn't happening in 361d4b3 .

Additionally, even tho ColorBarsHD creates a YUV444 clip, using

deep_resize(901, 480)

will throw an Expr error:

[avisynth @ 000001d6f98c9640] Expr: All inputs must have the same number of planes and the same dimensions, subsampling included
(C:/Program Files (x86)/AviSynth+/plugins64+/ExTools.avsi, line 94)
(C:/Program Files (x86)/AviSynth+/plugins64+/MasksPack.avsi, line 351)
(C:/Program Files (x86)/AviSynth+/plugins64+/ResizersPack.avsi, line 197)
(C:/Program Files (x86)/AviSynth+/plugins64+/ResizersPack.avsi, line 203)

Using commit a25c6bb (latest) with Avisynth+ 3.7.2 test 12 (latest)

SMDegrain & LSFmodex args

Updated to newest versions of your scripts today, finding a couple problems.
While in AVSPmod 3.7.0.
Updated Avisynth to test build 27 as well.

SMDegrain:
Script error: smdegrain does not have a named argument "fulls" or "fulld"
edit: I see, you may have removed it as you did with QTGMC

SMDegrain 3.3.8d with contrasharp=55 fails in LSFmod call; while contrasharp=true works fine
Errors:
Evaluate: operands of '/' must be numeric
LSFMod3.9_Mix line 631
SMDegrain3.3.8d line 482
SMDegrain3.3.8d line 593

In LSFmod 3.9:
I commented this out at line 629 and replaced it with the line from the previous version
rhlf = ex_dlut("range_half", bi, fs)

I changed it to this, based on the previous version and it works, but I'm not sure if it's affecting something else off hand.
rhlf = Eval(ex_dlut("range_half", bi, fs))

Thank you for your continued work on these.

Default f_taps for default flat resizer creates ringing around edges

Given an example clip with very sharp edges:

ColorBarsHD()
deep_resize(1920, 1080, edge="nnedi3") #nnedi3 to make sure non-ringing kernels are used in edges where possible

(cropped area, 400% with PointResize)
noticeable luma and chroma ringing appear around the edges. As far as I can test, it seem to be created by the flat resizer (Sinc).
When using less taps than the default (8), or a softer resizer like Hermite or Gauss, the luma ringing almost completely disappears to a single white halo in the lower cropped area, however chroma ringing still happens around the cyan-brown edge.
In comparison, running nnedi3resize(1920, 1080) has almost similar ringing in the lower cropped area, and absolutely no chroma ringing.
While this case is a bit on the extreme, I noticed deep_resize() was introducing luma and chroma ringing around lineart in anime when scaling it by 200%.

SMDegrain Lrad

A couple Lrad calls are still in SMDegrain when LSFmod is used.
Just updated both new versions, and the error popped up. Lrad was as removed in LSFMod 4.2mix. I jumped from LSFmod 4.1 to 5.0, so missed that change.

Lines 506 and 507 in SMDegrain:

SLimit ? LSFmod(output,source=CClip,preset="slow",strength=Contrasharp,Smode=5,Lmode=0,LRad=isHD?2:1,edgemode=0,soothe=false,overshoot=0,soft=-2,keep=0,ss_x=1.25,ss_y=1.25) : \

Thanks.

DeblockPack

Hi, Deblock_QED(uv=2) and Deblock_QED(uv=3) give identical chroma output.

MCDeblockFFT3D(uv=2) doesn't copy chroma planes.

QTGMC v3.64mx missing dependecies.

v3.64mx states as dependencies:

# Core plugins:
#   MVTools2   (2.7.45 or above)
#   MaskTools2 (2.2.26 or above)
#   NNEDI3     (0.9.4.59 or above)
#   RgTools    (1.2 or above)
#   Vinverse
#
# Core scripts:
#   Zs_RF_Shared (1.154 or above) (for sh_Bob)
#   ExTools      (5.7 or above)
#
# Additional plugins and scripts:
#   NNEDI2, NNEDI, EEDI3, EEDI2, TDeInt - if selected directly or via a source-match preset
#   yadifmod2 (0.2.7 or above) - for Preset="Ultra Fast" or if selected directly
#   FFT3DFilter - if selected for noise processing
#   dfttest (1.9.6 or above) - if selected for noise processing
#       For FFT3DFilter & ddftest you also need the FFTW3 library (FFTW.org). On Windows the file needed for both is libfftw3f-3.dll. However, for FFT3DFilter
#       the file needs to be called FFTW3.dll, so you will need two copies and rename one. On Windows put the files in your System32 or SysWow64 folder
#   KNLMeansCL - if selected for noise processing
#   AddGrainC - if NoiseDeint="Generate" selected for noise bypass
#   chikuzen PlanarTools - if you work with YUY2 source (not necessarily required but may improve speed)
#   BWDIF and vinverse() or ex_vinverse() - for EdiMode modes "BWDIF+NNEDI3" and "BWDIF+EEDI3"

calling:

ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\LSMASHSource.dll")
LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\RgTools.dll")
LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\masktools2.dll")
LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\mvtools2.dll")
LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\nnedi3.dll")
Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\QTGMC.avsi") # v3.64mx
Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\Zs_RF_Shared.avsi")  # V1.154
Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\ExTools.avsi") # ExTools v6.2
# loading source: G:\TestClips&Co\files\interlaceAndTelecineSamples\interlaced\avc - interlaced.m2ts
# color sampling YV12@8, matrix: bt709, scantyp: top field first, luminance scale: limited
LWLibavVideoSource("G:\TESTCL~1\files\INTERL~1\INTERL~1\AVC-IN~1.M2T",cache=false,format="YUV420P8", prefer_hw=0)
# current resolution: 1920x1080
# deinterlacing
AssumeTFF()
QTGMC(Preset="Fast", Threads=2)
SelectEven()
# filtering
PreFetch(16)
# setting output fps to 29.970fps
AssumeFPS(30000,1001)
#  output: color sampling YV12@8, matrix: bt709, scantyp: progressive, luminance scale: limited
return last

I get

Script error: There is no function named 'ex_Luma_Rebuild'. (I:\Hybrid\64bit\Avisynth\avisynthPlugins\QTGMC.avsi, line 603) Script error: There is no function named 'nmod'. (I:\Hybrid\64bit\Avisynth\avisynthPlugins\ExTools.avsi, line 1330)
Script error: There is no function named 'nmod'. (I:\Hybrid\64bit\Avisynth\avisynthPlugins\ExTools.avsi, line 1330)

-> dependencies on QTGMC.avsi and ExTools.avsi are missing stuff.
My guess is nmod comes from ResizersPack.avsi and ex_Luma_Rebuild from SMDegrain v3.3.4d.avsi
no clue whether additional dependencies are not listed and whether those to are also missing dependencies.

vsTCanny update(s) broke ex_retinex()

I just updated vsTCanny and it seems it broke ex_retinex()
More specifically, it's likely to come from https://github.com/Asd-g/AviSynth-vsTCanny/releases/tag/1.1.0 , but versions https://github.com/Asd-g/AviSynth-vsTCanny/releases/tag/1.1.6 and https://github.com/Asd-g/AviSynth-vsTCanny/releases/tag/1.1.7 also changed defaults for U and V, so it's likely those broke ex_retinex() too.

[avisynth @ 000001df36949680] vsTCanny: sigma_vY must be greater than or equal to 0.0.
(C:/Program Files (x86)/AviSynth+/plugins64+/ExTools.avsi, line 1792)
(C:/Program Files (x86)/AviSynth+/plugins64+/ExTools.avsi, line 1828)
(C:/Program Files (x86)/AviSynth+/plugins64+/SMDegrain v3.4.8d.avsi, line 875)
(test.avs, line 3)
test.avs: Unknown error occurred

Using latest commit cb9af65 with AVS+ 3.7.2

ExTools - ex_makediff() - Add more image metrics

Include more Metric Distance algorithms:

  • Color cost functions: Jjnd, Jil and Jhl
  • DEitp
  • CIE Delta-E 2016 (simply an Euclidean of CAM16-UCS)
  • PSNR-HSV (in VMAF plugin)
  • PSNR-HMA
  • IW-PSNR
  • iCAM
  • Image Fidelity Metrics (IFM, used with YCxCz)
  • VMAF (Video Multi-Method Assessment Fusion)
  • SRC (Spearman Rank-order Correlation) (monotonicity prediction )
  • PCC (Pearson linear Correlation) (prediction linearity)
  • KRC (Kendall Rank Correlation)
  • VIF (Visual Information Fidelity)
  • VSI
  • MCPD (Mean Co-Located Pixel Difference)
  • DLM (Detail Loss Metric)
  • SFF
  • DSCSI
  • ADD-GSIM
  • SCQI
  • INRF-IQ (Intrinsically Nonlinear Receptive Field Image Quality)
  • VQM (Video Quality Model)
  • VQMG (General Video Quality Model)
  • MOVIE (MOtion-tuned Video Integrity Evaluation)
  • PEVQ (Perceptual Evaluation of Video Quality)
  • BRISQUE (Blind/Referenceless Image Spatial Quality Evaluator)
  • NIQE (Naturalness Image Quality Evaluator)
  • PIQE (Perception based Image Quality Evaluator).
  • Video BLIINDS (BLind Image Integrity Notator using DCT-Statistics)
  • DIIVINE (Distortion Identification-based Image Verity and INtegrity Evalutation)
  • NRQA-NRIQA (No-Reference Quality Assessment for JPEG2000 Compressed Images using Natural Scene Statistics)
  • NRQA-DCT (No-Reference Quality Assessment algorithm for Block-Based compression artifacts)
  • NIMA: Neural Image Assessment
  • MANIQA: Multi-dimension Attention Network for no-reference Image Quality Assessment

SSIM Related:

  • SSIMPLUS
  • 4-SSIM
  • G-SSIM
  • SSIM HSV
  • IW-SSIM
  • SR_SSIM
  • DSSIM

LSFmod - fix Lmode with HBD.

Get parity output on Lmode with HBD as currently output differs.
Also unlock Lmode=0 when 'source' is defined.

ExTools v1.8 error SMDegrain

ExTools v1.8 error SMDegrain

was using this configuration

SMDegrain(tr=2,prefilter=0,pel=1,contrasharp=false,refinemotion=true,truemotion=false,chroma=true,plane=0,Str=1.8)

Captura de tela 2021-06-17 220756

ex_retinex()/SoftLimiter() - Add accumulated minmax stats

For this I need to retrieve past variables within ScriptClip which is problematic, specially since array type doesn't have dynamic properties. Floats or Int do but executing two runtime environments is not performance friendly.

Storing accumulation in frame properties which I can call back at a later frame seems a possibility but didn't work out. I want to avoid writing to disk or using Clipboard plugin.

SMDegrain does not work when interlaced=true && pel!=1 in SD clips

SMDegrain's interlaced flag does not work with interlaced SD video, unless you manually set pel to 1; 2 or 4 throw an error

Using an interlaced source should be more useful than creating a ColorBar clip; I found this sample to be enough https://forum.videohelp.com/attachments/56920-1611374890/20090227_233739-H.264.m2ts_1080i_interlaced_letterman_sample.mp4

LSMASHVideoSource("20090227_233739-H.264.m2ts_1080i_interlaced_letterman_sample.mp4") #or other interlaced videos
BicubicResize(720,480) #necessary for HD videos such as above
SMDegrain(interlaced=true)
[avisynth @ 0000012a200c9740] MSuper: pelclip frame size must be Pel of source!
(C:/Program Files (x86)/AviSynth+/plugins64+/SMDegrain v3.4.8d.avsi, line 279)
(C:/Program Files (x86)/AviSynth+/plugins64+/SMDegrain v3.4.8d.avsi, line 634)
(test.avs, line 3)
test.avs: Unknown error occurred

Also related:
On SMDegrain's script @ line 221:

    # Input preparation for: Interlacing, Motion Filter and MSuper optimization when pel=2

    inputP  = !isInter ? (pel == 2 ? input.AssumeFrameBased()           : input)                             : \

Correct me if I'm wrong, but shouldn't it be pel>=2 instead? Or is it not related to what the mvtools2 docs state here?

Note: MAnalyse (if pel ≥ 2) detects fieldbased video flag (after SeparateFields) and automatically makes correction of motion vectors according to verticlal shift of fields with different parity.

Using cb9af65 and AVS+ 3.7.2

GrainFactory3mod.avsi Invalid Args

Getting this error:

Script Error: Invalid arguments to function 'ex_makediff'
GrainFactorymod.avsi line 274

line 274:
result = o.ex_makediff(grainlayer, ochroma?3:2, fulls=fs)

All dependencies are up to date, except my AddGrainC is v1.8.3. ExTools v6.0
pinterf addgrainc https://github.com/pinterf/AddGrainC/releases

Wondering if tv_range=tv should be added to this ex_makediff call as well?
Thank you for your work.

Operands of '\" must be numberic of SMDegrain in line 175, 446

I meet error when use this script:

sdwcomp=DotKills(iterations=4).Rainbow_Smooth2(5,200)
smdc=SMDegrain(1,1000,1000,true, mfilter=sdwcomp,subpixel=3,amp=2,prefilter=sdwcomp.expr("x 0.5 * 0.125 x x[0,-1] - abs 32 scaleb > x x[0,-1] > x 32 scaleb + x 32 scaleb - ? x[0,-1] ? * + 0.125 x x[0,1] - abs 32 scaleb > x x[0,1] > x 32 scaleb + x 32 scaleb - ? x[0,1] ? * + 0.125 x x[-2,0] - abs 32 scaleb > x x[-2,0] > x 32 scaleb + x 32 scaleb - ? x[-2,0] ? * + 0.125 x x[2,0] - abs 32 scaleb > x x[2,0] > x 32 scaleb + x 32 scaleb - ? x[2,0] ? * +").sGConvolution("-1 2 -1 2 0 2 -1 2 -1",chroma=true)) #expr line made as imitation to https://web.archive.org/web/20150602063631/http://home.earthlink.net/~tacosalad/video/dotcrawl.html and sGConvolution from https://forum.doom9.org/showpost.php?p=1751654&postcount=5
mt_merge(last,smdc,scombmask,u=3,v=3)
mt_merge(last,smdc,scombmask,u=3,v=3)

But when change to NotSMDegrain() of real.finder, I don't meet this error

ChromaReconstructor_faster needs 'gpuid'

For ChromaReconstructor_faster, and anywhere you use KNLMeansCL, it's important to expose the parameter gpuid. Sometimes it won't work on the default device, and on dual-graphics, the default will run on Intel instead of NVidia. Ideally, set device_type="cpu" if gpuid==-1 (although CPU mode isn't currently working but should be fixed at some point?)

Invalid arguments to function 'propDelete' when using ex_edge()

A change between commit 361d4b3 and f38f458 (latest) introduced a bug in extools.avsi in line 6618.
It can be triggered with a simple ex_edge() call, no args necessary, like so:

ColorBarsHD()
ex_edge()

[avisynth @ 0000020643109640] Script error: Invalid arguments to function 'propDelete'.
(C:/Program Files (x86)/AviSynth+/plugins64+/ExTools.avsi, line 6618)
(Z:\test.avs, line 3)
Z:\test.avs: Unknown error occurred

Expr() error when using deep_resize()

I'm not exactly sure as to why, but using deep_resize() to resize a clip from/to specific resolutions throws an error in ExTools's Expr()
it can be triggered as simply as this

ColorbarsHD() #YV24
PointResize(720,480) #resizing from atleast this specific resolution triggers the issue
deep_resize(1440, 480) #error
[avisynth @ 000001b943a93300] Expr: All inputs must have the same number of planes and the same dimensions, subsampling included
(C:/Program Files (x86)/AviSynth+/plugins64+/ExTools.avsi, line 94)
(C:/Program Files (x86)/AviSynth+/plugins64+/MasksPack.avsi, line 333)
(C:/Program Files (x86)/AviSynth+/plugins64+/ResizersPack.avsi, line 154)
(C:/Program Files (x86)/AviSynth+/plugins64+/ResizersPack.avsi, line 157)
(C:\temp\script.avs, line 39)
C:\temp\script.avs: Unknown error occurred

Using Avisynth+ 3.7.2 test 3 (20220208) with 361d4b3 (latest)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.