This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

DeepEnhancer
#55
# FUNCTION RemoveDirtSMC
#============================================================================================================================================.

function RemoveTempGrain(clip clp, int "_mode")
{
  _mode = Default(_mode, 17)

  rg    = RemoveGrain(clp, mode=_mode)

  return TemporalRepair(rg, clp)
}





function RemoveDirtS(clip clp, int "limit", bool "_grey")
{
  _grey   = Default(_grey, false)
  limit   = Default(limit, 6)

  clensed = clp.Clense(grey=_grey, cache=4)
  alt     = clp.RemoveGrain(10)

  return (RestoreMotionBlocks(clensed, clp, alternative=alt, pthreshold=4, cthreshold=6, gmthreshold=40, \
                              dist=1, dmode=2, debug=false, noise=limit, noisy=16, grey=_grey))
}





function RemoveDirtSMC(clip clp, int "limit", bool "_grey")
{
  _grey  = Default(_grey, false)
  limit  = Default(limit, 6)

  super1  = MSuper(clp, pel=2, sharp=2)
  bvec1  = MAnalyse(super1, isb=true,  blksize=16, delta=1, truemotion=true)
  fvec1  = MAnalyse(super1, isb=false, blksize=16, delta=1, truemotion=true)
  backw1 = MFlow(clp, super1, bvec1)
  forw1  = MFlow(clp, super1, fvec1)

  clp    = Interleave(backw1, clp, forw1)
  clp    = clp.RemoveDirtS(limit, _grey).removetempgrain(10)
  clp    = clp.SelectEvery(3, 1)


  return clp
}
RemoveDirtSMC()

function McDegrainSharp(clip c, int "frames", int"strenght",float "bblur", float "csharp", bool "bsrch")
{ # Based on MCDegrain By Didee, http://forum.doom9.org/showthread.php?t=161594
  # Also based on DiDee observations in this thread: http://forum.doom9.org/showthread.php?t=161580
  # "Denoise with MDegrainX, do slight sharpening where motionmatch is good, do slight blurring where motionmatch is bad"
  # In areas where MAnalyse cannot find good matches, the blur() will be dominant.
  # In areas where good matches are found, the sharpen()'ed pixels will overweight the blur()'ed pixels
  # when the pixel averaging is performed.
    frames = default(frames, 2)
    strenght = default(strenght,400)
    bblur  = default(bblur, 1.0)
    csharp = default(csharp, 1.0)
    bsrch  = default(bsrch, true)
    
          blocks = 16
          overl = 8
    
    c2 = c.blur(bblur)
    super = bsrch ? c2.MSuper(pel=2, sharp=1) : c.MSuper(pel=2, sharp=1)
    super_rend     = c.sharpen(csharp).MSuper(pel=2, sharp=1,levels=1)
    backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=blocks, overlap=overl)
    backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=blocks, overlap=overl)
    backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=blocks, overlap=overl)
    forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=blocks, overlap=overl)
    forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=blocks, overlap=overl)
    forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=blocks, overlap=overl)    
    (frames<=0) ? c :\
    (frames==1) ? c2.MDegrain1(super_rend, backward_vec1,forward_vec1,thSAD=strenght) :\
    (frames==2) ? c2.MDegrain2(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=strenght) :\
              c2.MDegrain3(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=strenght)
    return(last)
}

McDegrainSharp()
Reply


