Skip to content

dnjulek/vapoursynth-ssimulacra2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: