forge
Explore
Log in

Don't you dare go Hollow

Re-pin the encoder's own streams and widen the drift bound

Browse files at this commit

d4a32344951a382ff080c78bebb4b5ee2a9a5e52Ahmet Kaan GümüşParent: 0b17e82
  • test
    • re-pin the encoder's own streams and widen the drift bound
Show full message
test(av1): re-pin the encoder's own streams and widen the drift bound

The frame-table price on non-screen frames is a decision change: the 640x384
4-frame pins move to 7106/25963 bytes and the predicted-vs-written drift bound
to 0.34 (the +32.6% lane-av1txbits measured under the knob is the default
path now).
crates/ec-av1/src/encode.rsmodified+10 -6
@@ -9488,12 +9488,13 @@ mod tests {
9488 // (compound share 8.8% -> 11.5%): a compound block carries a second9488 // (compound share 8.8% -> 11.5%): a compound block carries a second
9489 // reference tree, a compound mode symbol and -- for the half-new modes9489 // reference tree, a compound mode symbol and -- for the half-new modes
9490 // -- an MV residual, none of which the coefficient sum counts.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%9491+ // lane-av1txbits: pricing against the tables the frame's writer really
9492- // instead -- pricing against the tables the frame's writer really
9493 // starts from collapses the over-price above to nothing, so the whole9492 // 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 assert!(9496 assert!(
9496- worst_under <= 0.32,9497+ worst_under <= 0.34,
9497 "the writer spent {:.2}% more than the search priced -- more than \9498 "the writer spent {:.2}% more than the search priced -- more than \
9498 the mode/mv syntax outside the coefficient sum explains",9499 the mode/mv syntax outside the coefficient sum explains",
9499 worst_under * 100.09500 worst_under * 100.0
@@ -10522,7 +10523,10 @@ mod tests {
10522 /// `cdef_idx` literals and per-unit loop restoration syntax are new bits10523 /// `cdef_idx` literals and per-unit loop restoration syntax are new bits
10523 /// in the tile) and again on lane-av1mv's merge of it: an extra10524 /// in the tile) and again on lane-av1mv's merge of it: an extra
10524 /// reference's `NEWMV` is a coded-bits change too, judged by the BD gate10525 /// 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 #[test]10530 #[test]
10527 fn the_encoders_own_streams_are_byte_identical_to_their_pins() {10531 fn the_encoders_own_streams_are_byte_identical_to_their_pins() {
10528 if !have_ffmpeg() {10532 if !have_ffmpeg() {
@@ -10544,7 +10548,7 @@ mod tests {
10544 })10548 })
10545 };10549 };
10546 let pins: [(u8, usize, u64); 2] =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 for (q, bytes, hash) in pins {10552 for (q, bytes, hash) in pins {
10549 let encoded = encode_sequence(&source, q, 0.5).unwrap();10553 let encoded = encode_sequence(&source, q, 0.5).unwrap();
10550 assert_eq!(10554 assert_eq!(