Two-stage reference promises default OFF -- byte-exact, but the overlap is too short to pay
Browse files at this commit4231093b8dff91a428c87850f85002b5721fbe3aParent: 386b506- perf
- two-stage reference promises default OFF -- byte-exact, but the overlap is too short to pay
1 changed file +12 -6
- crates/ec-av1/src/stream.rs +12 -6
crates/ec-av1/src/stream.rsmodified+12 -6
| @@ -1006,13 +1006,19 @@ pub fn decode_stream_with_threads( | ||
| 1006 | 1006 | decode_idx, |
| 1007 | 1007 | shown_idx, |
| 1008 | 1008 | dump.as_deref(), |
| 1009 | - // lane-twostage kill switch: `EC_AV1_TWO_STAGE=0` | |
| 1010 | - // publishes a frame's meta where it always was | |
| 1011 | - // (after its filters), for bisecting a mismatch. | |
| 1009 | + // lane-twostage is OFF by default: it is byte-exact | |
| 1010 | + // and the chain shows the producer tail overlapped, | |
| 1011 | + // but it does not move the wall (the consumer parses | |
| 1012 | + // only 4.2% of its tile before its first reference | |
| 1013 | + // pixel read, which is shorter than the tail it | |
| 1014 | + // hides). `EC_AV1_TWO_STAGE=1` publishes a frame's | |
| 1015 | + // meta at its tile boundary instead of after its | |
| 1016 | + // filters; it pays only once the 8x8-leaf, OBMC and | |
| 1017 | + // sub-8x8-piece predictions are deferred to the recon | |
| 1018 | + // workers as well. | |
| 1012 | 1019 | crate::envflags::var("EC_AV1_TWO_STAGE") |
| 1013 | - .is_ok_and(|v| v == "0") | |
| 1014 | - .then_some(()) | |
| 1015 | - .map_or(Some(&stage1 as &dyn Fn(_, _, _, _)), |()| None), | |
| 1020 | + .is_ok_and(|v| v == "1") | |
| 1021 | + .then_some(&stage1 as &dyn Fn(_, _, _, _)), | |
| 1016 | 1022 | )?; |
| 1017 | 1023 | // Publish before grain synthesis: every frame waiting on |
| 1018 | 1024 | // this slot can start the moment the clean picture exists |