Skip to content

OpenReel Video - Professional browser-based video editor. Open source CapCut alternative. 100% browser-based, no installation, no cloud uploads, no watermarks.

TypeScript
27.4 KB
Raw Blame

Colour management

Source colour detection and "Interpret footage"

Each media item stores detected colour tags (primaries, transfer, matrix) read from container metadata (mediabunny in the browser, ffprobe on desktop). Media info shows them; Project panel > Interpret footage overrides them with a preset (Rec.709, sRGB, Rec.2020, Display P3, HDR10 PQ, HLG). The override is an undoable action. Code: packages/core/src/color/source-color.ts.

Input transform

packages/core/src/color/input-transform.ts: code values to linear (1.0 = 203 nit SDR white), source primaries to BT.709 (3x3 in linear light), highlight exponential shoulder (knee 0.85, C1-continuous, hue-preserving) for HDR sources, gamut clip, sRGB OETF. Rec.709/sRGB SDR sources get no transform, so SDR projects are byte-identical. The same function runs in the preview (clip-input-transform.ts) and in export.

Scene-referred HDR working mode

Code: packages/core/src/color/hdr-working.ts (math and the Float32 CPU reference), video/hdr-gpu.ts (WebGL2 RGBA16F implementation), video/hdr-frame.ts (eligibility, export target), VideoEngine.composeFrame.

When it is on: the project's Working color space is Rec.2020 (Preview options), or an HDR export (PQ / HLG) is running. A Rec.709 project with an SDR export never enters it: composeFrame takes the unchanged 8-bit path and the compositor is never created (checked in apps/web/e2e/hdr-float.spec.ts).

Pipeline, per frame:

  1. Working space is scene-linear BT.2020, 1.0 = 203 nit, unbounded (PQ 10 000 nit = 49.3). Eligible video / image clips enter through their input transform WITHOUT the tone map: code values -> linear (sRGB / PQ / HLG / linear), source primaries -> BT.2020. On desktop, natively decoded footage (ProRes, DNxHD, MXF...) is decoded to rgba64le (bitDepth: 16 on openreel:media:nativeFrame), so PQ / HLG code values arrive exactly; 8-bit sources and stills are read as sRGB at graphics white.
  2. Effects, then grading, on the clip. Effects (blur, sharpen, glow, below) run first on the clip's own frame in scene-linear float. Grading runs in a PQ-encoded copy of the working space (0..1 spans 0..10 000 nit): white balance, Basic Correction (exposure is a linear gain of 2^(2 x exposure); the other sliders use the tone curve), colour wheels, hue curves, Curves, LUT, HSL bands, vignette. Result back to linear. Always in Premiere order, whatever the clip's pipelineVersion.
  3. Compositing is "over" in linear light in half float: a ping-pong pair of RGBA16F textures (no float-blend extension needed). Layers are resampled bilinearly in linear light with the Canvas2D geometry (translate, rotate, scale, anchor, crop, fit, opacity).
  4. Everything not listed under "What is float" below (text, shapes, stickers, motion graphics, other transitions, subtitles, particles, the background, and any clip that has masks, background removal, stabilisation, border radius, an effect other than blur / sharpen / glow) still renders on the 8-bit canvas. After each track that canvas is merged into the float image at graphics white (sRGB-decoded, placed at graphics white, 203 nit unless the project sets another) and cleared, so track order is preserved. Frames with adjustment layers or text-behind-subject use the classic path as a whole.
  5. Output transform at the end. Preview: tone-mapped SDR view (BT.2020 -> BT.709, the same exponential highlight shoulder as the input transform, sRGB), so the monitor shows highlights rolled off. HDR export: PQ or HLG encode of the float image straight to 10-bit YCbCr planes (takeHdrPayload); the 8-bit read-back is skipped. SDR export of a Rec.2020 project: shoulder + BT.709 transfer in BT.2020 primaries, 8-bit.
  6. If WebGL2 with EXT_color_buffer_float is missing, or a GPU frame fails, the identical Float32 CPU reference is used (about 1 s per 1080p frame).

