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(
2616 reference: &Picture,2616 reference: &Picture,
2617 stack: &MvStack, fctx: &crate::decode::FrameCtx,2617 stack: &MvStack, fctx: &crate::decode::FrameCtx,
2618 ) -> BlockCoeffs {2618 ) -> 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).
2619 let (luma_set, chroma_set) = (TxbSet::Luma32, TxbSet::Chroma16);2623 let (luma_set, chroma_set) = (TxbSet::Luma32, TxbSet::Chroma16);
2620 let reach = Reach::of(BLOCK, x, y, luma.true_width, luma.true_height, fctx);2624 let reach = Reach::of(BLOCK, x, y, luma.true_width, luma.true_height, fctx);
2621 2625
@@ -2781,7 +2785,7 @@ fn search_inter_block(
2781 false,2785 false,
2782 search.base_q_idx,2786 search.base_q_idx,
2783 search.deadzone,2787 search.deadzone,
2784- luma_set, fctx,2788+ TxbSet::Luma32Inter, fctx,
2785 );2789 );
2786 let u = mc_trial(2790 let u = mc_trial(
2787 &chroma[0],2791 &chroma[0],
@@ -2882,7 +2886,7 @@ fn search_inter_block(
2882 false,2886 false,
2883 search.base_q_idx,2887 search.base_q_idx,
2884 search.deadzone,2888 search.deadzone,
2885- luma_set, fctx,2889+ TxbSet::Luma32Inter, fctx,
2886 );2890 );
2887 let u = mc_trial(2891 let u = mc_trial(
2888 &chroma[0],2892 &chroma[0],