Repository navigation
Butteraugli
Image metric Butteraugli, ported from libjxl. It gives the same scores as libjxl's butteraugli_main tool (within float rounding). Lower is better: about 1.0 or less means the difference is hard to see, 2.0 and above means it is clearly visible.
vszip.Butteraugli(vnode reference, vnode distorted[, float intensity_target=80.0, float hf_asymmetry=1.0, float xmul=1.0, int distmap=0])
ref = core.bs.VideoSource("ref.mkv").resize.Bicubic(format=vs.RGB24, matrix_in_s="709")
dist = core.bs.VideoSource("dist.mkv").resize.Bicubic(format=vs.RGB24, matrix_in_s="709")
res = core.vszip.Butteraugli(ref, dist)Each frame gets two properties: Butteraugli (the distance, the largest value of the difference map, what butteraugli_main prints first) and Butteraugli3Norm (its 3-norm, an average that is less sensitive to a single bad spot).
-
reference, distorted:
RGB clips of the same format, size and length: 8–16-bit integer or 32-bit float. Samples are read as sRGB; frames tagged_Transfer=8are read as linear light. -
intensity_target (float, default: 80.0, range: 0.001..10000):
Display brightness in nits that a value of 1.0 maps to. 80 is libjxl's default for SDR. -
hf_asymmetry (float, default: 1.0, range: 0.001..1000):
Weighs new high-frequency artifacts against lost detail. Above 1 penalizes added artifacts more.butteraugli_mainuses 1.0; the old core.julek plugin used 0.8. -
xmul (float, default: 1.0, range: 0..1000):
Multiplier for the red-green (X) channel's difference. -
distmap (int, default: 0, range: 0..2):
0: return the reference clip with the properties.
1: return libjxl's heatmap of the difference map (butteraugli_main --distmapcolors), in the input format and tagged as sRGB.
2: return the raw difference map as GRAYS (without color tags).