Re-pin the encoder's own streams and widen the drift bound
Browse files at this commitd4a32344951a382ff080c78bebb4b5ee2a9a5e52Parent: 0b17e82- test
- re-pin the encoder's own streams and widen the drift bound
1 changed file +10 -6
- crates/ec-av1/src/encode.rs +10 -6
crates/ec-av1/src/encode.rsmodified+10 -6
| @@ -9488,12 +9488,13 @@ mod tests { | ||
| 9488 | 9488 | // (compound share 8.8% -> 11.5%): a compound block carries a second |
| 9489 | 9489 | // reference tree, a compound mode symbol and -- for the half-new modes |
| 9490 | 9490 | // -- an MV residual, none of which the coefficient sum counts. |
| 9491 | - // lane-av1txbits: under `EC_AV1_PRICE_FRAME_CDFS=1` this reads +32.6% | |
| 9492 | - // instead -- pricing against the tables the frame's writer really | |
| 9491 | + // lane-av1txbits: pricing against the tables the frame's writer really | |
| 9493 | 9492 | // starts from collapses the over-price above to nothing, so the whole |
| 9494 | - // remaining gap is the syntax the coefficient sum leaves out. | |
| 9493 | + // remaining gap is the syntax the coefficient sum leaves out. That is | |
| 9494 | + // the default on a non-screen frame since lane-av1price2 (this | |
| 9495 | + // fixture is one), and it reads +32.6% here. | |
| 9495 | 9496 | assert!( |
| 9496 | - worst_under <= 0.32, | |
| 9497 | + worst_under <= 0.34, | |
| 9497 | 9498 | "the writer spent {:.2}% more than the search priced -- more than \ |
| 9498 | 9499 | the mode/mv syntax outside the coefficient sum explains", |
| 9499 | 9500 | worst_under * 100.0 |
| @@ -10522,7 +10523,10 @@ mod tests { | ||
| 10522 | 10523 | /// `cdef_idx` literals and per-unit loop restoration syntax are new bits |
| 10523 | 10524 | /// in the tile) and again on lane-av1mv's merge of it: an extra |
| 10524 | 10525 | /// reference's `NEWMV` is a coded-bits change too, judged by the BD gate |
| 10525 | - /// above, not by this pin. | |
| 10526 | + /// above, not by this pin. Re-pinned on lane-av1price2: the search now | |
| 10527 | + /// prices coefficients against the tables the frame's writer really | |
| 10528 | + /// starts from on every non-screen frame (`tile::arm_pricing_cdfs`), a | |
| 10529 | + /// decision change the BD gate judges. | |
| 10526 | 10530 | #[test] |
| 10527 | 10531 | fn the_encoders_own_streams_are_byte_identical_to_their_pins() { |
| 10528 | 10532 | if !have_ffmpeg() { |
| @@ -10544,7 +10548,7 @@ mod tests { | ||
| 10544 | 10548 | }) |
| 10545 | 10549 | }; |
| 10546 | 10550 | let pins: [(u8, usize, u64); 2] = |
| 10547 | - [(150, 7084, 0x00bc_da74_e540_28d7), (60, 25905, 0x1623_f794_727e_0716)]; | |
| 10551 | + [(150, 7106, 0x1da4_9acd_a892_68e3), (60, 25963, 0x94df_8f46_174e_1a5e)]; | |
| 10548 | 10552 | for (q, bytes, hash) in pins { |
| 10549 | 10553 | let encoded = encode_sequence(&source, q, 0.5).unwrap(); |
| 10550 | 10554 | assert_eq!( |