All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.1.0 - 2026-06-26
Added
Butteraugli.compare/5andcompare!/5— compute the butteraugli perceptual difference between two packed-binary images, returning aButteraugli.Resultwithscore(max-norm distance),pnorm_3(libjxl 3-norm aggregation), and an optionaldiffmap.Butteraugli.Reference—new/4,new!/4,compare/3,compare!/3for reusing one prepared reference across many candidates (~2× faster per compare in a quality-search loop).compare/3takesprefer: :speed | :memory(default:speed);:memoryruns a strip-bounded walker with bounded peak memory and per-strip cancellation, trading away the speedup.- Input formats selectable via the
:formatoption::rgb888(default,u8sRGB) and:linear_rgb(f32linear RGB). - Tuning parameters
:intensity_target(display brightness in nits, crate default80.0) and:hf_asymmetry(added-vs-removed high-frequency weighting, crate default1.0). OnButteraugli.Referencethese are baked in atnew/4time. - Optional difference map via
:compute_diffmap(defaultfalse). Diffmaps are cropped back to the input size; images smaller than 8×8 are padded up to butteraugli's 8×8 floor and scored. - Cooperative cancellation:
Butteraugli.CancelRef.new/0andButteraugli.cancel/1. The metric runs on a dirty scheduler and polls the cancel ref at strip boundaries, freeing the CPU promptly. A cancel ref is single-use and can cover a whole batch. - Wall-clock timeouts via the
:timeoutoption, returning{:error, :timeout}. - Optional Vix integration (
Butteraugli.Vix.compare/2,Butteraugli.Vix.reference/2), available when:vixis a dependency; images are coerced to 8-bit sRGB. - Precompiled NIFs via
rustler_precompiledforaarch64/x86_64macOS,gnu/muslLinux, andx86_64Windows, across NIF versions 2.15–2.17, so the Rust toolchain is not required on covered targets.
Notes
butteraugliis pinned to a git revision because the cooperative-cancellation API (*_with_stop) has not yet landed in a crates.io release. This will move to a versioned dependency once available.- The underlying crate is a port of Google's butteraugli implementation from libjxl.