SDR white in the SDR view and SDR exports of Rec.2020 projects sits at about 97 % (code ~247), because the shoulder needs headroom for highlights above it. A Rec.709 project is unaffected.

Cost of the float path (1080p, Apple GPU through Chrome/ANGLE Metal, apps/web/e2e/hdr-float.spec.ts, 20-run average): graded 16-bit layer + overlay + SDR view 9.8 ms; the same with an 8-bit canvas source 6.2 ms; with the PQ-encode read-back for export 22.9 ms; the existing 8-bit fused grading pass for one graded clip, 4.1 ms; CPU reference 998 ms. Playback of a Rec.2020 project therefore pays roughly 2 to 5 ms more per graded layer than an SDR project, plus 16 MB of upload per 1080p native 16-bit frame.

What is float and what is still 8-bit (wave 18)

Float (scene-linear BT.2020, half float on the GPU, Float32 in the CPU reference), per clip, in a Rec.2020 / HDR-export project:

Feature How it runs in float
Lumetri basic, curves, wheels, hue curves, white balance PQ working encoding, as before
LUT Trilinear 3D lookup in float. The table sees the picture in its declared space, chosen per LUT in the Color tab (LUT colour space): Display sRGB (default; the working light encoded with the sRGB curve, 1.0 = SDR white), Scene linear (1.0 = SDR white), or PQ. Signal above 1.0 in an sRGB / linear LUT bypasses the table and is added back on its output, so a grade does not clip the highlights it cannot address. Intensity mixes in that space.
HSL (the eight hue bands of the Color tab) rgb -> HSL -> band offsets -> rgb on the PQ working encoding
Vignette (grade) Source-frame coordinates (before crop and transform). Negative darkens by a gain on the PQ working encoding; positive lifts towards graphics white (never above the pixel's own value).
Blur, sharpen, glow effects See "Effects" below
Crossfade, dip to black, dip to white See "Transitions" below
Opacity "over" in linear light, as before
Titles, shapes, stickers, subtitles, motion graphics Rendered 8-bit, composited at graphics white (below)

Still 8-bit (they render on the canvas and enter at graphics white; highlights above SDR white of such a clip are tone-mapped): every effect other than blur, sharpen and glow (including the vignette effect, the HSL Secondary effect with its matte, chroma key, the pro effects), masks, background removal, stabilisation, border radius, 3D / perspective transforms, emphasis animations, frame-interpolated slow motion, every transition except crossfade and the two dips, compound clips, frames with active adjustment layers or text-behind-subject (the whole frame), the preview's 8-bit overlays. Per-clip blend modes are not rendered by the engine in either path (only adjustment layers use them), so there is nothing to port.

Effects. They run on the clip's frame at its source resolution, before the grade and the transform (the order of the 8-bit stack), on scene-linear floats, so a 1000 nit highlight blurs into its neighbours at 1000 nits and is not clipped first. Blur is a separable Gaussian with sigma = radius px (the same convention as the Canvas blur()), taps clamped to the frame edge, on premultiplied colour so transparent edges do not bleed black; the half kernel is capped at 64 taps (sigma above about 21 loses a sliver of tail). Sharpen is the 8-bit 4-neighbour kernel on the PQ working encoding. Glow adds the Gaussian-blurred frame after the 8-bit effect's bright-pass (brightness 1.25, contrast 1.5 about mid grey, on the extended sRGB encoding of the light) with a screen that is exact up to SDR white and adds light above it. On the GPU every pass is a fragment shader on RGBA16F textures; color/hdr-effects.ts is the reference.

Transitions. Crossfade and dips are planned as float draws (video/hdr-transition.ts): crossfade is the outgoing clip at full strength with the incoming one over it at the eased progress, i.e. exactly B x p + A x (1 - p) in linear light with alpha 1 (the 8-bit engine draws both at partial alpha, which dims the middle over transparency). A dip fades the outgoing clip into a flat colour, holds it, and fades the incoming one up; dip to white lands at graphics white. Differences from the 8-bit transition engine: the float path draws each clip with its own transform and effects (the 8-bit engine letterboxes both frames to the canvas and ignores the transform), and both clips must be float-eligible, otherwise the transition renders as before on the 8-bit canvas.

Graphics white. Project setting (Preview options > HDR graphics white, enabled in Rec.2020 projects; undoable through project/updateSettings): 100, 150, 203 (default, ITU-R BT.2408), 300 or 400 nits, stored as settings.graphicsWhiteNits (80 to 1000). It is where the white of every 8-bit overlay is placed (titles, shapes, stickers, subtitles, motion graphics, particles, and clips still on the 8-bit path) and where the dip-to-white colour lands. SDR video and still-image clips drawn through the float path are not scaled by it (their sRGB white stays at 203 nit = 1.0).

Verification. CPU: packages/core/src/color/hdr-float-effects.test.ts (LUT in three spaces, HSL, vignette, blur energy conservation, sharpen, glow, transition plans, graphics white, a PQ export of a blurred crossfade whose 10-bit luma codes stay above SDR white, light-level meter), hdr-working.test.ts, hdr-frame.test.ts. Real ffmpeg: apps/desktop/test/hdr-scene-referred-integration.test.ts (third case: a PQ ramp goes through blur and a 50 % crossfade into a 1000 nit flat, libx265 Main10, decoded codes match the expected mix within 10 codes and reach ~1000 nits). Browser (GPU vs CPU parity of every new stage, VideoEngine routing, SDR byte identity against hashes from commit 971b5a8b via SDR_BASELINE_HASHES): apps/web/e2e/hdr-float-effects.spec.ts. NOT RUN when this was written: the heavy-run lock was unavailable, so the new GLSL (LUT 3D texture, HSL, vignette, effect passes, solid layer) has only been compiled offline with glslangValidator, never executed on a GPU, and the SDR byte comparison has not been made; run the spec in the gpu project (twice for the SDR comparison: once on 971b5a8b with SDR_HASH_OUT, once here with SDR_BASELINE_HASHES) before relying on either.

Measured MaxCLL / MaxFALL

PQ exports in HDR working mode measure MaxCLL (largest R, G or B of any pixel of any frame) and MaxFALL (largest frame average of max(R, G, B)) from the PQ-encoded frames as they are sent to the encoder (color/hdr-light-level.ts, one table lookup per pixel). The result is returned as ExportStats.hdrLightLevel (whole nits) and shown in the "Export finished" notice. HLG exports are not measured (MaxCLL is a PQ / HDR10 field). The stream itself still declares 1000,400: libx265 writes the content light level SEI with the first headers, before any frame has been rendered, and max-cll=0,0 writes zeros rather than a computed value (checked with ffmpeg and ffprobe), so the measured numbers are reported beside the file, not written into it.

Desktop 10-bit HDR export

Export dialog > Color / HDR on desktop: HDR10 (PQ) and HLG as HEVC Main10 (libx265 or hevc_videotoolbox) in MP4/MOV, ProRes 4444 XQ in MOV. In HDR working mode the renderer sends 10-bit planes encoded from the float image (apps/web/src/services/native-ffmpeg-backend.ts); otherwise it converts the 8-bit canvas. Streams are tagged pix_fmt yuv420p10le, bt2020, smpte2084 / arib-std-b67, with mastering display (1000 / 0.0001 nit) and content light level (declared 1000 / 400; the measured values of the render are reported separately, see Measured MaxCLL / MaxFALL) metadata. Proof that highlights above SDR white survive: apps/desktop/test/hdr-scene-referred-integration.test.ts (real ffmpeg: a PQ ramp to 1000 nit goes decode -> float pipeline -> libx265 Main10 -> decode, and the 10-bit luma codes match the source up to code ~722 while SDR white is code ~573; the classic path peaks at <= 575) and apps/desktop/test/hdr-export-electron.test.ts (real Electron: HDR10 export of an HLG ProRes clip reaches luma code 665).

Hue curves keyframes

Hue Curves editor animates each control point's output value with keyframes (useHueCurveKeyframes.ts); values are sampled per frame in preview and export (animated-color-grading.ts).

Verification

Unit: packages/core/src/color/*.test.ts, apps/desktop/test/color-output-args.test.ts, hdr-export-integration.test.ts. Electron e2e: pnpm --filter @openreel/desktop test:hdr-e2e under the heavy-run lock (see known-limitations for its status).

Camera RAW input

Camera RAW stills (DNG) are developed by OpenReel (packages/core/src/raw/, see docs/raw.md) into an sRGB-encoded 8-bit image in the primaries of the item's RAW output colour space (sRGB/Rec.709, Display P3 or Rec.2020). inputSpaceForItem returns that space for RAW items whatever the decode path, so the input transform above converts P3 / Rec.2020 RAW to the working image in preview and export; sRGB output has no transform. The scene-linear Float32 development (developRawLinear) is not yet fed into the Rec.2020 HDR working mode.

ACES colour management (project setting)

Preview options > Color management: Display-referred (default, the pipeline described above, unchanged: the Rec.709 SDR path is byte-identical, checked by hdr-float-effects.spec.ts "SDR projects render byte-identically") or ACES. The choice is project.settings.colorManagement ("aces" or absent) and the SDR output transform is settings.acesOutput ("srgb" or "rec709", absent = sRGB). Both go through project/updateSettings, so a change is one undo step, and both are part of the project file (checked by save / load in aces-color.spec.ts) and of the render-cache key.

Code: packages/core/src/color/aces.ts (primaries, matrices, ACEScct, settings helpers; in the startup bundle), color/aces-output.ts (RRT, ODT, splines, HDR tone scale; lazy, registered by the video engine), video/aces-glsl.ts (GLSL port of the output transform, built from the same TypeScript constants), color/hdr-working.ts (pipeline selection, IDT, ACEScct grade, CPU compositor), video/hdr-gpu.ts (WebGL2 compositor), color/ocio-config.ts.

Pipeline

ACES mode runs the float compositor of "Scene-referred HDR working mode" (above) with a different colour pipeline:

  1. Input transform (IDT). The existing decoders (sRGB, Rec.709, Rec.2020, P3, PQ, HLG, the nine camera log curves, linear, ACEScct) give scene-linear light where 1.0 is SDR reference white and 18% grey is 0.18, the same numbers as ACES scene values. The source primaries go to AP1 (ACEScg) with a Bradford adaptation from the source white to the ACES white (gamutToAp1). The input colour space of a clip is, in order: the clip's own override (Color tab > Camera input > "This clip only", clip/setColorInterpretation), the footage item's Interpret Footage choice, the file's tags (desktop decode), else sRGB. New Interpret Footage presets: ACEScg, ACES2065-1, ACEScct, Linear Rec.709 / Rec.2020 / Display P3.
  2. Working space. ACEScg, half float on the GPU or Float32 in the CPU reference, composited "over" in linear light. 8-bit overlays (titles, shapes, subtitles, clips that need the 8-bit path) enter through the sRGB IDT at the project's graphics white (203 nits = scene 1.0 by default).
  3. Grading in ACEScct. The Lumetri stages run on acescctEncode(linear) instead of the PQ encoding. Exposure is still a linear gain, a positive vignette lifts towards ACEScct(1.0). Negative scene light is floored at 0 for the grade.
  4. Output Transform (RRT + ODT), from the ACES 1.3 CTL (ampas/aces-dev tag v1.3): sRGB (RRT.ctl + ODT.Academy.sRGB_100nits_dim.ctl), Rec.709 BT.1886 (ODT.Academy.Rec709_100nits_dim.ctl), Rec.2020 PQ 1000 nit (RRTODT.Academy.Rec2020_1000nits_15nits_ST2084.ctl), Rec.2020 HLG (..._HLG.ctl). The monitor, the render cache and SDR exports use the project's SDR transform; an HDR10 export uses the PQ transform and an HLG export the HLG one, regardless of the project's SDR choice.
  5. Where it shows. In ACES mode every Program monitor frame (scrub, pause and playback) is rendered by the engine's compositor, the same one export uses, so the monitor is not a re-implementation. The native video-element playback fast path is switched off. The scopes read the monitor, so they measure the output transform's code values (labelled in the Scopes panel).

Verification

  • packages/core/src/color/aces.test.ts: matrices against the published ACES constants (AP0/AP1, AP1 to XYZ, ACEScg to Rec.709) and against colour-science (Bradford) for every standard and camera gamut; ACEScct / ACEScc anchors; spline anchors and inverses; the SDR output on 68 scene colours (neutrals, saturated reds, random) against OpenColorIO 2.6's builtin ACES 1.3 SDR-VIDEO_1.0 transform, max error 5.4e-6 for sRGB codes and 2.1e-4 for BT.1886 (float32 near black); the 1000 nit HDR output against OCIO's HDR-VIDEO-1000nit-15nit-REC2020lim_1.1, within a relative 1e-3 (worst 4.6e-4, from a small difference in how OCIO derives the exposure shift of the HDR tone scale); PQ and HLG signal anchors. The reference values are in color/fixtures/aces-ocio-reference.ts, regenerated by scripts/aces-reference.py. HLG has no OCIO oracle: it is checked against BT.2100 anchors (203 nits to 0.75, 1000 to 1.0) and as the HLG encoding of the PQ transform's luminance.
  • aces-pipeline.test.ts: IDT (sRGB grey and red, every camera log's published 18% grey to neutral ACEScg 0.18, PQ / HLG), the compositor's view and PQ / HLG encode, ACEScct grade behaviour, setting undo / redo, validator, export output selection.
  • apps/web/e2e/aces-color.spec.ts (gpu project) and fallback-aces-color.spec.ts (no WebGPU, no GPU): the WebGL2 shader against the CPU reference on one composite (ACEScct grade, camera log layer, overlay): 8-bit view within 1 code (sRGB) / 3 codes (Rec.709, near-black amplification) on Apple Metal and within 1 / 1 on SwiftShader, PQ / HLG signal within 4.3e-4 / 1.8e-4; the product flow (menu, undo, save / load, per-clip override) with the ACES engine frame matching the CPU prediction within 3 codes (graded: 5) and the Program monitor matching the engine frame within 4 codes.

OCIO config import (Interpret footage, unchanged)

Interpret footage > OCIO config reads an .ocio file (parseOcioConfig): version, roles and every !<ColorSpace> entry with aliases, family, isdata, transform kinds, BuiltinTransform styles and LUT file names. mapOcioColorSpaces marks a space supported when a BuiltinTransform style equals one of the presets (ACEScct, ACEScg, ARRI LogC3 EI800 / AWG, LogC4, Canon Log 3, V-Log, S-Log3 / S-Gamut3.Cine), or when its name or alias is a well-known name from the ACES / "cg" reference configs and it carries no LUT of its own. Picking a supported space applies the matching built-in preset; everything else is listed with its reason. This only maps a config's spaces onto the built-in presets; it does not run the config. The OCIO mode below does.

OpenColorIO runtime (project setting)

Preview options > Color management > OpenColorIO config (or "OpenColorIO configuration..." to reopen the dialog). project.settings.colorManagement is "ocio" and project.settings.ocio holds the config text, the LUT files (relative path to file text), and the choices below. Applying is one project/updateSettings step (undo restores the previous config / choices); a clip's own input space is clip/setOcioInputSpace (Color tab, "OCIO input colour space (this clip)"). Both are part of the project file and of the render-cache key.

Code: packages/core/src/color/ocio/ (lazy chunk, never in the startup bundle): yaml.ts (the YAML subset configs use, with !<Tag> tags), config.ts (colour spaces incl. display_colorspaces, roles, displays, shared views, view transforms, looks), luts.ts (.cube, .spi1d, .spi3d, .csp), compile.ts (transform nodes to ops; ColorSpaceTransform, LookTransform, DisplayViewTransform resolution), ops.ts (the op model and the CPU evaluator), fixed.ts (fixed functions, CPU and GLSL side by side), builtins.ts + builtins-data.ts (generated from OpenColorIO by scripts/ocio/dump-builtins.py) + builtins-aces.ts, glsl.ts (the shader generator), runtime.ts (inspection, pipeline building, sessions), settings.ts (the stored shape, validation, cache key). The compositors consume compiled transforms through the HdrOcioTransform shape in color/hdr-working.ts; video/hdr-gpu.ts compiles one layer / decode shader per input colour space and one output shader, video/ocio-gpu-eval.ts runs a transform's exact GLSL over a list of colours for tests.

Pipeline

  1. Input. Each clip's pixels are read as an OCIO colour space of the config (clip.ocioInputSpace, else the project's default input space) and converted to the working space by the config's own transforms, in the layer shader (GPU) or decodeSourceToLinear (CPU reference).
  2. Working space. A scene-referred colour space of the config (scene_linear role by default), half float on the GPU, Float32 on the CPU, "over" compositing as in the other float modes. 8-bit graphics (titles, shapes, subtitles, clips on the 8-bit path) enter through the default input space at graphics white.
  3. Grade. Same stages as ACES mode, on acescctEncode(working value).
  4. Looks and view. The chosen OCIO looks ("a", or "-a" for the inverse) run in the working space, each through its own process space, then the DisplayViewTransform of the chosen display and view (view transform, view looks, display colour space). The monitor, the render cache and SDR exports use that output; scopes measure it.
  5. Where it shows. Like ACES, every Program monitor frame is rendered by the engine's compositor; the native video-element fast path is off. If the OCIO settings cannot be built, the engine logs the reason and renders through the ACES pipeline instead (the dialog never lets you apply settings that cannot be built).

What is evaluated

Transforms (CPU ops.ts, GPU glsl.ts, from one op list): MatrixTransform (3x3 + offset; a matrix that mixes alpha into colour is reported), ExponentTransform (clamp / mirror / pass_thru), ExponentWithLinearTransform (linear / mirror), LogTransform, LogAffineTransform, LogCameraTransform (linear segment from lin_side_break, optional linear_slope), CDLTransform (default no-clamp as in OCIO 2, asc clamps; forward and inverse), RangeTransform, FixedFunctionTransform (ACES_RedMod10, ACES_Glow03 / Glow10, ACES_DarkToDim10, ACES_GamutComp13, REC2100_Surround, XYZ_TO_xyY, XYZ_TO_uvY, XYZ_TO_LUV, forward and inverse), BuiltinTransform, GroupTransform, ColorSpaceTransform, LookTransform, DisplayViewTransform, FileTransform. Direction inverse works for everything above except 3D LUTs. A data colour space (isdata) on either side of a conversion is a no-op, as in OCIO.

Builtins: every OCIO builtin made of matrices, exponents, log curves, ranges and the fixed functions above is tabulated from OpenColorIO itself (43 styles plus the two ACES output transforms below: the ACES AP0 / AP1 / ACEScct / ACEScg conversions, ARRI LogC3 / LogC4, V-Log, Log3G10, REDLogFilm, S-Log3 (4 gamuts), the DISPLAY styles sRGB, Rec.1886 709 / 2020, G2.2, G2.6 P3, DisplayP3, DCDM, Reference Gamut Compression, ...). The curves OCIO stores as tables are analytic here: ACEScc, ST-2084 (PQ) and HLG (both directions, odd extension below zero as OCIO's half-domain tables do); the ACES 1.3 SDR-VIDEO_1.0 and HDR-VIDEO-1000nit-15nit-REC2020lim_1.1 output transforms use color/aces-output.ts (already checked against OCIO) up to CIE XYZ D65 so the config's own DISPLAY builtin finishes them. Anything else (ADX, Apple Log, Canon Log 2 / 3, ACES 2.0, the other ACES 1.x output variants) is reported.

LUTs: .cube (1D and 3D, DOMAIN_MIN / DOMAIN_MAX, both in one file), .spi1d (1 or 3 components, From domain), .spi3d, .csp (3D, with a straight pre-LUT). A domain other than 0..1 becomes a scale and offset in front of the table, as in OCIO; inputs outside the table clamp. 1D tables interpolate linearly (inverse by search); 3D tables are trilinear for linear and tetrahedral for tetrahedral / best. The files are found as OCIO finds them: search_path (with environment variables) then the plain path, then a unique file name, case-insensitively. On the GPU all tables of a transform are one RGBA32F texture read with texelFetch; no float-linear extension is needed.

Reporting: inspectOcioConfig compiles every colour space (to the reference, and for the working-space list also from it), every view of every display and every look, and records the reason where it cannot. The dialog lists those under "Not supported by the runtime" (colour spaces, views, looks, with the reason) and the LUT files a config names that were not provided. A clip set to a space that cannot run is read as the default input space and the engine logs it once.

Verification

  • packages/core/src/color/ocio/ocio-runtime.test.ts: the CPU reference against real OpenColorIO 2.6 (PyOpenColorIO, OPTIMIZATION_NONE) on 253 conversions (colour space, look and display / view transforms of the ACES studio config v2.1.0, the cg config v2.1.0 and a hand-made config with .cube 1D / 3D, .spi1d, .spi3d, .csp, CDLs, a view transform, looks, a nested colour space transform and a data space) on 49 (scene-referred) or 56 (code value) sample colours each (neutral ramps, primaries, negatives, values up to 32, random). Tolerance |d| <= 1e-4 + 5e-4 |reference| (3e-4 absolute for BT.1886, which amplifies float32 noise near black). The 42 other cases are the ones the runtime reports as unsupported, and the test checks that each is unsupported for the listed reason. Reference data: fixtures/ocio-reference.json, regenerated by scripts/ocio/make-reference.py (make-handmade.py writes the hand-made config and LUTs; dump-builtins.py writes builtins-data.ts).

  • ocio-parse.test.ts (YAML, config structure, LUT readers and interpolation, unsupported reporting, file lookup, pipeline building, looks and their reverse, settings validation and keys), ocio-pipeline.test.ts (the CPU compositor with an OCIO pipeline: decode, overlay, view, encode; undo / redo of the settings and of the per-clip space; validator; render-cache key; SDR export tagging).

  • apps/web/e2e/ocio-runtime.spec.ts (gpu project): (1) the WebGL2 shader, the exact GLSL the compositor embeds, over the same 253 conversions in full float against the CPU reference (worst 9.5e-6 relative) and against OpenColorIO (worst 2.1e-4); (2) the product flow: load the hand-made config and its LUT files in the dialog (unsupported spaces listed with reasons), pick the spaces, display and view, apply; the engine frame matches the CPU prediction from the frame's own pixels within 1 code (mean 0.02); turning on the Film Print look (a 3D LUT in a log process space) changes the Program monitor as the same prediction says (within 1 code, mean 0.02); undo / redo; save / load round trip of config text, LUT data and choices; a per-clip input space changes the picture and undoes.

  • The display-referred path is untouched: hdr-float-effects.spec.ts "SDR projects render byte-identically" produces the same ten frame hashes (plain, graded, effects, crossfade, dips, wipe) on this branch and on its base 190d0da0a, run back to back on the same machine; hdr-float.spec.ts, hdr-float-effects.spec.ts, aces-color.spec.ts and fallback-aces-color.spec.ts pass.

  • apps/web/e2e/fallback-ocio-runtime.spec.ts: the same product flow with WebGPU switched off and with --disable-gpu (fallback-nowebgpu and fallback-software projects): same pixels, undo and persistence.

Measured on an Apple GPU through Chrome / ANGLE Metal (the software-GPU tolerances in the e2e are ceilings, not measurements). Not run: the Linux SwiftShader stack, the desktop (Electron) app.