Skip to content

feat(ocio): pick the OCIO display and view for the presentation and footage - #161

Merged
mcoliver merged 1 commit into
mainfrom
feat/ocio-auto-display-view
Oct 26, 2026
Merged

mcoliver merged 1 commit into
mainfrom
feat/ocio-auto-display-view

Conversation

@mcoliver

@mcoliver mcoliver commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #155.

Turning an OCIO display on (OCIO > Displays > device > Active) used the config's default display and view, sRGB with the ACES SDR view, whatever the macOS presentation mode or the footage. In HDR PQ presentation that put sRGB values into a PQ surface.

What it picks

macOS presentation Display
SDR sRGB - Display
EDR sRGB - Display (the EDR surface is extended sRGB, so not Display P3 HDR)
HDR PQ Rec.2100-PQ - Display
HDR HLG Rec.2100-HLG - Display
Linux, Windows, or RV_DISABLE_METAL_VIEW the config's default display
Current source View
Display-referred video (the input color space's encoding is sdr-video, hdr-video, edr-video or display-linear) Video (colorimetric)
Scene-referred or log, SDR or EDR presentation ACES 2.0 - SDR 100 nits (Rec.709)
Scene-referred or log, PQ or HLG presentation ACES 2.0 - HDR 1000 nits (P3 D65)
  • The source's input color space is the one fix(ocio): give sources an OCIO input while an OCIO display is in use #160 assigns: file metadata first, then the config's file rules.
  • A display or view the config doesn't have falls back to the config's defaults.
  • Choosing a display/view in the menu still overrides this.
  • The presentation mode is read once at startup, the same way MetalView reads it (UTV_MACOS_PRESENTATION, then the Display/macosPresentation preference), because the view only picks up a change after a restart.
  • Studios that override ocio_node_from_media through rv_ocio_setup keep their own choice. The source's color space is passed to it as attributes["input_colorspace"].

The OCIODisplay node is also kept off while its display and view are set, as ocioDisplayEvent already does. Before, setting the view before the display logged DisplayViewTransform error. The display 'sRGB - Display' does not have view ....

Tested

Dev build on macOS, display turned on through the Active menu code path, with each presentation mode × synthetic PQ Rec.2020 / SDR Rec.709 / linear EXR:

  • All 12 cases chose the display, view and input in the tables above, with no OCIO errors.
  • PQ presentation with the synthetic PQ colour chart: the Export > Snapshot readback matches the source within 1 code value on every channel.

Not covered: the per-window display when a window moves to another screen, following the view when the current source changes, and EDR tone mapping (#151).

…ootage (#161)

Turning an OCIO display on used the config's default display and view
(sRGB, ACES SDR) whatever the macOS presentation mode and the footage.
In HDR PQ presentation that encoded sRGB into a PQ surface.

The display now matches the surface's color space: sRGB for SDR and EDR
(the EDR surface is extended sRGB), Rec.2100-PQ for PQ and Rec.2100-HLG
for HLG. The view follows the current source's color space: Video
(colorimetric) for display-referred video, the ACES 2.0 SDR or HDR 1000
nits view for scene-referred media. Anything the config lacks falls
back to its defaults, and choosing a display or view in the menu still
wins.

The OCIODisplay node is also kept off while its display and view are
set, as the menu already does, so it never builds a transform from a
view the display doesn't have.

Part of #155.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
@mcoliver
mcoliver force-pushed the feat/ocio-auto-display-view branch from bbade8e to a592c82 Compare October 26, 2026 02:48
@mcoliver
mcoliver merged commit a592c82 into main Oct 26, 2026
1 check passed
mcoliver added a commit that referenced this pull request Oct 27, 2026
…es on OCIO 2.6

With the macOS presentation set to HDR PQ or HLG and no OCIO display
chosen, an sRGB still went through the built-in sRGB display onto a
surface that expects Rec.2100, so it came out oversaturated and too
bright. The main window's display now switches to OCIO when a source
loads in those modes, which picks the Rec.2100 display and the view for
the footage (#161). A display the user turns OCIO off for stays off.

Two fixes on the way:

- PyOpenColorIO 2.6 returns (color space, rule index) from
  getColorSpaceFromFilepath(), and that tuple was used as the color
  space name. Sources classified by the file rules (a PNG, for example)
  got an OCIO input with an empty color space and the scene-referred
  view. They now get e.g. sRGB - Display and Video (colorimetric).
- The presentation mode only applies to the main window. NDI, SDI and
  other outputs got the Rec.2100-PQ display too; they now get the
  config's default display and no presentation warnings.

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant