Commit Graph
2177 Commits
Author SHA1 Message Date
BFlat b771f171d0 Merge pull request #2341 from vangel76/camtrack-validate-input
Camera tracking: validate solver input and bound workspaces
2026-10-29 10:08:05 +07:00
BFlat 6efe743a95 Merge pull request #2334 from vangel76/trkx-face-polygon-rows
Face tracker: find polygon crossings once per window row
2026-10-29 10:07:53 +07:00
vangel76andClaude Sonnet 5.5 1ec9947efb Merge upstream/main into camtrack-validate-input
Conflict in crates/track/src/camtrack/bundle.rs (imports): upstream replaced
the linalg glob import with an explicit list; kept that list and added the
branch's SolveError import (use super::{Distortion, SolveError}). Input
validation, size budget and Result-returning adjust/cost are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 15:28:34 +01:00
vangel76andClaude Sonnet 5.5 130298ef82 Merge upstream/main into trkx-face-polygon-rows
Conflict in crates/track/src/face.rs: upstream moved the feature-blob search
into FaceTracker::feature_blobs. Re-applied the branch there: the per-pixel
point-in-polygon loop is replaced by non_skin_inside (one crossing pass per
window row) and the roll rotation is hoisted with face_mapper.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 15:24:18 +01:00
Matej Kozlovský 6e69b91a80 Export: H.264 frames convert to YUV 4:2:0 on the GPU
Accelerator::comp_frame_yuv420 (default None) renders a top-level comp frame and
converts it over the background to the H.264 export's 8-bit BT.709 limited-range
4:2:0, every byte within one level of the CPU conversion (the GPU kernel follows
it operation for operation, including NaN and half-away-from-zero ties, but a
driver may contract its arithmetic). A 4K frame then reads back 12 MB of planes
instead of 133 MB of RGBA f32.

The H.264 export asks the accelerator for planes when a frame needs nothing after
the render (progressive, project depth, no crop/resize, rendered at the output
size) and otherwise renders and converts on the CPU as before. Deferred
readbacks (a browser worker) keep the pass-based path. Sizes the kernel can't
take (width not a multiple of 8, odd height) are declined before any GPU work.

Like Cx::frames, h264_frames caps GPU frames in flight only while the
accelerator is up (map_frames_while with the same liveness check): once the GPU
stops for good, the remaining frames render on the CPU side by side instead of
one at a time.

rgba_to_yuv420 moves to effectcraft_raster::yuv so the export and the GPU tests
share one reference. The GPU tests skip without an adapter (tests::gpu()), as
the crate's others do.
2026-10-28 13:19:24 +01:00
Dylan M. Taylor 6194a157d7 Refactor automation tests for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 6e72ab3b57 Refactor ui-egui for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor f20d22bf36 Refactor engine for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor d01871516a Refactor effects for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 5d71dce7fc Refactor render for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 7926b8bd31 Refactor gpu for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 1d2c0d4248 Refactor script for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor c8994a2cfe Refactor hevcenc for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 3bc15c7c17 Refactor vp9enc for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 8e67bfce47 Refactor av1enc for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 7c27d88030 Refactor opusenc for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 072f2619bd Refactor export for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor d171d6cf88 Refactor project for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor f26f30871c Refactor track for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 51b910657d Refactor pdf for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 388ebc10ac Refactor psd for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 87e42c150c Refactor segment for strict Clippy checks 2026-10-28 06:09:21 +00:00
Dylan M. Taylor 7c74960c6f Refactor text for strict Clippy checks 2026-10-28 06:09:20 +00:00
Dylan M. Taylor 8d34f1d449 Refactor media for strict Clippy checks 2026-10-28 06:09:20 +00:00
Dylan M. Taylor 2fd6c448c5 Refactor expr for strict Clippy checks 2026-10-28 06:09:20 +00:00
Dylan M. Taylor e55e288397 Refactor raster for strict Clippy checks 2026-10-28 06:09:20 +00:00
Dylan M. Taylor d562e10acf Refactor path for strict Clippy checks 2026-10-28 06:09:20 +00:00
aiongg dd12ed8f9c Merge pull request #2518 from Silvertree2010/perf/export-speed
Export: encode while the next batch renders, skip transparent pixels when compositing
2026-10-27 13:42:31 -04:00
vangel76andClaude Sonnet 5.5 6418c8c0a4 Merge upstream/main into camtrack-validate-input
Upstream split lib.rs files into modules and moved engine commands/ to cmd/; this branch's change merges without textual conflicts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 17:51:50 +01:00
NetterSilverandClaude Opus 5.5 94399e62ff Pin movie export bytes
H.264 and ProRes exports of a 60-frame comp (several render batches, a
rotating stroked ring, a fading solid at a fractional position, a
Screen-mode shape, 8 bpc) must keep the exact bytes main wrote before the
two previous commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:40:41 +01:00
NetterSilverandClaude Opus 5.5 db41fa7980 Skip transparent pixels and quantise while compositing
Much of a layer buffer is often transparent (a stroked ring, a glow-padded
text layer, a precomp canvas), yet every destination pixel sampled it
bilinearly, and 8/16 bpc comps then re-quantised the layer's whole rotated
bounding box.

