Initial commit: video effects processing system

Add S-expression based video effects pipeline with modular effect
definitions, constructs, and recipe files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-19 12:34:45 +00:00
commit 406cc7c0c7
171 changed files with 13406 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
;; Layer effect - composite frame-b over frame-a at position
;; Multi-input effect: uses frame-a (background) and frame-b (overlay)
;; Params: x, y (position), opacity (0-1), mode (blend mode)
(define-effect layer
((x 0) (y 0) (opacity 1.0) (mode "alpha"))
(let [bg (copy frame-a)
fg frame-b
;; Resize fg if needed to fit
fg-w (width fg)
fg-h (height fg)]
(if (= opacity 1.0)
;; Simple paste
(paste bg fg x y)
;; Blend with opacity
(let [blended (if (= mode "alpha")
(blend-images (crop bg x y fg-w fg-h) fg opacity)
(blend-images (crop bg x y fg-w fg-h)
(blend-mode (crop bg x y fg-w fg-h) fg mode)
opacity))]
(paste bg blended x y)))))