Caution
DEPRECATED! Use https://github.com/dnjulek/vapoursynth-zip
SSIMULACRA2 for VapourSynth with Zig.
ssimulacra2.SSIMULACRA2(vnode reference, vnode distorted)
ref = YUV420P8 clip
dist = YUV420P8 clip
# Only works with RGBS format.
ref = ref.resize.Bicubic(format=vs.RGBS, matrix_in=1)
dist = dist.resize.Bicubic(format=vs.RGBS, matrix_in=1)
# Must be converted from gamma to linear with fmtc because resize/zimg uses another formula.
ref = ref.fmtc.transfer(transs="srgb", transd="linear", bits=32)
dist = dist.fmtc.transfer(transs="srgb", transd="linear", bits=32)
ssim = core.ssimulacra2.SSIMULACRA2(ref, dist)
Download the latest zig-dev and run zig build -Doptimize=ReleaseFast
Or run the script that downloads it for you: