#[non_exhaustive]pub struct EntropyMulTable {
pub dct8: f32,
pub dct4x4: f32,
pub dct4x8: f32,
pub identity: f32,
pub dct2x2: f32,
pub afv: f32,
pub dct16x8: f32,
pub dct16x16: f32,
pub dct16x32: f32,
pub dct32x32: f32,
pub dct64x32: f32,
pub dct64x64: f32,
}Expand description
Per-strategy raw entropy multipliers for the AC strategy cost model.
These control the relative preference for each transform type in AC strategy selection. Higher values penalize a strategy (making it less likely to be chosen); lower values favor it. The 8x8-class values are normalized by DCT8’s value before use, so DCT8 always evaluates at 1.0. Larger transforms use raw values directly.
Default values match libjxl enc_ac_strategy.cc:584 (kTransforms8x8[i].entropy_mul).
Experimental values from libjxl PR #4506 (Jon Sneyers, VarDCT cost tuning).
#[non_exhaustive] so future libjxl-side strategy additions can land
without a breaking change. Construct via Self::reference or
Self::experimental and mutate fields as needed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dct8: f32DCT8 base value. All 8x8-class transforms are normalized by this.
Reference: 0.8 (libjxl enc_ac_strategy.cc:357, kTransforms8x8[0].entropy_mul).
dct4x4: f32DCT4x4 (four 4x4 sub-blocks per 8x8 block). Reference: 1.08. Experimental: 0.88 (PR #4506, ~19% reduction). Lowering favors DCT4x4 for textured/detailed regions (screenshots, text).
dct4x8: f32DCT4x8 / DCT8x4 (half-block transforms for edges/detail).
Reference: 0.859316 (libjxl enc_ac_strategy.cc).
identity: f32Identity (pixel copy, no transform). Reference: 1.0428. Experimental: 0.88 (PR #4506, ~16% reduction). Lowering favors identity blocks for flat/noisy regions.
dct2x2: f32DCT2x2 (2x2 Hadamard-like transform).
Reference: 0.95 (libjxl enc_ac_strategy.cc).
afv: f32AFV (Adaptive Frequency Variable, corner DCT). Reference: 0.818. Experimental: 0.75 (PR #4506, ~8% reduction). Lowering favors AFV for edge blocks with mixed content.
dct16x8: f32DCT16x8 / DCT8x16 (larger transforms use raw values, not normalized by DCT8).
Reference: 1.21 (libjxl enc_ac_strategy.cc).
dct16x16: f32DCT16x16.
Reference: 1.34 (libjxl enc_ac_strategy.cc).
dct16x32: f32DCT16x32 / DCT32x16.
Reference: 1.49 (libjxl enc_ac_strategy.cc).
dct32x32: f32DCT32x32.
Reference: 1.48 (libjxl enc_ac_strategy.cc).
dct64x32: f32DCT64x32 / DCT32x64.
Reference: 2.25 (libjxl enc_ac_strategy.cc).
dct64x64: f32DCT64x64.
Reference: 2.25 (libjxl enc_ac_strategy.cc).
Implementations§
Source§impl EntropyMulTable
impl EntropyMulTable
Sourcepub fn experimental() -> Self
pub fn experimental() -> Self
Experimental values from libjxl PR #4506 (Jon Sneyers, VarDCT cost tuning).
Changes vs reference:
- dct4x4: 1.08 → 0.88 (~19% reduction) — favor detail-preserving 4x4 sub-blocks
- identity: 1.0428 → 0.88 (~16% reduction) — favor pixel-copy for flat regions
- afv: 0.818 → 0.75 (~8% reduction) — favor corner DCT for edge blocks
Trait Implementations§
Source§impl Clone for EntropyMulTable
impl Clone for EntropyMulTable
Source§fn clone(&self) -> EntropyMulTable
fn clone(&self) -> EntropyMulTable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for EntropyMulTable
impl RefUnwindSafe for EntropyMulTable
impl Send for EntropyMulTable
impl Sync for EntropyMulTable
impl Unpin for EntropyMulTable
impl UnsafeUnpin for EntropyMulTable
impl UnwindSafe for EntropyMulTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more