Remove DEBUG prints from ascii primitive

This commit is contained in:
gilesb
2026-01-20 09:34:13 +00:00
parent e3c6163e2e
commit 45f9171701
2 changed files with 4 additions and 25 deletions

View File

@@ -19,10 +19,6 @@
:desc "Blend opacity (0=video-a only, 1=video-b only)") :desc "Blend opacity (0=video-a only, 1=video-b only)")
(blend_mode :type string :default "overlay" (blend_mode :type string :default "overlay"
:desc "Blend mode: alpha, add, multiply, screen, overlay, difference") :desc "Blend mode: alpha, add, multiply, screen, overlay, difference")
(audio_start :type float :default 60
:desc "Start time in audio (seconds)")
(duration :type float :default 10
:desc "Duration (seconds)")
) )
;; Registry - effects and analyzers ;; Registry - effects and analyzers
@@ -39,7 +35,7 @@
;; Stage 1: Analysis ;; Stage 1: Analysis
(stage :analyze (stage :analyze
:outputs [energy-data] :outputs [energy-data]
(def audio-clip (-> audio (segment :start audio_start :duration duration))) (def audio-clip (-> audio (segment :start 60 :duration 10)))
(def energy-data (-> audio-clip (analyze energy)))) (def energy-data (-> audio-clip (analyze energy))))
;; Stage 2: Process both videos ;; Stage 2: Process both videos
@@ -49,10 +45,10 @@
:outputs [blended audio-clip] :outputs [blended audio-clip]
;; Get audio clip for final mux ;; Get audio clip for final mux
(def audio-clip (-> audio (segment :start audio_start :duration duration))) (def audio-clip (-> audio (segment :start 60 :duration 10)))
;; Process video A with ASCII effect ;; Process video A with ASCII effect
(def clip-a (-> video-a (segment :start 0 :duration duration))) (def clip-a (-> video-a (segment :start 0 :duration 10)))
(def ascii-a (-> clip-a (def ascii-a (-> clip-a
(effect ascii_fx_zone (effect ascii_fx_zone
:cols cols :cols cols
@@ -70,7 +66,7 @@
(- 1 (get zone "row-norm"))))))))))) (- 1 (get zone "row-norm")))))))))))
;; Process video B with ASCII effect ;; Process video B with ASCII effect
(def clip-b (-> video-b (segment :start 0 :duration duration))) (def clip-b (-> video-b (segment :start 0 :duration 10)))
(def ascii-b (-> clip-b (def ascii-b (-> clip-b
(effect ascii_fx_zone (effect ascii_fx_zone
:cols cols :cols cols

View File

@@ -261,11 +261,6 @@ def _apply_cell_effect(cell_img, zone, cell_effect, interp, env, extra_params):
# Inject loaded effects as callable functions # Inject loaded effects as callable functions
if hasattr(interp, 'effects'): if hasattr(interp, 'effects'):
# Debug: print what effects are available on first cell
if zone.get('row', 0) == 0 and zone.get('col', 0) == 0:
import sys
print(f"DEBUG: Available effects in interp: {list(interp.effects.keys())}", file=sys.stderr)
for effect_name in interp.effects: for effect_name in interp.effects:
def make_effect_fn(name): def make_effect_fn(name):
def effect_fn(frame, *args): def effect_fn(frame, *args):
@@ -294,18 +289,6 @@ def _apply_cell_effect(cell_img, zone, cell_effect, interp, env, extra_params):
return effect_fn return effect_fn
cell_env.set(effect_name, make_effect_fn(effect_name)) cell_env.set(effect_name, make_effect_fn(effect_name))
# Debug: verify bindings
if zone.get('row', 0) == 0 and zone.get('col', 0) == 0:
import sys
print(f"DEBUG: cell_env bindings: {list(cell_env.bindings.keys())}", file=sys.stderr)
print(f"DEBUG: 'rotate' in cell_env.bindings: {'rotate' in cell_env.bindings}", file=sys.stderr)
print(f"DEBUG: cell_env.has('rotate'): {cell_env.has('rotate')}", file=sys.stderr)
# Check Symbol class identity
print(f"DEBUG: cell_effect.body = {cell_effect.body}", file=sys.stderr)
if hasattr(cell_effect, 'body') and isinstance(cell_effect.body, list) and cell_effect.body:
head = cell_effect.body[0]
print(f"DEBUG: head = {head}, type = {type(head)}, module = {type(head).__module__}", file=sys.stderr)
# Bind cell image and zone dict # Bind cell image and zone dict
cell_env.set('cell', cell_img) cell_env.set('cell', cell_img)
cell_env.set('zone', zone) cell_env.set('zone', zone)