Skip to content

Write HTML. Render video. Built for agents.

test(hdr-regression): tighten Window F maxFrameFailures budget after Chunk 4 fix (#375)

Vance Ingalls8ffd007716f7
diff --git a/packages/producer/tests/hdr-hlg-regression/README.md b/packages/producer/tests/hdr-hlg-regression/README.md
index a1c08a120a..1c43340628 100644
--- a/packages/producer/tests/hdr-hlg-regression/README.md
+++ b/packages/producer/tests/hdr-hlg-regression/README.md
@@ -27,13 +27,6 @@ The suite is intentionally short (5 s, two windows) — it exists to detect
regressions in the HLG-specific code path, not to enumerate every composition
shape (those live in `hdr-regression`).
-## Tolerance
-
-`maxFrameFailures` is **0** here. HLG is a pure pass-through path — no known
-failures, no transcoder workarounds — and HEVC encoding against the rendered
-`rgb48le` buffer is byte-deterministic on the same fixture. Any drift is a
-real regression, not codec noise, so the budget is the strictest possible.
-
## Fixture
`src/hdr-hlg-clip.mp4` — last 5 seconds of a user-recorded HEVC HLG clip,
diff --git a/packages/producer/tests/hdr-regression/README.md b/packages/producer/tests/hdr-regression/README.md
index b9efb3a700..0ca0739038 100644
--- a/packages/producer/tests/hdr-regression/README.md
+++ b/packages/producer/tests/hdr-regression/README.md
@@ -15,11 +15,17 @@ covering the highest-value HDR compositing shapes. 10s / 300 frames at 30fps.
## Fixtures
- `src/hdr-clip.mp4` — short HEVC Main10 / BT.2020 PQ clip with a moving
- bright gradient (see `NOTICE.md` for attribution).
-- `src/hdr-photo-pq.png` — 256x144 16-bit RGB PNG with a hand-injected `cICP`
+ bright gradient (see `NOTICE.md` for attribution). Reused across windows
+ A–G and as scene A of the window-H shader transition.
+- `src/hdr-photo-pq.png` — 256×144 16-bit RGB PNG with a hand-injected `cICP`
chunk (primaries=BT.2020, transfer=SMPTE ST 2084, matrix=GBR, range=full).
+ Used as scene B of the window-H shader transition.
-To regenerate the PNG fixture:
+ffmpeg is **not** used to generate the PNG because it does not embed `cICP`
+in PNGs — without that chunk Chromium would not treat the file as HDR and the
+test would silently fall back to SDR.
+
+To regenerate the PNG fixture (deterministic, byte-for-byte stable):
```bash
python3 packages/producer/tests/hdr-regression/scripts/generate-hdr-photo-pq.py
diff --git a/packages/producer/tests/hdr-regression/meta.json b/packages/producer/tests/hdr-regression/meta.json
index 25f6ea5b83..7c6f421424 100644
--- a/packages/producer/tests/hdr-regression/meta.json
+++ b/packages/producer/tests/hdr-regression/meta.json
@@ -1,9 +1,9 @@
{
"name": "hdr-regression",
- "description": "HDR10 (BT.2020 PQ) regression suite. Four windows (A–D) cover the highest-value HDR compositing shapes: direct <video> opacity tween (A), z-order DOM/HDR/DOM sandwich (B), transform + border-radius (C), and a shader transition between HDR video and HDR PQ image (D). 10s / 300 frames at 30fps.",
+ "description": "Comprehensive HDR10 (BT.2020 PQ) regression suite. Eight back-to-back 'windows' (A–H) lock down the layered HDR compositing pipeline against the most common composition shapes: baseline pass-through, wrapper-vs-direct opacity, z-order sandwiches, side-by-side multi-source, transform + border-radius, object-fit letterbox, and a shader transition between an HDR video and an HDR PQ image. Window C (direct <video> opacity) is fixed by Chunk 1. Window F (transform + border-radius) is fixed by Chunk 4. The golden is byte-deterministic and `maxFrameFailures` is 0 — any drift in the layered HDR compositor is caught immediately.",
"tags": ["regression", "hdr"],
"minPsnr": 28,
- "maxFrameFailures": 5,
+ "maxFrameFailures": 0,
"minAudioCorrelation": 0,
"maxAudioLagWindows": 1,
"renderConfig": {
diff --git a/packages/producer/tests/hdr-regression/output/compiled.html b/packages/producer/tests/hdr-regression/output/compiled.html
index 70ef18f1d6..3a33c22145 100644
--- a/packages/producer/tests/hdr-regression/output/compiled.html
+++ b/packages/producer/tests/hdr-regression/output/compiled.html
@@ -189,7 +189,7 @@ html2canvas/dist/html2canvas.esm.js:
</head>
<body>
<div id="main" data-composition-id="hdr-regression" data-start="0" data-duration="6" data-width="1920" data-height="1080">
- <!-- Window A · Baseline HDR + direct opacity tween · 0.0–2.5s -->
+ <!-- Window A · Baseline HDR + direct opacity tween · 0.0–1.5s -->
<video id="wa-video" class="clip hdr-video" data-start="0" data-duration="1.5" data-track-index="0" src="hdr-clip.mp4" muted playsinline data-has-audio="false" data-end="1.5"></video>
<div class="label label-tl clip" data-start="0" data-duration="1.5">
A · Baseline HDR + opacity tween
diff --git a/packages/producer/tests/hdr-regression/output/output.mp4 b/packages/producer/tests/hdr-regression/output/output.mp4
index a86cc734e8..318c782422 100644
--- a/packages/producer/tests/hdr-regression/output/output.mp4
+++ b/packages/producer/tests/hdr-regression/output/output.mp4
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e95e62592900fadeb78b7366134f6d3c78a647cc75f9d4f8c84646ef6177952b
-size 1755367
+oid sha256:ef13545af8288619f3c493d9b684f49ed7de007229f16970f34c741d3e6d2a9d
+size 1746876