update readme (again)

This commit is contained in:
kageru 2020-02-26 22:16:18 +01:00
parent 1bd8e2f816
commit 6db1f7f7c7
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
2 changed files with 6 additions and 2 deletions

View File

@ -43,11 +43,13 @@ Binaries for Windows and Linux are in the release tab.
## FAQ ## FAQ
**Why do I have to call std.PlaneStats() manually?** **Why do I have to call std.PlaneStats() manually?**
Because I didn’t want to reimplement it. Because I didn’t want to reimplement it.
`kagefunc.adaptive_grain(clip, show_mask=True)` `kagefunc.adaptive_grain(clip, show_mask=True)`
does that for you and then just returns the mask. does that for you and then just returns the mask.
**Why doesn’t this also add grain?** **Why doesn’t this also add grain?**
I was going to do that originally, I was going to do that originally,
but it just goes back to the same point but it just goes back to the same point
about not wanting to reimplement about not wanting to reimplement

View File

@ -1,12 +1,14 @@
import vapoursynth as vs import vapoursynth as vs
import kagefunc as kgf
core = vs.core core = vs.core
#black = core.std.BlankClip(format=vs.YUV444P8, width=1920, height=1080, color=[0, 128, 128]) #black = core.std.BlankClip(format=vs.YUV444P8, width=1920, height=1080, color=[0, 128, 128])
#white = core.std.BlankClip(black, color=[255, 128, 128]) #white = core.std.BlankClip(black, color=[255, 128, 128])
core.std.LoadPlugin('target/release/libadaptivegrain_rs.so') #core.std.LoadPlugin('target/release/libadaptivegrain_rs.so')
zweihu = core.ffms2.Source('1558625524644.jpg').resize.Point(format=vs.YUV444PS).std.PlaneStats() * 200 zweihu = core.ffms2.Source('1558625524644.jpg').resize.Point(format=vs.YUV444PS).std.PlaneStats() * 500
#grained = white.std.PlaneStats().adg.Mask() #grained = white.std.PlaneStats().adg.Mask()
grained = zweihu.adg.Mask() grained = zweihu.adg.Mask()
#grained = kgf.adaptive_grain(zweihu, show_mask=True)
#grained = zweihu #grained = zweihu
#grained = white.grain.Add(2, constant=True) #grained = white.grain.Add(2, constant=True)
#for i in range(len(grained)): #for i in range(len(grained)):