Ponder
6th June 2011, 01:13
The original intend was to incorporate the script inside Speedy HDRAGC v4 for heavy dancing
grains. So there is some dependency.
Needed plugins:
SimpleResize from trbarry
HDRAGC from Paviko
RemoveGrain from Kassandro
MaskTools v2 from Kurosu, Manao, mg262
TTempSmoothF from tritical
FluxSmooth from SansGrip
mod. sh0dan
LoadPlugin("F:\AviSynth 2.5\PLUGINS\SimpleResize.dll")
LoadPlugin("f:\AviSynth 2.5\PLUGINS1\TTempSmooth.dll")
#aviSource("b:\3.avi") #300 Original.avi
#DirectShowSource("b:\3.mkv", fps=23.976)
#MPEG2Source("b:\z.d2v",idct=6,cpu=0)
#simpleResize(1280,528) # better since you dont want sharpen heavy grains if downside
source=last
my_wid0=1280
#my_wid0=1024
ratio=my_wid0/4 #Mod8h may get pixels overlap, get bright green edge, mod4 preferred
mod4h=4*ROUND((HEIGHT*ratio)/width)
my_HEIGHT=mod4h
my_wid = (width > my_wid0) ? my_wid0 : width
#TTempSmoothF(1,strength=8,scthresh=15,pfclip=source.blur(1).FluxSmoothT(7).blur(1))
#HDRAGC(Corrector=0.7,Reducer=1.5,protect=1,MODE=1,PASSES=2,max_sat=1.35)
#yLevels(0, 1.9, 255, 60,273) #to see
#return last #Uncomment these above 4 lines to test pure HDRAGC and TTempSmoothF,lot more
#artifacts on flat wall on 300 Original.avi . Following script, lot less artifacts.
# Separate source into 2 parts. Pure gradient, and 100% details
a = source.simpleResize(my_wid/2,my_HEIGHT/2).blur(1).FluxSmoothT(7).blur(1)
a_up=a.simpleResize(my_wid,my_HEIGHT)
a=a.HDRAGC(Corrector=0.7,Reducer=1.5,protect=1,MODE=1,PASSES=2,max_sat=1.35)
b=a.simpleResize(my_wid,my_HEIGHT)
bri2=mt_makediff(b,a_up)
source2=source.TTempSmoothF(1,strength=7,scthresh=15,pfclip=a_up)#radius=2 is overkill,20-33% slower
mt_adddiff(bri2,source2)
RemoveGrain(1)
RemoveGrain(1)
yLevels(0, 1.8, 255, 60,273) #to see under virtualdub
return last
Didee and Zep's version look very good. Above script, version 1 was used on the dark grainy scene
to get:
My test on the "Original avi", very calm and lot of details. 14MB crf20 at
http://www.mediafire.com/?1s7e6bv5a5o2zde
HDRAGC has good effect on dark scene being a excellent gradient plugin, but
on the very bright wheat fields scene. HDRAGC preferred not be to used, to retain more contrast.
So use this instead for very bright scene. Version 1a.
a = source.simpleResize(my_wid/2,my_HEIGHT/2).blur(1).FluxSmoothT(8)
#a = source.simpleResize(my_wid/2,my_HEIGHT/2).blur(1).FluxSmoothT(7).blur(1) #or
a_up=a.simpleResize(my_wid,my_HEIGHT)
TTempSmoothF(1,strength=1,scthresh=15,pfclip=a_up)#strength=1 is best here, not 2+,quite sensitive
RemoveGrain(1)
#yLevels(0, 1.8, 255, 60,273) #to see under virtualdub
return last
It is a fairly new script aim to be fast and quite good, so improvement and new parts can be
added hence very flexible. some settings are chosen carefully, so any change without careful
inspection will impact quality.
Ponder heavy degrain test on 300's wheat field scene at crf21.9 using Version 1a on very bright scene.
http://www.mediafire.com/?pmvwdb2amltla9q
grains. So there is some dependency.
Needed plugins:
SimpleResize from trbarry
HDRAGC from Paviko
RemoveGrain from Kassandro
MaskTools v2 from Kurosu, Manao, mg262
TTempSmoothF from tritical
FluxSmooth from SansGrip
mod. sh0dan
LoadPlugin("F:\AviSynth 2.5\PLUGINS\SimpleResize.dll")
LoadPlugin("f:\AviSynth 2.5\PLUGINS1\TTempSmooth.dll")
#aviSource("b:\3.avi") #300 Original.avi
#DirectShowSource("b:\3.mkv", fps=23.976)
#MPEG2Source("b:\z.d2v",idct=6,cpu=0)
#simpleResize(1280,528) # better since you dont want sharpen heavy grains if downside
source=last
my_wid0=1280
#my_wid0=1024
ratio=my_wid0/4 #Mod8h may get pixels overlap, get bright green edge, mod4 preferred
mod4h=4*ROUND((HEIGHT*ratio)/width)
my_HEIGHT=mod4h
my_wid = (width > my_wid0) ? my_wid0 : width
#TTempSmoothF(1,strength=8,scthresh=15,pfclip=source.blur(1).FluxSmoothT(7).blur(1))
#HDRAGC(Corrector=0.7,Reducer=1.5,protect=1,MODE=1,PASSES=2,max_sat=1.35)
#yLevels(0, 1.9, 255, 60,273) #to see
#return last #Uncomment these above 4 lines to test pure HDRAGC and TTempSmoothF,lot more
#artifacts on flat wall on 300 Original.avi . Following script, lot less artifacts.
# Separate source into 2 parts. Pure gradient, and 100% details
a = source.simpleResize(my_wid/2,my_HEIGHT/2).blur(1).FluxSmoothT(7).blur(1)
a_up=a.simpleResize(my_wid,my_HEIGHT)
a=a.HDRAGC(Corrector=0.7,Reducer=1.5,protect=1,MODE=1,PASSES=2,max_sat=1.35)
b=a.simpleResize(my_wid,my_HEIGHT)
bri2=mt_makediff(b,a_up)
source2=source.TTempSmoothF(1,strength=7,scthresh=15,pfclip=a_up)#radius=2 is overkill,20-33% slower
mt_adddiff(bri2,source2)
RemoveGrain(1)
RemoveGrain(1)
yLevels(0, 1.8, 255, 60,273) #to see under virtualdub
return last
Didee and Zep's version look very good. Above script, version 1 was used on the dark grainy scene
to get:
My test on the "Original avi", very calm and lot of details. 14MB crf20 at
http://www.mediafire.com/?1s7e6bv5a5o2zde
HDRAGC has good effect on dark scene being a excellent gradient plugin, but
on the very bright wheat fields scene. HDRAGC preferred not be to used, to retain more contrast.
So use this instead for very bright scene. Version 1a.
a = source.simpleResize(my_wid/2,my_HEIGHT/2).blur(1).FluxSmoothT(8)
#a = source.simpleResize(my_wid/2,my_HEIGHT/2).blur(1).FluxSmoothT(7).blur(1) #or
a_up=a.simpleResize(my_wid,my_HEIGHT)
TTempSmoothF(1,strength=1,scthresh=15,pfclip=a_up)#strength=1 is best here, not 2+,quite sensitive
RemoveGrain(1)
#yLevels(0, 1.8, 255, 60,273) #to see under virtualdub
return last
It is a fairly new script aim to be fast and quite good, so improvement and new parts can be
added hence very flexible. some settings are chosen carefully, so any change without careful
inspection will impact quality.
Ponder heavy degrain test on 300's wheat field scene at crf21.9 using Version 1a on very bright scene.
http://www.mediafire.com/?pmvwdb2amltla9q