Messages In This Thread
DeepEnhancer - by djilayeden - 04.04.2025, 00:52
RE: Deoldify Vapoursynth filter - by Selur - 04.04.2025, 04:13
RE: Deoldify Vapoursynth filter - by Selur - 04.04.2025, 13:57
RE: Deoldify Vapoursynth filter - by safshe - 04.04.2025, 16:17
RE: Deoldify Vapoursynth filter - by Dan64 - 04.04.2025, 18:41
RE: DeepEnhancer - by Selur - 04.04.2025, 19:30
RE: DeepEnhancer - by djilayeden - 04.04.2025, 21:08
RE: DeepEnhancer - by zspeciman - 04.04.2025, 21:32
RE: DeepEnhancer - by Selur - 04.04.2025, 22:15
RE: DeepEnhancer - by Selur - 05.04.2025, 10:11
RE: DeepEnhancer - by Dan64 - 05.04.2025, 10:41
RE: DeepEnhancer - by Selur - 05.04.2025, 11:07
RE: DeepEnhancer - by djilayeden - 05.04.2025, 14:09
RE: DeepEnhancer - by zspeciman - 05.04.2025, 14:35
RE: DeepEnhancer - by Selur - 05.04.2025, 14:52
RE: DeepEnhancer - by djilayeden - 05.04.2025, 15:28
RE: DeepEnhancer - by Selur - 05.04.2025, 17:08
RE: DeepEnhancer - by zspeciman - 05.04.2025, 17:26
RE: DeepEnhancer - by Selur - 05.04.2025, 17:34
RE: DeepEnhancer - by djilayeden - 05.04.2025, 18:39
RE: DeepEnhancer - by Dan64 - 06.04.2025, 11:39
RE: DeepEnhancer - by Selur - 06.04.2025, 13:02
RE: DeepEnhancer - by Dan64 - 06.04.2025, 13:28
RE: DeepEnhancer - by Selur - 06.04.2025, 13:45
RE: DeepEnhancer - by Selur - 06.04.2025, 15:58
RE: DeepEnhancer - by Dan64 - 06.04.2025, 20:09
RE: DeepEnhancer - by Selur - 06.04.2025, 20:12
RE: DeepEnhancer - by Dan64 - 06.04.2025, 20:20
RE: DeepEnhancer - by Selur - 06.04.2025, 20:43
RE: DeepEnhancer - by Selur - 06.04.2025, 21:29
RE: DeepEnhancer - by Dan64 - 06.04.2025, 21:29
RE: DeepEnhancer - by Selur - 06.04.2025, 21:41
RE: DeepEnhancer - by djilayeden - 06.04.2025, 21:44
RE: DeepEnhancer - by Dan64 - 06.04.2025, 21:56
RE: DeepEnhancer - by Selur - 07.04.2025, 05:10
RE: DeepEnhancer - by Selur - 07.04.2025, 16:13
RE: DeepEnhancer - by Dan64 - 10.04.2025, 00:49
RE: DeepEnhancer - by zspeciman - 10.04.2025, 14:42
RE: DeepEnhancer - by Selur - 10.04.2025, 15:18
RE: DeepEnhancer - by djilayeden - 11.04.2025, 15:47
RE: DeepEnhancer - by Selur - 11.04.2025, 20:26
RE: DeepEnhancer - by Dan64 - 12.04.2025, 00:09
RE: DeepEnhancer - by Dan64 - 12.04.2025, 12:36
RE: DeepEnhancer - by Selur - 12.04.2025, 12:43
RE: DeepEnhancer - by djilayeden - 12.04.2025, 13:26
RE: DeepEnhancer - by Dan64 - 12.04.2025, 13:44
RE: DeepEnhancer - by Dan64 - 12.04.2025, 15:24
RE: DeepEnhancer - by Selur - 12.04.2025, 15:47
RE: DeepEnhancer - by djilayeden - 12.04.2025, 15:52
RE: DeepEnhancer - by Selur - 12.04.2025, 15:56
RE: DeepEnhancer - by djilayeden - 12.04.2025, 15:59
RE: DeepEnhancer - by Selur - 12.04.2025, 16:51
RE: DeepEnhancer - by Dan64 - 12.04.2025, 17:16
RE: DeepEnhancer - by Selur - 12.04.2025, 18:03
RE: DeepEnhancer - by Dan64 - 13.04.2025, 18:18

Forum Jump:


Users browsing this thread: 1 Guest(s)