FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust
Count H.264 conversion done ahead on the render threads as convert time
NetterSilver69f8d63e6c8d
diff --git a/crates/export/src/encoders.rs b/crates/export/src/encoders.rsindex 841567cd2..1a49cc542 100644--- a/crates/export/src/encoders.rs+++ b/crates/export/src/encoders.rs@@ -435,7 +435,7 @@ impl VideoEncoder for H264Encoder {let (ready, signal) = (self.ready.clone(), self.signal);Some(Arc::new(move |f: &EncoderFrame| {let (mut y, mut u, mut v) = (Vec::new(), Vec::new(), Vec::new());- h264_input(f, signal, &mut y, &mut u, &mut v);+ timed(Stage::Convert, || h264_input(f, signal, &mut y, &mut u, &mut v));ready.lock().unwrap_or_else(PoisonError::into_inner).insert(f.index, (y, u, v));}))}diff --git a/crates/export/src/stats.rs b/crates/export/src/stats.rsindex 2c80ac419..549b15b21 100644--- a/crates/export/src/stats.rs+++ b/crates/export/src/stats.rs@@ -51,7 +51,8 @@ pub enum Stage {Render,/// Encoding the rendered frames, colour conversion included (serial).Encode,- /// The part of [`Stage::Encode`] spent converting RGB to the encoder's YUV.+ /// Time spent converting RGB to the encoder's YUV: part of [`Stage::Encode`], or, when the encoder+ /// converts ahead ([`crate::VideoEncoder::prepare_ahead`]), summed over the render threads.Convert,/// Mixing and encoding audio and writing it to the container.Audio,