YAHRmod source
From Avisynth wiki
(Difference between revisions)
| (5 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Scripts]] | [[Category:Scripts]] | ||
| − | source: | + | source: https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/YAHR.avsi |
<pre> | <pre> | ||
# Y'et A'nother H'alo R'educing script | # Y'et A'nother H'alo R'educing script | ||
| − | # YAHR A.SONY mod 1. | + | # YAHR A.SONY mod 1.38, original YAHR was by Didée |
# good deHalo for modern DVD and other cases | # good deHalo for modern DVD and other cases | ||
| − | function YAHR2(clip clp, int "depth", int "blur", bool " | + | function YAHR2(clip clp, int "depth", int "blur", bool "useawarp4", int "depthV", int "blurV") |
{ | { | ||
depth = Default(depth, 8) | depth = Default(depth, 8) | ||
| − | + | useawarp4 = Default(useawarp4, false) | |
| + | |||
| + | blur = defined(blurV) && !defined(blur) ? depth==0 ? 0 : blur : blur | ||
| + | |||
| + | defined(depthV) ? depthV != 0 && depth==0 ? eval("blurV=defined(blurV) ? blurV : blur Chr(3) blur=defined(blur) ? blur : 0") : depthV==0 && depth != 0 ? eval("blurV=defined(blurV) ? blurV : 0") : nop() : nop() | ||
| + | |||
| + | awarp_params = defined(depthV) ? ",depthV=" + string(depthV) : "" | ||
| + | awarp_params = defined(blurV) ? awarp_params + ",blurV=" + string(blurV) : defined(depthV) ? depthV==0 ? ",blurV=0" : awarp_params : awarp_params | ||
b1 = clp.minblur(2).removegrain(11,-1) | b1 = clp.minblur(2).removegrain(11,-1) | ||
b1D = mt_makediff(clp,b1) | b1D = mt_makediff(clp,b1) | ||
| − | w1 = | + | w1 = useawarp4 ? clp.aWarpSharp4xx(depth=depth,blur=blur,chroma=1,useawarp4=true,depthV=depthV,blurV=blurV) : eval("clp.aWarpSharp2(depth=depth,blur=blur,chroma=1" + awarp_params + ")") |
w1b1 = w1.minblur(2,1).removegrain(11,-1) | w1b1 = w1.minblur(2,1).removegrain(11,-1) | ||
w1b1D = mt_makediff(w1,w1b1) | w1b1D = mt_makediff(w1,w1b1) | ||
Latest revision as of 10:24, 27 March 2021
source: https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/YAHR.avsi
# Y'et A'nother H'alo R'educing script
# YAHR A.SONY mod 1.38, original YAHR was by Didée
# good deHalo for modern DVD and other cases
function YAHR2(clip clp, int "depth", int "blur", bool "useawarp4", int "depthV", int "blurV")
{
depth = Default(depth, 8)
useawarp4 = Default(useawarp4, false)
blur = defined(blurV) && !defined(blur) ? depth==0 ? 0 : blur : blur
defined(depthV) ? depthV != 0 && depth==0 ? eval("blurV=defined(blurV) ? blurV : blur Chr(3) blur=defined(blur) ? blur : 0") : depthV==0 && depth != 0 ? eval("blurV=defined(blurV) ? blurV : 0") : nop() : nop()
awarp_params = defined(depthV) ? ",depthV=" + string(depthV) : ""
awarp_params = defined(blurV) ? awarp_params + ",blurV=" + string(blurV) : defined(depthV) ? depthV==0 ? ",blurV=0" : awarp_params : awarp_params
b1 = clp.minblur(2).removegrain(11,-1)
b1D = mt_makediff(clp,b1)
w1 = useawarp4 ? clp.aWarpSharp4xx(depth=depth,blur=blur,chroma=1,useawarp4=true,depthV=depthV,blurV=blurV) : eval("clp.aWarpSharp2(depth=depth,blur=blur,chroma=1" + awarp_params + ")")
w1b1 = w1.minblur(2,1).removegrain(11,-1)
w1b1D = mt_makediff(w1,w1b1)
DD = b1D.repair(w1b1D,13)
DD2 = mt_makediff(b1D,DD)
clp.mt_makediff(DD2,U=2,V=2)
}