EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Merge main into #2300; Cineon conversion kept in footage_frame_raw (main routes proxies through footage_frame), frame-blend cache key hashes both premul colour and Cineon settings, spec strings combined
bflatastic0754a754aeb4
diff --cc crates/engine/src/cmd/file_more.rsindex c4af0846c,59a824208..6358e7029--- a/crates/engine/src/cmd/file_more.rs+++ b/crates/engine/src/cmd/file_more.rs@@@ -1217,7 -1090,7 +1241,7 @@@ pub fn specs() -> Vec<CommandSpec>"Main...",["File", "Interpret Footage"],Some("Cmd+Alt+G"),- "{items?, frameRate?: fps|\"file\", alpha?: straight|premultiplied|ignore|guess, guessAlpha?, matteColor?, invertAlpha?, loop?, pixelAspect?, fields?: off|upper|lower, colorProfile?: srgb|rec709|rec2020|p3|auto, linearLight?, preserveRgb? (the file's values unconverted), overrideStart?: bool (false: Use Source File Timecode), startTimecode?: timecode|frame (Override Start), logConversion? (Cineon Settings of DPX and Cineon files), cineonUnits?: 10bit|8bit|float, convertedBlack?, convertedWhite?, pointUnits?: 10bit|8bit|float (the units of convertedBlack and convertedWhite; default cineonUnits, else the footage's Units), tenBitBlack?, tenBitWhite? (0..1023), currentGamma? (0.1..10), highlightRolloff? (0..100)}",- "{items?|item?, frameRate?: fps|\"file\", alpha?: straight|premultiplied|ignore|guess, guessAlpha?, matteColor?|premulColor?, invertAlpha?, loop?, pixelAspect?, fields?: off|upper|lower, colorProfile?: srgb|rec709|rec2020|p3|auto, linearLight?, preserveRgb? (the file's values unconverted), overrideStart?: bool (false: Use Source File Timecode), startTimecode?: timecode|frame (Override Start)}",++ "{items?|item?, frameRate?: fps|\"file\", alpha?: straight|premultiplied|ignore|guess, guessAlpha?, matteColor?|premulColor?, invertAlpha?, loop?, pixelAspect?, fields?: off|upper|lower, colorProfile?: srgb|rec709|rec2020|p3|auto, linearLight?, preserveRgb? (the file's values unconverted), overrideStart?: bool (false: Use Source File Timecode), startTimecode?: timecode|frame (Override Start), logConversion? (Cineon Settings of DPX and Cineon files), cineonUnits?: 10bit|8bit|float, convertedBlack?, convertedWhite?, pointUnits?: 10bit|8bit|float (the units of convertedBlack and convertedWhite; default cineonUnits, else the footage's Units), tenBitBlack?, tenBitWhite? (0..1023), currentGamma? (0.1..10), highlightRolloff? (0..100)}",has_footage_selection,interpret),diff --cc crates/engine/src/cmd/proxy.rsindex 358275112,d15f93730..99650875c--- a/crates/engine/src/cmd/proxy.rs+++ b/crates/engine/src/cmd/proxy.rs@@@ -230,7 -229,7 +230,7 @@@ pub fn specs() -> Vec<CommandSpec>"Proxy...",["File", "Interpret Footage"],None,- "{items?|item?, alpha?, matteColor?, invertAlpha?, frameRate?, loop?, pixelAspect?, fields?, colorProfile?, linearLight?, logConversion? (Cineon Settings of DPX and Cineon proxies, as file.interpretFootage), cineonUnits?, convertedBlack?, convertedWhite?, pointUnits?, tenBitBlack?, tenBitWhite?, currentGamma?, highlightRolloff?}",- "{items?|item?, alpha?, guessAlpha?, matteColor?|premulColor?, invertAlpha?, frameRate?, loop?, pixelAspect?, fields?, colorProfile?, linearLight?, preserveRgb?, overrideStart?, startTimecode? (as file.interpretFootage)}",++ "{items?|item?, alpha?, guessAlpha?, matteColor?|premulColor?, invertAlpha?, frameRate?, loop?, pixelAspect?, fields?, colorProfile?, linearLight?, preserveRgb?, overrideStart?, startTimecode? (as file.interpretFootage), logConversion?, cineonUnits?, convertedBlack?, convertedWhite?, pointUnits?, tenBitBlack?, tenBitWhite?, currentGamma?, highlightRolloff? (Cineon Settings of DPX and Cineon proxies)}",has_proxy,interpret_proxy),diff --cc crates/render/src/frames.rsindex 83f8cb5ac,3024dfc52..7d1929ecd--- a/crates/render/src/frames.rs+++ b/crates/render/src/frames.rs@@@ -1,9 -1,6 +1,7 @@@use super::footage::NoFootage;use super::opts::RenderOpts;- use super::{- Arc, EvalCtx, Footage, FrameBlend, FrameRate, Image, ItemId, Layer, LayerSource, Project, Renderer, TICKS_PER_SECOND, Tick, shapes, source_size, text,- };-use super::{EvalCtx, Footage, FrameBlend, FrameRate, Image, ItemId, Layer, LayerSource, Project, Renderer, TICKS_PER_SECOND, Tick, shapes, text};++use super::{Arc, EvalCtx, Footage, FrameBlend, FrameRate, Image, ItemId, Layer, LayerSource, Project, Renderer, TICKS_PER_SECOND, Tick, shapes, text};+use rayon::prelude::*;/// The layer's frame blending mode, if the comp's Enable Frame Blending switch is on./// One field of an interlaced frame as a full frame: the field's lines (`parity` 0 = even /diff --cc crates/render/src/pipeline.rsindex ec89f7a80,d51344923..9b428d1a0--- a/crates/render/src/pipeline.rs+++ b/crates/render/src/pipeline.rs@@@ -738,10 -840,10 +841,14 @@@ impl<'a> Renderer<'a>use std::hash::{Hash, Hasher};let mut h = std::collections::hash_map::DefaultHasher::new();(0x00f8_a3e5_u64, item, i, (w as f32).to_bits(), mode as u8, f.frame_rate.num, f.frame_rate.den, &f.path, float).hash(&mut h);+ (f.alpha as u8).hash(&mut h);+ if f.alpha == effectcraft_project::AlphaMode::Premultiplied {+ f.premul_color.map(f32::to_bits).hash(&mut h);+ }+ if f.cineon_applies() {+ let c = &f.cineon;+ [c.converted_black, c.converted_white, c.black, c.white, c.gamma, c.rolloff].map(f32::to_bits).hash(&mut h);+ }h.finish()});if let (Some(c), Some(k)) = (self.cache, key)diff --cc docs/file-format-parity.mdindex ad3b3c2fe,e10a242fa..50dff8aff--- a/docs/file-format-parity.md+++ b/docs/file-format-parity.md@@@ -48,8 -48,8 +48,8 @@@ trips and renders, checked by tests, no| GIF | R/W | yes | yes (animated) | good || BMP | R | yes | — | good || WebP | — | yes (still; animated WebP as footage with its frames, timing and alpha, #762) | — | beyond After Effects |- | Targa `.tga` | R/W | yes (still and sequence; alpha interpreted on import) | none | good for import (#745); no Targa output |+ | Targa `.tga` | R/W | yes (still and sequence; alpha interpreted on import) | yes (sequence; uncompressed 24-bit RGB or 32-bit RGB + Alpha, straight or premultiplied) | good: import (#745); output reads back through it unchanged; the alpha is not labelled in the file (no TGA 2.0 extension area), so it is interpreted on import |-| DPX / Cineon `.dpx` `.cin` | R/W | yes (still and sequence; 8/10/12/16-bit luma, RGB, RGBA, both byte orders; log code values shown as stored) | none | partial: import (#756); no Interpret Footage ▸ Cineon Settings (log to linear), no DPX output; common in film VFX |+| DPX / Cineon `.dpx` `.cin` | R/W | yes (still and sequence; 8/10/12/16-bit luma, RGB, RGBA, both byte orders; log code values shown as stored, or converted by Interpret Footage ▸ Cineon Settings ▸ Logarithmic Conversion) | none | partial: import (#756) and Cineon Settings; no DPX output; common in film VFX || Radiance `.hdr` | R/W | yes (still and sequence, 32-bit linear float like OpenEXR) | none | good for import (#745); no Radiance output || SGI, PICT, ElectricImage, RLA/RPF images | R | none | none | Legacy; RPF camera data import exists (`keys.rpfCameraImport`) || Camera Raw (DNG, CR3, NEF…) | R (Camera Raw) | none | none | LightCraft has decoders that could be shared |