From 6db1f7f7c7cb60c7bd5f8da55635d0558e817d47 Mon Sep 17 00:00:00 2001 From: kageru Date: Wed, 26 Feb 2020 22:16:18 +0100 Subject: [PATCH] update readme (again) --- README.md | 2 ++ test.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f6da6b..f9d6523 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,13 @@ Binaries for Windows and Linux are in the release tab. ## FAQ **Why do I have to call std.PlaneStats() manually?** + Because I didn’t want to reimplement it. `kagefunc.adaptive_grain(clip, show_mask=True)` does that for you and then just returns the mask. **Why doesn’t this also add grain?** + I was going to do that originally, but it just goes back to the same point about not wanting to reimplement diff --git a/test.py b/test.py index b0ef03b..b1fb286 100644 --- a/test.py +++ b/test.py @@ -1,12 +1,14 @@ import vapoursynth as vs +import kagefunc as kgf core = vs.core #black = core.std.BlankClip(format=vs.YUV444P8, width=1920, height=1080, color=[0, 128, 128]) #white = core.std.BlankClip(black, color=[255, 128, 128]) -core.std.LoadPlugin('target/release/libadaptivegrain_rs.so') -zweihu = core.ffms2.Source('1558625524644.jpg').resize.Point(format=vs.YUV444PS).std.PlaneStats() * 200 +#core.std.LoadPlugin('target/release/libadaptivegrain_rs.so') +zweihu = core.ffms2.Source('1558625524644.jpg').resize.Point(format=vs.YUV444PS).std.PlaneStats() * 500 #grained = white.std.PlaneStats().adg.Mask() grained = zweihu.adg.Mask() +#grained = kgf.adaptive_grain(zweihu, show_mask=True) #grained = zweihu #grained = white.grain.Add(2, constant=True) #for i in range(len(grained)):