Giter VIP home page Giter VIP logo

avs-stuff's People

Contributors

asd-g avatar dogway avatar francebb avatar kedaitinh12 avatar mrhso 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

Watchers

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

avs-stuff's Issues

QTGMC: fft3d, dfttest and KNLMeansCL support native hibits

Instead of using the crappy lsb setting fft3d and dfttest could be used with native hibits content, which is much faster. There is even huge upside to use fft3d in high bits mode irrepective of the input clip bits, because this solves the banding issues fft3d has but is still faster then using dfttest on low bits.
Suggestion would be to replace the lsbd variable with something more readable like "forceHighBitFFT" and change the calls like that:

inHighBits = input.BitsPerComponent()>8
lowInForceHigh = forceHighBitFFT && !inHighBits

(Denoiser == "dfttest") ? sneo_dfttest(lowInForceHigh ? noiseWindow.ConvertBits(16) : noiseWindow, ....) : \
(Denoiser == "KNLMeansCL") ? ... : \
sneo_FFT3D(lowInForceHigh ? noiseWindow.ConvertBits(16) : noiseWindow, ....)

dnwindow = (Denoiser != "KNLMeansCL" && lowInForceHigh ) ? dnWindow.ConvertBits(8,dither=1) : dnWindow
dnwindow = (Denoiser == "KNLMeansCL" && lowInForceHigh ) ? dnWindow.ditherpost(....)

Hqdn3dY

Hi, Hqdn3d already supports hdb and can process only luma. Can you replace Hqdn3dY/Hqdn3d16Y with Hqdn3d in Hqdn3d_2?

QTGMC: uppercase nnedi3 function call raises an issue on Turkish locale

In Turkish alphabet, the uppercase for i is İ, not I like in English. (I is the uppercase letter for the lowercase letter ı in Turkish.)

QTGMC adopts the uppercase name NNEDI3 as an alias function name for nnedi3 in NNEDI3 plugin or plugins_JPSDR plugin. Although AviSynth is indifferent between cases, this uppercase function call raises an issue in the particular case of Turkish locale.

StaxRip developers/collaborators found this issue while discussing a mysterious error caused by QTGMC with a Turkish user. On Turkish locale, the critical plugin 'plugins_JPSDR' was not automatically loaded when QTGMC was called. (Other filters that require the same 'plugins_JPSDR' do not fail. Eg., nnedi)

This issue was fixed only after the user changed the function name from 'NNEDI3' to 'nnedi3'. Please see this.

And please also refer to the related issue thread on the StaxRip repo: here.

It'd be greatly appreciated if you could fix this issue by changing the letter cases.

QTGMC: srchClip being fed to MAnalyse can always be 8bits even if input clip is high bits

It brings a speed improvement at no cost at all to always restrict the srchClip to 8 bits before feeting it to MAnalyse. This could actually being done as early as the very beginning of the "Motion Analysis" stage at the "bobbed" clip:

bobbedMA = input.BitsPerComponent()>8 ? bobbed.ConvertBits(8,dither=-1) : bobbed

In the rest of the "Motion Analysis" stage "bobbedMA" would be used instead of "bobbed"

DFMDeRainbow possible bugs,..

Not sure if I'm missing something or if there are bugs in
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/DFMDeRainbow.avsi

  1. line 66-68:
themask=subtract(org,YtoUV(first_u,first_v,org)).Levels(108,1,148,0,255)
	\ .svsMSharpen(mask=true,threshold=maskthresh).Invert()
	\ .Blur(0.5).Levels(0,2,255,0,255).Blur(0.5)

svsMSharpen should probably be just MSharpen

Also I get 'deen need a YV12 input' when using:

LoadCPlugin("I:\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\masktools2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\MSharpen.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\FluxSmooth.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\Deen.dll")
Import("I:\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi")
Import("I:\Hybrid\32bit\avisynthPlugins\DFMDeRainbow.avsi")
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
FFVideoSource("F:\TESTCL~1\files\test.avi",cachefile="E:\Temp\avi_078c37f69bb356e7b5fa040c71584c40_853323747_1_0.ffindex",fpsnum=25,colorspace="YV12")
DFMDeRainbow(interlaced=false)
return last

I use the Deen version from http://ziquash.chez-alice.fr/Deen%20beta%202.zip
is there a newer one which support more than Yv12?

