forge
Explore
Log in

Don't you dare go Hollow

The stream pins are default-preset pins -- encode at speed 0 whatever EC_AV1_SPEED says

Browse files at this commit

a50740a9855ca468ddc8f34f9be3a39fbdd4e0d2Ahmet Kaan GümüşParent: 707505a
  • test
    • the stream pins are default-preset pins -- encode at speed 0 whatever EC_AV1_SPEED says
Show full message
test(av1): the stream pins are default-preset pins -- encode at speed 0 whatever EC_AV1_SPEED says

Also: the search-free arm's screen row (byte-identical to the control, LAST2
never fires on the capture).
crates/ec-av1/src/encode.rsmodified+16 -8
@@ -15618,7 +15618,12 @@ mod tests {
1561815618 /// (`EC_AV1_ANGLE=0` restores that half).
1561915619 #[test]
1562015620 fn the_encoders_own_streams_are_byte_identical_to_their_pins() {
15621- let _knobs = crate::speed::knob_read();
15621+ // These are DEFAULT-PRESET pins: a speed preset switches search levers
15622+ // off, so it legitimately moves every byte. Encode at speed 0 whatever
15623+ // `EC_AV1_SPEED` says (write guard: the preset is process-global).
15624+ let _knobs = crate::speed::knob_write();
15625+ let was = crate::speed::speed();
15626+ crate::speed::set_speed(0);
1562215627 if !have_ffmpeg() {
1562315628 eprintln!("SKIP the_encoders_own_streams_are_byte_identical_to_their_pins: no ffmpeg");
1562415629 return;
@@ -15681,13 +15686,16 @@ mod tests {
1568115686 // now. `EC_AV1_I64=0` restores 8557 / 33345.
1568215687 let pins: [(u8, usize, u64); 2] =
1568315688 [(150, 8562, 0x66f5_4ffc_aacf_964f), (60, 33357, 0x1d61_9ca4_e960_b044)];
15684- for (q, bytes, hash) in pins {
15685- let encoded = encode_sequence(&source, q, 0.5).unwrap();
15686- assert_eq!(
15687- (encoded.stream.len(), fnv(&encoded.stream)),
15688- (bytes, hash),
15689- "q={q}: the encoder's stream moved"
15690- );
15689+ let coded: Vec<(u8, usize, u64)> = pins
15690+ .iter()
15691+ .map(|&(q, _, _)| {
15692+ let e = encode_sequence(&source, q, 0.5).unwrap();
15693+ (q, e.stream.len(), fnv(&e.stream))
15694+ })
15695+ .collect();
15696+ crate::speed::set_speed(was);
15697+ for (&(q, bytes, hash), &got) in pins.iter().zip(&coded) {
15698+ assert_eq!(got, (q, bytes, hash), "q={q}: the encoder's stream moved");
1569115699 }
1569215700 }
1569315701
lanes/last2.report.mdmodified+7 -0
@@ -136,6 +136,13 @@ comes back (194 s / 171 s against the control's 208 s / 165 s, i.e. inside the
136136 gate's own wall noise), so the cost of the searched arm was indeed the second
137137 motion search — but the reference itself does not pay for its own syntax.
138138
139+**The screen row** (`EC_AV1_NATIVE_SCREEN=1`, the keep rule's third column):
140+control and the search-free arm are BYTE-IDENTICAL at all four quantizers
141+(+19.8% / -30.5%, 143.6 s vs 144.1 s), and the census prints `LAST2 0 of 23942
142+inter blocks` — the screen clip's leaves never take the older picture, so the
143+screen half of the keep rule is neutral either way and the decision rests on
144+the two film rows.
145+
139146 **Fire share, on the real film rows** (the census the gate now prints):
140147
141148 | clip | LAST | LAST2 | GOLDEN | ALTREF | LAST2 share |