Skip to main content

Module prelude

Module prelude 

Source
Expand description

Re-exports of metric crate types for convenience.

This module provides a single place to import common types from the metrics crates (dssim-core, butteraugli, ssimulacra2, fast-ssim2), allowing zen* projects to depend only on codec-eval instead of each metric crate separately.

§Example

use codec_eval::metrics::prelude::*;

// Now you have access to:
// - Dssim, DssimImage (from dssim-core)
// - butteraugli, ButteraugliParams (from butteraugli)
// - compute_frame_ssimulacra2, Xyb (from ssimulacra2)
// - Ssimulacra2 (from fast-ssim2)
// - ImgRef, ImgVec (from imgref)
// - RGB8, RGBA8, RGB16, RGBA16 (from rgb)

§Note

This is a convenience module. You can still depend on the individual metric crates directly if you prefer. This module just provides a single dependency point with consistent versions.

Structs§

ButteraugliParams
Butteraugli parameters (from butteraugli).
ButteraugliResult
Butteraugli result (from butteraugli).
Dssim
DSSIM metric calculator (from dssim-core).
DssimImage
DSSIM image wrapper (from dssim-core).
RGB
Generic RGB pixel type (from rgb). A Red + Green + Blue pixel.
RGBA
Generic RGBA pixel type (from rgb). A Red + Green + Blue + Alpha pixel.
Ssimulacra2Config
SSIMULACRA2 configuration for customizing computation (from fast-ssim2). Configuration for SSIMULACRA2 computation.
Ssimulacra2Reference
Precomputed reference for repeated comparisons (from fast-ssim2).

Functions§

butteraugli
Butteraugli metric function (from butteraugli).
compute_ssimulacra2
Compute SSIMULACRA2 score with SIMD acceleration (from fast-ssim2).

Type Aliases§

ImgRef
Image reference type (from imgref).
ImgVec
Owned image type (from imgref).
RGB8
RGB pixel type with u8 components (from rgb). 8-bit RGB
RGB16
RGB pixel type with u16 components (from rgb). 16-bit RGB in machine’s native endian
RGBA8
RGBA pixel type with u8 components (from rgb). 8-bit RGBA, alpha is last. 0 = transparent, 255 = opaque.
RGBA16
RGBA pixel type with u16 components (from rgb). 16-bit RGB in machine’s native endian. 0 = transparent, 65535 = opaque.