StabilizationToolsPack.avsi and Zs_RF_Shared_v1.139.avsi have function duplicates

I checked with avs info tool and meet this error:

[Plugin errors/warnings]


Function duplicates:

"FillBorders" : "[PluginFunction]"
"FillBorders" : "C:\Program Files (x86)\AviSynth+\plugins64+\Stabilization_Tools_Pack_v2.1mod2.51.avsi"
"undefined" : "[InternalFunction]"
"Undefined" : "C:\Program Files (x86)\AviSynth+\plugins64+\Zs_RF_Shared_v1.139.avsi"

QTGMC doesn't work on GNU/Linux

You can still use it though with this patch:

diff --git a/avs 2.6 and up/QTGMC.avsi b/avs 2.6 and up/QTGMC.avsi
index 2e0f48e..197ffe0 100644
--- a/avs 2.6 and up/QTGMC.avsi	
+++ b/avs 2.6 and up/QTGMC.avsi	
@@ -211,6 +211,7 @@ function QTGMC( clip Input, string "Preset", int "TR0", int "TR1", int "TR2", in
 	# EdiMode="RepcYadif"/"cYadif" require the Yadif plugin, which doesn't autoload. Typically the calling script would load it.
 
 	# Temporary Warnings
+	AvsPlusVersionNumber = 9000
 	Assert( !defined(BT),            "QTGMC: Setting BT has been replaced by setting NoiseTR" )
 	Assert( !defined(DetailRestore), "QTGMC: Setting DetailRestore has been renamed to GrainRestore" )
 	Assert( !defined(MotionBlur),    "QTGMC: Setting MotionBlur has been renamed to ShutterBlur" )
@@ -359,7 +360,8 @@ function QTGMC( clip Input, string "Preset", int "TR0", int "TR1", int "TR2", in
 	EdiMaxD  = (SourceMatch == 0) ? EdiMaxD  : Select( mpNum1,  12,      10,       8,        7,        7,        6,        6,        5,        4,        4     )
 	EdiQual  = (SourceMatch == 0) ? EdiQual  : Select( mpNum1,  1,       1,        1,        1,        1,        1,        1,        1,        1,        1     )
 	TempEdi  = EdiMode # Main interpolation is actually done by basic-source match step when enabled, so a little swap and wriggle is needed
-	EdiMode  = (SourceMatch == 0) ? EdiMode  : default( MatchEdi, ((mpNum1 < 9) ?  EdiMode : "Yadif") ) # Force Yadif for "Ultra Fast" basic source match
+	#EdiMode  = (SourceMatch == 0) ? EdiMode  : default( MatchEdi, ((mpNum1 < 9) ?  EdiMode : "Yadif") ) # Force Yadif for "Ultra Fast" basic source match
+	EdiMode  = "Yadif"
 	MatchEdi = TempEdi
 
 	#                                                          Very                                                        Very      Super     Ultra
@@ -377,7 +379,7 @@ function QTGMC( clip Input, string "Preset", int "TR0", int "TR1", int "TR2", in
 	# Core and Interpolation defaults
 	TR2        = (SourceMatch > 0) ? default(TR2, ((TR2X == 0) ? 1 : TR2X)) : TR2X  # ***TR2 defaults always at least 1 when using source-match***
 	RepChroma  = default( RepChroma,  true )
-	EdiThreads = default( EdiThreads, sh_GetUserGlobalIMTint(true)    )
+	EdiThreads = default( EdiThreads, 20    )
 	ChromaEdi  = default( ChromaEdi,  ""   )
 	NNeurons   = (EdiMode == "NNEDI2" && NNeurons > 2) ? 2 : NNeurons # Smaller range for NNeurons in NNEDI2 (which calls it nsize)
 	EdiQual    = (EdiMode == "EEDI3+NNEDI3" || EdiMode == "NNEDI3" || EdiMode == "BWDIF+NNEDI3" || EdiMode == "BWDIF+EEDI3") && EdiQual > 2 ? 2 : EdiQual  # Smaller range for EdiQual in NNEDI3
@@ -420,7 +422,7 @@ function QTGMC( clip Input, string "Preset", int "TR0", int "TR1", int "TR2", in
 	               (defined(EZDenoise)   && EZDenoise   > 0.0) ? EZDenoise : \
 	               (defined(EZKeepGrain) && EZKeepGrain > 0.0) ? 4.0 * EZKeepGrain : 2.0
 	FftThreads   = default( FftThreads, EdiThreads )
-	bomt         = sh_GetUserGlobalIMTbool()
+	bomt         = true
 	ChromaNoise  = default( ChromaNoise, false )
 	ShowNoise    = default( ShowNoise, 0.0 )
 	ShowNoise    = IsBool( ShowNoise ) ? (ShowNoise ? 10.0 : 0.0) : ShowNoise
@@ -509,7 +511,7 @@ function QTGMC( clip Input, string "Preset", int "TR0", int "TR1", int "TR2", in
 	planarClip = yuy2 ? clip.nonyuy2clipin(true) : clip
 
 	# Bob the input as a starting point for motion search clip
-	bobbed = (InputType == 0) ? UseEdiExt > 0 ? isyuy2(EdiExt) ? EdiExt.nonyuy2clipin(true) : EdiExt : planarClip.sh_Bob( 0,0.5 ) : \
+	bobbed = (InputType == 0) ? UseEdiExt > 0 ? isyuy2(EdiExt) ? EdiExt.nonyuy2clipin(true) : EdiExt : planarClip.Bob( 0,0.5 ) : \
 	         (InputType == 1) ? planarClip : \
 	                            planarClip.Blur( 0,1 )
 	bobbed = (InputType == 0) && UseEdiExt > 1 ? bobbed.Vinverse() : bobbed
@@ -778,7 +780,7 @@ function QTGMC( clip Input, string "Preset", int "TR0", int "TR1", int "TR2", in
 	# Expand fields to full frame size before extracting noise (allows use of motion vectors which are frame-sized)
 	fullClip  = (NoiseProcess == 0) ? NOP() : \
 	            (InputType > 0)     ? clip : \
-	                                  clip.sh_Bob( 0,1.0 )
+	                                  clip.Bob( 0,1.0 )
 	fullClip  = (yuy2 && NoiseTR > 0) ? fullClip.nonyuy2clipin(true) : fullClip
 	fullSuper = (NoiseTR > 0)         ? defined(bomt) ? fullClip.MSuper( pel=SubPel, levels=1, hpad=hpad, vpad=vpad, chroma=ChromaNoise, mt=bomt ) : fullClip.MSuper( pel=SubPel, levels=1, hpad=hpad, vpad=vpad, chroma=ChromaNoise ) : NOP() #TEST chroma OK?
 
@@ -822,7 +824,7 @@ function QTGMC( clip Input, string "Preset", int "TR0", int "TR1", int "TR2", in
 	noise = (totalRestore > 0.0)  ? mt_makediff( planarClip, planarDenoised, U=CNmt1,V=CNmt1 ) : NOP()
 	deintNoise = (NoiseProcess == 0 || totalRestore == 0.0) ? NOP() : \
 	             (InputType != 0)                           ? noise : \
-	             (NoiseDeint == "Bob")                      ? noise.sh_Bob( 0,0.5 ) : \
+	             (NoiseDeint == "Bob")                      ? noise.Bob( 0,0.5 ) : \
 	             (NoiseDeint == "Generate")                 ? noise.QTGMC_Generate2ndFieldNoise( denoised, ChromaNoise ) : \
 	                                                          noise.DoubleWeave()
 	# Motion-compensated stabilization of generated noise
@@ -1064,19 +1066,19 @@ function QTGMC_Interpolate( clip Input, int InputType, string EdiMode, int NNSiz
 	         (EdiMode == "Yadif")        ? isyuy2(Input) ? Input.nonyuy2clipin(true).Yadifmod2( mode=3 ).nonyuy2clipout(true) : Input.Yadifmod2( mode=3 ) : \
 	         (EdiMode == "cYadif")       ? Input.Yadif( mode=3 ) : \
 	         (EdiMode == "TDeint")       ? Input.TDeInt( mode=1 ) : \
-	         (EdiMode == "RepYadif")     ? isyuy2(Input) ? Repair( Input.nonyuy2clipin(true).Yadifmod2( mode=3 ), default( Fallback, Input.sh_Bob( 0,0.5 ) ).nonyuy2clipin(true), 2, 0 ).nonyuy2clipout(true) : \
-                                                           Repair( Input.Yadifmod2( mode=3 ), default( Fallback, Input.sh_Bob( 0,0.5 ) ), 2, 0 ) : \	
-	         (EdiMode == "RepcYadif")    ? isyuy2(Input) ? Repair( Input.Yadif( mode=3 ).nonyuy2clipin(true), default( Fallback, Input.sh_Bob( 0,0.5 ) ).nonyuy2clipin(true), 2, 0 ).nonyuy2clipout(true) : \
-	         	         	                               Repair( Input.Yadif( mode=3 ), default( Fallback, Input.sh_Bob( 0,0.5 ) ), 2, 0 ) : \
+	         (EdiMode == "RepYadif")     ? isyuy2(Input) ? Repair( Input.nonyuy2clipin(true).Yadifmod2( mode=3 ), default( Fallback, Input.Bob( 0,0.5 ) ).nonyuy2clipin(true), 2, 0 ).nonyuy2clipout(true) : \
+                                                           Repair( Input.Yadifmod2( mode=3 ), default( Fallback, Input.Bob( 0,0.5 ) ), 2, 0 ) : \	
+	         (EdiMode == "RepcYadif")    ? isyuy2(Input) ? Repair( Input.Yadif( mode=3 ).nonyuy2clipin(true), default( Fallback, Input.Bob( 0,0.5 ) ).nonyuy2clipin(true), 2, 0 ).nonyuy2clipout(true) : \
+	         	         	                               Repair( Input.Yadif( mode=3 ), default( Fallback, Input.Bob( 0,0.5 ) ), 2, 0 ) : \
 	         (EdiMode == "BWDIF+NNEDI3") ? isyuy2(Input) ? Input.nonyuy2clipin(true).BWDIF(-2,edeint=NNEDI3clp.nonyuy2clipin(true)).Vinverse(clip2=NNEDI3clp.nonyuy2clipin(true)).nonyuy2clipout(true) : Input.BWDIF(-2,edeint=NNEDI3clp).Vinverse(clip2=NNEDI3clp) : \
 	         (EdiMode == "BWDIF+EEDI3")  ? isyuy2(Input) ? Input.nonyuy2clipin(true).BWDIF(-2,edeint=EEDI3clp.nonyuy2clipin(true)).Vinverse(clip2=NNEDI3clp.nonyuy2clipin(true)).nonyuy2clipout(true) : Input.BWDIF(-2,edeint=EEDI3clp).Vinverse(clip2=NNEDI3clp) : \
-	                                       default( Fallback, Input.sh_Bob( 0,0.5 ) )
+	                                       default( Fallback, Input.Bob( 0,0.5 ) )
 
 	interpuv = (InputType == 1)        ? NOP() : \
 	           (ChromaEdi == "NNEDI3") ? Input.NNEDI3( field=-2, nsize=4, nns=0, qual=1, threads=EdiThreads, Y=false ) : \
 	           (ChromaEdi == "Yadif")  ? isyuy2(Input) ? Input.nonyuy2clipin(true).Yadifmod2( mode=3 ).nonyuy2clipout(true) : Input.Yadifmod2( mode=3 ) : \
 	           (ChromaEdi == "cYadif") ? Input.Yadif( mode=3 ) : \
-	           (ChromaEdi == "Bob")    ? Input.sh_Bob( 0,0.5 ) : \
+	           (ChromaEdi == "Bob")    ? Input.Bob( 0,0.5 ) : \
 			                             NOP()
 
 	return (!IsClip(interpuv)) ? interp : interp.MergeChroma( interpuv )
@@ -1324,4 +1326,4 @@ function QTGMC_GetUserGlobal( string Prefix, string Name, bool "Reuse" )
 	try       { ret = Reuse ? Eval( globalName ) : NOP() }
 	catch (e) { ret = NOP() }
 	return ret
-}
\ No newline at end of file
+}

QTGMC potential typo

Hi,

Thank you for you effort, it is much appreciated.

On line 601 of QTGMC.avsi

I trust
V==ChromaNoise?3:2

should be changed to

V=ChromaNoise?3:2

All the best,

Milan

Replace SangNom

Hi,
why not replace SangNom with SangNom2 in ContraSharpen_mod.avsi and ZS_AVS_Shared_Functions.avsi?

LSFmod error

I meet this error when try index video with lsmashsource

Script error: expected "val", "bool", "int", "float", "string", "array", or "clip" (or their "_array" versions
(C:/Program Files (x86)/AviSynth+/plugins64+/LSFmod_v2.192.avsi, line 422, column 0)

DDCOMB

ddcomb is acting very strange, sometimes it actually introduces static dot crawl back or blurs area where there is no dot crawl at all heavily and even takes chunks out of lines, I use it to grab any residual dot crawl that may have been missed.

Do you think you can add anyway we can further control ddcomb?

F3KDB_s.avsi

Hi,
Using the latest update has memory leak.

ffvideosource()
#convertbits(x)
f3kdb_3_adg()

Any bit depth from 8-bit to 16-bit is using 2GB+ for only few frames.

Btw this version https://pastebin.com/cAqHEzPJ has the same memory leak only for 8-bit but it's fine from 10-bit to 16-bit.

Also using f3kdb_3_adg(random_algo_ref=2, random_algo_grain=2) the speed is significantly lower compared to f3kdb_3_adg(). (neo-)f3kdb(random_algo_ref=2, random_algo_grain=2) has almost the same speed as (neo-)f3kdb(). Is it expected behavior?

FixChromaBleedingMod

Hi,

The result of 8-bit and 16-bit is different. Test:

colorbars(pixel_type="yuv420p16") #colorbars(pixel_type="yv12")
FixChromaBleedingMod(-200)
ExtractV()

YLevelsC. Description requirement of few functions.

Hi.
Comparing original YLevelsC ( http://avisynth.nl/images/YLevels_mt.avsi ) and the one from the latest update here, there is a big difference (8-bit):

tv range yuv input
YlevelsC(16,4.5,15,0,240)

Can you add some info about:

  • filtering_wsb and filtering_wsb - can you add the purpose of those functions? Can you add parameters description?
  • scaled444tonative - can you add parameters description?
  • smaskmerge - can you add the purpose of that function? Can you add parameters description?

Thanks.

Add vsTEdgeMask

Hi,
Both vsTEdgeMask and TEedgeMask have identical outputs (default parameters).
Can you update ASTDR.avsi and ContraSharpen_mod.avsi for vsTEdgeMask?

F3KDB_3 with stacked input clip not working.

Line 56 should be:
noutput_mode==1 ? last.convertbits(16,false).ConvertToStacked() : noutput_mode==2 ? last.convertbits(16,false).ConvertToDoubleWidth() : last
How it currently is, it will just return the input clip when using stacked input/output.

QTGMC: SearchParam for hex and umh

The SearchParam for Search=4 and 5 look very suspicious. I would have expected them to increase in radius for the slower presets, especially for placebo, very slow and slow.
Following the x264 documentation the search range for hex (=4) and umh (=5) can be up to 16 or 24. At a maximal range of 2 I doubt that uhm and hex are much better then Search=2 with SearchParam=2.
I tested that hypothesis by returning the "noiseWindow" clip and scrolling through a film and comparing Search=0,4,5 at SearchParam=2. And indeed the result was basically identical for SearchParam=2. Increasing SerachParam for hex and umh however yielded much better results the more the content was moving.

Few issues

Hi.

I uploaded here diff for Advanced Denoising.avsi, nnedi3_resize16.avsi and ZS AVS Shared Functions.avsi. Without those changes the scripts aren't working. ZS AVS Shared Functions.avsi has added few helper functions.

LSFmod.avsi and Smethod=5

At some point in LSFmod.avsi, Smethod=5 was removed:

477  Assert( ( Smethod >= 1 && Smethod <= 4 ) ? true : false, chr(10) + "'Smethod' have not a correct value! [1,2,3,4]" + chr(10))

According to the AviSynth Wiki, these should be the values for Smethod:

int Smethod = 2

    Sharpening method: (not used for Smode=1&2)

        1 : 3x3 Kernel
        2 : Min/Max (original)
        3 : Min/Max (enhanced)
        4 : Min/Max (original) + 3x3 Kernel
        5 : Min/Max (enhanced) + 3x3 Kernel 

Are these Smethods still the same? Is it correct that Smethod=5 should be removed?

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.