commit 038eb40866b3d5f0d177cb880039abae5e45af51
parent 845d8610f5ee967525c1d70750aff0997087b7c6
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 10 Nov 2026 09:14:32 -0500
umtool: a stacked deck's post item covers its hero card (a chapter bumper keeps off it); its render declares at least its measured 2.6 GB peak + 25%
The real-data preview (quartering-diet, a twocrop clip, a clip, a post item; 30.9 s at 720x1280) rendered in
158.5 s, the heavy scope's MemoryPeak 2.6 GB.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/umtool/report-to-video/deck.mjs b/umtool/report-to-video/deck.mjs
@@ -1715,6 +1715,11 @@ export function postCovers(entries, segments, render, { feed = false } = {}) {
entries.forEach((e, i) => {
const seg = segments[i];
if (e?.type !== "post" || !seg || seg.id !== e.id) return;
+ // The stacked vertical deck lays a post item as its hero card (stackedPostFraming): the card covers that box.
+ if (stackedOn(render)) {
+ out.push({ segment: e.id, from: seg.start, to: Math.round((seg.start + seg.duration) * 1000) / 1000, rects: [{ ...stackedGeometry(render).post.card }] });
+ return;
+ }
const L = postLayout(panelEntry(e, render), { width: box.width, height: box.height });
const rects = [L.card, L.slot, L.strip]
.filter((b) => b && [b.x, b.y, b.width, b.height].every(Number.isFinite))
diff --git a/umtool/report-to-video/render-estimate.mjs b/umtool/report-to-video/render-estimate.mjs
@@ -21,6 +21,12 @@
// a window's capture, 4 / 7 workers 0.8 / 1.15 GB
// the ladder's re-encode (x264 medium, one rung at a time) 0.76 GB
//
+// The STACKED VERTICAL DECK (vertical-deck.mjs; 2026-11-10, the heavy scope's MemoryPeak, the quartering-diet
+// take's 3 entries -- a twocrop clip, a clip, a post item -- 1080x1920, the deck's full-frame page and the
+// dial/odometer/trail/extras layers, a preview): 2.6 GB
+// A 9:16 frame is a 16:9 frame's pixels on its side, so the formula below holds for it; its full-frame deck page
+// is one more 1080x1920 layer, which VERTICAL_DECK_MIN_MB (the measured peak + 25 %) floors.
+//
// So a render's peak is its widest ffmpeg -- the crossfade pass holds every
// segment of a batch open, about 200 MB each (build-video's xfadeBatches:
// REPORT_VIDEO_XFADE_BATCH / render.xfadeBatch, default 24) -- or its chrome
@@ -62,6 +68,8 @@ export const LADDER_ESTIMATE_MB = 1000;
* a 1080p60 source decodes twice the frames, so this carries about 40 % over it.
*/
export const BASIC_ESTIMATE_MB = 1200;
+/** A stacked vertical deck's render declares at least this (its measured peak, 2.6 GB, + 25 %). */
+export const VERTICAL_DECK_MIN_MB = 3300;
/** build-video's XFADE_BATCH_DEFAULT: the segments one crossfade pass opens. */
export const XFADE_BATCH = 24;
@@ -196,5 +204,11 @@ export function manifestEstimateMb(manifest, env = process.env, { xfade = true,
if (manifest?.render?.mode === "basic") return renderEstimateMb("basic", env);
const crossfades = xfade && (manifest?.render?.transition ?? 0.5) !== 0;
const segments = single || (manifest && !crossfades) ? 1 : manifestSegments(manifest);
- return renderEstimateMb("render", env, { segments, batch });
+ const mb = renderEstimateMb("render", env, { segments, batch });
+ // A 9:16 cut that keeps its deck (render.format vertical with a deck, render.vertical.deck not "bare"): floored at
+ // its measured peak + margin -- unless an override says otherwise (0: declare nothing).
+ const r = manifest?.render;
+ const c = r?.chrome;
+ const stacked = r?.format === "vertical" && r?.vertical?.deck !== "bare" && !!c && typeof c === "object" && c.engine === "hyperframes" && c.layout === "deck";
+ return stacked && mb > 0 && env.UMTOOL_RENDER_ESTIMATE_MB === undefined ? Math.max(mb, VERTICAL_DECK_MIN_MB) : mb;
}
diff --git a/umtool/report-to-video/vertical-deck.test.mjs b/umtool/report-to-video/vertical-deck.test.mjs
@@ -305,3 +305,11 @@ test("the lint reads a vertical cut's QR at 720p on its short side, at the size
const l = lintManifest(m, { validators: false });
assert.ok(!l.errors.some((e) => e.includes("too small to scan")), l.errors.join("; "));
});
+
+test("a stacked vertical deck's render declares at least its measured peak + margin; a bare one what it did", async () => {
+ const { VERTICAL_DECK_MIN_MB, manifestEstimateMb } = await import("./render-estimate.mjs");
+ const one = (render) => manifestEstimateMb({ render, timeline: [{ type: "clip", id: "a" }] }, {}, { single: true });
+ const v = { format: "vertical", chrome: { engine: "hyperframes", layout: "deck", deck: {} } };
+ assert.ok(one(v) >= VERTICAL_DECK_MIN_MB);
+ assert.equal(one({ ...v, vertical: { deck: "bare" } }), one({ chrome: v.chrome }));
+});