Skip to content

v0.1.4

Latest

Choose a tag to compare

@lilith lilith released this 27 Apr 03:44
· 1 commit to master since this release

Fixed

  • QM level mapping (qm_level_for_qindex): extend to libavif's still-image range [4, 15] instead of all-intra-video [4, 10]. With the old upper bound of 10, level 15 (= identity / no QM) was unreachable, so even at near-lossless qindex the encoder applied substantial QM weighting. On ac_quant 1–4 with QM weights ~80, the integer rounding (quant * weight + 16) >> 5 multiplied the effective quantizer step 2-3× on high-frequency coefficients, collapsing zensim from ~76 at qindex 18 to ~49 at qindex 0 in zenavif's encode sweep, and degrading the entire q≥60 range by 11–22 zensim points. Fix: linear interpolation across [4, 15] so qindex 0 → level 15 (no QM applied) and shaping ramps in smoothly. The q→zensim curve is now monotonic across all 5 CID22 test images and QM-on tracks QM-off within ±0.4 zensim from q=70 onward.

  • AV1 spec 6.8.11 conformance: set_quantizers now clears using_qmatrix when the frame is coded-lossless (base_q_idx == 0 and all delta_q == 0) and also when the selected qm_level is 15 for every plane (degenerate case rav1d/libaom reject). Without this, decoding zenavif quality=100 with QM=on failed primary-frame decode.

Fixes #7.

Validation

5-image CID22 sweep, q=5..=100 step 5, both bottomup modes:

  • All 5 images: fully monotonic in q=5..=100 (zero zensim drops > 0.5)
  • q=100: QM=on now produces identical bytes and identical zensim as QM=off
  • Mid-range (q=60-90): QM=on within ±0.4 zensim of QM=off, often slightly better
  • Low quality (q≤50): QM=on saves 5-12% bytes at cost of ~1 zensim point — the BD-rate win the original benchmark documented