Files
test/sexp_effects/effects/fisheye.sexp
gilesb 406cc7c0c7 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>
2026-01-19 12:34:45 +00:00

15 lines
560 B
Common Lisp

;; Fisheye effect - barrel/pincushion lens distortion
;; @param strength float [-1, 1] default 0.3
;; @param center_x float [0, 1] default 0.5
;; @param center_y float [0, 1] default 0.5
;; @param zoom_correct bool default true
(define-effect fisheye
((strength 0.3) (center_x 0.5) (center_y 0.5) (zoom_correct true))
(let* ((w (width frame))
(h (height frame))
(cx (* w center_x))
(cy (* h center_y))
(coords (fisheye-displace w h strength cx cy zoom_correct)))
(remap frame (coords-x coords) (coords-y coords))))