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 {
94889488 // (compound share 8.8% -> 11.5%): a compound block carries a second
94899489 // reference tree, a compound mode symbol and -- for the half-new modes
94909490 // -- 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
94939492 // 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.
94959496 assert!(
9496- worst_under <= 0.32,
9497+ worst_under <= 0.34,
94979498 "the writer spent {:.2}% more than the search priced -- more than \
94989499 the mode/mv syntax outside the coefficient sum explains",
94999500 worst_under * 100.0
@@ -10522,7 +10523,10 @@ mod tests {
1052210523 /// `cdef_idx` literals and per-unit loop restoration syntax are new bits
1052310524 /// in the tile) and again on lane-av1mv's merge of it: an extra
1052410525 /// 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.
1052610530 #[test]
1052710531 fn the_encoders_own_streams_are_byte_identical_to_their_pins() {
1052810532 if !have_ffmpeg() {
@@ -10544,7 +10548,7 @@ mod tests {
1054410548 })
1054510549 };
1054610550 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)];
1054810552 for (q, bytes, hash) in pins {
1054910553 let encoded = encode_sequence(&source, q, 0.5).unwrap();
1055010554 assert_eq!(