forked from jsl/video_editing_poc
fix(vision): overlay describes the chosen peak, not the trailing outcome
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 <noreply@anthropic.com>
This commit is contained in:
parent
cf8ec76430
commit
1ea6640da0
|
|
@ -107,10 +107,13 @@ public class HighlightVisionDirector {
|
||||||
if (payoffIdx < 0 || plan.shots().isEmpty()) {
|
if (payoffIdx < 0 || plan.shots().isEmpty()) {
|
||||||
return plan;
|
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 payoffShot = plan.shots().get(payoffIdx);
|
||||||
MontagePlan.Shot last = plan.shots().get(plan.shots().size() - 1);
|
|
||||||
double winStart = payoffShot.sourceStartSeconds();
|
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) {
|
if (winEnd <= winStart) {
|
||||||
winEnd = winStart + 1.0;
|
winEnd = winStart + 1.0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue