Skip to main content

Crate ffcine_reframe

Crate ffcine_reframe 

Source
Expand description

Reframe (roadmap step 5, docs/design.md#roadmap, docs/reframe.md): keyframed crop windows for punch-ins, eased push-ins, pans and vertical aspect windows (9:16 reels, 4:5 feed) from 16:9 sources, evaluated in Rust per frame and applied as the crop/scale of the libplacebo grade pass. Replaces the prototype’s per-frame libplacebo crop expressions (render.py gpu_geo), without their pixel rounding: windows are f64 until libplacebo resamples them sub-pixel.

Re-exports§

pub use geo::Geo;
pub use geo::Mapped;
pub use keyframe::Interp;
pub use keyframe::Key;
pub use keyframe::Keyed;
pub use profile::Profile;
pub use profile::SafeArea;
pub use reframe::Fit;
pub use reframe::Frame;
pub use reframe::Punch;
pub use reframe::Reframe;
pub use reframe::Shot;
pub use reframe::Slide;
pub use window::Rect;

Modules§

geo
The NLE importers’ ffcine.geo.crop/1 and ffcine.geo.transform/1 (docs/timeline.md) on a clip’s picture, evaluated per frame into one map from output pixels to source pixels and a source-side crop mask. crate::pass::apply_mapped samples it in the grade pass, composed with the reframe window and the stabilizer’s warp, so the picture is resampled once more at most (as on the warp path).
keyframe
The one keyframe form, [{"t": RationalTime, "v": value, "interp": "linear" | "ease" | "hold"}] (docs/timeline.md#effect-schemas), evaluated in Rust per frame.
pass
Reframe in the grade pass: the per-frame windows become Grade::crops (libplacebo’s own sub-pixel crop and EWA scaler), or, with a stabilizer warp, one MAIN hook that samples the source at warp_i * crop_i so warp and crop are a single resample in the same pl_render_image call.
profile
Render profiles: the output frame a timeline is reframed into. One timeline renders to several aspects (16:9 master, 9:16 reels, 4:5 feed) by rendering it once per profile; the reframe effect can carry per-profile overrides (profiles: {name: {...}}, crate::Reframe).
reframe
ffcine.geo.reframe/1: the prototype’s zoom / punch / push / pan / fit fields (edit.yaml, render.py gpu_geo), any of zoom, zoom_center, crop_x, crop_y also in the keyframe form, plus per-profile overrides. Evaluated per output frame into a crop window.
window
Crop windows in source pixels, kept as f64 end to end: nothing is rounded, so a moving window moves by fractions of a pixel and its size never steps out of sync with its position.