forge
Explore
Log in

Don't you dare go Hollow

The inter transform-type search ships SCREEN-GATED at presets 0-6

Browse files at this commit

63f401a2f3a62278f75b019ceb7a6deeb3fea905Ahmet Kaan GümüşParent: 5c1d094
  • feat
    • the inter transform-type search ships SCREEN-GATED at presets 0-6
Show full message
feat(av1): the inter transform-type search ships SCREEN-GATED at presets 0-6

Unconditional it loses twenty BD points on both synthetic bars rows of the
12-frame gate (and 0.3 on film B) while winning 0.7/0.3 on the capture; the
le16 restriction does not soften the bars loss. Behind the screen content gate
every non-screen frame is byte-identical to the encoder before the lane, pins
included, and the capture keeps its 0.7/0.3.
crates/ec-av1/src/encode.rsmodified+10 -1
@@ -292,6 +292,15 @@ pub(crate) fn tx_type_candidates(set: TxbSet, screen: bool) -> &'static [TxType]
292292 /// (`IDTX`, `DCT_DCT`) and 32x32 is `EXT_TX_SET_DCT_IDTX` -- the same two
293293 /// types, a symbol the writer already codes and never varied. 64x64 codes no
294294 /// `tx_type` symbol at all, so it is not offered one.
295+/// SCREEN CONTENT ONLY, measured (12-frame `bd_rate_screen_native`): the
296+/// capture row goes +20.8/-30.1 -> +20.1/-30.4 while the two synthetic bars
297+/// rows lose TWENTY points (-1.0/-16.8 -> +23.1/+3.3 and +9.4/-12.7 ->
298+/// +31.2/+3.7) and film B 0.3 -- the `local-rd-on-references` class at its
299+/// loudest, and restricting the offer to 16x16 and below does not soften it
300+/// (`le16`: +22.9/+3.1, +31.6/+4.0). So this takes the same content gate the
301+/// intra search, palette and intrabc stand behind: a non-screen frame is
302+/// byte-identical to the encoder before the lane.
303+///
295304 /// `EC_AV1_TXSET_INTER`: `0`/`off`, `screen` (screen frames only), `le16`
296305 /// (16x16 and below, the sizes libaom's own census picks a non-`DCT_DCT`
297306 /// inter type on -- it never takes `IDTX` at 32x32 on film B), anything else
@@ -354,7 +363,7 @@ fn inter_tx_type_search() -> InterTxSearch {
354363 });
355364 ENV.unwrap_or_else(|| {
356365 if crate::speed::at(&crate::speed::TX_TYPE_SEARCH_INTER) {
357- InterTxSearch::All
366+ InterTxSearch::Screen
358367 } else {
359368 InterTxSearch::Off
360369 }
crates/ec-av1/src/speed.rsmodified+9 -3
@@ -493,9 +493,15 @@ pub(crate) const TX_TYPE_SEARCH: [bool; 11] = [
493493
494494 /// `tx_type_candidates`: whether an INTER luma transform unit searches the
495495 /// two-type `TX_SET_INTER_3` (`IDTX` vs `DCT_DCT`) the writer already codes a
496-/// symbol for, instead of always coding `DCT_DCT` (lane-txset2). Off at every
497-/// preset until the gate says otherwise; `EC_AV1_TXSET_INTER` overrides.
498-pub(crate) const TX_TYPE_SEARCH_INTER: [bool; 11] = [false; 11];
496+/// symbol for, instead of always coding `DCT_DCT` (lane-txset2). On at the
497+/// presets that carry the intra search, and SCREEN CONTENT ONLY on top of it
498+/// (measured, 12-frame `bd_rate_screen_native`: the capture goes
499+/// +20.8/-30.1 -> +20.1/-30.4 while both synthetic bars rows lose twenty
500+/// points and film B 0.3 -- see `encode::inter_tx_type_candidates`).
501+/// `EC_AV1_TXSET_INTER` overrides.
502+pub(crate) const TX_TYPE_SEARCH_INTER: [bool; 11] = [
503+ true, true, true, true, true, true, true, false, false, false, false,
504+];
499505
500506 /// `filter_search`: whether the deblock ladder's +-1/+-2 refinement stage runs.
501507 pub(crate) const DEBLOCK_REFINE: [bool; 11] = [