mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-25 16:42:16 +03:00
fix(video): make one-frame scene sampling deterministic (#11344)
Merged via consolidated batch validation. Makes scene_aware Video Bridge sampling deterministic for a one-frame budget: falls back to the midpoint of the active full-video/focus window and reports policyEffective: uniform (a single scene candidate can't preserve both temporal ends). Adds opt-in real-FFmpeg fixture matrix (rapid edge cuts, one-frame budget, static/gradual scenes, sub-second clips, detector failure). Static gates green; own regression suite (videoBridgeSampler.test.ts, video-bridge-sampler-ffmpeg.test.ts) passed in the combined-batch run. Related to #9760. Thanks!
This commit is contained in:
committed by
GitHub
parent
c83116e634
commit
04d2a60331
@@ -339,6 +339,15 @@ export function calculateSamplingDecision(
|
||||
}
|
||||
|
||||
const frameCount = uniform.length;
|
||||
if (frameCount === 1) {
|
||||
return {
|
||||
candidateCount: candidates.length,
|
||||
...(focusWindow ? { focusWindow } : {}),
|
||||
policyEffective: "uniform",
|
||||
policyRequested: "scene_aware",
|
||||
timestamps: uniform,
|
||||
};
|
||||
}
|
||||
const selected =
|
||||
candidates.length <= frameCount
|
||||
? [...candidates]
|
||||
|
||||
Reference in New Issue
Block a user