NEAREST_NEWMV / NEW_NEARESTMV compound candidates on by default
Browse files at this commit757ff823c400ae61046c141944e9a56732713033Parent: 9b0008b- feat
- NEAREST_NEWMV / NEW_NEARESTMV compound candidates on by default
1 changed file +12 -7
- crates/ec-av1/src/encode.rs +12 -7
crates/ec-av1/src/encode.rsmodified+12 -7
| @@ -4342,11 +4342,12 @@ fn search_inter_block( | |||
| 4342 | // reference alone is right. Priced with the same static-CDF approximation | 4342 | // reference alone is right. Priced with the same static-CDF approximation |
| 4343 | // the single-reference candidates use, plus the compound-only symbols | 4343 | // the single-reference candidates use, plus the compound-only symbols |
| 4344 | // (`comp_mode`, the reference-pair tree, `comp_group_idx`/`compound_idx`). | 4344 | // (`comp_mode`, the reference-pair tree, `comp_group_idx`/`compound_idx`). |
| 4345 | - // The two 2026-09-06 compound-mode arms, both measured on the BD gate | 4345 | + // The two compound-mode arms, each measured alone on the BD gate before |
| 4346 | - // before either could default on (see the lane report): presence of the | 4346 | + // it could default on. `NEAREST_NEWMV`/`NEW_NEARESTMV` keep (-1.0/-0.8 |
| 4347 | - // flag arms the candidate. | 4347 | + // vs libaom, screen byte-identical) and ship on; `NEAR_NEARMV` does not |
| 4348 | + // (+0.5/-0.2/flat) and stays behind `EC_AV1_COMP_NEARNEAR`. | ||
| 4348 | let near_near = crate::envflags::env_flag!("EC_AV1_COMP_NEARNEAR"); | 4349 | let near_near = crate::envflags::env_flag!("EC_AV1_COMP_NEARNEAR"); |
| 4349 | - let half_new = crate::envflags::env_flag!("EC_AV1_COMP_HALFNEW"); | 4350 | + let half_new = true; |
| 4350 | for (ref1, g, cstack) in compound { | 4351 | for (ref1, g, cstack) in compound { |
| 4351 | let (ref1, g) = (*ref1, *g); | 4352 | let (ref1, g) = (*ref1, *g); |
| 4352 | let uni = (crate::mvstack::BWDREF_FRAME..=crate::mvstack::ALTREF_FRAME) | 4353 | let uni = (crate::mvstack::BWDREF_FRAME..=crate::mvstack::ALTREF_FRAME) |
| @@ -7488,9 +7489,13 @@ mod tests { | |||
| 7488 | ); | 7489 | ); |
| 7489 | // Measured 2026-09-06 with the extra-reference `NEWMV` in: +18.9% at | 7490 | // Measured 2026-09-06 with the extra-reference `NEWMV` in: +18.9% at |
| 7490 | // the worst inter frame, where nearly every block now codes an MV | 7491 | // the worst inter frame, where nearly every block now codes an MV |
| 7491 | - // residual and a reference the coefficient sum never counts. | 7492 | + // residual and a reference the coefficient sum never counts. Re-measured |
| 7493 | + // at +29.6% once the encoder's grid published compound blocks properly | ||
| 7494 | + // (compound share 8.8% -> 11.5%): a compound block carries a second | ||
| 7495 | + // reference tree, a compound mode symbol and -- for the half-new modes | ||
| 7496 | + // -- an MV residual, none of which the coefficient sum counts. | ||
| 7492 | assert!( | 7497 | assert!( |
| 7493 | - worst_under <= 0.22, | 7498 | + worst_under <= 0.32, |
| 7494 | "the writer spent {:.2}% more than the search priced -- more than \ | 7499 | "the writer spent {:.2}% more than the search priced -- more than \ |
| 7495 | the mode/mv syntax outside the coefficient sum explains", | 7500 | the mode/mv syntax outside the coefficient sum explains", |
| 7496 | worst_under * 100.0 | 7501 | worst_under * 100.0 |
| @@ -8366,7 +8371,7 @@ mod tests { | |||
| 8366 | }) | 8371 | }) |
| 8367 | }; | 8372 | }; |
| 8368 | let pins: [(u8, usize, u64); 2] = | 8373 | let pins: [(u8, usize, u64); 2] = |
| 8369 | - [(150, 7209, 0xacdd_6952_78c1_49f2), (60, 27353, 0x9be8_7898_f08d_3b77)]; | 8374 | + [(150, 7166, 0xc608_4e2a_071e_1d72), (60, 26950, 0x019f_a19c_251b_f61d)]; |
| 8370 | for (q, bytes, hash) in pins { | 8375 | for (q, bytes, hash) in pins { |
| 8371 | let encoded = encode_sequence(&source, q, 0.5).unwrap(); | 8376 | let encoded = encode_sequence(&source, q, 0.5).unwrap(); |
| 8372 | assert_eq!( | 8377 | assert_eq!( |