View difference between Paste ID: 06EfSweJ and VP7ATg79
SHOW: | | - or go back to the newest paste.
1-
# trick to fix chroma blend/bleed/halo v1.1
1+
# ASTDR DeRainbow function
2-
# it better to use it after dehalo
2+
3
  function ASTDR(clip input)
4-
  input=last
4+
  {
5-
  chrwa=input.awarpsharp2(depth=4,chroma=6).aWarpSharp2(depth=-1,chroma=2)
5+
  momask    = input.tweak(sat=1.5).mt_motion(thc2=5,thc1=5,y=3,v=3,u=3)
6-
  gchrblu=chrwa.MergeLuma(chrwa.blur(0.1)).aWarpSharp2(depth=4,chroma=6)
6+
  momaskinv = momask.Invert().Levels(0,2,255,0,255)
7-
  Mergechroma(gchrblu)
7+
  
8
  f_uv = input.DeCross(ThresholdY=15, Noise=100, Margin=1).awarpsharp2(depth=1,chroma=6).hqdn3d(ls=1,lt=2).temporalsoften(2,5,15,3,2).aWarpSharp2(depth=-1,chroma=2)
9-
fft3dfilter(sigma=1,plane=3,degrid=1) #Optional
9+
  filtered_uv=f_uv.MergeLuma(f_uv.blur(0.1)).aWarpSharp2(depth=1,chroma=6).FluxSmoothST(10,10).fft3dfilter(sigma=1,plane=3,degrid=1)
10
  
11
  filtered = mt_merge(filtered_uv, input, momaskinv,y=2,u=3,v=3,luma=true)
12
  
13
  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)
14
  }