Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#881 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,664
|
Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
![]() |
![]() |
![]() |
#882 | Link | |
Registered User
Join Date: Oct 2011
Location: Dans le nord
Posts: 62
|
Quote:
Code:
Feedback ======== Feedback is a pair of filters that allow the output of a filter chain to be passed back as an input, further up the chain, to be used in outputting the next frame of the chain. For example, it can be used to fill in the empty areas of a stablised clip by compositing in the previous output frame (which itself will have been composited using Feedback). Usage ===== FeedbackInput( (clip), (int) id ) FeedbackOutput( (clip), (int) id ) FeedbackInput will return frame 0 of its input clip as frame 0 of its output, but after that it returns frame n-1 of the associated FeedbackOutput clip. FeedbackOutput sets a clip as a source for a FeedbackInput clip. The id parameter is optional, but must be given unique values whenever there is more than one FeedbackInput/FeedbackOutput set in a script environment. Code:
function Stab31 (clip clp, int "ts", int "range", int "dxmax", int "dymax", bool "UVfix", bool "FixFalPos", float "zoom", int "mirror", float "PAR", clip "Prefilter", int "Luma_Exp", int "FillBorder", clip "FalPosclip", bool "use_ExInpaint", bool "use_InpaintDelogo", bool "use_Feedback", string "the_path") { ts = default(ts, 7) #frames to temporal average for better motion estimation (max. 7) range = default(range, 1) #frames before/after to estimate motion dxmax = default(dxmax, Round(clp.width()/180.0)) #maximum deviation in pixels dymax = default(dymax, dxmax) #x, and y should be the same zoom = default(zoom, 1) #maximum zoom factor (1 disabled) u_feed = default(use_Feedback, false) mirror = default(mirror, u_feed ? 15 : 0) #Edge filling. 0 off, 15 everything on PAR = default(PAR, 1.0) #PAR of your source UVfix = default(UVfix, false) # Fixes the bug of change of HUE in Depan, not need in depan 1.13.1 and up bfix = default(FillBorder, u_feed ? 2 : 1) # 1=Fixes borders of 3 or less pixels wide. u_ExIn = default(use_ExInpaint, false) u_InDe = default(use_InpaintDelogo, u_feed) b3fix = bfix > 0 FixFalPos = default(FixFalPos, true) # Fixes borders of 3 or more pixels wide. Use along crop(2,2,-2,-2)... # ...after stab2() to get rid of border issues entirely Lumae = default(Luma_Exp, 1) #Luma Rebuild Pref = Defined(Prefilter) ? Prefilter : clp temp = Pref.TemporalSoften(ts,255,255,25,2) # SC thr to 25 otherwise pans will stutter rep = temp.Repair(Pref.TemporalSoften(1,255,255,25,2)) inter = Interleave(rep,Pref) FN_NAME_ONLY = RT_FilenameSplit(the_path,get=4) # temporal stable auto-contrast (better subpixel detection) Luma_Expa = Lumae==2 ? AutoAdjust(inter,temporal_radius=10,auto_balance=false,auto_gain=true,use_interp=true,\ avg_safety=0.25,dark_limit=10,bright_limit=10,gamma_limit=1.0,dark_exclude=0.05,bright_exclude=0.05,\ chroma_process=0,scd_threshold=16,input_tv=false,output_tv=false,high_bitdepth=false,debug_view=false) : \ Lumae==1 ? inter.ColorYUV(levels="TV->PC") : inter mdata = DePanEstimate(Luma_Expa,range=range,pixaspect=PAR,trust=0,dxmax=dxmax,dymax=dymax,zoommax=zoom) DePan(Defined(Prefilter)?Interleave(rep,clp):inter,data=mdata,offset=-1,mirror=b3fix ? 0 : mirror,pixaspect=PAR,matchfields=false,subpixel=2) SelectEvery(2,0) stabclip=last FalPosclip = !defined(FalPosclip) && FixFalPos && mirror==15 && b3fix ? clp : FalPosclip # from depansafe() function b3fix && defined(FalPosclip) ? FalPosclip : FixFalPos ? eval(""" thick = b3fix ? 3.0 : 2.0 # removing >2px wide borders cropx = dxmax*2 ratiox = "YPlaneMax("+string(ceil(99-thick/cropx*100))+")" crop(0,0,0,cropx).conditionalfilter(last,clp,ratiox,">","0") crop(0,height-cropx,0,0).conditionalfilter(last,clp,ratiox,">","0") crop(0,0,cropx,0).conditionalfilter(last,clp,ratiox,">","0") crop(width-cropx,0,0,0).conditionalfilter(last,clp,ratiox,">","0")""") : last subsampl = b3fix ? AvsPlusVersionNumber > 2294 ? !(clp.is444() || clp.isy()) : VersionNumber() < 2.60 ? clp.isyv12() : !(clp.isyv24() || clp.isy8()) : nop() bfixc = bfix > 0 ? stabclip.FillBorders_stabi(pad=subsampl && mirror!=15 ? 1 : 0,subsample=subsampl,FixFalPos=defined(FalPosclip) || FixFalPos ? last : Undefined, mirror=mirror==15,PAR=PAR, maskonly=bfix > 1) : last stabbclp = bfix > 1 && u_feed ? BlankClip(bfixc,color_yuv=$000000) : nop() stabclpa1 = bfix > 1 && u_feed ? stabclip.SCSelect(stabbclp,bfixc,bfixc).ExtractY().Invert() : nop() stabclpa2 = bfix > 1 && u_feed ? stabclip.SCSelect(stabbclp,stabbclp,bfixc).ExtractY().Invert() : nop() # [strike]stabclip = bfix > 1 && u_feed ? Layer(stabclip.AddAlphaPlane(stabclpa1).FeedbackInput(clp.AddAlphaPlane(stabclpa1), id=FN_NAME_ONLY).FeedbackOutput(id=FN_NAME_ONLY)) : stabclip[/strike] stabclip = bfix > 1 && u_feed ? Layer(stabclip.AddAlphaPlane(stabclpa1).FeedbackInput(id=FN_NAME_ONLY), clp.AddAlphaPlane(stabclpa1)).FeedbackOutput(id=FN_NAME_ONLY) : stabclip stabclip = bfix > 1 && u_feed ? stabclip.RemoveAlphaPlane() : stabclip preclip = mt_merge(stabclip,clp,bfixc,luma=true) preclip = bfix > 1 && u_feed ? mt_merge(stabclip,preclip,stabclpa2,luma=true).repair(preclip) : preclip bfix > 1 ? stabclip.FillBorders_stabi(pad=subsampl && mirror!=15 ? 1 : 0,subsample=subsampl,FixFalPos=defined(FalPosclip) || FixFalPos ? last : Undefined, mirror=mirror==15,PAR=PAR, FillBordersc=u_ExIn ? preclip.ExInpaint(bfixc.mt_lut(u=-255,v=-255)) : u_InDe ? preclip.InpaintDelogo(mask=bfixc, Loc="0,0,0,0",dPP=0,dPPm=1,diPP=1,diPPm=0,oPP=1,oPPm=0,Inflate=0) : preclip.InpaintLogo(bfixc)) : bfixc bfix > 1 && u_feed ? mt_merge(stabclip,last,stabclpa2.sh_Padding(2,2,2,2).mt_expand().crop(2,2,-2,-2),luma=true).repair(preclip) : last UVfix ? eval(""" lumaf=last clpDith=Dither_convert_8_to_16() ScriptClip (" blue=round((AverageChromaU(clp) - AverageChromaU()) * 256.0) red=round((AverageChromaV(clp) - AverageChromaV()) * 256.0) SmoothTweak16(clpDith,saturation=1.0,hue1=min(384,blue),hue2=min(384,red),HQ=true) DitherPost(stacked=true,prot=false,mode=6,y=1,slice=false) ", args="clp,clpDith" ) Mergeluma(lumaf) """) : last } Code:
MPEG2Source (chemin, idct=5) # RequestLinear(clim=100) RoboCrop(LeftAdd=2, TopAdd=0, RightAdd=0, BotAdd=0) Scomb(Decrawing=False, ntsccombmask=False) # Convertbits(16) A=STGMC( Preset="very slow",sourcematch=3, Sharpness=0.0, lossless=2 ).selecteven() B=STGMC( Preset="very slow",sourcematch=3, Sharpness=0.0, lossless=2 ).selectodd() C=Tfm(field=1,Mode=5,PP=2,cthresh=2,mthresh=2,clip2=A,micmatching=0,chroma=true,display=false, d2v=chemin, slow=2) D=Tfm(field=0,Mode=5,PP=2,cthresh=2,mthresh=2,clip2=B,micmatching=0,chroma=true,display=false, d2v=chemin, slow=2) Interleave(C,D) Stab31(use_feedback=True, the_path=chemin) Code:
[avisynth @ 00000153a3375a00] Script error: Invalid arguments to function 'FeedbackInput'. (D:/A encoder/avs_plugin_372/Stab31.avsi, line 68) (simpsons_s02e01_p1_scomb3.avs, line 45) simpsons_s02e01_p1_scomb3.avs: Unknown error occurred Last edited by Blankmedia; 5th June 2022 at 00:42. Reason: i messed up |
|
![]() |
![]() |
![]() |
#883 | Link |
Registered User
Join Date: Oct 2011
Location: Dans le nord
Posts: 62
|
I messed up that line in stab31* :
Code:
stabclip = bfix > 1 && u_feed ? Layer(stabclip.AddAlphaPlane(stabclpa1).FeedbackInput(id=FN_NAME_ONLY), clp.AddAlphaPlane(stabclpa1)).FeedbackOutput(id=FN_NAME_ONLY) : stabclip Code:
avisynth @ 000001fc10ed5a00] Script error: the named argument "id" to FeedbackInput had the wrong type (D:/A encoder/avs_plugin_372/Stab31.avsi, line 69) (simpsons_s02e01_p1_scomb3.avs, line 45) simpsons_s02e01_p1_scomb3.avs: Unknown error occurred Last edited by Blankmedia; 5th June 2022 at 00:35. |
![]() |
![]() |
![]() |
#884 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,664
|
I only added that stuff so that Real.Finder would not have to look up what it did. (was not meant as any kind of solution)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
![]() |
![]() |
![]() |
#885 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,664
|
OK, here extracts PartNo from multi-part Filename, only tested with given script.
Code:
Function GetMultipartFileNamePartNo(String FN) { FN = RT_FilenameSplit(FN,get=4) # Name node only, no path, no extension eg, "FFMS_MultiPart_Source_PART_1" RFN = RevStr(FN) S="" # Init C = RFN.MidStr(1,1) While("0" <= C <= "9") { S = C + S RFN = RFN.MidStr(2) C = RFN.MidStr(1,1) } Return Eval("0" + S) } FN = "FFMS_MultiPart_Source_PART_123.avs" PartNo = GetMultipartFileNamePartNo(FN) Assert(PartNo > 0, "Bad PartNo") BlankClip Subtitle("Got PartNo = " + String(PartNo)) EDIT: Extracts the bit in RED as int. EDIT: Added "0" + in the Eval, ie Return Eval(S) to Return Eval("0" + S).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 5th June 2022 at 02:17. |
![]() |
![]() |
![]() |
#887 | Link |
Registered User
Join Date: Jan 2019
Location: Antarctica
Posts: 74
|
I wanted to ask if this script below from https://forum.doom9.org/showthread.p...22#post1906222 doesn't need an update to it after a year and many months of updates later? Thanks for sharing that script as I been using it since even now.
Code:
useDebilinearM=false #Depend on the source nativeWidth=1504 #Depend on the source nativeHeight=846 #Depend on the source outputWidth=1280 #Depend on what you need outputHeight=720 #Depend on what you need noDesample=(nativeWidth > outputWidth && nativeHeight > outputHeight) || (nativeHeight >= Height && nativeWidth >= Width) luma=IsAvsPlus() ? ExtractY() : ConvertToY8() chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8()) desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight, DeResizeMT=true) : luma.ResizeX(nativeWidth, nativeHeight,kernel="bicubic",a1=0,a2=1,dither_mode=0,desampling=true) #you must set the correct kernel and the settings here (Depend on the source) outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight) #you can add another settings depend on what you need outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,kernel_u="blackman"src_top=0.0,src_left=0.50) #you can add another settings depend on what you need YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma) Code:
useDebilinearM=false #Depend on the source nativeWidth=1504 #Depend on the source nativeHeight=846 #Depend on the source outputWidth=1280 #Depend on what you need outputHeight=720 #Depend on what you need noDesample=(nativeWidth > outputWidth && nativeHeight > outputHeight) || (nativeHeight >= Height && nativeWidth >= Width) luma=IsAvsPlus() ? ExtractY() : ConvertToY8() chroma=Interleave(IsAvsPlus() ? ExtractU() : UToY8(), IsAvsPlus() ? ExtractV() : VToY8()) desampleluma=noDesample ? luma : useDebilinearM ? luma.DebilinearM(nativeWidth,nativeHeight, DeResizeMT=true,thr=01, lsb_inout=true) : luma.ResizeX(nativeWidth, nativeHeight,kernel="bicubic",a1=0,a2=1,dither_mode=0,lsb_in=true,lsb_out=true,desampling=true) #you must set the correct kernel and the settings here (Depend on the source) outputluma=!(noDesample || (nativeWidth != outputWidth || nativeHeight != outputHeight)) ? desampleluma : desampleluma.nnedi3_resize16(outputWidth, outputHeight, lsb_in=true,lsb=true) #you can add another settings depend on what you need outputchroma=chroma.nnedi3_resize16(outputWidth, outputHeight,0.50,kernel_u="blackman",src_top=0.0,src_left=0.50,lsb_in=true,lsb=true) #you can add another settings depend on what you need YtoUV(outputchroma.SelectEven(),outputchroma.SelectOdd(),outputluma) One more thing, does "nnedi3_resize16" use the "MT's" or take advantage of "ResampleMT"? I think you did this for "DebilinearM" to use "MT" in the script. Maybe I am wrong but seems to be "DeRMT". I just don't see it in "nnedi3_resize16" as I see "kernel_d = Default(kernel_d, "Spline36" " so I think it uses the normal "Spline36". You think it's fine the way it is? or could use an update or would that take too long? Last edited by dREV; 5th July 2022 at 21:16. Reason: minor edit |
![]() |
![]() |
![]() |
#888 | Link | |
Registered User
Join Date: Jan 2017
Posts: 46
|
Quote:
|
|
![]() |
![]() |
![]() |
#889 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,627
|
Quote:
|
|
![]() |
![]() |
![]() |
#890 | Link | |
Registered User
Join Date: Jan 2017
Posts: 46
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#892 | Link |
Registered User
Join Date: Jan 2017
Posts: 46
|
That seems... like a lot of extra work lol. The old one looked good enough to me with just a single line. Luckily I found a copy of it on gitlab, if anyone wants to try/compare/have an alternate solution/hold onto for posterity/etc
|
![]() |
![]() |
![]() |
#893 | Link | |
Registered User
Join Date: Jul 2018
Posts: 351
|
Quote:
Code:
MPEG2Source("D:\Edit\DVD\ntscDVD.d2v") TFM() TDecimate() neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0) z_Spline36Resize(1440,1080) AdaptiveGrain(grain=GrainFactory3(g1str=1, g2str=2, g3str=3)) z_Spline36Resize(640,480) Code:
MPEG2Source("D:\Edit\DVD\ntscDVD.d2v") TFM() TDecimate() neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0) z_Spline36Resize(1440,1080) mt_merge(GrainFactory3(g1str=1, g2str=2, g3str=3), agm()) z_Spline36Resize(640,480) |
|
![]() |
![]() |
![]() |
#894 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,359
|
I am getting error in maa2, i.e.
there is no function named sh_GetUserGlobalIMTint() function present at line 61 as threads = default(Threads, sh_GetUserGlobalIMTint()) How can I fix it, more than setting threads = 1? ![]() The second error I get is I don't know what AvsPlusVersionNumber means "fixed" using sisphbd = true instead of sisphbd = AvsPlusVersionNumber > 2294 The third error is I don't know what IsAVSPlus means again "fixed" setting as true. Help.
__________________
@turment on Telegram Last edited by tormento; 27th October 2022 at 09:15. |
![]() |
![]() |
![]() |
#899 | Link | |
Registered User
Join Date: Dec 2005
Location: Sweden
Posts: 602
|
Admfilter - motionthresh
Trying to understand the code of admfilter and the motionthresh part. Looks interesting for speed with the tiles 16x16. But it is only for scenchanges or for something more?
Quote:
Last edited by anton_foy; 3rd May 2023 at 23:44. |
|
![]() |
![]() |
![]() |
#900 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,549
|
admfilter used manly to make denoiser more aggressive in high motion, motionthresh part to pass how fast motion moving value but as an unified clip and that why it is 16x16 and it can be one pixel in nowadays avs+ for even faster
__________________
See My Avisynth Stuff |
![]() |
![]() |
![]() |
Tags |
avisynth, avs script, avs+, banding, generator, hbd, mod |
Thread Tools | Search this Thread |
Display Modes | |
|
|