The inter transform-type search ships SCREEN-GATED at presets 0-6
Browse files at this commit63f401a2f3a62278f75b019ceb7a6deeb3fea905Parent: 5c1d094- feat
- the inter transform-type search ships SCREEN-GATED at presets 0-6
2 changed files +19 -4
crates/ec-av1/src/encode.rsmodified+10 -1
| @@ -292,6 +292,15 @@ pub(crate) fn tx_type_candidates(set: TxbSet, screen: bool) -> &'static [TxType] | |||
| 292 | /// (`IDTX`, `DCT_DCT`) and 32x32 is `EXT_TX_SET_DCT_IDTX` -- the same two | 292 | /// (`IDTX`, `DCT_DCT`) and 32x32 is `EXT_TX_SET_DCT_IDTX` -- the same two |
| 293 | /// types, a symbol the writer already codes and never varied. 64x64 codes no | 293 | /// types, a symbol the writer already codes and never varied. 64x64 codes no |
| 294 | /// `tx_type` symbol at all, so it is not offered one. | 294 | /// `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 | +/// | ||
| 295 | /// `EC_AV1_TXSET_INTER`: `0`/`off`, `screen` (screen frames only), `le16` | 304 | /// `EC_AV1_TXSET_INTER`: `0`/`off`, `screen` (screen frames only), `le16` |
| 296 | /// (16x16 and below, the sizes libaom's own census picks a non-`DCT_DCT` | 305 | /// (16x16 and below, the sizes libaom's own census picks a non-`DCT_DCT` |
| 297 | /// inter type on -- it never takes `IDTX` at 32x32 on film B), anything else | 306 | /// inter type on -- it never takes `IDTX` at 32x32 on film B), anything else |
| @@ -354,7 +363,7 @@ fn inter_tx_type_search() -> InterTxSearch { | |||
| 354 | }); | 363 | }); |
| 355 | ENV.unwrap_or_else(|| { | 364 | ENV.unwrap_or_else(|| { |
| 356 | if crate::speed::at(&crate::speed::TX_TYPE_SEARCH_INTER) { | 365 | if crate::speed::at(&crate::speed::TX_TYPE_SEARCH_INTER) { |
| 357 | - InterTxSearch::All | 366 | + InterTxSearch::Screen |
| 358 | } else { | 367 | } else { |
| 359 | InterTxSearch::Off | 368 | InterTxSearch::Off |
| 360 | } | 369 | } |
crates/ec-av1/src/speed.rsmodified+9 -3
| @@ -493,9 +493,15 @@ pub(crate) const TX_TYPE_SEARCH: [bool; 11] = [ | |||
| 493 | 493 | ||
| 494 | /// `tx_type_candidates`: whether an INTER luma transform unit searches the | 494 | /// `tx_type_candidates`: whether an INTER luma transform unit searches the |
| 495 | /// two-type `TX_SET_INTER_3` (`IDTX` vs `DCT_DCT`) the writer already codes a | 495 | /// 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 | 496 | +/// symbol for, instead of always coding `DCT_DCT` (lane-txset2). On at the |
| 497 | -/// preset until the gate says otherwise; `EC_AV1_TXSET_INTER` overrides. | 497 | +/// presets that carry the intra search, and SCREEN CONTENT ONLY on top of it |
| 498 | -pub(crate) const TX_TYPE_SEARCH_INTER: [bool; 11] = [false; 11]; | 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 | +]; | ||
| 499 | 505 | ||
| 500 | /// `filter_search`: whether the deblock ladder's +-1/+-2 refinement stage runs. | 506 | /// `filter_search`: whether the deblock ladder's +-1/+-2 refinement stage runs. |
| 501 | pub(crate) const DEBLOCK_REFINE: [bool; 11] = [ | 507 | pub(crate) const DEBLOCK_REFINE: [bool; 11] = [ |