forge
Explore
Log in

Don't you dare go Hollow

Price an inter candidate through the inter 32x32 coefficient set

Browse files at this commit

c0bc07f76bb340f86225eb4ef744f90885bedc26Ahmet Kaan GümüşParent: 40e1d94
  • perf
    • price an inter candidate through the inter 32x32 coefficient set
Show full message
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.rsmodified+6 -2
@@ -2616,6 +2616,10 @@ fn search_inter_block(
26162616 reference: &Picture,
26172617 stack: &MvStack, fctx: &crate::decode::FrameCtx,
26182618 ) -> BlockCoeffs {
2619+ // `luma_set` is the INTRA candidates' table; the two inter candidates
2620+ // below price their coefficients through `TxbSet::Luma32Inter`, which is
2621+ // what `sb_coeff_inter_frame_tile` codes an inter block with (it carries
2622+ // the inter `tx_type` symbol `Luma32` has no table for -- lane-av1rd1).
26192623 let (luma_set, chroma_set) = (TxbSet::Luma32, TxbSet::Chroma16);
26202624 let reach = Reach::of(BLOCK, x, y, luma.true_width, luma.true_height, fctx);
26212625
@@ -2781,7 +2785,7 @@ fn search_inter_block(
27812785 false,
27822786 search.base_q_idx,
27832787 search.deadzone,
2784- luma_set, fctx,
2788+ TxbSet::Luma32Inter, fctx,
27852789 );
27862790 let u = mc_trial(
27872791 &chroma[0],
@@ -2882,7 +2886,7 @@ fn search_inter_block(
28822886 false,
28832887 search.base_q_idx,
28842888 search.deadzone,
2885- luma_set, fctx,
2889+ TxbSet::Luma32Inter, fctx,
28862890 );
28872891 let u = mc_trial(
28882892 &chroma[0],