From c0bc07f76bb340f86225eb4ef744f90885bedc26 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 04:17:09 +0300 Subject: [PATCH] perf(av1): price an inter candidate through the inter 32x32 coefficient set search_inter_block priced its NEARESTMV/NEWMV candidates through TxbSet::Luma32, the INTRA table, while sb_coeff_inter_frame_tile codes an inter block through Luma32Inter -- which carries the inter tx_type symbol Luma32 has no table for. The BD gate is byte-identical either way (the symbol is worth ~0.03 bit, far below a decision flip), so this is a price-matches-the-writer alignment, not a gain. --- crates/ec-av1/src/encode.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/ec-av1/src/encode.rs b/crates/ec-av1/src/encode.rs index 5059572f..7ae51c77 100644 --- a/crates/ec-av1/src/encode.rs +++ b/crates/ec-av1/src/encode.rs @@ -2616,6 +2616,10 @@ fn search_inter_block( reference: &Picture, stack: &MvStack, fctx: &crate::decode::FrameCtx, ) -> BlockCoeffs { + // `luma_set` is the INTRA candidates' table; the two inter candidates + // below price their coefficients through `TxbSet::Luma32Inter`, which is + // what `sb_coeff_inter_frame_tile` codes an inter block with (it carries + // the inter `tx_type` symbol `Luma32` has no table for -- lane-av1rd1). let (luma_set, chroma_set) = (TxbSet::Luma32, TxbSet::Chroma16); let reach = Reach::of(BLOCK, x, y, luma.true_width, luma.true_height, fctx); @@ -2781,7 +2785,7 @@ fn search_inter_block( false, search.base_q_idx, search.deadzone, - luma_set, fctx, + TxbSet::Luma32Inter, fctx, ); let u = mc_trial( &chroma[0], @@ -2882,7 +2886,7 @@ fn search_inter_block( false, search.base_q_idx, search.deadzone, - luma_set, fctx, + TxbSet::Luma32Inter, fctx, ); let u = mc_trial( &chroma[0],