Two-stage publication on by default
Browse files at this commit30b0391cfe4f27b5574b64afa537cc8dee06480aParent: 9137abf- perf
- two-stage publication on by default
1 changed file +11 -12
- crates/ec-av1/src/stream.rs +11 -12
crates/ec-av1/src/stream.rsmodified+11 -12
| @@ -1006,18 +1006,17 @@ pub fn decode_stream_with_threads( | |||
| 1006 | decode_idx, | 1006 | decode_idx, |
| 1007 | shown_idx, | 1007 | shown_idx, |
| 1008 | dump.as_deref(), | 1008 | dump.as_deref(), |
| 1009 | - // lane-twostage is OFF by default: it is byte-exact | 1009 | + // lane-twostage publishes a frame's meta at its tile |
| 1010 | - // and the chain shows the producer tail overlapped, | 1010 | + // boundary instead of after its filters, so a consumer |
| 1011 | - // but it does not move the wall (the consumer parses | 1011 | + // parses over its producer's filter tail. It is ON by |
| 1012 | - // only 4.2% of its tile before its first reference | 1012 | + // default since lane-sub8group: with every reference |
| 1013 | - // pixel read, which is shorter than the tail it | 1013 | + // pixel read deferred to the recon workers, the |
| 1014 | - // hides). `EC_AV1_TWO_STAGE=1` publishes a frame's | 1014 | + // consumer parses its WHOLE tile before it needs a |
| 1015 | - // meta at its tile boundary instead of after its | 1015 | + // pixel, and the 4K critical chain shortens by 11-14% |
| 1016 | - // filters; it pays only once the 8x8-leaf, OBMC and | 1016 | + // in three interleaved pairs (14450/10594/14407 ms off |
| 1017 | - // sub-8x8-piece predictions are deferred to the recon | 1017 | + // vs 12790/9207/12463 ms on) where it moved 3-7% |
| 1018 | - // workers as well. | 1018 | + // before. `EC_AV1_TWO_STAGE=0` turns it back off. |
| 1019 | - crate::envflags::var("EC_AV1_TWO_STAGE") | 1019 | + (crate::envflags::var("EC_AV1_TWO_STAGE").as_deref() != Ok("0")) |
| 1020 | - .is_ok_and(|v| v == "1") | ||
| 1021 | .then_some(&stage1 as &dyn Fn(_, _, _, _)), | 1020 | .then_some(&stage1 as &dyn Fn(_, _, _, _)), |
| 1022 | )?; | 1021 | )?; |
| 1023 | // Publish before grain synthesis: every frame waiting on | 1022 | // Publish before grain synthesis: every frame waiting on |