- Bilinear warps skip 16x16 source tiles whose pixels (and a one-pixel
  apron) all have zero alpha: their samples are transparent and were never
  drawn.
- The fast affine warp reports the rectangle it changed and, given the
  comp's levels, quantises each pixel as it blends it, so draw_comp has
  nothing left to re-quantise for that layer. quantize_px moves to
  effectcraft-raster for this.
- quantize_rect skips runs of four all-zero (+0.0) pixels, which quantise
  to themselves.
- to_rgba8 / to_rgba8_over convert row by row instead of per 4-byte item.

Every pixel stays bit-identical: tests compare the warp against the
reference path, fused quantising against quantising after blending, and
the zero-run skip against per-pixel quantising.

With the previous commit, demo comp to H.264 (`cargo xtask bench --scenario
demo --format h264 --frames 300`, 11 interleaved runs on a 16-thread Ryzen):
wall 9.26 s -> 6.97 s median (-24.8%), 8.55 s -> 6.55 s min (-23.3%); CPU
time -23%. Output byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:40:41 +01:00
NetterSilverandClaude Opus 5.5 d8bca3cdd9 Overlap movie encoding with rendering
Movie exports (H.264, HEVC, AV1, ProRes, uncompressed) rendered a batch of
frames on every core, then encoded it frame by frame while the render
threads waited. Each batch now encodes on a pool shared by all exports while the
next batch renders (Cx::frames_beside). With deferred GPU readbacks, or
where no thread can be started (wasm without threads), the two still take
turns. A panicking encoder becomes an export error.

H.264 frames are converted to 4:2:0 on the render threads, per frame, instead
of on the encoder's critical path. The conversion reads 8-bit levels from a
table and rounds without a libm call; both give the same values as before
(tested against the previous formula).

Demo comp (1920x1080, 300 frames) to H.264 on a 16-thread Ryzen, export
wall time -6% (median of 7 interleaved runs); output byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:40:41 +01:00
aiongg bc4b48f67d fix(ui): dropdown menus grow back after a search with no matches (#2511)
* fix(ui-egui): craft_ui::ComboBox for every combo box, so open menus grow back (egui#5225)

Repins craft-libs to aiongg/craft-libs 60d60d48 (storytold main with the shared
dropdown) and bans egui::ComboBox in clippy.toml.

* fix(ui-egui): font menu under the font field is a craft_ui combo menu that grows back

The filter row is the menu's header and only the font list scrolls, so a search
that matched nothing grows the menu back when it is cleared.

* chore(deps): craft-libs 4d7b82f7 (dropdown fixes)

* chore(deps): craft-libs 92d392cf (#387 merged)

* chore(xtask): pdf-deps expects craft-libs 92d392cf
2026-10-27 10:27:52 -04:00
aiongg b7b75ed37a style: cargo fmt on the moved files 2026-10-26 21:54:30 +00:00
aiongg 3e38bd7349 refactor(pdf): split the PostScript interpreter ps.rs into ps/*.rs 2026-10-26 21:49:12 +00:00
aiongg 5cb742591c refactor(effects): split ocio.rs into ocio/*.rs 2026-10-26 21:49:12 +00:00
aiongg 13fe6e5c03 refactor(effects): split sim.rs into sim/*.rs 2026-10-26 21:49:12 +00:00
aiongg 67ef9ad93c refactor(effects): split sim2.rs into sim2/*.rs 2026-10-26 21:49:12 +00:00
aiongg b05467e47f refactor(effects): split generate3.rs into generate3/*.rs 2026-10-26 21:49:12 +00:00
aiongg f5f51f8db8 refactor(ui-egui): move viewer frame, geometry, gestures, shapes, tools and view parts to panels/viewer/*.rs 2026-10-26 21:49:12 +00:00
aiongg 9b52c71a71 refactor(ui-egui): move viewer tests to panels/viewer/tests.rs 2026-10-26 21:49:12 +00:00
aiongg 319d2cba3b refactor(ui-egui): move menu commands, dispatch, entries, shortcuts and the menu bar to menus/*.rs 2026-10-26 21:49:11 +00:00
aiongg 03f5ba581d refactor(ui-egui): move EffectcraftApp methods to app/*.rs 2026-10-26 21:49:11 +00:00
aiongg 0eea2d67ab refactor(ui-egui): move app constructors and eframe::App to app.rs, clock and hooks to their own files, screenshot and playback state to state.rs 2026-10-26 21:49:11 +00:00
aiongg da99df18b4 refactor(ui-egui): move lifecycle_tests to lifecycle_tests.rs 2026-10-26 21:49:11 +00:00
aiongg e59048107a refactor(ui-egui): move Effect Controls panel parts to panels/effect_controls/*.rs 2026-10-26 21:49:11 +00:00
aiongg 5c6375c7ea refactor(psd): move limits, model, parsing and pixel decoding out of lib.rs 2026-10-26 21:49:11 +00:00
aiongg 80453e8673 refactor(psd): move the test counters module to counters.rs 2026-10-26 21:49:11 +00:00
aiongg 55ab7b556c refactor(project): move settings, comp, layer, footage and item types out of lib.rs 2026-10-26 21:49:11 +00:00
aiongg cbce15f069 refactor(render): move footage, effect host, accelerators, options, pipeline, layers and frames out of lib.rs 2026-10-26 21:49:11 +00:00