Expand description
The expression language (docs/compositing.md#expressions): ffmpeg’s function names and
semantics over f64, plus easing, lerp, smoothstep, and stateless random and noise.
A source string is tokenised, parsed by precedence climbing into an AST, resolved against a
Scope (names to variable slots), constant-folded and flattened to stack ops. Evaluating
the ops is a pure function of the Frame: no state, no loops, so it always terminates.
Structs§
- Compiled
- A compiled expression: evaluates in about a hundred nanoseconds.
- Expr
Error - A compile error: what is wrong and where (1-based column, in characters).
Constants§
- MAX_
ARGS - Most arguments a call takes (
min,max). - MAX_
DEPTH - Deepest accepted nesting (parentheses, calls, unary operators, the right side of
^, and each operator of a chain likea + b + c, which nests to the left). - MAX_LEN
- Longest accepted source, bytes.
Functions§
- is_
builtin_ name - Names an expression can’t use for anything else (
varsmay not shadow them). - noise
noise(seed, x): value noise in [-1, 1], smooth inx(lattice values at integers, eased with the quintic fade between them).- random
random(seed)on framen: uniform in [0, 1), the same on every render.