fssimu2: Fast SSIMULACRA2 implementation in Zig (github.com)

🤖 AI Summary
fssimu2 is a new, high-performance SSIMULACRA2 implementation written in Zig that provides a command-line tool and a C-compatible shared library for computing perceptual image quality scores. The binary accepts sRGB PNG/PAM/JPEG/WebP/AVIF inputs and supports --json and --err-map (PNG/TGA) output; error maps use the Turbo colormap for visually intuitive highlighting of artifacts. Build with zig build --release=fast to produce zig-out/bin/ssimu2 and a platform-shared library (libssimu2), and call it from C via the provided ssimulacra2_score(...) ABI and example code. Technically, fssimu2 delivers substantial efficiency gains over the reference implementation: measured on an Intel i7-13700k with a 3840×2160 test image, wall time fell from ~809 ms to ~618 ms (≈23.6% faster) and peak RSS dropped from ~1.34 GB to ~817 MB (≈39.1% reduction). CPU cycles, instruction counts and cache misses show similar reductions (≈22–42%), while validation against the reference across the gb82 image set yields near-identical results (mean diff ≈ -0.518, 0.669% relative error, max abs error 1.9165) and very high correlation (PCC 0.99970, SRCC 0.99940, KRCC 0.98775). Apache 2.0 licensed, fssimu2 is a practical drop-in for faster, lower-memory perceptual quality measurement in image-processing and ML evaluation pipelines.
Loading comments...
loading comments...