Advertisement
Seedmanc

SF OVA upscaling HQ

Jul 23rd, 2013
804
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Plugin list & downloads:
  2. TDecimate   http://bengal.missouri.edu/~kes25c/TIVTCv105.zip
  3. Deblock_QED http://avisynth.org/mediawiki/Upload/f/f7/Deblock_QED_MT2.avs (rename to *.avsi)
  4. requires:
  5.     Deblock     http://avisynth.org.ru/mvtools/deblock12.zip
  6.     DCTfilter   http://avisynth.org/warpenterprises/files/dctfilter_25_dll_20030221.zip
  7. BlindPP2    https://dl.dropboxusercontent.com/u/74005421/blindpp2.avsi  (my own little function)
  8. requires:
  9.     BlindPP     http://hank315.nl/files/DGdecode/dgmpgdec158.zip
  10. NNEDI3_rpow2    http://bengal.missouri.edu/~kes25c/nnedi3.zip   <- best upscaler right there
  11. spline144resize http://www.wilbertdijkhof.com/SplineResize_v02.zip <- second best resizer
  12. awarp4/awarp2   http://www.mediafire.com/download/7bu46ab33dwex0o/aWarpSharp_20120328.rar 2 is faster
  13. fastlinedarken  http://forum.doom9.org/showthread.php?p=1060081#post1060081 (save as .avsi)
  14. requires:  
  15.     MaskTools2  http://manao4.free.fr/masktools-v2.0a48.zip <- must have
  16. Motion stuff    http://avisynth.org.ru/mvtools/mvtools-v2.5.11.3.zip <- another must have
  17. fft3dfilter http://avisynth.org.ru/fft3dfilter/fft3dfilter211.zip
  18. requires:  
  19.     ftp://ftp.fftw.org/pub/fftw/fftw3win32mingw.zip <- this should be put in %PATH% variable (like system32)
  20. HQDering    http://forum.doom9.org/showthread.php?p=793930#post793930   (save as .avsi)
  21.  
  22. Put .dlls and .avsi to avisynth/plugins folder or in a separate folder (but then you'll have to include them manually using "loadplugin("path/to/plugin.dll")" and "import("path/to/script.avsi")".
  23. */
  24. setmtmode(2)
  25. ffmpegsource2("C:\Users\Seedmanc\Downloads\MC99U001.Mkv")
  26. TDecimate               #Recovering actual framerate (24fps instead of 30 with every 4th frame repeating)
  27. x=24132                 #Start of OVA-specific MV              
  28. y=30238                 #Start of Music MV
  29. trim(0,x)+trim(x+1,0).deblock_qed.blindpp2.blur(0.1)
  30. #I'll be using different processing settings for each part since MVs are highly dynamic compared to OVA
  31.  
  32. nnedi3_rpow2(rfactor=2,    cshift="spline144resize", fwidth=1280,fheight=720)
  33. #Upscaling
  34. a=aWarp4(Spline36Resize(width*4, height*4, 0.375, 0.375), aSobel().aBlur(), depth= 2,chroma=4)
  35. b=awarpsharp2(depth=4)          #Thinning lines
  36. a.trim(0,x)+b.trim(x+1,0)
  37.  
  38. a=fastlinedarkenmod(luma_cap=250,threshold=1,strength=50,thinning=0)
  39. b=fastlinedarkenmod(luma_cap=200,threshold=2,strength=45,thinning=0)
  40. a.trim(0,x)+b.trim(x+1,0)           #Darkening lines for nicer look
  41.  
  42. super = MSuper(pel=1)
  43. backward_vectors =  MAnalyse(super, isb = true, truemotion=false, blksize=32, overlap=16)
  44. forward_vectors =  MAnalyse(super, isb = false, truemotion=false, blksize=32, overlap=16)
  45. forward_compensation = MCompensate(super, forward_vectors, thSCD1=500)
  46. backward_compensation = MCompensate(super, backward_vectors, thSCD1=500)
  47. interleave(forward_compensation, last, backward_compensation)
  48.  setmtmode(3)
  49. a=fft3dfilter(bw=32,bh=32,ow=16,oh=16, bt=3,sigma=2.1        ,plane=4 ,sharpen=0.3    ,measure=true,dehalo=0.35    )    .selectevery(3,1)
  50. b=fft3dfilter(bw=32,bh=32,ow=16,oh=16, bt=3,sigma=2.55        ,plane=4 ,sharpen=0.35    ,measure=true,dehalo=0.3    )   .selectevery(3,1)
  51. a.trim(0,x)+b.trim(x+1,0)         #Motion-compensated spatial&temporal denoising, cool thing. Cleans edges, removes blocks, sharpens image, all in one and decently fast.
  52.  
  53.  setmtmode(2)
  54. a=merge(hqdering(overall=14) ,0.66).sharpen(0.1)
  55. b=merge(hqdering(overall=16).sharpen(0.1)  ,0.77)
  56. a.trim(0,x)+b.trim(x+1,0)           #Additional edge-denoising for anime.
  57.  
  58. a=gradfun3(thr=0.4,radius=14 ,smode=2 )
  59. b=gradfun3(thr=0.4,radius=14  ) #You know this guy.
  60. a.trim(0,y)+b.trim(y+1,0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement