effectcraft/docs
daijro 74b151cedc Footage: reduced-resolution renders get movie frames converted at their size
Cause: at Half, Third and Quarter resolution (the viewer's Auto resolution
in most windows) every movie frame was converted from Y'CbCr to f32 RGBA at
full size and then resampled down. In the browser (wasm, one thread) that
was about 8 ms converting a 1080p frame, 6 ms resampling it and 2 ms
zeroing a 33 MB buffer, per layer and frame, for a frame shown at a
quarter or a ninth of its pixels; the footage frame cache held the
full-size frames.

Fix: FootageSource::frame_at_size asks for a frame shown at a given size
(default: the full frame, as before). The renderer asks for it where it
resampled footage (below 3/4 scale; not for proxies, fields or Interpret
Footage's pixel options, which need the full frame). MediaPool makes opaque
4:2:0 movie frames of the footage's own size there: it box-filters them to
half size in Y'CbCr before converting (each 2x2 block of luma, and the
[1 6 1]/8 neighbourhood of its chroma sample, which is the mean of the
upsampled chroma its pixels get), resamples the rest of the way and caches
the result per size. Conversion is linear until colours clip, so this is
the RGB box filter resample starts with, except in blocks where some
colours clip. Other frames convert at full size and resample as before.
In the browser the conversion and resampling take about 4 ms instead of
16. Docs (architecture).

Tests:
- convert::scaled_conversion_matches_resampling_the_converted_frame: half,
  third, quarter and odd sizes of an unclipped 4:2:0 frame are within 1e-5
  of resampling the converted frame; larger sizes, odd frame sizes and
  4:4:4 convert at full size.
- tests_footage_size::reduced_renders_take_footage_resampled_by_the_source:
  a source that resamples frames itself renders the same frames as one
  that doesn't, at 8 and 32 bpc and every resolution, and is asked only
  below 3/4 scale, and not with Invert Alpha.
- footage::h264_frames_at_reduced_sizes (ffmpeg fixture): 1080p H.264
  testsrc2 frames, whose saturated colours clip, at 960x540, 640x360,
  480x270 and 323x182 are 58-62 dB from the resampled full frames, and
  are cached per size.
- convert's ignored 1080p bench also times the conversion at a third.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 16:44:49 -05:00
..
brand Licensing: standard LICENSE files, NOTICE, ArtCraft brand terms 2026-10-04 10:05:24 -04:00
fidelity G2: improve editing reliability and Windows rendering fidelity 2026-10-06 00:00:31 -05:00
images M0.11: README rewrite with headless screenshots (hero, graph editor, effects, 3D, render queue) 2026-10-01 23:31:40 -04:00
agents.md Timeline: every property has a pick whip in the Parent & Link column (#363) 2026-10-10 00:28:22 +07:00
architecture.md Footage: reduced-resolution renders get movie frames converted at their size 2026-10-09 16:44:49 -05:00
contributors.md About: contributor and model credits compiled in (grab bag + table, self-submitted names) (#228) 2026-10-07 21:16:47 -04:00
control-protocol.md Viewer: the Snapping menu has After Effects' two options 2026-10-09 21:03:12 +07:00
effects.md Effects: CC Particle World follows the comp camera (#397) 2026-10-10 00:35:25 +07:00
footage.md Import: Interpret Footage ▸ Preserve RGB keeps the file's values (#411) 2026-10-09 23:57:12 +07:00
gaps.md Effects: CC Particle World follows the comp camera (#397) 2026-10-10 00:35:25 +07:00
mcp.md MCP: report render progress and handle cancellation 2026-10-09 00:20:22 -07:00
parity.md Effects: CC Particle World follows the comp camera (#397) 2026-10-10 00:35:25 +07:00
plugins.md Plug-ins: Ease Presets moves out of core into a bundled ScriptUI panel 2026-10-09 21:03:12 +07:00
preferences.md Web: the layer and footage caches stay small enough for eight stacked clips 2026-10-09 16:44:15 -05:00
releasing.md Release: FreeBSD x86_64, Flatpak x86_64 + aarch64, AppImage zsync updates; README Downloads (#287) 2026-10-08 09:48:00 -04:00
testing.md Effects: the sim golden test accepts macOS 27's libm hash for Mr. Mercury (#232) 2026-10-08 13:36:09 +07:00
web.md Web: the layer and footage caches stay small enough for eight stacked clips 2026-10-09 16:44:15 -05:00