(options, tone)
| 347 | } |
| 348 | |
| 349 | function stitchLabel(options, tone) { |
| 350 | const parts = []; |
| 351 | if (options.trimStart2 > 0) parts.push(`-${options.trimStart2}f start v2`); |
| 352 | if (options.trimEnd1 > 0) parts.push(`-${options.trimEnd1}f end v1`); |
| 353 | parts.push(options.mode === "blend" ? `blend ${options.blendFrames}f` : "cut"); |
| 354 | if (options.toneMatch && tone) { |
| 355 | const brightness = Math.abs(tone.meanDeltaPct).toFixed(1); |
| 356 | const contrast = Math.abs(tone.contrastDeltaPct).toFixed(1); |
| 357 | const brightnessDirection = tone.brightnessDelta >= 0 ? "+" : "-"; |
| 358 | const contrastDirection = tone.contrastRatio >= 1 ? "+" : "-"; |
| 359 | parts.push(`${brightnessDirection}${brightness}% brightness`); |
| 360 | parts.push(`${contrastDirection}${contrast}% contrast`); |
| 361 | parts.push(options.toneScope === "full" ? "tone all v2" : `tone ${options.toneFrames}f`); |
| 362 | } |
| 363 | if (options.interpolate) parts.push("motion interpolation"); |
| 364 | return `SMOOTH STITCH - ${parts.join(", ")}`; |
| 365 | } |
| 366 | |
| 367 | async function serveFile(res, filePath) { |
| 368 | try { |
no outgoing calls
no test coverage detected