Measure the encoder's first decode -- 94% of it is parse, not reconstruction
Browse files at this commit591f575f30e17e983a21852658474d6fd242ca5fParent: c9c94fc- perf
- measure the encoder's first decode -- 94% of it is parse, not reconstruction
1 changed file +14 -0
- crates/ec-av1/src/decode.rs +14 -0
crates/ec-av1/src/decode.rsmodified+14 -0
| @@ -3245,6 +3245,20 @@ fn exec_op( | |||
| 3245 | preds: &[u16], | 3245 | preds: &[u16], |
| 3246 | fctx: &crate::decode::FrameCtx, | 3246 | fctx: &crate::decode::FrameCtx, |
| 3247 | ) { | 3247 | ) { |
| 3248 | + // lane-nbpub instrument: `EC_AV1_NORECON=1` drops every recorded pixel | ||
| 3249 | + // write, leaving the entropy parse and the per-mi neighbour bookkeeping | ||
| 3250 | + // alone. It makes the encoder's own streams garbage, so it is a | ||
| 3251 | + // MEASUREMENT rung only -- what it measures is how much of the encoder's | ||
| 3252 | + // first decode of its own tiles (`par::S_FIRST`) is reconstruction and | ||
| 3253 | + // how much is parse. Answer at 3840x1608 (4 frames, 4x2 tiles, 8 tile | ||
| 3254 | + // threads): 150 ms -> 141 ms, i.e. the reconstruction is 6% of that | ||
| 3255 | + // stage and the parse plus the neighbour grids are the other 94%. That | ||
| 3256 | + // is why handing the decoder the encoder's own reconstruction cannot | ||
| 3257 | + // shrink the stage: only publishing the per-mi neighbour state the | ||
| 3258 | + // filters read (and so never parsing at all) can. | ||
| 3259 | + if crate::envflags::env_flag!("EC_AV1_NORECON") { | ||
| 3260 | + return; | ||
| 3261 | + } | ||
| 3248 | let mut scratch = Vec::new(); | 3262 | let mut scratch = Vec::new(); |
| 3249 | match op { | 3263 | match op { |
| 3250 | ReconOp::Pred(b) => (b.0)(y, u, v, fctx, cur), | 3264 | ReconOp::Pred(b) => (b.0)(y, u, v, fctx, cur), |