From bbbf1cd0166a2b986a66848662167c542719685b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 6 Sep 2026 13:32:49 +0300 Subject: [PATCH] doc(av1): a compound leaf keeps the flat transform -- the var-tx split is measured worse Built the compound commit_inter_luma the previous lane named as the upgrade path (both references predicting every half-side trial) and swept its split margin on the BD gate: no margin beats the flat commit on more than one clip, and 1080p and screen lose at every one. Recorded at the decision site. --- crates/ec-av1/src/encode.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/ec-av1/src/encode.rs b/crates/ec-av1/src/encode.rs index b29b58cd..c4e96502 100644 --- a/crates/ec-av1/src/encode.rs +++ b/crates/ec-av1/src/encode.rs @@ -3194,9 +3194,16 @@ fn code_square_inter( // A compound winner commits the flat trial it was priced from: // `commit_inter_luma`'s var-tx trial set is single-reference // (`mc_trial`), so a compound leaf codes `tx_depth = 0`. - // corner-cut: no var-tx split for a compound leaf -- ceiling is - // the split gain on 16x16 compound blocks; upgrade path is a - // compound `commit_inter_luma` taking both references. + // lane-av1comp4 BUILT that upgrade (a `commit_inter_luma` + // predicting each half-side trial from BOTH references, verified + // byte-identical to this when its split is disabled) and MEASURED + // it a loss: vs libaom +83.5/+99.7/+54.9 at no margin against the + // +83.0/+99.9/+54.5 here, and +83.3/+100.2/+54.9, +83.8/+99.5/ + // +54.9, +83.3/+100.0/+54.9 at split margins 0.02/0.05/0.15. A + // compound block's residual is small enough that the four extra + // per-unit txb_skip/eob symbols cost more ladder bytes than this + // encoder's static-CDF estimate prices them at, so the local RD + // win does not convert. The flat trial stays. let (levels, tx_depth, dcost) = if info.ref1.is_some() { luma.commit(x, y, side, &luma_new); (luma_new.levels.clone(), 0, 0.0)