Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.33 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.33 KB

vapoursynth-ssimulacra2

Linux Windows

SSIMULACRA2 for VapourSynth with Zig.

Usage

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)

Building

Download the latest zig-dev and run zig build -Doptimize=ReleaseFast

Or run the script that downloads it for you: