SHOW:
|
|
- or go back to the newest paste.
| 1 | - | # ASTDR DeRainbow function v1.50 |
| 1 | + | # ASTDR DeRainbow function v1.51 |
| 2 | ||
| 3 | - | function ASTDR(clip input, int "strength", int "tempsoftth", int "tempsoftrad", int "tempsoftsc", float "blstr", int "tht", int "FluxStv") |
| 3 | + | function ASTDR(clip input, int "strength", int "tempsoftth", int "tempsoftrad", int "tempsoftsc", float "blstr", int "tht", int "FluxStv", int "dcn", bool "edgem") |
| 4 | {
| |
| 5 | strn = Default(strength, 5) | |
| 6 | blstr = Default(blstr, 0.5) | |
| 7 | tht = Default(tht, 255) | |
| 8 | tschrth = Default(tempsoftth, 30) | |
| 9 | tschrrad = Default(tempsoftrad, 3) | |
| 10 | - | tschrsc = Default(tempsoftsc, 3) |
| 10 | + | tschrsc = Default(tempsoftsc, 3) |
| 11 | - | FluxStv = Default(FluxStv, 75) |
| 11 | + | FluxStv = Default(FluxStv, 75) |
| 12 | dcn = Default(dcn, 15) | |
| 13 | edgem = default(edgem, false) | |
| 14 | - | momaskinv = momask.Invert().Levels(0,2,255,0,255) |
| 14 | + | |
| 15 | momask = input.tweak(sat=1.1).mt_motion(thc2=1,thc1=1,thy2=1,thy1=1,y=3,v=3,u=3,tht=tht) | |
| 16 | - | filtered_uv = input.DeCross(ThresholdY=15, Noise=100, Margin=1).FluxSmoothST(FluxStv,FluxStv).Mergeluma(input).awarpsharp2(depth=4,chroma=6).hqdn3d(ls=0,lt=0,cs=strn*3/5,ct=strn) |
| 16 | + | momaskinv = momask.mt_expand(u=3, v=3).mt_inflate(u=3, v=3).Invert().Levels(0,2,255,0,255) |
| 17 | ||
| 18 | filtered_uv = input.DeCross(ThresholdY=15, Noise=dcn, Margin=1).FluxSmoothST(FluxStv,FluxStv).Mergeluma(input).awarpsharp2(depth=4,chroma=6).hqdn3d(ls=0,lt=0,cs=strn*3/5,ct=strn) | |
| 19 | \ .temporalsoften(tschrrad,0,tschrth,tschrsc,2).blur(blstr).Mergeluma(input).aWarpSharp2(depth=4,chroma=6).fft3dfilter(sigma=1,sigma3=4,plane=3,degrid=1) | |
| 20 | ||
| 21 | filtered = mt_merge(filtered_uv, input, momaskinv,y=2,u=3,v=3,luma=true) | |
| 22 | ||
| 23 | mt_merge(input, filtered, momask.mt_expand(mode="both", y=3,u=3,v=3).mt_inflate(y=3,u=3,v=3),y=2,u=3,v=3) | |
| 24 | edgem ? mt_merge(input, last, input.mt_edge("sobel", 4, 4, 4, 4, u=3, v=3).mt_expand(u=3, v=3).mt_inflate(u=3, v=3),y=2,u=3,v=3,luma=true) : last
| |
| 25 | } | |
| 26 | - | function ASTDRmc(clip prerb, int "strength", int "tempsoftth", int "tempsoftrad", int "tempsoftsc", float "blstr", int "tht") |
| 26 | + | |
| 27 | # ASTDRmc DeRainbow function v1.0 | |
| 28 | ||
| 29 | function ASTDRmc(clip prerb, int "strength", int "tempsoftth", int "tempsoftrad", int "tempsoftsc", float "blstr", int "tht", int "FluxStv", int "dcn", bool "edgem") | |
| 30 | {
| |
| 31 | derbmask = (VersionNumber() < 2.60) ? prerb.tedgemask(threshY=2).mt_inflate() : prerb.TEMmod(threshY=2).mt_inflate() | |
| 32 | derbsuper = prerb.MSuper() | |
| 33 | derbbackward_vectors = MAnalyse(derbsuper, truemotion = true, isb = true, chroma=false) | |
| 34 | derbforward_vectors = MAnalyse(derbsuper, truemotion = true, isb = false, chroma=false) | |
| 35 | - | ASTDRclip = mcclip.ASTDR(strength=strength,tempsoftth=tempsoftth,tempsoftrad=tempsoftrad,tempsoftsc=tempsoftsc,blstr=blstr,tht=tht).selectevery(3,1) |
| 35 | + | |
| 36 | derbbackward_compensation = prerb.MCompensate(derbsuper, derbbackward_vectors) | |
| 37 | mcclip = interleave(derbforward_compensation,prerb,derbbackward_compensation) | |
| 38 | ASTDRclip = mcclip.ASTDR(strength=strength,tempsoftth=tempsoftth,tempsoftrad=tempsoftrad,tempsoftsc=tempsoftsc,blstr=blstr,tht=tht,FluxStv=FluxStv,dcn=dcn,edgem=edgem).selectevery(3,1) | |
| 39 | mt_merge(prerb,ASTDRclip, derbmask,luma=true,y=2,u=3,v=3) | |
| 40 | } |