From 1ea6640da0c4febe9d432e8eba467759d7280584 Mon Sep 17 00:00:00 2001 From: JSLMPR Date: Sun, 26 Jul 2026 16:49:22 +0200 Subject: [PATCH] fix(vision): overlay describes the chosen peak, not the trailing outcome MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit groundOverlay sampled the payoff shot THROUGH the final (button/outcome) shot, so a post-payoff reaction frame could supply the overlay (bowling: 'SMILING' from the bowler lowering his arms after the celebration). Confine the overlay caption to the payoff (slow-mo) shot — the decisive moment the judge chose. Co-Authored-By: Claude Opus 4.8 --- .../videoclips/editing/HighlightVisionDirector.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/example/videoclips/editing/HighlightVisionDirector.java b/src/main/java/org/example/videoclips/editing/HighlightVisionDirector.java index 7433333..5419e80 100644 --- a/src/main/java/org/example/videoclips/editing/HighlightVisionDirector.java +++ b/src/main/java/org/example/videoclips/editing/HighlightVisionDirector.java @@ -107,10 +107,13 @@ public class HighlightVisionDirector { if (payoffIdx < 0 || plan.shots().isEmpty()) { return plan; } + // Caption the CHOSEN PEAK itself — the payoff (slow-mo) shot — not the trailing outcome/button shots. + // Sampling through to the last shot let a post-payoff reaction frame (e.g. the bowler lowering his arms + // and holding his face after the celebration) supply the overlay; confining it to the payoff shot keeps + // the label on the decisive moment the judge picked. MontagePlan.Shot payoffShot = plan.shots().get(payoffIdx); - MontagePlan.Shot last = plan.shots().get(plan.shots().size() - 1); double winStart = payoffShot.sourceStartSeconds(); - double winEnd = last.sourceStartSeconds() + last.durationSeconds() * Math.max(0.05, last.speed()); + double winEnd = payoffShot.sourceStartSeconds() + payoffShot.durationSeconds() * Math.max(0.05, payoffShot.speed()); if (winEnd <= winStart) { winEnd = winStart + 1.0; }