added test.py and example image for manual testing

This commit is contained in:
kageru 2019-06-01 09:46:28 +02:00
parent 783d36bbd2
commit c36233859c
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
3 changed files with 22 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
/target
**/*.rs.bk
Cargo.lock
.idea/
*.png
*.ffindex

BIN
1558625524644.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

16
test.py Normal file
View File

@ -0,0 +1,16 @@
import vapoursynth as vs
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
#grained = white.std.PlaneStats().adg.Mask()
grained = zweihu.adg.Mask()
#grained = zweihu
#grained = white.grain.Add(2, constant=True)
#for i in range(len(grained)):
# grained.get_frame(i)
#grained.resize.Bicubic(format=vs.RGB24, matrix_in_s='709').imwri.Write('png', 'grain%d.png').get_frame(0)
grained.set_output()
#zweihu.set_output()