Files
hyperframes/packages/producer/tests/hdr-hlg-regression
Miguel Ángel aab7377400 feat(core): spring physics solver + runtime fixes [2/6] (#1168)
* feat(core): GSAP keyframe parsing, mutations, and API routes

* feat(core): spring physics solver + runtime fixes + spring ease editor

* feat(core): spring physics solver + runtime fixes + spring ease editor

Revert totalTime nudge that caused black first frames in from() tweens.
Keep stale CSS offset cleanup. Regenerate baselines for offset cleanup.

* ci: trigger regression run

* fix(producer): use video stream duration for PSNR checkpoint range

The regression harness used container duration (format.duration) to
compute PSNR checkpoints. Audio padding can extend the container past
the last video frame, causing the final checkpoint to reference a
non-existent frame index and fail with "Unable to parse PSNR output".

Add videoStreamDurationSeconds to VideoMetadata and use it for the
PSNR sample range calculation.

* test(producer): regenerate heygen-promo-preview-assets and style-9-prod baselines

Baselines regenerated inside Dockerfile.test on the devbox to match
the current runtime init.ts changes. Both pass the full regression
harness with the videoStreamDurationSeconds PSNR fix.

* test(producer): allow 2-frame PSNR tolerance for style-9-prod

A single transition frame at 10.742s renders with marginal PSNR
(26.6 dB vs 30 threshold) on CI runners but passes on the devbox
Docker image. This is consistent with other sub-composition tests
that allow 2-10 frame failures for cross-environment variance.
2026-06-05 11:51:25 -04:00
..

hdr-hlg-regression

Regression test that locks down end-to-end HDR HLG (BT.2020 ARIB STD-B67) video rendering. Companion to hdr-regression (PQ), kept as a separate suite so the HLG-specific encoder/metadata path stays tested in isolation.

What it covers

Window Time Shape Expected
A 0.0 2.5 s Baseline HLG video + DOM overlay pass
B 2.5 5.0 s Wrapper opacity fade around HLG video pass

The test pins the contract that:

  • extractMediaMetadata reports bt2020/arib-std-b67/limited for the HLG source (i.e. HLG is detected and not silently coerced to PQ).
  • isHdrColorSpace flips the orchestrator into the layered HDR path on the HLG signal.
  • The HLG source is decoded into rgb48le and blitted under the SDR DOM overlay on every frame.
  • Wrapper-opacity composition (window B) does not break HLG pass-through.
  • hdrEncoder writes HEVC Main10 / yuv420p10le / BT.2020 HLG with the correct color tags (no PQ mastering display metadata for HLG).

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).

Fixture

src/hdr-hlg-clip.mp4 — last 5 seconds of a user-recorded HEVC HLG clip, remuxed (no re-encode) so the HLG color tags survive verbatim.

Running

cd packages/producer
bun run test hdr-hlg-regression

bun run test:update hdr-hlg-regression

In CI it runs in the hdr shard alongside hdr-regression (see .github/workflows/regression.yml).