Files
shaneandshinyobjectz 740f3c2cf4 Engine side of the render-cost work: clip decoding, frame keys, NVENC (#282)
* A page reads a clip on from where it stopped: up to 4 readers a file, so a clip shown twice at once isn't sought every frame

Where two elements showed one 4K clip, they shared one decoder and ffmpeg restarted every frame (31 starts in 30
frames). Each file now keeps up to 4 readers, each reading on from its last frame (the one behind within 60 frames,
else a new one, else the least used), and the frame it read last for a second ask. Those frames: 909 to 53 ms on the
Mac, SSIM 1.000000; a 30 s ad of 4K street-interview clips on the farm's GPUs 277 s and $0.106 to 153 s and $0.033.

* render --keys: each frame's key with nothing drawn, and the largest each clip is drawn

raea render EDIT --keys keys.json steps React through every frame and makes the page match it without reading a clip
or drawing: each frame's key (its elements' place, kind, props and text, each video's file and time, its 3D rows;
paths named from the composition's folder), has3d, the piece's sounds, and the largest each clip is drawn (box as
drawn, transforms and punch-in applied). A render farm keeps runs by these keys and reads clips from copies no larger
than they're drawn. On the ad: 6.7 s for 894 frames; a caption word changed 70 frames' keys, a sound 3 dB louder none
(CR32, CR36).

* RAEA_NV=1: NVENC and NVDEC in the ffmpeg backend, each after a one-frame try on the machine

The render farm sets it on a GPU's runs of a piece with 3D in it. h264_nvenc at libx264's CRF number as constant QP
(SSIM 0.9925 to libx264's 0.9924 on the ad) and clips through CUDA; where a try fails, libx264 and ffmpeg's own,
said once. The answer is kept for the machine's later runs (CR34).

* The face track and render --review's sheets are crates of their own (raea-sys-facetrack, raea-runtime-review): raea-runtime-page and raea-runtime-export are under 2000 lines again

* One opener for a video (raea_io_media::open_video) and one step of React to a frame (step_react), where the render-cost work had copied each

---------

Co-authored-by: shinyobjectz <[email protected]>
2026-11-30 19:16:06 -08:00

351 lines
13 KiB
TOML

# Each crate of ours and its layer (docs/overhaul.md, "Layers"). tools/layers.sh reads this file. A dependency may
# point down to a lower layer. Within a layer, it may point sideways only where the layer allows it: core, io,
# gpu, runtime, apps and tools do; systems don't, except to a crate listed under [facility]. Vendored crates sit
# below everything. A crate missing from this file fails the check: give every new crate its layer here.
# The order, lowest first: core io gpu systems runtime sdk apps tools
[crates]
raea-core-program = "core"
raea-core-tables = "core"
raea-core-scene = "core"
raea-core-shape = "core"
raea-core-meshcheck = "core"
raea-core-sdf = "core"
raea-core-grow = "core"
raea-core-review = "core"
raea-core-zfight = "core"
raea-core-modelbox = "core"
raea-core-facts = "core"
raea-core-solidinfo = "core"
raea-core-place = "core"
raea-shape-web = "runtime"
raea-web = "runtime"
raea-core-wire = "core"
raea-core-alloc = "core"
raea-io-net = "io"
raea-io-net-calls = "io"
raea-io-os = "io"
# raea's own build: the CLI with the signer installed (private)
raea-io-trace = "io"
raea-io-media = "io"
raea-io-assets = "io"
raea-io-clef = "io"
raea-io-gen = "io"
raea-io-gen-comfy = "io"
raea-io-gen-core = "io"
raea-io-gen-fit = "io"
raea-io-home = "io"
raea-io-codec = "io"
raea-io-soft = "io"
raea-io-av1 = "io"
raea-io-ffmpeg = "io"
raea-io-apple = "io"
raea-io-apple-coding = "io"
raea-io-alpha = "io"
raea-io-capcut = "io"
raea-io-shell = "io"
raea-core-animate = "core"
raea-core-ease = "core"
raea-core-fonts = "core"
raea-sys-animate = "systems"
raea-gpu-device = "gpu"
raea-core-k = "core"
raea-core-calls = "core"
raea-core-brief = "core"
raea-core-ask = "core"
raea-sys-k = "systems"
raea-sys-mix = "systems"
raea-sys-mix-level = "systems"
raea-sys-mix-device = "systems"
raea-sys-tone = "systems"
raea-seedling = "systems"
raea-sys-ml = "systems"
# MLX on Apple silicon, beside raea-sys-ml's ONNX Runtime (empty on other systems)
raea-sys-mlx = "systems"
# Kimodo's text to SOMA motion on MLX (raea motion; docs/character.feature CH15c)
raea-sys-kimodo = "systems"
raea-sys-speech = "systems"
raea-sys-layout = "systems"
raea-sys-vision = "systems"
# Index's fast pass (docs/index.feature): pictures embedded on the Neural Engine, searched by words
raea-sys-index = "systems"
# raea fix: raea's own fixes and the community library (SQLite FTS5), looked up by symptom
raea-sys-fixes = "systems"
# Fingerprint (docs/fingerprint.feature): the columns its heads read, and the heads
raea-sys-columns = "systems"
raea-sys-fingerprint = "systems"
raea-sys-fingerprint-use = "systems"
raea-sys-fingerprint-things = "systems"
raea-sys-song = "systems"
raea-sys-perceive = "systems"
raea-sys-footage = "systems"
raea-perceive = "tools"
raea-bridge-bench = "tools"
raea-bevy-parity = "tools" # Bevy's own examples with the parity probe (docs/control.feature FC0a)
raea-lightbench = "tools" # LightBench (bench/lightbench): a test renderer on Bevy alone, proving lighting before it moves into raea
raea-rerender-ios = "tools" # RR0's film on the iPhone (bench/rerender/ios): a static library the bench app calls
raea-sys-parity = "systems" # the parity probe, in raea's App and the examples'
raea-bench-swatch = "systems" # a Blitz widget fixture (bench/bridge/swatch) the plugin catalog declares: a leaf on vendored crates, so a runtime crate may build it in
raea-render = "runtime"
raea-render-raytrace = "runtime"
raea-render-plugins = "runtime"
raea-runtime-ecs = "runtime"
raea-runtime-kinds = "runtime"
# `raea light check`: raealism's measures (docs/realism.feature LT1)
raea-light = "runtime"
# `raea bench denoise`: each denoiser against its converged truth (docs/denoise.feature DN0), on raea light's runner
raea-denoise-bench = "runtime"
raea-bevy-plugins = "runtime"
raea-bevy-calls = "runtime"
raea-bevy-adapters = "runtime"
wsx = "systems"
raea-native = "runtime"
raea-modules = "runtime"
raea-io-npm = "io"
raea-bevy-world = "runtime"
raea-runtime-js = "runtime"
raea-runtime-jsengine = "runtime"
raea-sys-a11y = "systems"
raea-sys-bake = "systems"
raea-sys-contact = "systems"
raea-sys-notice = "systems" # raea scene faults: whether a viewer would notice a lint finding
raea-sys-motionfaults = "systems" # raea scene faults --clip: faults that only show in motion
raea-sys-light-meter = "systems"
raea-sys-stage = "systems" # SG10-SG14: 3D type that reads, parts that don't snap, a camera that settles, a composed frame
raea-sys-measure = "systems"
raea-sys-canvas = "systems"
raea-sys-tweak = "systems"
raea-sys-filters = "systems"
raea-sys-weathering = "systems"
raea-sys-atlas = "systems"
raea-sys-runoff = "systems"
raea-sys-touch = "systems"
raea-sys-exposure = "systems"
raea-sys-damage = "systems"
raea-sys-glb = "systems"
raea-sys-procmat = "systems"
raea-sys-grass = "systems"
raea-sys-page = "systems"
raea-sys-page-net = "systems"
raea-sys-page-ops = "systems"
raea-sys-frame = "systems"
# a take's face track (TAKE.faces.json), for <Video framing="face">
raea-sys-facetrack = "systems"
raea-sys-shots = "systems"
raea-sys-hold = "systems"
raea-sys-body = "systems"
raea-sys-grab = "systems"
raea-sys-splat = "systems"
raea-sys-sprite = "systems"
raea-sys-rt = "systems"
raea-sys-memtally = "systems" # RM0: what each App holds in meshes and images, CPU and GPU, at each mark (docs/render-memory.feature)
raea-sys-gi = "systems"
raea-sys-engine-shaders = "systems"
raea-sys-lod = "systems"
raea-sys-foliage = "systems"
raea-sys-text3d = "systems"
raea-runtime-gpuframe = "runtime"
raea-runtime-scene3d = "runtime"
raea-sys-screen = "systems"
raea-sys-matchmove = "systems"
raea-sys-grid = "systems"
raea-sys-viewbox = "systems"
raea-sys-rendermap = "systems"
raea-sys-meshseq = "systems"
raea-sys-environment = "systems"
raea-sys-look = "systems"
raea-sys-compose = "systems"
raea-sys-material = "systems"
raea-sys-toon = "systems"
raea-sys-mesh = "systems"
raea-sys-layers = "systems"
raea-sys-framepass = "systems"
raea-sys-compute = "systems"
raea-sys-phase = "systems"
raea-sys-sampler = "systems"
raea-sys-shader = "systems"
raea-sys-shader-wgsl = "systems"
raea-sys-copies = "systems"
# equal parts share one mesh and material, let go once no part holds them (runtime/scene3d re-exports it)
raea-sys-share = "systems"
raea-sys-three-shader = "systems"
raea-sys-post = "systems"
raea-sys-fog = "systems"
raea-sys-fog-half = "systems"
raea-sys-volume = "systems"
raea-sys-fonts = "systems"
raea-sys-image = "systems"
raea-runtime-twins = "runtime"
raea-runtime-dom = "runtime"
raea-runtime-dom-media = "runtime"
raea-runtime-edit = "runtime"
raea-runtime-input = "runtime"
raea-runtime-bake = "runtime"
raea-runtime-bundle = "runtime"
raea-runtime-bundle-lib = "runtime"
raea-runtime-calls = "runtime"
raea-runtime-shots = "runtime"
raea-runtime-segments = "runtime"
raea-runtime-canvas = "runtime"
raea-runtime-wear = "runtime"
raea-runtime-export = "runtime"
raea-runtime-pagestore = "runtime"
# render --review's tiles and sheets (raea-runtime-export measures and places the cameras)
raea-runtime-review = "runtime"
raea-runtime-cssurls = "runtime"
raea-runtime-pid = "runtime"
raea-runtime-page = "runtime"
raea-runtime-appscreen = "runtime"
raea-runtime-sound = "runtime"
raea-runtime-view = "runtime"
raea-runtime-world = "runtime"
raea-runtime-encode = "runtime"
raea-runtime-endchecks = "runtime"
raea-runtime-lod-plan = "runtime" # MK21: a part planned far or as a grey box that a shot shows closer than its plan
raea-runtime-plugins = "runtime"
raea-runtime-live = "runtime"
raea-runtime-look = "runtime"
raea-runtime-scene = "runtime"
raea-runtime-scene2d = "runtime"
raea-runtime-shared = "runtime"
raea-page = "runtime"
raea-app-check = "apps"
raea-app-check-cause = "apps"
raea-app-check-flash = "apps"
raea-app-check-inbox = "apps"
raea-app-check-make = "apps"
raea-app-check-read = "apps"
raea-app-check-text = "apps"
raea-app-direction = "apps"
raea-app-notes = "apps"
# `raea fingerprint`: its verbs and the resident service that keeps the encoders loaded
raea-app-fingerprint = "apps"
raea-app-sound = "apps"
raea-app-ci = "apps"
raea-app-tools = "apps"
raea-app-motion = "apps"
raea-app-engines = "apps"
raea-app-interchange = "apps"
raea-app-judge = "apps"
raea-app-make = "apps"
raea-app-scene = "apps" # raea scene lint|explain|light|stage
raea-app-voice = "apps" # raea voice: speech to speech on this computer, as lines of JSON
raea-app-ask = "apps"
raea-app-lightbake = "apps" # raea make bake light (docs/bake.feature)
raea-sys-lightbake = "systems" # light baked over raea/wear's atlas on raea's ray tracer (docs/bake.feature)
raea-app-double = "apps"
raea-app-solid = "apps"
raea-app-media = "apps"
raea-app-targets = "apps"
raea-app-game = "apps"
raea-app-capcut = "apps"
raea-app-layers = "apps"
raea-app-play = "apps"
raea-app-playable = "apps"
raea-page-host = "runtime"
raea-rune-host = "runtime"
raea-rune-page = "runtime"
raea-rune-media = "runtime"
raea-rune-look = "runtime"
raea-rune-style = "runtime"
raea-rune-js = "runtime"
raea-rune-bevy = "runtime"
raea-rune-layer = "runtime"
raea-rune-slots = "runtime"
raea-page-stage = "runtime"
raea-page-window = "runtime"
raea-page-ax = "runtime"
raea-page-sound = "runtime"
raea-runtime-react = "runtime"
raea-runtime-track = "runtime"
raea-cli = "apps"
raea-cli-goal = "apps" # raea goal's verbs in the command line
raea-cli-refused = "apps" # what a refused render changed
raea-neural = "runtime"
raea-app-registry = "apps"
raea-app-workspace = "apps"
raea-bundle = "apps"
raea-sdk-props = "tools"
conformance = "tools"
ui-parity = "tools"
ui-parity-compare = "tools"
conformance-fake = "tools"
rtools = "tools"
skillcheck = "tools"
seetool = "tools"
raea-hands-audit = "tools"
# systems that hold only a facility another system may build on (docs/overhaul.md: the mixer graph, ONNX sessions,
# Vision requests, K kernels on the GPU)
[facility]
# the frame's rows every pass reads (FrameRows, the edit, the clock, row helpers)
raea-sys-frame = true
# cuts between cameras: the frames that start a shot and the last cut drawn (raea-sys-frame re-exports it)
raea-sys-shots = true
# the layer pass's keys, table, raster and NAME.layers (raea-sys-frame records the 3D through it)
raea-sys-layers = true
# a row's standard material and its maps (meshseq builds its mesh's on it)
raea-sys-material = true
# a row's mesh from JSON, Bevy's primitives by name (materials and reflected Mesh handles build on it)
raea-sys-mesh = true
# the character's rig, poses, forward kinematics, IK and joint limits (what the hands do with things builds on it)
raea-sys-body = true
# how a texture is read (materials, shaders and models set it the same way)
raea-sys-sampler = true
# a shader's inputs, accessors and registration (surface shaders and frame passes share them)
raea-sys-shader = true
# a WGSL source read as text: uniform and storage layouts, bindings renumbered (raea-sys-shader builds on it)
raea-sys-shader-wgsl = true
# the pass mask (looks and the paint look read which pass drew each pixel)
raea-sys-compose = true
# ink outlines (the frame's look sets its camera's)
raea-sys-post = true
# the froxel grid and glass fogged through it (looks and greybox surfaces keep a mesh's fog copy)
raea-sys-fog = true
# simulated volumes (a fire row with a sim is one)
raea-sys-volume = true
# the scene's ray tracing (the traced-light pass reads its scene)
raea-sys-rt = true
raea-sys-mix = true
# the mix before the master: dialogue at one level, room tone at the joins (the mix masters what it gives)
raea-sys-mix-level = true
# the mixer's output: the device stream live play runs in, followed when the system's output changes
raea-sys-mix-device = true
raea-sys-tone = true
raea-sys-ml = true
raea-sys-mlx = true
raea-sys-layout = true
raea-sys-vision = true
# a file's encoder columns (Fingerprint's heads read them)
raea-sys-columns = true
# a fingerprint's taxonomy, evidence and heads (raea-sys-fingerprint-use scores, compares and picks with them)
raea-sys-fingerprint = true
# grow, profile and the heads' readings over a file (raea-sys-fingerprint-things reads things on them)
raea-sys-fingerprint-use = true
raea-sys-song = true
raea-sys-k = true
raea-sys-procmat = true
# trees grown by species as meshes: crowns, leaves, bark and roots (the city's tree LODs build on them)
raea-sys-foliage = true
raea-sys-canvas = true
raea-sys-filters = true
raea-sys-page = true
# a page's loads (raea-sys-page's net)
raea-sys-page-net = true
# the op wire applied to a page (raea-sys-page's ops)
raea-sys-page-ops = true
raea-sys-fonts = true
raea-sys-image = true
# rain's run-off over a model's surfaces (the weathering bake builds its flow and stains on it)
raea-sys-runoff = true
# where hands, feet and wheels wear a model, and where things belong (the weathering bake's touch and spots)
raea-sys-touch = true
# what a model is exposed to through the year: the sun by date, driven snow, where blown things settle (the weathering bake's causes3)
raea-sys-exposure = true
# where a building breaks: cracks from its openings' corners, how readily a coat comes off, debris under the losses (the weathering bake's causes3 a and debris)
raea-sys-damage = true
# a .glb read as JSON and bytes and written back (the weathering bake reads and rewrites models through it)
raea-sys-glb = true
# the atlas raea's bakes share: charts, packing, each texel's point (the cause maps and the light bake lie over it)
raea-sys-atlas = true